From f07cedf04806b9d02d4754e37c7a81536ae30e33 Mon Sep 17 00:00:00 2001
From: Nicholas Marriott <nicholas.marriott@gmail.com>
Date: Wed, 10 Sep 2008 19:15:06 +0000
Subject: [PATCH] Rename some functions.

---
 cmd-respawn-window.c |  4 ++--
 screen.c             | 34 +++++++++++++++++-----------------
 server.c             |  6 +++---
 tmux.h               |  8 ++++----
 window-copy.c        |  6 +++---
 window-more.c        |  6 +++---
 window-scroll.c      |  6 +++---
 window.c             |  6 +++---
 8 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/cmd-respawn-window.c b/cmd-respawn-window.c
index e79c673e..37040715 100644
--- a/cmd-respawn-window.c
+++ b/cmd-respawn-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-respawn-window.c,v 1.4 2008-07-01 05:06:11 nicm Exp $ */
+/* $Id: cmd-respawn-window.c,v 1.5 2008-09-10 19:15:04 nicm Exp $ */
 
 /*
  * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -68,7 +68,7 @@ cmd_respawn_window_exec(struct cmd *self, struct cmd_ctx *ctx)
 		ctx->error(ctx, "respawn failed: %s:%d", s->name, wl->idx);
 		return;
 	}
-	screen_reset(&wl->window->base);
+	screen_reinit(&wl->window->base);
 
 	recalculate_sizes();
 	server_redraw_window(wl->window);
diff --git a/screen.c b/screen.c
index 8b4fc924..de643ab0 100644
--- a/screen.c
+++ b/screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.70 2008-09-10 18:59:29 nicm Exp $ */
+/* $Id: screen.c,v 1.71 2008-09-10 19:15:04 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -76,7 +76,7 @@
 
 /* Create a new screen. */
 void
-screen_create(struct screen *s, u_int dx, u_int dy, u_int hlimit)
+screen_init(struct screen *s, u_int dx, u_int dy, u_int hlimit)
 {
 	s->dx = dx;
 	s->dy = dy;
@@ -110,7 +110,7 @@ screen_create(struct screen *s, u_int dx, u_int dy, u_int hlimit)
 
 /* Reinitialise screen. */
 void
-screen_reset(struct screen *s)
+screen_reinit(struct screen *s)
 {
 	s->cx = 0;
 	s->cy = 0;
@@ -130,6 +130,20 @@ screen_reset(struct screen *s)
 	screen_clear_selection(s);	
 }
 
+/* Destroy a screen. */
+void
+screen_free(struct screen *s)
+{
+	utf8_free(&s->utf8_table);
+	xfree(s->title);
+	screen_free_lines(s, 0, s->dy + s->hsize);
+	xfree(s->grid_data);
+	xfree(s->grid_attr);
+	xfree(s->grid_fg);
+	xfree(s->grid_bg);
+	xfree(s->grid_size);
+}
+
 /* Resize screen. */
 void
 screen_resize(struct screen *s, u_int sx, u_int sy)
@@ -294,20 +308,6 @@ screen_set_cell(struct screen *s,
 	s->grid_bg[cy][cx] = bg;
 }
 
-/* Destroy a screen. */
-void
-screen_destroy(struct screen *s)
-{
-	utf8_free(&s->utf8_table);
-	xfree(s->title);
-	screen_free_lines(s, 0, s->dy + s->hsize);
-	xfree(s->grid_data);
-	xfree(s->grid_attr);
-	xfree(s->grid_fg);
-	xfree(s->grid_bg);
-	xfree(s->grid_size);
-}
-
 /* Create a range of lines. */
 void
 screen_make_lines(struct screen *s, u_int py, u_int ny)
diff --git a/server.c b/server.c
index ed421922..d5bd5bab 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.79 2008-09-08 17:40:51 nicm Exp $ */
+/* $Id: server.c,v 1.80 2008-09-10 19:15:04 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -339,7 +339,7 @@ server_check_redraw(struct client *c)
 			 * screen, this can't use anything which relies on
 			 * cursor position.
 			 */
-			screen_create(&screen, xx, yy, 0);
+			screen_init(&screen, xx, yy, 0);
 			screen_redraw_start(&ctx, &screen, tty_write_client, c);
 			if (sx < xx)
 				screen_redraw_columns(&ctx, sx, xx - sx);
@@ -349,7 +349,7 @@ server_check_redraw(struct client *c)
 				screen_redraw_lines(&ctx, sy, yy - sy);
 			}
 			screen_redraw_stop(&ctx);
-			screen_destroy(&screen);
+			screen_free(&screen);
 		}
 
 		screen_redraw_start_client(&ctx, c);
diff --git a/tmux.h b/tmux.h
index fc1943b9..ccf87657 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.187 2008-09-10 18:59:29 nicm Exp $ */
+/* $Id: tmux.h,v 1.188 2008-09-10 19:15:04 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1255,9 +1255,9 @@ void	screen_redraw_lines(struct screen_redraw_ctx *, u_int, u_int);
 void	screen_redraw_columns(struct screen_redraw_ctx *, u_int, u_int);
 
 /* screen.c */
-void	 screen_create(struct screen *, u_int, u_int, u_int);
-void	 screen_reset(struct screen *);
-void	 screen_destroy(struct screen *);
+void	 screen_init(struct screen *, u_int, u_int, u_int);
+void	 screen_reinit(struct screen *);
+void	 screen_free(struct screen *);
 void	 screen_resize(struct screen *, u_int, u_int);
 void	 screen_expand_line(struct screen *, u_int, u_int);
 void	 screen_reduce_line(struct screen *, u_int, u_int);
diff --git a/window-copy.c b/window-copy.c
index 192f6a20..51d53e4a 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -1,4 +1,4 @@
-/* $Id: window-copy.c,v 1.29 2008-09-08 17:40:51 nicm Exp $ */
+/* $Id: window-copy.c,v 1.30 2008-09-10 19:15:04 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -97,7 +97,7 @@ window_copy_init(struct window *w)
 	data->cy = w->base.cy;
 
 	s = &data->screen;
-	screen_create(s, screen_size_x(&w->base), screen_size_y(&w->base), 0);
+	screen_init(s, screen_size_x(&w->base), screen_size_y(&w->base), 0);
 	s->cx = data->cx;
 	s->cy = data->cy;
 
@@ -115,7 +115,7 @@ window_copy_free(struct window *w)
 {
 	struct window_copy_mode_data	*data = w->modedata;
 
-	screen_destroy(&data->screen);
+	screen_free(&data->screen);
 	xfree(data);
 }
 
diff --git a/window-more.c b/window-more.c
index 2a688497..65a926ed 100644
--- a/window-more.c
+++ b/window-more.c
@@ -1,4 +1,4 @@
-/* $Id: window-more.c,v 1.17 2008-09-08 17:40:51 nicm Exp $ */
+/* $Id: window-more.c,v 1.18 2008-09-10 19:15:04 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -92,7 +92,7 @@ window_more_init(struct window *w)
 	data->top = 0;
 
 	s = &data->screen;
-	screen_create(s, screen_size_x(&w->base), screen_size_y(&w->base), 0);
+	screen_init(s, screen_size_x(&w->base), screen_size_y(&w->base), 0);
 	s->mode &= ~MODE_CURSOR;
 
 	return (s);
@@ -108,7 +108,7 @@ window_more_free(struct window *w)
 		xfree(ARRAY_ITEM(&data->list, i));
 	ARRAY_FREE(&data->list);
 
-	screen_destroy(&data->screen);
+	screen_free(&data->screen);
 	xfree(data);
 }
 
diff --git a/window-scroll.c b/window-scroll.c
index d76cf71c..09f5b1e7 100644
--- a/window-scroll.c
+++ b/window-scroll.c
@@ -1,4 +1,4 @@
-/* $Id: window-scroll.c,v 1.22 2008-09-08 17:40:51 nicm Exp $ */
+/* $Id: window-scroll.c,v 1.23 2008-09-10 19:15:05 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -65,7 +65,7 @@ window_scroll_init(struct window *w)
 	data->oy = 0;
 
 	s = &data->screen;
-	screen_create(s, screen_size_x(&w->base), screen_size_y(&w->base), 0);
+	screen_init(s, screen_size_x(&w->base), screen_size_y(&w->base), 0);
 	s->mode &= ~MODE_CURSOR;
 
 	screen_write_start(&ctx, s, NULL, NULL);
@@ -81,7 +81,7 @@ window_scroll_free(struct window *w)
 {
 	struct window_scroll_mode_data	*data = w->modedata;
 
-	screen_destroy(&data->screen);
+	screen_free(&data->screen);
 	xfree(data);
 }
 
diff --git a/window.c b/window.c
index 667cbc50..d2454fba 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.48 2008-07-01 20:35:16 nicm Exp $ */
+/* $Id: window.c,v 1.49 2008-09-10 19:15:06 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -182,7 +182,7 @@ window_create(const char *name,
 	w->flags = 0;
 
 	w->limitx = w->limity = UINT_MAX;
-	screen_create(&w->base, sx, sy, hlimit);
+	screen_init(&w->base, sx, sy, hlimit);
 	w->screen = &w->base;
 
 	input_init(w);
@@ -282,7 +282,7 @@ window_destroy(struct window *w)
 	input_free(w);
 
 	window_reset_mode(w);
-	screen_destroy(&w->base);
+	screen_free(&w->base);
 
 	buffer_destroy(w->in);
 	buffer_destroy(w->out);