diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-03-31 21:42:28 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-03-31 21:42:28 +0000 |
commit | 0ed8aeafd6bb194e076026d9bc8c2d533ddabd14 (patch) | |
tree | ba1030fba7d393a68a6635a4783ad00acb5cb16f | |
parent | 9e91af1981f37954834b37ac955d4bbed57a51f2 (diff) |
GRID_DEBUG is no longer needed.
-rw-r--r-- | usr.bin/tmux/grid-view.c | 24 | ||||
-rw-r--r-- | usr.bin/tmux/grid.c | 20 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 12 |
3 files changed, 3 insertions, 53 deletions
diff --git a/usr.bin/tmux/grid-view.c b/usr.bin/tmux/grid-view.c index 32c36a7d978..6c2442df9cf 100644 --- a/usr.bin/tmux/grid-view.c +++ b/usr.bin/tmux/grid-view.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid-view.c,v 1.14 2013/03/25 10:05:35 nicm Exp $ */ +/* $OpenBSD: grid-view.c,v 1.15 2014/03/31 21:42:27 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -59,8 +59,6 @@ grid_view_clear_history(struct grid *gd) struct grid_line *gl; u_int yy, last; - GRID_DEBUG(gd, ""); - /* Find the last used line. */ last = 0; for (yy = 0; yy < gd->sy; yy++) { @@ -82,8 +80,6 @@ grid_view_clear_history(struct grid *gd) void grid_view_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny) { - GRID_DEBUG(gd, "px=%u, py=%u, nx=%u, ny=%u", px, py, nx, ny); - px = grid_view_x(gd, px); py = grid_view_y(gd, py); @@ -94,8 +90,6 @@ grid_view_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny) void grid_view_scroll_region_up(struct grid *gd, u_int rupper, u_int rlower) { - GRID_DEBUG(gd, "rupper=%u, rlower=%u", rupper, rlower); - if (gd->flags & GRID_HISTORY) { grid_collect_history(gd); if (rupper == 0 && rlower == gd->sy - 1) @@ -116,8 +110,6 @@ grid_view_scroll_region_up(struct grid *gd, u_int rupper, u_int rlower) void grid_view_scroll_region_down(struct grid *gd, u_int rupper, u_int rlower) { - GRID_DEBUG(gd, "rupper=%u, rlower=%u", rupper, rlower); - rupper = grid_view_y(gd, rupper); rlower = grid_view_y(gd, rlower); @@ -130,8 +122,6 @@ grid_view_insert_lines(struct grid *gd, u_int py, u_int ny) { u_int sy; - GRID_DEBUG(gd, "py=%u, ny=%u", py, ny); - py = grid_view_y(gd, py); sy = grid_view_y(gd, gd->sy); @@ -145,8 +135,6 @@ grid_view_insert_lines_region(struct grid *gd, u_int rlower, u_int py, u_int ny) { u_int ny2; - GRID_DEBUG(gd, "rlower=%u, py=%u, ny=%u", rlower, py, ny); - rlower = grid_view_y(gd, rlower); py = grid_view_y(gd, py); @@ -162,8 +150,6 @@ grid_view_delete_lines(struct grid *gd, u_int py, u_int ny) { u_int sy; - GRID_DEBUG(gd, "py=%u, ny=%u", py, ny); - py = grid_view_y(gd, py); sy = grid_view_y(gd, gd->sy); @@ -178,8 +164,6 @@ grid_view_delete_lines_region(struct grid *gd, u_int rlower, u_int py, u_int ny) { u_int ny2; - GRID_DEBUG(gd, "rlower=%u, py=%u, ny=%u", rlower, py, ny); - rlower = grid_view_y(gd, rlower); py = grid_view_y(gd, py); @@ -195,8 +179,6 @@ grid_view_insert_cells(struct grid *gd, u_int px, u_int py, u_int nx) { u_int sx; - GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx); - px = grid_view_x(gd, px); py = grid_view_y(gd, py); @@ -214,8 +196,6 @@ grid_view_delete_cells(struct grid *gd, u_int px, u_int py, u_int nx) { u_int sx; - GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx); - px = grid_view_x(gd, px); py = grid_view_y(gd, py); @@ -229,8 +209,6 @@ grid_view_delete_cells(struct grid *gd, u_int px, u_int py, u_int nx) char * grid_view_string_cells(struct grid *gd, u_int px, u_int py, u_int nx) { - GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx); - px = grid_view_x(gd, px); py = grid_view_y(gd, py); diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c index 5d147845b86..6c00ca0f3ed 100644 --- a/usr.bin/tmux/grid.c +++ b/usr.bin/tmux/grid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid.c,v 1.35 2014/02/14 13:59:01 nicm Exp $ */ +/* $OpenBSD: grid.c,v 1.36 2014/03/31 21:42:27 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -151,8 +151,6 @@ grid_collect_history(struct grid *gd) { u_int yy; - GRID_DEBUG(gd, ""); - if (gd->hsize < gd->hlimit) return; @@ -173,8 +171,6 @@ grid_scroll_history(struct grid *gd) { u_int yy; - GRID_DEBUG(gd, ""); - yy = gd->hsize + gd->sy; gd->linedata = xrealloc(gd->linedata, yy + 1, sizeof *gd->linedata); memset(&gd->linedata[yy], 0, sizeof gd->linedata[yy]); @@ -189,8 +185,6 @@ grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower) struct grid_line *gl_history, *gl_upper, *gl_lower; u_int yy; - GRID_DEBUG(gd, "upper=%u, lower=%u", upper, lower); - /* Create a space for a new line. */ yy = gd->hsize + gd->sy; gd->linedata = xrealloc(gd->linedata, yy + 1, sizeof *gd->linedata); @@ -282,8 +276,6 @@ grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny) { u_int xx, yy; - GRID_DEBUG(gd, "px=%u, py=%u, nx=%u, ny=%u", px, py, nx, ny); - if (nx == 0 || ny == 0) return; @@ -319,8 +311,6 @@ grid_clear_lines(struct grid *gd, u_int py, u_int ny) struct grid_line *gl; u_int yy; - GRID_DEBUG(gd, "py=%u, ny=%u", py, ny); - if (ny == 0) return; @@ -342,8 +332,6 @@ grid_move_lines(struct grid *gd, u_int dy, u_int py, u_int ny) { u_int yy; - GRID_DEBUG(gd, "dy=%u, py=%u, ny=%u", dy, py, ny); - if (ny == 0 || py == dy) return; @@ -381,8 +369,6 @@ grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx) struct grid_line *gl; u_int xx; - GRID_DEBUG(gd, "dx=%u, px=%u, py=%u, nx=%u", dx, px, py, nx); - if (nx == 0 || px == dx) return; @@ -592,8 +578,6 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx, u_int xx; const struct grid_line *gl; - GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx); - if (lastgc != NULL && *lastgc == NULL) { memcpy(&lastgc1, &grid_default_cell, sizeof lastgc1); *lastgc = &lastgc1; @@ -661,8 +645,6 @@ grid_duplicate_lines(struct grid *dst, u_int dy, struct grid *src, u_int sy, struct grid_line *dstl, *srcl; u_int yy; - GRID_DEBUG(src, "dy=%u, sy=%u, ny=%u", dy, sy, ny); - if (dy + ny > dst->hsize + dst->sy) ny = dst->hsize + dst->sy - dy; if (sy + ny > src->hsize + src->sy) diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index d2d53d942fd..b5ecf6788f5 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.444 2014/03/31 21:42:05 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.445 2014/03/31 21:42:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -663,16 +663,6 @@ struct utf8_data { u_int width; }; -/* Grid output. */ -#if defined(DEBUG) && \ - ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__GNUC__) && __GNUC__ >= 3)) -#define GRID_DEBUG(gd, fmt, ...) log_debug2("%s: (sx=%u, sy=%u, hsize=%u) " \ - fmt, __func__, (gd)->sx, (gd)->sy, (gd)->hsize, ## __VA_ARGS__) -#else -#define GRID_DEBUG(...) -#endif - /* Grid attributes. */ #define GRID_ATTR_BRIGHT 0x1 #define GRID_ATTR_DIM 0x2 |