rendered paste bodydiff -uNr tmux-1.1.orig/cmd-pipe-pane.c tmux-1.1/cmd-pipe-pane.c--- tmux-1.1.orig/cmd-pipe-pane.c 2009-10-23 19:26:40.000000000 +0200+++ tmux-1.1/cmd-pipe-pane.c 2010-01-06 23:09:41.000000000 +0100@@ -121,5 +121,5 @@ return (0); } - return (0);+ /* NOTREACHED */ }diff -uNr tmux-1.1.orig/cmd-run-shell.c tmux-1.1/cmd-run-shell.c--- tmux-1.1.orig/cmd-run-shell.c 2009-11-02 22:38:26.000000000 +0100+++ tmux-1.1/cmd-run-shell.c 2010-01-06 21:11:02.000000000 +0100@@ -81,7 +81,7 @@ size_t off, len, llen; int retcode; - buf = BUFFER_OUT(job->out);+ buf = (char *)BUFFER_OUT(job->out); len = BUFFER_USED(job->out); cmd = cdata->cmd;diff -uNr tmux-1.1.orig/cmd-select-prompt.c tmux-1.1/cmd-select-prompt.c--- tmux-1.1.orig/cmd-select-prompt.c 2009-08-19 15:47:10.000000000 +0200+++ tmux-1.1/cmd-select-prompt.c 2010-01-06 22:43:34.000000000 +0100@@ -78,7 +78,7 @@ if (winlink_find_by_index(&c->session->windows, idx) == NULL) { xsnprintf(msg, sizeof msg,- "Window not found: %s:%d", c->session->name, idx);+ "Window not found: %s:%u", c->session->name, idx); status_message_set(c, "%s", msg); return (0); }diff -uNr tmux-1.1.orig/cmd-set-buffer.c tmux-1.1/cmd-set-buffer.c--- tmux-1.1.orig/cmd-set-buffer.c 2009-09-08 01:48:54.000000000 +0200+++ tmux-1.1/cmd-set-buffer.c 2010-01-06 20:15:47.000000000 +0100@@ -52,8 +52,8 @@ return (-1); limit = options_get_number(&s->options, "buffer-limit"); - pdata = xstrdup(data->arg);- psize = strlen(pdata);+ pdata = (u_char *)xstrdup(data->arg);+ psize = strlen((const char *)pdata); if (data->buffer == -1) { paste_add(&s->buffers, pdata, psize, limit);diff -uNr tmux-1.1.orig/cmd-set-option.c tmux-1.1/cmd-set-option.c--- tmux-1.1.orig/cmd-set-option.c 2009-11-02 22:38:26.000000000 +0100+++ tmux-1.1/cmd-set-option.c 2010-01-06 20:17:56.000000000 +0100@@ -97,7 +97,7 @@ { "visual-activity", SET_OPTION_FLAG, 0, 0, NULL }, { "visual-bell", SET_OPTION_FLAG, 0, 0, NULL }, { "visual-content", SET_OPTION_FLAG, 0, 0, NULL },- { NULL, 0, 0, 0, NULL }+ { NULL } }; intdiff -uNr tmux-1.1.orig/cmd-set-window-option.c tmux-1.1/cmd-set-window-option.c--- tmux-1.1.orig/cmd-set-window-option.c 2009-10-09 15:07:04.000000000 +0200+++ tmux-1.1/cmd-set-window-option.c 2010-01-06 20:18:25.000000000 +0100@@ -73,7 +73,7 @@ { "window-status-current-fg", SET_OPTION_COLOUR, 0, 0, NULL }, { "window-status-fg", SET_OPTION_COLOUR, 0, 0, NULL }, { "xterm-keys", SET_OPTION_FLAG, 0, 0, NULL },- { NULL, 0, 0, 0, NULL }+ { NULL } }; intdiff -uNr tmux-1.1.orig/colour.c tmux-1.1/colour.c--- tmux-1.1.orig/colour.c 2009-09-11 16:13:52.000000000 +0200+++ tmux-1.1/colour.c 2010-01-06 22:45:21.000000000 +0100@@ -50,7 +50,7 @@ static char s[32]; if (c & 0x100) {- xsnprintf(s, sizeof s, "colour%u", c & ~0x100);+ xsnprintf(s, sizeof s, "colour%d", c & ~0x100); return (s); } diff -uNr tmux-1.1.orig/environ.c tmux-1.1/environ.c--- tmux-1.1.orig/environ.c 2009-08-19 15:47:12.000000000 +0200+++ tmux-1.1/environ.c 2010-01-06 22:45:45.000000000 +0100@@ -27,7 +27,7 @@ * Environment - manipulate a set of environment variables. */ -RB_GENERATE(environ, environ_entry, entry, environ_cmp);+RB_GENERATE(environ, environ_entry, entry, environ_cmp) int environ_cmp(struct environ_entry *envent1, struct environ_entry *envent2)diff -uNr tmux-1.1.orig/input.c tmux-1.1/input.c--- tmux-1.1.orig/input.c 2009-10-29 00:12:38.000000000 +0100+++ tmux-1.1/input.c 2010-01-06 22:52:04.000000000 +0100@@ -166,7 +166,7 @@ if (*arg->data == '\0') return (0); - *n = strtonum(arg->data, 0, UINT16_MAX, &errstr);+ *n = strtonum((const char*)arg->data, 0, UINT16_MAX, &errstr); if (errstr != NULL) return (-1); return (0);@@ -209,7 +209,7 @@ if (ictx->string_buf == NULL || input_add_string(ictx, '\0') != 0) return (xstrdup("")); - s = ictx->string_buf;+ s = (char *)ictx->string_buf; ictx->string_buf = NULL; return (s); }@@ -802,7 +802,7 @@ for (i = 0; i < ARRAY_LENGTH(&ictx->args); i++) { iarg = &ARRAY_ITEM(&ictx->args, i); if (*iarg->data != '\0')- log_debug2(" ++ %u: %s", i, iarg->data);+ log_debug2(" ++ %u: %s", i, (char *)iarg->data); } find.ch = ch;@@ -1199,7 +1199,7 @@ wp->flags |= PANE_REDRAW; break; default:- log_debug("unknown SM [%hhu]: %u", ictx->private, n);+ log_debug("unknown SM [%hhu]: %d", ictx->private, n); break; } } else {@@ -1212,7 +1212,7 @@ /* Cursor high visibility not supported. */ break; default:- log_debug("unknown SM [%hhu]: %u", ictx->private, n);+ log_debug("unknown SM [%hhu]: %d", ictx->private, n); break; } }@@ -1292,7 +1292,7 @@ wp->flags |= PANE_REDRAW; break; default:- log_debug("unknown RM [%hhu]: %u", ictx->private, n);+ log_debug("unknown RM [%hhu]: %d", ictx->private, n); break; } } else if (ictx->private == '\0') {@@ -1305,7 +1305,7 @@ /* Cursor high visibility not supported. */ break; default:- log_debug("unknown RM [%hhu]: %u", ictx->private, n);+ log_debug("unknown RM [%hhu]: %d", ictx->private, n); break; } }diff -uNr tmux-1.1.orig/job.c tmux-1.1/job.c--- tmux-1.1.orig/job.c 2009-11-02 22:38:26.000000000 +0100+++ tmux-1.1/job.c 2010-01-06 23:09:17.000000000 +0100@@ -32,7 +32,7 @@ /* All jobs list. */ struct joblist all_jobs = SLIST_HEAD_INITIALIZER(&all_jobs); -RB_GENERATE(jobs, job, entry, job_cmp);+RB_GENERATE(jobs, job, entry, job_cmp) int job_cmp(struct job *job1, struct job *job2)diff -uNr tmux-1.1.orig/key-bindings.c tmux-1.1/key-bindings.c--- tmux-1.1.orig/key-bindings.c 2009-10-06 16:14:07.000000000 +0200+++ tmux-1.1/key-bindings.c 2010-01-06 22:52:31.000000000 +0100@@ -24,7 +24,7 @@ #include "tmux.h" -SPLAY_GENERATE(key_bindings, key_binding, entry, key_bindings_cmp);+SPLAY_GENERATE(key_bindings, key_binding, entry, key_bindings_cmp) struct key_bindings key_bindings; struct key_bindings dead_key_bindings;diff -uNr tmux-1.1.orig/key-string.c tmux-1.1/key-string.c--- tmux-1.1.orig/key-string.c 2009-10-28 23:53:03.000000000 +0100+++ tmux-1.1/key-string.c 2010-01-06 20:25:17.000000000 +0100@@ -112,9 +112,9 @@ ptr = NULL; if ((string[0] == 'C' || string[0] == 'c') && string[1] == '-')- ptr = string + 2;+ ptr = (const u_char *)string + 2; else if (string[0] == '^')- ptr = string + 1;+ ptr = (const u_char *)string + 1; if (ptr != NULL) { if (ptr[0] == '\0') return (KEYC_NONE);@@ -129,14 +129,14 @@ return (ptr[0] - 96); return (KEYC_NONE); }- key = key_string_search_table(ptr);+ key = key_string_search_table((const char *)ptr); if (key != KEYC_NONE) return (key | KEYC_CTRL); return (KEYC_NONE); } if ((string[0] == 'M' || string[0] == 'm') && string[1] == '-') {- ptr = string + 2;+ ptr = (const u_char *)string + 2; if (ptr[0] == '\0') return (KEYC_NONE); if (ptr[1] == '\0') {@@ -144,13 +144,13 @@ return (KEYC_NONE); return (ptr[0] | KEYC_ESCAPE); }- key = key_string_lookup_string(ptr);+ key = key_string_lookup_string((const char *)ptr); if (key != KEYC_NONE) return (key | KEYC_ESCAPE); return (KEYC_NONE); } - return (key_string_search_table(string));+ return (key_string_search_table((const char *)string)); } const char *diff -uNr tmux-1.1.orig/layout.c tmux-1.1/layout.c--- tmux-1.1.orig/layout.c 2009-08-19 15:47:14.000000000 +0200+++ tmux-1.1/layout.c 2010-01-06 22:11:43.000000000 +0100@@ -86,7 +86,7 @@ struct layout_cell *lcchild; log_debug(- "%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n, " ", lc,+ "%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, (int)n, " ", lc, lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx, lc->sy); switch (lc->type) { case LAYOUT_LEFTRIGHT:diff -uNr tmux-1.1.orig/mode-key.c tmux-1.1/mode-key.c--- tmux-1.1.orig/mode-key.c 2009-10-15 03:52:47.000000000 +0200+++ tmux-1.1/mode-key.c 2010-01-06 22:52:57.000000000 +0100@@ -59,7 +59,7 @@ { MODEKEYEDIT_SWITCHMODEAPPEND, "switch-mode-append" }, { MODEKEYEDIT_TRANSPOSECHARS, "transpose-chars" }, - { 0, NULL }+ { MODEKEY_NONE, 0 } }; /* Choice keys command strings. */@@ -71,7 +71,7 @@ { MODEKEYCHOICE_PAGEUP, "page-up" }, { MODEKEYCHOICE_UP, "up" }, - { 0, NULL }+ { MODEKEY_NONE, NULL } }; /* Copy keys command strings. */@@ -101,7 +101,7 @@ { MODEKEYCOPY_TOPLINE, "top-line" }, { MODEKEYCOPY_UP, "cursor-up" }, - { 0, NULL }+ { MODEKEY_NONE, NULL } }; /* vi editing keys. */@@ -136,7 +136,7 @@ { KEYC_RIGHT, 1, MODEKEYEDIT_CURSORRIGHT }, { KEYC_UP, 1, MODEKEYEDIT_HISTORYUP }, - { 0, -1, 0 }+ { 0, -1, MODEKEY_NONE } }; struct mode_key_tree mode_key_tree_vi_edit; @@ -152,7 +152,7 @@ { KEYC_PPAGE, 0, MODEKEYCHOICE_PAGEUP }, { KEYC_UP, 0, MODEKEYCHOICE_UP }, - { 0, -1, 0 }+ { 0, -1, MODEKEY_NONE } }; struct mode_key_tree mode_key_tree_vi_choice; @@ -196,7 +196,7 @@ { KEYC_UP | KEYC_CTRL, 0, MODEKEYCOPY_SCROLLUP }, { KEYC_UP, 0, MODEKEYCOPY_UP }, - { 0, -1, 0 }+ { 0, -1, MODEKEY_NONE } }; struct mode_key_tree mode_key_tree_vi_copy; @@ -226,7 +226,7 @@ { KEYC_RIGHT, 0, MODEKEYEDIT_CURSORRIGHT }, { KEYC_UP, 0, MODEKEYEDIT_HISTORYUP }, - { 0, -1, 0 }+ { 0, -1, MODEKEY_NONE } }; struct mode_key_tree mode_key_tree_emacs_edit; @@ -245,7 +245,7 @@ { KEYC_PPAGE, 0, MODEKEYCHOICE_PAGEUP }, { KEYC_UP, 0, MODEKEYCHOICE_UP }, - { 0, -1, 0 }+ { 0, -1, MODEKEY_NONE } }; struct mode_key_tree mode_key_tree_emacs_choice; @@ -287,7 +287,7 @@ { KEYC_UP | KEYC_ESCAPE, 0, MODEKEYCOPY_HALFPAGEUP }, { KEYC_UP, 0, MODEKEYCOPY_UP }, - { 0, -1, 0 } + { 0, -1, MODEKEY_NONE } }; struct mode_key_tree mode_key_tree_emacs_copy; @@ -309,7 +309,7 @@ { NULL, NULL, NULL, NULL } }; -SPLAY_GENERATE(mode_key_tree, mode_key_binding, entry, mode_key_cmp);+SPLAY_GENERATE(mode_key_tree, mode_key_binding, entry, mode_key_cmp) int mode_key_cmp(struct mode_key_binding *mbind1, struct mode_key_binding *mbind2)diff -uNr tmux-1.1.orig/options.c tmux-1.1/options.c--- tmux-1.1.orig/options.c 2009-09-22 16:22:20.000000000 +0200+++ tmux-1.1/options.c 2010-01-06 22:53:21.000000000 +0100@@ -28,7 +28,7 @@ * a splay tree. */ -SPLAY_GENERATE(options_tree, options_entry, entry, options_cmp);+SPLAY_GENERATE(options_tree, options_entry, entry, options_cmp) int options_cmp(struct options_entry *o1, struct options_entry *o2)diff -uNr tmux-1.1.orig/paste.c tmux-1.1/paste.c--- tmux-1.1.orig/paste.c 2009-11-04 23:39:20.000000000 +0100+++ tmux-1.1/paste.c 2010-01-06 20:31:20.000000000 +0100@@ -114,7 +114,7 @@ pb = xmalloc(sizeof *pb); ARRAY_INSERT(ps, 0, pb); - pb->data = data;+ pb->data = (char *)data; pb->size = size; } @@ -129,7 +129,7 @@ pb = ARRAY_ITEM(ps, idx); xfree(pb->data); - pb->data = data;+ pb->data = (char *)data; pb->size = size; return (0);diff -uNr tmux-1.1.orig/screen-redraw.c tmux-1.1/screen-redraw.c--- tmux-1.1.orig/screen-redraw.c 2009-10-29 00:17:28.000000000 +0100+++ tmux-1.1/screen-redraw.c 2010-01-06 21:57:21.000000000 +0100@@ -180,9 +180,9 @@ /* Draw background and borders. */ tty_reset(tty);- strlcpy(border, " |-....--||+.", sizeof border);+ strlcpy((char *)border, " |-....--||+.", sizeof border); if (tty_term_has(tty->term, TTYC_ACSC)) {- base = " xqlkmjwvtun~";+ base = (u_char const *)" xqlkmjwvtun~"; for (ptr = base; *ptr != '\0'; ptr++) { if ((ch = tty_get_acs(tty, *ptr)) != '\0') border[ptr - base] = ch;diff -uNr tmux-1.1.orig/screen-write.c tmux-1.1/screen-write.c--- tmux-1.1.orig/screen-write.c 2009-10-23 19:16:24.000000000 +0200+++ tmux-1.1/screen-write.c 2010-01-06 20:34:41.000000000 +0100@@ -103,12 +103,12 @@ xvasprintf(&msg, fmt, ap); va_end(ap); - ptr = msg;+ ptr = (u_char *)msg; while (*ptr != '\0') { if (utf8flag && *ptr > 0x7f && utf8_open(&utf8data, *ptr)) { ptr++; - left = strlen(ptr);+ left = strlen((const char *)ptr); if (left < utf8data.size - 1) break; while (utf8_append(&utf8data, *ptr))@@ -161,12 +161,12 @@ xvasprintf(&msg, fmt, ap); - ptr = msg;+ ptr = (u_char *)msg; while (*ptr != '\0') { if (utf8flag && *ptr > 0x7f && utf8_open(&utf8data, *ptr)) { ptr++; - left = strlen(ptr);+ left = strlen((const char *)ptr); if (left < utf8data.size - 1) break; while (utf8_append(&utf8data, *ptr))@@ -217,18 +217,18 @@ memcpy(&lgc, gc, sizeof lgc); - ptr = msg;+ ptr = (u_char *)msg; while (*ptr != '\0') { if (ptr[0] == '#' && ptr[1] == '[') { ptr += 2;- last = ptr + strcspn(ptr, "]");+ last = ptr + strcspn((const char*)ptr, "]"); if (*last == '\0') { /* No ]. Not much point in doing anything. */ break; } *last = '\0'; - screen_write_parsestyle(gc, &lgc, ptr);+ screen_write_parsestyle(gc, &lgc, (const char*)ptr); ptr = last + 1; continue; }@@ -236,7 +236,7 @@ if (utf8flag && *ptr > 0x7f && utf8_open(&utf8data, *ptr)) { ptr++; - left = strlen(ptr);+ left = strlen((const char *)ptr); if (left < utf8data.size - 1) break; while (utf8_append(&utf8data, *ptr))diff -uNr tmux-1.1.orig/server-client.c tmux-1.1/server-client.c--- tmux-1.1.orig/server-client.c 2009-11-04 23:46:25.000000000 +0100+++ tmux-1.1/server-client.c 2010-01-06 22:54:34.000000000 +0100@@ -541,7 +541,7 @@ continue; } - log_debug("got %d from client %d", imsg.hdr.type, c->ibuf.fd);+ log_debug("got %u from client %d", imsg.hdr.type, c->ibuf.fd); switch (imsg.hdr.type) { case MSG_COMMAND: if (datalen != sizeof commanddata)diff -uNr tmux-1.1.orig/server-fn.c tmux-1.1/server-fn.c--- tmux-1.1.orig/server-fn.c 2009-10-12 02:37:41.000000000 +0200+++ tmux-1.1/server-fn.c 2010-01-06 23:10:12.000000000 +0100@@ -57,7 +57,7 @@ if (c->flags & CLIENT_BAD) return;- log_debug("writing %d to client %d", type, c->ibuf.fd);+ log_debug("writing %u to client %d", type, c->ibuf.fd); imsg_compose(ibuf, type, PROTOCOL_VERSION, -1, -1, (void *) buf, len); } diff -uNr tmux-1.1.orig/server-window.c tmux-1.1/server-window.c--- tmux-1.1.orig/server-window.c 2009-11-04 23:47:29.000000000 +0100+++ tmux-1.1/server-window.c 2010-01-06 22:58:11.000000000 +0100@@ -180,7 +180,7 @@ status_message_set(c, "Bell in current window"); continue; }- status_message_set(c, "Bell in window %u",+ status_message_set(c, "Bell in window %d", winlink_find_by_window(&s->windows, w)->idx); } break;@@ -232,7 +232,7 @@ c = ARRAY_ITEM(&clients, i); if (c == NULL || c->session != s) continue;- status_message_set(c, "Activity in window %u",+ status_message_set(c, "Activity in window %d", winlink_find_by_window(&s->windows, w)->idx); } }@@ -273,7 +273,7 @@ c = ARRAY_ITEM(&clients, i); if (c == NULL || c->session != s) continue;- status_message_set(c, "Content in window %u",+ status_message_set(c, "Content in window %d", winlink_find_by_window(&s->windows, w)->idx); } }diff -uNr tmux-1.1.orig/server.c tmux-1.1/server.c--- tmux-1.1.orig/server.c 2009-11-04 23:42:31.000000000 +0100+++ tmux-1.1/server.c 2010-01-06 22:58:40.000000000 +0100@@ -61,8 +61,8 @@ struct pollfd *server_poll_flatten(int *); void server_poll_dispatch(struct pollfd *, int); void server_poll_reset(void);-RB_PROTOTYPE(poll_items, poll_item, entry, server_poll_cmp);-RB_GENERATE(poll_items, poll_item, entry, server_poll_cmp);+RB_PROTOTYPE(poll_items, poll_item, entry, server_poll_cmp)+RB_GENERATE(poll_items, poll_item, entry, server_poll_cmp) int server_create_socket(void); void server_callback(int, int, void *);diff -uNr tmux-1.1.orig/session.c tmux-1.1/session.c--- tmux-1.1.orig/session.c 2009-11-04 23:42:31.000000000 +0100+++ tmux-1.1/session.c 2010-01-06 21:03:01.000000000 +0100@@ -458,6 +458,7 @@ } fatalx("session group not found");+ /* NOTREACHED */ } /*diff -uNr tmux-1.1.orig/tmux.c tmux-1.1/tmux.c--- tmux-1.1.orig/tmux.c 2009-11-05 00:09:09.000000000 +0100+++ tmux-1.1/tmux.c 2010-01-06 23:12:08.000000000 +0100@@ -264,7 +264,7 @@ u_int uid; uid = getuid();- xsnprintf(base, MAXPATHLEN, "%s/tmux-%d", _PATH_TMP, uid);+ xsnprintf(base, MAXPATHLEN, "%s/tmux-%u", _PATH_TMP, uid); if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) return (NULL);@@ -638,7 +638,7 @@ if (datalen != 0) fatalx("bad MSG_VERSION size"); - log_warnx("protocol version mismatch (client %u, "+ log_warnx("protocol version mismatch (client %d, " "server %u)", PROTOCOL_VERSION, imsg.hdr.peerid); *retcode = 1; return (-1);diff -uNr tmux-1.1.orig/tmux.h tmux-1.1/tmux.h--- tmux-1.1.orig/tmux.h 2009-11-04 23:46:25.000000000 +0100+++ tmux-1.1/tmux.h 2010-01-06 23:23:27.000000000 +0100@@ -180,7 +180,7 @@ KEYC_KP_THREE, KEYC_KP_ENTER, KEYC_KP_ZERO,- KEYC_KP_PERIOD,+ KEYC_KP_PERIOD }; /* Termcap codes. */@@ -331,7 +331,7 @@ TTYC_SMSO, /* enter_standout_mode, so */ TTYC_SMUL, /* enter_underline_mode, us */ TTYC_VPA, /* row_address, cv */- TTYC_XENL, /* eat_newline_glitch, xn */+ TTYC_XENL /* eat_newline_glitch, xn */ }; #define NTTYCODE (TTYC_XENL + 1) @@ -340,7 +340,7 @@ TTYCODE_NONE = 0, TTYCODE_STRING, TTYCODE_NUMBER,- TTYCODE_FLAG,+ TTYCODE_FLAG }; /* Termcap code. */@@ -480,7 +480,7 @@ MODEKEYCOPY_STARTOFLINE, MODEKEYCOPY_STARTSELECTION, MODEKEYCOPY_TOPLINE,- MODEKEYCOPY_UP,+ MODEKEYCOPY_UP }; /* Entry in the default mode key tables. */@@ -630,7 +630,7 @@ enum { OPTIONS_STRING, OPTIONS_NUMBER,- OPTIONS_DATA,+ OPTIONS_DATA } type; char *str;@@ -1268,7 +1268,7 @@ extern struct mode_key_tree mode_key_tree_emacs_choice; extern struct mode_key_tree mode_key_tree_emacs_copy; int mode_key_cmp(struct mode_key_binding *, struct mode_key_binding *);-SPLAY_PROTOTYPE(mode_key_tree, mode_key_binding, entry, mode_key_cmp);+SPLAY_PROTOTYPE(mode_key_tree, mode_key_binding, entry, mode_key_cmp) const char *mode_key_tostring(struct mode_key_cmdstr *r, enum mode_key_cmd); enum mode_key_cmd mode_key_fromstring(struct mode_key_cmdstr *, const char *); const struct mode_key_table *mode_key_findtable(const char *);@@ -1279,7 +1279,7 @@ /* options.c */ int options_cmp(struct options_entry *, struct options_entry *);-SPLAY_PROTOTYPE(options_tree, options_entry, entry, options_cmp);+SPLAY_PROTOTYPE(options_tree, options_entry, entry, options_cmp) void options_init(struct options *, struct options *); void options_free(struct options *); struct options_entry *options_find1(struct options *, const char *);@@ -1298,7 +1298,7 @@ /* job.c */ extern struct joblist all_jobs; int job_cmp(struct job *, struct job *);-RB_PROTOTYPE(jobs, job, entry, job_cmp);+RB_PROTOTYPE(jobs, job, entry, job_cmp) void job_tree_init(struct jobs *); void job_tree_free(struct jobs *); struct job *job_get(struct jobs *, const char *);@@ -1311,7 +1311,7 @@ /* environ.c */ int environ_cmp(struct environ_entry *, struct environ_entry *);-RB_PROTOTYPE(environ, environ_entry, entry, environ_cmp);+RB_PROTOTYPE(environ, environ_entry, entry, environ_cmp) void environ_init(struct environ *); void environ_free(struct environ *); void environ_copy(struct environ *, struct environ *);@@ -1379,7 +1379,7 @@ /* tty-keys.c */ int tty_keys_cmp(struct tty_key *, struct tty_key *);-RB_PROTOTYPE(tty_keys, tty_key, entry, tty_keys_cmp);+RB_PROTOTYPE(tty_keys, tty_key, entry, tty_keys_cmp) void tty_keys_init(struct tty *); void tty_keys_free(struct tty *); int tty_keys_next(struct tty *, int *, struct mouse_event *);@@ -1560,7 +1560,7 @@ /* key-bindings.c */ extern struct key_bindings key_bindings; int key_bindings_cmp(struct key_binding *, struct key_binding *);-SPLAY_PROTOTYPE(key_bindings, key_binding, entry, key_bindings_cmp);+SPLAY_PROTOTYPE(key_bindings, key_binding, entry, key_bindings_cmp) struct key_binding *key_bindings_lookup(int); void key_bindings_add(int, int, struct cmd_list *); void key_bindings_remove(int);@@ -1782,8 +1782,8 @@ extern struct windows windows; int window_cmp(struct window *, struct window *); int winlink_cmp(struct winlink *, struct winlink *);-RB_PROTOTYPE(windows, window, entry, window_cmp);-RB_PROTOTYPE(winlinks, winlink, entry, winlink_cmp);+RB_PROTOTYPE(windows, window, entry, window_cmp)+RB_PROTOTYPE(winlinks, winlink, entry, winlink_cmp) struct winlink *winlink_find_by_index(struct winlinks *, int); struct winlink *winlink_find_by_window(struct winlinks *, struct window *); int winlink_next_index(struct winlinks *, int);diff -uNr tmux-1.1.orig/tty-keys.c tmux-1.1/tty-keys.c--- tmux-1.1.orig/tty-keys.c 2009-10-29 00:05:01.000000000 +0100+++ tmux-1.1/tty-keys.c 2010-01-06 23:04:59.000000000 +0100@@ -72,15 +72,15 @@ { TTYC_KCBT, NULL, KEYC_BTAB, TTYKEY_CTRL }, /* Arrow keys. */- { 0, "\033OA", KEYC_UP, TTYKEY_RAW },- { 0, "\033OB", KEYC_DOWN, TTYKEY_RAW },- { 0, "\033OC", KEYC_RIGHT, TTYKEY_RAW },- { 0, "\033OD", KEYC_LEFT, TTYKEY_RAW },-- { 0, "\033[A", KEYC_UP, TTYKEY_RAW },- { 0, "\033[B", KEYC_DOWN, TTYKEY_RAW },- { 0, "\033[C", KEYC_RIGHT, TTYKEY_RAW },- { 0, "\033[D", KEYC_LEFT, TTYKEY_RAW },+ { TTYC_AX, "\033OA", KEYC_UP, TTYKEY_RAW },+ { TTYC_AX, "\033OB", KEYC_DOWN, TTYKEY_RAW },+ { TTYC_AX, "\033OC", KEYC_RIGHT, TTYKEY_RAW },+ { TTYC_AX, "\033OD", KEYC_LEFT, TTYKEY_RAW },++ { TTYC_AX, "\033[A", KEYC_UP, TTYKEY_RAW },+ { TTYC_AX, "\033[B", KEYC_DOWN, TTYKEY_RAW },+ { TTYC_AX, "\033[C", KEYC_RIGHT, TTYKEY_RAW },+ { TTYC_AX, "\033[D", KEYC_LEFT, TTYKEY_RAW }, { TTYC_KCUU1, NULL, KEYC_UP, TTYKEY_CTRL }, { TTYC_KCUD1, NULL, KEYC_DOWN, TTYKEY_CTRL },@@ -88,37 +88,37 @@ { TTYC_KCUF1, NULL, KEYC_RIGHT, TTYKEY_CTRL }, /* Special-case arrow keys for rxvt until terminfo has kRIT5 etc. */- { 0, "\033Oa", KEYC_UP|KEYC_CTRL, TTYKEY_RAW },- { 0, "\033Ob", KEYC_DOWN|KEYC_CTRL, TTYKEY_RAW },- { 0, "\033Oc", KEYC_RIGHT|KEYC_CTRL, TTYKEY_RAW },- { 0, "\033Od", KEYC_LEFT|KEYC_CTRL, TTYKEY_RAW },-- { 0, "\033[a", KEYC_UP|KEYC_SHIFT, TTYKEY_RAW },- { 0, "\033[b", KEYC_DOWN|KEYC_SHIFT, TTYKEY_RAW },- { 0, "\033[c", KEYC_RIGHT|KEYC_SHIFT, TTYKEY_RAW },- { 0, "\033[d", KEYC_LEFT|KEYC_SHIFT, TTYKEY_RAW },+ { TTYC_AX, "\033Oa", KEYC_UP|KEYC_CTRL, TTYKEY_RAW },+ { TTYC_AX, "\033Ob", KEYC_DOWN|KEYC_CTRL, TTYKEY_RAW },+ { TTYC_AX, "\033Oc", KEYC_RIGHT|KEYC_CTRL, TTYKEY_RAW },+ { TTYC_AX, "\033Od", KEYC_LEFT|KEYC_CTRL, TTYKEY_RAW },++ { TTYC_AX, "\033[a", KEYC_UP|KEYC_SHIFT, TTYKEY_RAW },+ { TTYC_AX, "\033[b", KEYC_DOWN|KEYC_SHIFT, TTYKEY_RAW },+ { TTYC_AX, "\033[c", KEYC_RIGHT|KEYC_SHIFT, TTYKEY_RAW },+ { TTYC_AX, "\033[d", KEYC_LEFT|KEYC_SHIFT, TTYKEY_RAW }, /* * Numeric keypad. Just use the vt100 escape sequences here and always * put the terminal into keypad_xmit mode. Translation of numbers * mode/applications mode is done in input-keys.c. */- { 0, "\033Oo", KEYC_KP_SLASH, TTYKEY_RAW },- { 0, "\033Oj", KEYC_KP_STAR, TTYKEY_RAW },- { 0, "\033Om", KEYC_KP_MINUS, TTYKEY_RAW },- { 0, "\033Ow", KEYC_KP_SEVEN, TTYKEY_RAW },- { 0, "\033Ox", KEYC_KP_EIGHT, TTYKEY_RAW },- { 0, "\033Oy", KEYC_KP_NINE, TTYKEY_RAW },- { 0, "\033Ok", KEYC_KP_PLUS, TTYKEY_RAW },- { 0, "\033Ot", KEYC_KP_FOUR, TTYKEY_RAW },- { 0, "\033Ou", KEYC_KP_FIVE, TTYKEY_RAW },- { 0, "\033Ov", KEYC_KP_SIX, TTYKEY_RAW },- { 0, "\033Oq", KEYC_KP_ONE, TTYKEY_RAW },- { 0, "\033Or", KEYC_KP_TWO, TTYKEY_RAW },- { 0, "\033Os", KEYC_KP_THREE, TTYKEY_RAW },- { 0, "\033OM", KEYC_KP_ENTER, TTYKEY_RAW },- { 0, "\033Op", KEYC_KP_ZERO, TTYKEY_RAW },- { 0, "\033On", KEYC_KP_PERIOD, TTYKEY_RAW },+ { TTYC_AX, "\033Oo", KEYC_KP_SLASH, TTYKEY_RAW },+ { TTYC_AX, "\033Oj", KEYC_KP_STAR, TTYKEY_RAW },+ { TTYC_AX, "\033Om", KEYC_KP_MINUS, TTYKEY_RAW },+ { TTYC_AX, "\033Ow", KEYC_KP_SEVEN, TTYKEY_RAW },+ { TTYC_AX, "\033Ox", KEYC_KP_EIGHT, TTYKEY_RAW },+ { TTYC_AX, "\033Oy", KEYC_KP_NINE, TTYKEY_RAW },+ { TTYC_AX, "\033Ok", KEYC_KP_PLUS, TTYKEY_RAW },+ { TTYC_AX, "\033Ot", KEYC_KP_FOUR, TTYKEY_RAW },+ { TTYC_AX, "\033Ou", KEYC_KP_FIVE, TTYKEY_RAW },+ { TTYC_AX, "\033Ov", KEYC_KP_SIX, TTYKEY_RAW },+ { TTYC_AX, "\033Oq", KEYC_KP_ONE, TTYKEY_RAW },+ { TTYC_AX, "\033Or", KEYC_KP_TWO, TTYKEY_RAW },+ { TTYC_AX, "\033Os", KEYC_KP_THREE, TTYKEY_RAW },+ { TTYC_AX, "\033OM", KEYC_KP_ENTER, TTYKEY_RAW },+ { TTYC_AX, "\033Op", KEYC_KP_ZERO, TTYKEY_RAW },+ { TTYC_AX, "\033On", KEYC_KP_PERIOD, TTYKEY_RAW }, /* Key and modifier capabilities. */ { TTYC_KDC2, NULL, KEYC_DC|KEYC_SHIFT, 0 },@@ -183,7 +183,7 @@ { TTYC_KUP7, NULL, KEYC_UP|KEYC_ESCAPE|KEYC_CTRL, 0 }, }; -RB_GENERATE(tty_keys, tty_key, entry, tty_keys_cmp);+RB_GENERATE(tty_keys, tty_key, entry, tty_keys_cmp) struct tty_key *tty_keys_find(struct tty *, char *, size_t, size_t *); @@ -302,7 +302,7 @@ size_t len, size; cc_t bspace; - buf = BUFFER_OUT(tty->in);+ buf = (char *)BUFFER_OUT(tty->in); len = BUFFER_USED(tty->in); if (len == 0) return (1);diff -uNr tmux-1.1.orig/tty-term.c tmux-1.1/tty-term.c--- tmux-1.1.orig/tty-term.c 2009-10-29 00:01:44.000000000 +0100+++ tmux-1.1/tty-term.c 2010-01-06 23:06:15.000000000 +0100@@ -463,7 +463,7 @@ if (!tty_term_has(term, code)) return (""); if (term->codes[code].type != TTYCODE_STRING)- log_fatalx("not a string: %d", code);+ log_fatalx("not a string: %u", code); return (term->codes[code].value.string); } @@ -486,7 +486,7 @@ if (!tty_term_has(term, code)) return (0); if (term->codes[code].type != TTYCODE_NUMBER)- log_fatalx("not a number: %d", code);+ log_fatalx("not a number: %u", code); return (term->codes[code].value.number); } @@ -496,6 +496,6 @@ if (!tty_term_has(term, code)) return (0); if (term->codes[code].type != TTYCODE_FLAG)- log_fatalx("not a flag: %d", code);+ log_fatalx("not a flag: %u", code); return (term->codes[code].value.flag); }diff -uNr tmux-1.1.orig/tty.c tmux-1.1/tty.c--- tmux-1.1.orig/tty.c 2009-11-05 00:10:43.000000000 +0100+++ tmux-1.1/tty.c 2010-01-06 21:07:10.000000000 +0100@@ -1167,7 +1167,7 @@ * may add to (NOT remove) the desired attributes by changing new_attr. */ new_attr = gc->attr;- tty_colours(tty, gc, &new_attr);+ tty_colours(tty, gc, (int *)&new_attr); /* Filter out attribute bits already set. */ changed = new_attr & ~tc->attr;diff -uNr tmux-1.1.orig/window-copy.c tmux-1.1/window-copy.c--- tmux-1.1.orig/window-copy.c 2009-10-23 19:17:20.000000000 +0200+++ tmux-1.1/window-copy.c 2010-01-06 21:07:51.000000000 +0100@@ -81,7 +81,7 @@ WINDOW_COPY_OFF, WINDOW_COPY_SEARCHUP, WINDOW_COPY_SEARCHDOWN,- WINDOW_COPY_GOTOLINE,+ WINDOW_COPY_GOTOLINE }; struct window_copy_mode_data {@@ -884,7 +884,7 @@ /* Add the buffer to the stack. */ limit = options_get_number(&c->session->options, "buffer-limit");- paste_add(&c->session->buffers, buf, off, limit);+ paste_add(&c->session->buffers, (u_char *)buf, off, limit); } voiddiff -uNr tmux-1.1.orig/window.c tmux-1.1/window.c--- tmux-1.1.orig/window.c 2009-10-23 19:41:20.000000000 +0200+++ tmux-1.1/window.c 2010-01-06 23:07:12.000000000 +0100@@ -54,7 +54,7 @@ /* Global window list. */ struct windows windows; -RB_GENERATE(winlinks, winlink, entry, winlink_cmp);+RB_GENERATE(winlinks, winlink, entry, winlink_cmp) int winlink_cmp(struct winlink *wl1, struct winlink *wl2)