summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd-attach-session.c3
-rw-r--r--cmd-list-clients.c4
-rw-r--r--cmd-select-layout.c4
-rw-r--r--grid-view.c6
-rw-r--r--grid.c4
-rw-r--r--screen-write.c10
-rw-r--r--server.c14
-rw-r--r--status.c4
-rw-r--r--tmux.c5
-rw-r--r--tmux.h4
-rw-r--r--tools/fix-ids.sh4
-rw-r--r--tty.c4
-rw-r--r--xmalloc.c18
13 files changed, 27 insertions, 57 deletions
diff --git a/cmd-attach-session.c b/cmd-attach-session.c
index d2c2b988..898bf645 100644
--- a/cmd-attach-session.c
+++ b/cmd-attach-session.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-attach-session.c,v 1.25 2009-05-04 17:58:26 nicm Exp $ */
+/* $Id: cmd-attach-session.c,v 1.26 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -77,4 +77,3 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx)
return (1);
}
-
diff --git a/cmd-list-clients.c b/cmd-list-clients.c
index c2a0a66d..7cc3cea3 100644
--- a/cmd-list-clients.c
+++ b/cmd-list-clients.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-list-clients.c,v 1.15 2009-05-19 16:29:35 nicm Exp $ */
+/* $Id: cmd-list-clients.c,v 1.16 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -59,7 +59,7 @@ cmd_list_clients_exec(unused struct cmd *self, struct cmd_ctx *ctx)
else
s_utf8 = "";
ctx->print(ctx, "%s: %s [%ux%u %s]%s", c->tty.path,
- c->session->name, c->tty.sx, c->tty.sy,
+ c->session->name, c->tty.sx, c->tty.sy,
c->tty.termname, s_utf8);
}
diff --git a/cmd-select-layout.c b/cmd-select-layout.c
index 40709370..d2da21b1 100644
--- a/cmd-select-layout.c
+++ b/cmd-select-layout.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-select-layout.c,v 1.2 2009-05-18 21:32:36 nicm Exp $ */
+/* $Id: cmd-select-layout.c,v 1.3 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -78,7 +78,7 @@ cmd_select_layout_exec(struct cmd *self, struct cmd_ctx *ctx)
ctx->error(ctx, "unknown or ambiguous layout: %s", data->arg);
return (-1);
}
-
+
if (layout_select(wl->window, layout) == 0)
ctx->info(ctx, "layout now: %s", layout_name(wl->window));
diff --git a/grid-view.c b/grid-view.c
index f8ee44ff..2990bc56 100644
--- a/grid-view.c
+++ b/grid-view.c
@@ -1,4 +1,4 @@
-/* $Id: grid-view.c,v 1.13 2009-06-25 16:21:32 nicm Exp $ */
+/* $Id $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -133,7 +133,7 @@ grid_view_insert_lines(struct grid *gd, u_int py, u_int ny)
/* Insert lines in region. */
void
grid_view_insert_lines_region(
- struct grid *gd, u_int rupper, u_int rlower, u_int py, u_int ny)
+ struct grid *gd, unused u_int rupper, u_int rlower, u_int py, u_int ny)
{
GRID_DEBUG(
gd, "rupper=%u, rlower=%u, py=%u, ny=%u", rupper, rlower, py, ny);
@@ -163,7 +163,7 @@ grid_view_delete_lines(struct grid *gd, u_int py, u_int ny)
/* Delete lines inside scroll region. */
void
grid_view_delete_lines_region(
- struct grid *gd, u_int rupper, u_int rlower, u_int py, u_int ny)
+ struct grid *gd, unused u_int rupper, u_int rlower, u_int py, u_int ny)
{
GRID_DEBUG(
gd, "rupper=%u, rlower=%u, py=%u, ny=%u", rupper, rlower, py, ny);
diff --git a/grid.c b/grid.c
index 6d82877a..2ddbdcf2 100644
--- a/grid.c
+++ b/grid.c
@@ -1,4 +1,4 @@
-/* $Id: grid.c,v 1.20 2009-06-25 16:21:32 nicm Exp $ */
+/* $Id: grid.c,v 1.21 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -517,5 +517,3 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx)
buf[off] = '\0';
return (buf);
}
-
-
diff --git a/screen-write.c b/screen-write.c
index a60b126b..2bbfb296 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1,4 +1,4 @@
-/* $Id: screen-write.c,v 1.51 2009-06-25 16:21:32 nicm Exp $ */
+/* $Id $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -89,7 +89,7 @@ screen_write_strlen(int utf8flag, const char *fmt, ...)
size++;
ptr++;
}
- }
+ }
return (size);
}
@@ -148,7 +148,7 @@ screen_write_vnputs(struct screen_write_ctx *ctx, ssize_t maxlen,
*utf8buf = *ptr;
ptr++;
}
-
+
width = utf8_width(utf8buf);
if (maxlen > 0 && size + width > (size_t) maxlen) {
while (size < (size_t) maxlen) {
@@ -301,12 +301,12 @@ screen_write_alignmenttest(struct screen_write_ctx *ctx)
memcpy(&gc, &grid_default_cell, sizeof gc);
gc.data = 'E';
-
+
for (yy = 0; yy < screen_size_y(s); yy++) {
for (xx = 0; xx < screen_size_x(s); xx++)
grid_view_set_cell(s->grid, xx, yy, &gc);
}
-
+
s->cx = 0;
s->cy = 0;
diff --git a/server.c b/server.c
index fb886c20..a2d00a97 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.148 2009-06-25 16:21:32 nicm Exp $ */
+/* $Id: server.c,v 1.149 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -131,7 +131,7 @@ server_client_index(struct client *c)
int
server_start(char *path)
{
- int retcode, pair[2], srv_fd;
+ int pair[2], srv_fd;
char *cause;
#ifdef HAVE_SETPROCTITLE
char rpathbuf[MAXPATHLEN];
@@ -152,10 +152,6 @@ server_start(char *path)
}
close(pair[0]);
-#ifdef DEBUG
- xmalloc_clear();
-#endif
-
/*
* Must daemonise before loading configuration as the PID changes so
* $TMUX would be wrong for sessions created in the config file.
@@ -194,11 +190,7 @@ server_start(char *path)
srv_fd = server_create_socket();
server_create_client(pair[1]);
- retcode = server_main(srv_fd);
-#ifdef DEBUG
- xmalloc_report(getpid(), "server");
-#endif
- exit(retcode);
+ exit(server_main(srv_fd));
}
/* Create server socket. */
diff --git a/status.c b/status.c
index 82f66166..6b5bd5bf 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.87 2009-06-25 16:21:32 nicm Exp $ */
+/* $Id: status.c,v 1.88 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -847,7 +847,7 @@ status_prompt_key(struct client *c, int key)
c->prompt_index += n;
}
- c->flags |= CLIENT_STATUS;
+ c->flags |= CLIENT_STATUS;
break;
case MODEKEYCMD_CHOOSE:
if (*c->prompt_buffer != '\0') {
diff --git a/tmux.c b/tmux.c
index e09a5665..d20bd62a 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.134 2009-06-25 16:21:32 nicm Exp $ */
+/* $Id: tmux.c,v 1.135 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -504,8 +504,5 @@ out:
buffer_destroy(cctx.srv_in);
buffer_destroy(cctx.srv_out);
-#ifdef DEBUG
- xmalloc_report(getpid(), "client");
-#endif
return (retcode);
}
diff --git a/tmux.h b/tmux.h
index 8b169870..794220d1 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.341 2009-06-25 16:25:15 nicm Exp $ */
+/* $Id: tmux.h,v 1.342 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1684,4 +1684,4 @@ int printflike3 printpath(char *, size_t, const char *, ...);
char *xdirname(const char *);
char *xbasename(const char *);
-#endif
+#endif /* TMUX_H */
diff --git a/tools/fix-ids.sh b/tools/fix-ids.sh
index 66b78c26..39bec826 100644
--- a/tools/fix-ids.sh
+++ b/tools/fix-ids.sh
@@ -1,8 +1,8 @@
-# $Id: fix-ids.sh,v 1.1 2009-06-25 16:21:32 nicm Exp $
+# $Id: fix-ids.sh,v 1.2 2009-06-25 16:34:50 nicm Exp $
for i in *.[ch] tmux.1; do
(head -1 $i|grep '$OpenBSD' >/dev/null) || continue
mv $i $i~ || exit
- sed 's/\$OpenBSD.* \$/$Id: fix-ids.sh,v 1.1 2009-06-25 16:21:32 nicm Exp $/' $i~ >$i || exit
+ sed 's/\$OpenBSD.* \$/$\Id $/' $i~ >$i || exit
echo $i
done
diff --git a/tty.c b/tty.c
index 5848f69f..89ad38bf 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.106 2009-06-25 16:21:32 nicm Exp $ */
+/* $Id: tty.c,v 1.107 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -206,7 +206,7 @@ tty_stop_tty(struct tty *tty)
tty_raw(tty, tty_term_string(tty->term, TTYC_RMKX));
tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));
tty_raw(tty, tty_term_string(tty->term, TTYC_CLEAR));
-
+
tty_raw(tty, tty_term_string(tty->term, TTYC_CNORM));
if (tty_term_has(tty->term, TTYC_KMOUS))
tty_raw(tty, "\033[?1000l");
diff --git a/xmalloc.c b/xmalloc.c
index 986a017f..d71bec08 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,4 +1,4 @@
-/* $Id: xmalloc.c,v 1.8 2009-01-29 19:24:34 nicm Exp $ */
+/* $Id: xmalloc.c,v 1.9 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2004 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -50,9 +50,6 @@ xcalloc(size_t nmemb, size_t size)
if ((ptr = calloc(nmemb, size)) == NULL)
fatal("xcalloc failed");
-#ifdef DEBUG
- xmalloc_new(xmalloc_caller(), ptr, nmemb * size);
-#endif
return (ptr);
}
@@ -66,9 +63,6 @@ xmalloc(size_t size)
if ((ptr = malloc(size)) == NULL)
fatal("xmalloc failed");
-#ifdef DEBUG
- xmalloc_new(xmalloc_caller(), ptr, size);
-#endif
return (ptr);
}
@@ -85,9 +79,6 @@ xrealloc(void *oldptr, size_t nmemb, size_t size)
if ((newptr = realloc(oldptr, newsize)) == NULL)
fatal("xrealloc failed");
-#ifdef DEBUG
- xmalloc_change(xmalloc_caller(), oldptr, newptr, nmemb * size);
-#endif
return (newptr);
}
@@ -97,10 +88,6 @@ xfree(void *ptr)
if (ptr == NULL)
fatalx("null pointer");
free(ptr);
-
-#ifdef DEBUG
- xmalloc_free(ptr);
-#endif
}
int printflike2
@@ -125,9 +112,6 @@ xvasprintf(char **ret, const char *fmt, va_list ap)
if (i < 0 || *ret == NULL)
fatal("xvasprintf failed");
-#ifdef DEBUG
- xmalloc_new(xmalloc_caller(), *ret, i + 1);
-#endif
return (i);
}