CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: tnn Date: Tue Nov 3 10:52:58 UTC 2020 Modified Files: src/external/bsd/tmux/dist: tmux.h Log Message: tmux.h: annotate file_vprint() as printflike To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/bsd/tmux/dist/tmux.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/tmux.h diff -u src/external/bsd/tmux/dist/tmux.h:1.16 src/external/bsd/tmux/dist/tmux.h:1.17 --- src/external/bsd/tmux/dist/tmux.h:1.16 Sun Nov 1 15:16:05 2020 +++ src/external/bsd/tmux/dist/tmux.h Tue Nov 3 10:52:58 2020 @@ -2185,7 +2185,7 @@ void file_fire_done(struct client_file void file_fire_read(struct client_file *); int file_can_print(struct client *); void printflike(2, 3) file_print(struct client *, const char *, ...); -void file_vprint(struct client *, const char *, va_list); +void printflike(2, 0) file_vprint(struct client *, const char *, va_list); void file_print_buffer(struct client *, void *, size_t); void printflike(2, 3) file_error(struct client *, const char *, ...); void file_write(struct client *, const char *, int, const void *, size_t,
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Sun Apr 18 14:01:29 UTC 2021 Modified Files: src/external/bsd/tmux/dist: cmd-display-menu.c window-customize.c window-tree.c Log Message: fix the 32 bit build (I guess the authors don't have any 32 bit machines anymore) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/cmd-display-menu.c \ src/external/bsd/tmux/dist/window-customize.c cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tmux/dist/window-tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/cmd-display-menu.c diff -u src/external/bsd/tmux/dist/cmd-display-menu.c:1.2 src/external/bsd/tmux/dist/cmd-display-menu.c:1.3 --- src/external/bsd/tmux/dist/cmd-display-menu.c:1.2 Sat Apr 17 16:42:09 2021 +++ src/external/bsd/tmux/dist/cmd-display-menu.c Sun Apr 18 10:01:29 2021 @@ -155,7 +155,7 @@ cmd_display_menu_get_position(struct cli else format_add(ft, "popup_centre_x", "%ld", n); n = (tty->sy - 1) / 2 + h / 2; - if (n >= tty->sy) + if ((unsigned long)n >= tty->sy) format_add(ft, "popup_centre_y", "%u", tty->sy - h); else format_add(ft, "popup_centre_y", "%ld", n); @@ -188,7 +188,7 @@ cmd_display_menu_get_position(struct cli /* Position in pane. */ tty_window_offset(&tc->tty, &ox, &oy, &sx, &sy); n = top + wp->yoff - oy + h; - if (n >= tty->sy) + if ((unsigned long)n >= tty->sy) format_add(ft, "popup_pane_top", "%u", tty->sy - h); else format_add(ft, "popup_pane_top", "%ld", n); @@ -236,7 +236,7 @@ cmd_display_menu_get_position(struct cli yp = "#{popup_window_status_line_y}"; p = format_expand(ft, yp); n = strtol(p, NULL, 10); - if (n < h) + if ((unsigned long)n < h) n = 0; else n -= h; Index: src/external/bsd/tmux/dist/window-customize.c diff -u src/external/bsd/tmux/dist/window-customize.c:1.2 src/external/bsd/tmux/dist/window-customize.c:1.3 --- src/external/bsd/tmux/dist/window-customize.c:1.2 Sat Apr 17 16:42:10 2021 +++ src/external/bsd/tmux/dist/window-customize.c Sun Apr 18 10:01:29 2021 @@ -116,7 +116,7 @@ window_customize_get_tag(struct options_ uint64_t offset; if (oe == NULL) - return ((uint64_t)o); + return ((uintptr_t)o); offset = ((const char *)oe - (const char *)options_table) / sizeof *options_table; return ((2ULL << 62)|(offset << 32)|((idx + 1) << 1)|1); } @@ -484,7 +484,7 @@ window_customize_build_keys(struct windo item->idx = -1; expanded = format_expand(ft, data->format); - child = mode_tree_add(data->data, top, item, (uint64_t)bd, + child = mode_tree_add(data->data, top, item, (uintptr_t)bd, expanded, NULL, 0); free(expanded); Index: src/external/bsd/tmux/dist/window-tree.c diff -u src/external/bsd/tmux/dist/window-tree.c:1.8 src/external/bsd/tmux/dist/window-tree.c:1.9 --- src/external/bsd/tmux/dist/window-tree.c:1.8 Sat Apr 17 16:42:10 2021 +++ src/external/bsd/tmux/dist/window-tree.c Sun Apr 18 10:01:29 2021 @@ -1257,10 +1257,10 @@ window_tree_key(struct window_mode_entry data->offset++; break; case 'H': - mode_tree_expand(data->data, (uint64_t)fsp->s); - mode_tree_expand(data->data, (uint64_t)fsp->wl); - if (!mode_tree_set_current(data->data, (uint64_t)wme->wp)) - mode_tree_set_current(data->data, (uint64_t)fsp->wl); + mode_tree_expand(data->data, (uintptr_t)fsp->s); + mode_tree_expand(data->data, (uintptr_t)fsp->wl); + if (!mode_tree_set_current(data->data, (uintptr_t)wme->wp)) + mode_tree_set_current(data->data, (uintptr_t)fsp->wl); break; case 'm': window_tree_pull_item(item, &ns, &nwl, &nwp);
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: rillig Date: Mon Apr 19 21:52:17 UTC 2021 Modified Files: src/external/bsd/tmux/dist: control.c status.c Log Message: tmux: fix -Wformat-nonliteral for Clang dist/control.c:394:17: error: format string is not a string literal [-Werror,-Wformat-nonliteral] xvasprintf(&s, fmt, ap); ^~~ dist/status.c:436:33: error: format string is not a string literal [-Werror,-Wformat-nonliteral] xvasprintf(&c->message_string, fmt, ap); ^~~ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/control.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tmux/dist/status.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/control.c diff -u src/external/bsd/tmux/dist/control.c:1.2 src/external/bsd/tmux/dist/control.c:1.3 --- src/external/bsd/tmux/dist/control.c:1.2 Sat Apr 17 20:42:09 2021 +++ src/external/bsd/tmux/dist/control.c Mon Apr 19 21:52:17 2021 @@ -385,7 +385,7 @@ control_pause_pane(struct client *c, str } /* Write a line. */ -static void +static void __printflike(2, 0) control_vwrite(struct client *c, const char *fmt, va_list ap) { struct control_state *cs = c->control_state; Index: src/external/bsd/tmux/dist/status.c diff -u src/external/bsd/tmux/dist/status.c:1.11 src/external/bsd/tmux/dist/status.c:1.12 --- src/external/bsd/tmux/dist/status.c:1.11 Sat Apr 17 20:42:09 2021 +++ src/external/bsd/tmux/dist/status.c Mon Apr 19 21:52:17 2021 @@ -422,7 +422,7 @@ status_redraw(struct client *c) } /* Set a status line message. */ -void +void __printflike(5, 0) status_message_set(struct client *c, int delay, int ignore_styles, int ignore_keys, const char *fmt, ...) {
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: rillig Date: Tue Apr 20 17:42:31 UTC 2021 Modified Files: src/external/bsd/tmux/dist: status.c tmux.h Log Message: tmux: move __printflike to the declaration in the header Noted by Akihiko HAYASHI. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/external/bsd/tmux/dist/status.c cvs rdiff -u -r1.18 -r1.19 src/external/bsd/tmux/dist/tmux.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/status.c diff -u src/external/bsd/tmux/dist/status.c:1.12 src/external/bsd/tmux/dist/status.c:1.13 --- src/external/bsd/tmux/dist/status.c:1.12 Mon Apr 19 21:52:17 2021 +++ src/external/bsd/tmux/dist/status.c Tue Apr 20 17:42:31 2021 @@ -422,7 +422,7 @@ status_redraw(struct client *c) } /* Set a status line message. */ -void __printflike(5, 0) +void status_message_set(struct client *c, int delay, int ignore_styles, int ignore_keys, const char *fmt, ...) { Index: src/external/bsd/tmux/dist/tmux.h diff -u src/external/bsd/tmux/dist/tmux.h:1.18 src/external/bsd/tmux/dist/tmux.h:1.19 --- src/external/bsd/tmux/dist/tmux.h:1.18 Sat Apr 17 20:42:09 2021 +++ src/external/bsd/tmux/dist/tmux.h Tue Apr 20 17:42:31 2021 @@ -2492,7 +2492,8 @@ struct style_range *status_get_range(str void status_init(struct client *); void status_free(struct client *); int status_redraw(struct client *); -void status_message_set(struct client *, int, int, int, const char *, ...); +void status_message_set(struct client *, int, int, int, const char *, ...) + __printflike(5, 0); void status_message_clear(struct client *); int status_message_redraw(struct client *); void status_prompt_set(struct client *, struct cmd_find_state *,
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Fri May 7 11:11:11 UTC 2021 Modified Files: src/external/bsd/tmux/dist: mode-tree.c Log Message: Don't free things twice (Kengo Nakahara) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tmux/dist/mode-tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/mode-tree.c diff -u src/external/bsd/tmux/dist/mode-tree.c:1.7 src/external/bsd/tmux/dist/mode-tree.c:1.8 --- src/external/bsd/tmux/dist/mode-tree.c:1.7 Sat Apr 17 16:42:09 2021 +++ src/external/bsd/tmux/dist/mode-tree.c Fri May 7 07:11:11 2021 @@ -139,7 +139,7 @@ mode_tree_free_item(struct mode_tree_ite mode_tree_free_items(&mti->children); free(__UNCONST(mti->name)); - free(__UNCONST(mti->name)); + free(__UNCONST(mti->text)); free(__UNCONST(mti->keystr)); free(mti);
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Thu Aug 25 16:41:51 UTC 2011 Modified Files: src/external/bsd/tmux/dist: log.c Log Message: Avoid non-literal format strings by replacing asprintf with putc. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/log.c diff -u src/external/bsd/tmux/dist/log.c:1.1.1.2 src/external/bsd/tmux/dist/log.c:1.2 --- src/external/bsd/tmux/dist/log.c:1.1.1.2 Wed Aug 17 18:40:04 2011 +++ src/external/bsd/tmux/dist/log.c Thu Aug 25 16:41:51 2011 @@ -1,4 +1,4 @@ -/* $Id: log.c,v 1.1.1.2 2011/08/17 18:40:04 jmmv Exp $ */ +/* $Id: log.c,v 1.2 2011/08/25 16:41:51 joerg Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -85,7 +85,6 @@ void log_vwrite(int pri, const char *msg, va_list ap) { - char *fmt; FILE *f = log_file; switch (log_type) { @@ -96,12 +95,11 @@ f = stderr; /* FALLTHROUGH */ case LOG_TYPE_FILE: - if (asprintf(&fmt, "%s\n", msg) == -1) + if (vfprintf(f, msg, ap) == -1) exit(1); - if (vfprintf(f, fmt, ap) == -1) + if (putc('\n', f) == -1) exit(1); fflush(f); - free(fmt); break; } }
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Sat Sep 17 01:50:09 UTC 2011 Modified Files: src/external/bsd/tmux/dist: tmux.h window.c Added Files: src/external/bsd/tmux/dist: utmp.c Log Message: Add utmp/utmpx support. XXX: Should we make the top pty (tmux) hide? XXX: Should we add an option to not create utmp entries for a tmux terminal? To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/tmux.h cvs rdiff -u -r0 -r1.1 src/external/bsd/tmux/dist/utmp.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/window.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/tmux.h diff -u src/external/bsd/tmux/dist/tmux.h:1.2 src/external/bsd/tmux/dist/tmux.h:1.3 --- src/external/bsd/tmux/dist/tmux.h:1.2 Fri Aug 19 05:06:05 2011 +++ src/external/bsd/tmux/dist/tmux.h Fri Sep 16 21:50:08 2011 @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.2 2011/08/19 09:06:05 christos Exp $ */ +/* $Id: tmux.h,v 1.3 2011/09/17 01:50:08 christos Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -789,6 +789,7 @@ }; /* Child window structure. */ +struct window_utmp; struct window_pane { u_int id; @@ -832,6 +833,8 @@ const struct window_mode *mode; void *modedata; + struct window_utmp *utmp; + TAILQ_ENTRY(window_pane) entry; RB_ENTRY(window_pane) tree_entry; }; @@ -2067,4 +2070,8 @@ int printflike3 xsnprintf(char *, size_t, const char *, ...); int xvsnprintf(char *, size_t, const char *, va_list); +/* utmp.c */ +struct window_utmp *utmp_create(const char *); +void utmp_destroy(struct window_utmp *); + #endif /* TMUX_H */ Index: src/external/bsd/tmux/dist/window.c diff -u src/external/bsd/tmux/dist/window.c:1.3 src/external/bsd/tmux/dist/window.c:1.4 --- src/external/bsd/tmux/dist/window.c:1.3 Wed Aug 17 14:48:36 2011 +++ src/external/bsd/tmux/dist/window.c Fri Sep 16 21:50:09 2011 @@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.3 2011/08/17 18:48:36 jmmv Exp $ */ +/* $Id: window.c,v 1.4 2011/09/17 01:50:09 christos Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -629,6 +629,7 @@ xfree(wp->shell); if (wp->cmd != NULL) xfree(wp->cmd); + utmp_destroy(wp->utmp); xfree(wp); } @@ -718,6 +719,8 @@ window_pane_read_callback, NULL, window_pane_error_callback, wp); bufferevent_enable(wp->event, EV_READ|EV_WRITE); + wp->utmp = utmp_create(wp->tty); + return (0); } Added files: Index: src/external/bsd/tmux/dist/utmp.c diff -u /dev/null src/external/bsd/tmux/dist/utmp.c:1.1 --- /dev/null Fri Sep 16 21:50:09 2011 +++ src/external/bsd/tmux/dist/utmp.c Fri Sep 16 21:50:08 2011 @@ -0,0 +1,167 @@ +/* $NetBSD: utmp.c,v 1.1 2011/09/17 01:50:08 christos Exp $ */ + +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + *This product includes software developed by the NetBSD + *Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + *contributors may be used to endorse or promote products derived + *from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include +__RCSID("$NetBSD: utmp.c,v 1.1 2011/09/17 01:50:08 christos Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef SUPPORT_UTMP +#include +#endi
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Fri Oct 7 10:38:03 UTC 2011 Modified Files: src/external/bsd/tmux/dist: cmd-string.c Log Message: Optimise by simplifying. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/cmd-string.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/cmd-string.c diff -u src/external/bsd/tmux/dist/cmd-string.c:1.3 src/external/bsd/tmux/dist/cmd-string.c:1.4 --- src/external/bsd/tmux/dist/cmd-string.c:1.3 Wed Aug 17 18:48:36 2011 +++ src/external/bsd/tmux/dist/cmd-string.c Fri Oct 7 10:38:02 2011 @@ -1,4 +1,4 @@ -/* $Id: cmd-string.c,v 1.3 2011/08/17 18:48:36 jmmv Exp $ */ +/* $Id: cmd-string.c,v 1.4 2011/10/07 10:38:02 joerg Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -64,7 +64,7 @@ cmd_string_parse(const char *s, struct c int ch, i, argc, rval; char **argv, *buf, *t; const char *whitespace, *equals; - size_t len; + size_t len, len2; argv = NULL; argc = 0; @@ -84,25 +84,28 @@ cmd_string_parse(const char *s, struct c case '\'': if ((t = cmd_string_string(s, &p, '\'', 0)) == NULL) goto error; - buf = xrealloc(buf, 1, len + strlen(t) + 1); - strlcpy(buf + len, t, strlen(t) + 1); - len += strlen(t); + len2 = strlen(t); + buf = xrealloc(buf, 1, len + len2 + 1); + memcpy(buf + len, t, len2 + 1); + len += len2; xfree(t); break; case '"': if ((t = cmd_string_string(s, &p, '"', 1)) == NULL) goto error; - buf = xrealloc(buf, 1, len + strlen(t) + 1); - strlcpy(buf + len, t, strlen(t) + 1); - len += strlen(t); + len2 = strlen(t); + buf = xrealloc(buf, 1, len + len2 + 1); + memcpy(buf + len, t, len2 + 1); + len += len2; xfree(t); break; case '$': if ((t = cmd_string_variable(s, &p)) == NULL) goto error; - buf = xrealloc(buf, 1, len + strlen(t) + 1); - strlcpy(buf + len, t, strlen(t) + 1); - len += strlen(t); + len2 = strlen(t); + buf = xrealloc(buf, 1, len + len2 + 1); + strlcpy(buf + len, t, len2 + 1); + len += len2; xfree(t); break; case '#': @@ -149,9 +152,10 @@ cmd_string_parse(const char *s, struct c if (buf == NULL) { if ((t = cmd_string_expand_tilde(s, &p)) == NULL) goto error; -buf = xrealloc(buf, 1, len + strlen(t) + 1); -strlcpy(buf + len, t, strlen(t) + 1); -len += strlen(t); +len2 = strlen(t); +buf = xrealloc(buf, 1, len + len2 + 1); +memcpy(buf + len, t, len2 + 1); +len += len2; xfree(t); break; } @@ -187,7 +191,7 @@ cmd_string_string(const char *s, size_t { int ch; char *buf, *t; - size_t len; + size_t len, len2; buf = NULL; len = 0; @@ -221,9 +225,10 @@ cmd_string_string(const char *s, size_t break; if ((t = cmd_string_variable(s, p)) == NULL) goto error; - buf = xrealloc(buf, 1, len + strlen(t) + 1); - strlcpy(buf + len, t, strlen(t) + 1); - len += strlen(t); + len2 = strlen(t); + buf = xrealloc(buf, 1, len + len2 + 1); + memcpy(buf + len, t, len2 + 1); + len += len2; xfree(t); continue; }
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: jmmv Date: Wed Aug 17 18:40:16 UTC 2011 Update of /cvsroot/src/external/bsd/tmux/dist In directory ivanova.netbsd.org:/tmp/cvs-serv28275 Log Message: Import tmux 1.5: CHANGES FROM 1.4 TO 1.5, 09 July 2011 * Support xterm mouse modes 1002 and 1003. * Change from a per-session stack of buffers to one global stack. This renders copy-buffer useless and makes buffer-limit now a server option. * Fix most-recently-used choice by avoiding reset the activity timer for unattached sessions every second. * Add a -P option to new-window and split-window to print the new window or pane index in target form (useful to pass it into other commands). * Handle a # at the end of a replacement string (such as status-left) correctly. * Support for UTF-8 mouse input (\033[1005h) which was added in xterm 262. If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all UTF-8 terminals. The option defaults to on if LANG etc are set in the same manner as the utf8 option. * Support for HP-UX. * Accept colours of the hex form #ff and translate to the nearest from the xterm(1) 256-colour set. * Clear the non-blocking IO flag (O_NONBLOCK) on the stdio file descriptors before closing them (fixes things like "tmux ls && cat"). * Use TMPDIR if set. * Fix next and previous session functions to actually work. * Support -x and -y for new-session to specify the initial size of the window if created detached with -d. * Make bind-key accept characters with the top-bit-set and print them as octal. * Set $TMUX without the session when background jobs are run. * Simplify the way jobs work and drop the persist type, so all jobs are fire-and-forget. * Accept tcgetattr/tcsetattr(3) failure, fixes problems with fatal() if the terminal disappears while locked. * Add a -P option to detach to HUP the client's parent process (usually causing it to exit as well). * Support passing through escape sequences to the underlying terminal by using DCS with a "tmux;" prefix. * Prevent tiled producing a corrupt layout when only one column is needed. * Give each pane created in a tmux server a unique id (starting from 0), put it in the TMUX_PANE environment variable and accept it as a target. * Allow a start and end line to be specified for capture-pane which may be negative to capture part of the history. * Add -a and -s options to lsp to list all panes in the server or session respectively. Likewise add -s to lsw. * Change -t on display-message to be target-pane for the #[A-Z] replacements and add -c as target-client. * The attach-session command now prefers the most recently used unattached session. * Add -s option to detach-client to detach all clients attached to a session. * Add -t to list-clients. * Change window with mouse wheel over status line if mouse-select-window is on. * When mode-mouse is on, automatically enter copy mode when the mouse is dragged or the mouse wheel is used. Also exit copy mode when the mouse wheel is scrolled off the bottom. * Provide #h character pair for short hostname (no domain). * Don't use strnvis(3) for the title as it breaks UTF-8. * Use the tsl and fsl terminfo(5) capabilities to update terminal title and automatically fill them in on terminals with the XT capability (which means their title setting is xterm-compatible). * Add a new option, mouse-resize-pane. When on, panes may be resized by dragging their borders. * Fix crash by resetting last pane on {break,swap}-pane across windows. * Add three new copy-mode commands - select-line, copy-line, copy-end-of-line. * Support setting the xterm clipboard when copying from copy mode using the xterm escape sequence for the purpose (if xterm is configured to allow it). * Support xterm(1) cursor colour change sequences through terminfo(5) Cc (set) and Cr (reset) extensions. * Support DECSCUSR sequence to set the cursor style with two new terminfo(5) extensions, Cs and Csr. * Make the command-prompt custom prompts recognize the status-left option character pairs. * Add a respawn-pane command. * Add a couple of extra xterm-style keys that gnome terminal provides. * Allow the initial context on prompts to be set with the new -I option to command-prompt. Include the current window and session name in the prompt when renaming and add a new key binding ($) for rename session. * Option bell-on-alert added to trigger the terminal bell when there is an alert. * Change the list-keys format so that it shows the keys using actual tmux commands which should be able to be directly copied into the config file. * Show full targets for lsp/lsw -a. * Make confirm-before prompt customizable with -p option like command-prompt and add the character pairs #W and #P to the default kill-{pane,window} prompts. * Avoid sending data to suspended/locked clients. * Small memory leaks in error paths plugged. * Vi mode improvements. Status: Vendor Tag: TMUX Release Tags: tm
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: jmmv Date: Wed Aug 17 18:48:37 UTC 2011 Modified Files: src/external/bsd/tmux/dist: cmd-paste-buffer.c cmd-server-info.c cmd-string.c environ.c input.c job.c options.c screen-write.c screen.c server-fn.c session.c tty-acs.c tty-keys.c tty-term.c window.c src/external/bsd/tmux/dist/compat: imsg-buffer.c imsg.c Removed Files: src/external/bsd/tmux/dist: cmd-copy-buffer.c cmd-generic.c cmd-last-pane.c cmd-last-window.c cmd-lock-client.c cmd-lock-session.c cmd-next-layout.c cmd-next-window.c cmd-previous-layout.c cmd-previous-window.c cmd-set-window-option.c cmd-show-window-options.c layout-string.c Log Message: Fix merge conflicts after tmux 1.5 import. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/external/bsd/tmux/dist/cmd-copy-buffer.c cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/tmux/dist/cmd-generic.c \ src/external/bsd/tmux/dist/cmd-last-pane.c \ src/external/bsd/tmux/dist/cmd-last-window.c \ src/external/bsd/tmux/dist/cmd-lock-client.c \ src/external/bsd/tmux/dist/cmd-lock-session.c \ src/external/bsd/tmux/dist/cmd-next-layout.c \ src/external/bsd/tmux/dist/cmd-next-window.c \ src/external/bsd/tmux/dist/cmd-previous-layout.c \ src/external/bsd/tmux/dist/cmd-previous-window.c \ src/external/bsd/tmux/dist/cmd-set-window-option.c \ src/external/bsd/tmux/dist/cmd-show-window-options.c \ src/external/bsd/tmux/dist/layout-string.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/cmd-paste-buffer.c \ src/external/bsd/tmux/dist/cmd-server-info.c \ src/external/bsd/tmux/dist/cmd-string.c \ src/external/bsd/tmux/dist/environ.c src/external/bsd/tmux/dist/input.c \ src/external/bsd/tmux/dist/job.c src/external/bsd/tmux/dist/options.c \ src/external/bsd/tmux/dist/screen-write.c \ src/external/bsd/tmux/dist/screen.c \ src/external/bsd/tmux/dist/server-fn.c \ src/external/bsd/tmux/dist/session.c src/external/bsd/tmux/dist/tty-acs.c \ src/external/bsd/tmux/dist/tty-keys.c \ src/external/bsd/tmux/dist/tty-term.c src/external/bsd/tmux/dist/window.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/compat/imsg-buffer.c \ src/external/bsd/tmux/dist/compat/imsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/cmd-paste-buffer.c diff -u src/external/bsd/tmux/dist/cmd-paste-buffer.c:1.2 src/external/bsd/tmux/dist/cmd-paste-buffer.c:1.3 --- src/external/bsd/tmux/dist/cmd-paste-buffer.c:1.2 Sat Mar 12 03:02:58 2011 +++ src/external/bsd/tmux/dist/cmd-paste-buffer.c Wed Aug 17 18:48:35 2011 @@ -1,4 +1,4 @@ -/* $Id: cmd-paste-buffer.c,v 1.2 2011/03/12 03:02:58 christos Exp $ */ +/* $Id: cmd-paste-buffer.c,v 1.3 2011/08/17 18:48:35 jmmv Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -27,131 +27,73 @@ * Paste paste buffer if present. */ -struct cmd_paste_buffer_data { - char *target; - int buffer; - - int flag_delete; - char *sepstr; -}; - -void cmd_paste_buffer_init(struct cmd *, int); -int cmd_paste_buffer_parse(struct cmd *, int, char **, char **); int cmd_paste_buffer_exec(struct cmd *, struct cmd_ctx *); + void cmd_paste_buffer_filter( - struct window_pane *, const char *, size_t, char *); -void cmd_paste_buffer_free(struct cmd *); -size_t cmd_paste_buffer_print(struct cmd *, char *, size_t); + struct window_pane *, const char *, size_t, const char *); const struct cmd_entry cmd_paste_buffer_entry = { "paste-buffer", "pasteb", + "db:rs:t:", 0, 0, "[-dr] [-s separator] [-b buffer-index] [-t target-pane]", - 0, "", - cmd_paste_buffer_init, - cmd_paste_buffer_parse, - cmd_paste_buffer_exec, - cmd_paste_buffer_free, - cmd_paste_buffer_print + 0, + NULL, + NULL, + cmd_paste_buffer_exec }; -/* ARGSUSED */ -void -cmd_paste_buffer_init(struct cmd *self, unused int arg) -{ - struct cmd_paste_buffer_data *data; - - self->data = data = xmalloc(sizeof *data); - data->target = NULL; - data->buffer = -1; - data->flag_delete = 0; - data->sepstr = xstrdup("\r"); -} - -int -cmd_paste_buffer_parse(struct cmd *self, int argc, char **argv, char **cause) -{ - struct cmd_paste_buffer_data *data; - int opt, n; - const char *errstr; - - cmd_paste_buffer_init(self, 0); - data = self->data; - - while ((opt = getopt(argc, argv, "b:ds:t:r")) != -1) { - switch (opt) { - case 'b': - if (data->buffer == -1) { -n = strtonum(optarg, 0, INT_MAX, &errstr); -if (errstr != NULL) { - xasprintf(cause, "buffer %s", errstr); - goto error; -} -data->buffer = n; - } - break; - case 'd': - data->flag_delete = 1; - break; - case 's': - if (data->sepstr != NULL) -xfree(data->sepstr); - data->sepstr = xstrdup(optarg); - break; - case 't': - if (data->target == NULL) -data->target = xstrdup(optarg);
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: he Date: Mon Aug 22 06:52:36 UTC 2011 Modified Files: src/external/bsd/tmux/dist: colour.c Log Message: Replace needless use of double math just to compare colour distances with integer arithmetic. Reported to and discussed with upstream maintainer. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/colour.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/colour.c diff -u src/external/bsd/tmux/dist/colour.c:1.1.1.2 src/external/bsd/tmux/dist/colour.c:1.2 --- src/external/bsd/tmux/dist/colour.c:1.1.1.2 Wed Aug 17 18:40:04 2011 +++ src/external/bsd/tmux/dist/colour.c Mon Aug 22 06:52:35 2011 @@ -1,4 +1,4 @@ -/* $Id: colour.c,v 1.1.1.2 2011/08/17 18:40:04 jmmv Exp $ */ +/* $Id: colour.c,v 1.2 2011/08/22 06:52:35 he Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -41,7 +40,7 @@ struct colour_rgb *colour_rgb_256; void colour_rgb_generate256(void); -double colour_rgb_distance(struct colour_rgb *, struct colour_rgb *); +u_int colour_rgb_distance(struct colour_rgb *, struct colour_rgb *); int colour_rgb_find(struct colour_rgb *); /* Generate 256 colour RGB table. */ @@ -90,8 +89,8 @@ } } -/* Get colour RGB distance. */ -double +/* Get a measure of colour RGB distance. */ +u_int colour_rgb_distance(struct colour_rgb *rgb1, struct colour_rgb *rgb2) { int r, g, b; @@ -99,22 +98,22 @@ r = rgb1->r - rgb2->r; g = rgb1->g - rgb2->g; b = rgb1->b - rgb2->b; - return (sqrt(r * r + g * g + b * b)); + return (r * r + g * g + b * b); } /* Work out the nearest colour from the 256 colour set. */ int colour_rgb_find(struct colour_rgb *rgb) { - double distance, lowest; + u_int distance, lowest; u_int colour, i; if (colour_rgb_256 == NULL) colour_rgb_generate256(); colour = 16; - lowest = INFINITY; - for (i = 0; i < 240; i++) { + lowest = UINT_MAX; + for (i = 1; i < 240; i++) { distance = colour_rgb_distance(&colour_rgb_256[i], rgb); if (distance < lowest) { lowest = distance;
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: he Date: Mon Aug 22 09:19:51 UTC 2011 Modified Files: src/external/bsd/tmux/dist: colour.c Log Message: Hm, upstream maintainer says loop needs to start from 0, make it so. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/colour.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/colour.c diff -u src/external/bsd/tmux/dist/colour.c:1.2 src/external/bsd/tmux/dist/colour.c:1.3 --- src/external/bsd/tmux/dist/colour.c:1.2 Mon Aug 22 06:52:35 2011 +++ src/external/bsd/tmux/dist/colour.c Mon Aug 22 09:19:51 2011 @@ -1,4 +1,4 @@ -/* $Id: colour.c,v 1.2 2011/08/22 06:52:35 he Exp $ */ +/* $Id: colour.c,v 1.3 2011/08/22 09:19:51 he Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -113,7 +113,7 @@ colour = 16; lowest = UINT_MAX; - for (i = 1; i < 240; i++) { + for (i = 0; i < 240; i++) { distance = colour_rgb_distance(&colour_rgb_256[i], rgb); if (distance < lowest) { lowest = distance;
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: martin Date: Thu May 31 19:14:56 UTC 2012 Modified Files: src/external/bsd/tmux/dist: tmux.c Log Message: Make sure to have file descriptors 0-2 open before doing further setup. Otherwise strange invocations could trick us into passing the event descriptor as, for example, stdin to the server. See PR 46463 for details. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/tmux.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/tmux.c diff -u src/external/bsd/tmux/dist/tmux.c:1.1.1.2 src/external/bsd/tmux/dist/tmux.c:1.2 --- src/external/bsd/tmux/dist/tmux.c:1.1.1.2 Wed Aug 17 18:40:05 2011 +++ src/external/bsd/tmux/dist/tmux.c Thu May 31 19:14:56 2012 @@ -1,4 +1,4 @@ -/* $Id: tmux.c,v 1.1.1.2 2011/08/17 18:40:05 jmmv Exp $ */ +/* $Id: tmux.c,v 1.2 2012/05/31 19:14:56 martin Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -213,6 +213,22 @@ shell_exec(const char *shell, const char fatal("execl failed"); } +static void +init_std_fds(void) +{ + int fd; + + /* + * Make sure the standard file descriptors are populated, so we + * don't end up forwarding (for example) the event descriptor + * instead of stdin to the server. + */ + + while ((fd = open("/dev/null", O_RDWR)) <= 2) + ; + close(fd); +} + int main(int argc, char **argv) { @@ -283,6 +299,7 @@ main(int argc, char **argv) if (shell_cmd != NULL && argc != 0) usage(); + init_std_fds(); log_open_tty(debug_level); if (!(flags & IDENTIFY_UTF8)) {
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: jmmv Date: Thu Mar 10 09:15:42 UTC 2011 Update of /cvsroot/src/external/bsd/tmux/dist In directory ivanova.netbsd.org:/tmp/cvs-serv2140 Log Message: Initial import of tmux-1.4: tmux is a "terminal multiplexer". It enables a number of terminals (or windows) to be accessed and controlled from a single terminal. tmux is intended to be a simple, modern, BSD-licensed alternative to programs such as GNU screen. The import of tmux is intended to replace window(1) in the not-too-distant future. For reference, tmux is also present in the base system of FreeBSD and OpenBSD. Approved by core@. Status: Vendor Tag: TMUX Release Tags: tmux-1-4 N src/external/bsd/tmux/dist/attributes.c N src/external/bsd/tmux/dist/array.h N src/external/bsd/tmux/dist/cmd-bind-key.c N src/external/bsd/tmux/dist/cfg.c N src/external/bsd/tmux/dist/client.c N src/external/bsd/tmux/dist/clock.c N src/external/bsd/tmux/dist/cmd-display-message.c N src/external/bsd/tmux/dist/cmd-attach-session.c N src/external/bsd/tmux/dist/cmd-break-pane.c N src/external/bsd/tmux/dist/cmd-capture-pane.c N src/external/bsd/tmux/dist/cmd-choose-buffer.c N src/external/bsd/tmux/dist/cmd-choose-client.c N src/external/bsd/tmux/dist/cmd-choose-session.c N src/external/bsd/tmux/dist/cmd-choose-window.c N src/external/bsd/tmux/dist/cmd-clear-history.c N src/external/bsd/tmux/dist/cmd-clock-mode.c N src/external/bsd/tmux/dist/cmd-command-prompt.c N src/external/bsd/tmux/dist/cmd-confirm-before.c N src/external/bsd/tmux/dist/cmd-copy-buffer.c N src/external/bsd/tmux/dist/cmd-copy-mode.c N src/external/bsd/tmux/dist/cmd-delete-buffer.c N src/external/bsd/tmux/dist/cmd-detach-client.c N src/external/bsd/tmux/dist/cmd-previous-layout.c N src/external/bsd/tmux/dist/cmd-display-panes.c N src/external/bsd/tmux/dist/cmd-find-window.c N src/external/bsd/tmux/dist/cmd-generic.c N src/external/bsd/tmux/dist/cmd-has-session.c N src/external/bsd/tmux/dist/cmd-if-shell.c N src/external/bsd/tmux/dist/cmd-join-pane.c N src/external/bsd/tmux/dist/cmd-kill-pane.c N src/external/bsd/tmux/dist/cmd-kill-server.c N src/external/bsd/tmux/dist/cmd-kill-session.c N src/external/bsd/tmux/dist/cmd-kill-window.c N src/external/bsd/tmux/dist/cmd-last-pane.c N src/external/bsd/tmux/dist/cmd-last-window.c N src/external/bsd/tmux/dist/cmd-link-window.c N src/external/bsd/tmux/dist/cmd-list-keys.c N src/external/bsd/tmux/dist/cmd-list-buffers.c N src/external/bsd/tmux/dist/cmd-list-clients.c N src/external/bsd/tmux/dist/cmd-list-commands.c N src/external/bsd/tmux/dist/cmd-list-panes.c N src/external/bsd/tmux/dist/cmd-list-sessions.c N src/external/bsd/tmux/dist/cmd-list-windows.c N src/external/bsd/tmux/dist/cmd-list.c N src/external/bsd/tmux/dist/cmd-load-buffer.c N src/external/bsd/tmux/dist/cmd-lock-client.c N src/external/bsd/tmux/dist/cmd-lock-server.c N src/external/bsd/tmux/dist/cmd-lock-session.c N src/external/bsd/tmux/dist/cmd-move-window.c N src/external/bsd/tmux/dist/cmd-new-session.c N src/external/bsd/tmux/dist/cmd-new-window.c N src/external/bsd/tmux/dist/cmd-next-layout.c N src/external/bsd/tmux/dist/cmd-next-window.c N src/external/bsd/tmux/dist/cmd-paste-buffer.c N src/external/bsd/tmux/dist/cmd-pipe-pane.c N src/external/bsd/tmux/dist/cmd.c N src/external/bsd/tmux/dist/cmd-show-window-options.c N src/external/bsd/tmux/dist/cmd-previous-window.c N src/external/bsd/tmux/dist/cmd-refresh-client.c N src/external/bsd/tmux/dist/cmd-rename-session.c N src/external/bsd/tmux/dist/cmd-rename-window.c N src/external/bsd/tmux/dist/cmd-resize-pane.c N src/external/bsd/tmux/dist/cmd-respawn-window.c N src/external/bsd/tmux/dist/cmd-rotate-window.c N src/external/bsd/tmux/dist/cmd-run-shell.c N src/external/bsd/tmux/dist/cmd-save-buffer.c N src/external/bsd/tmux/dist/cmd-select-layout.c N src/external/bsd/tmux/dist/cmd-select-pane.c N src/external/bsd/tmux/dist/cmd-select-window.c N src/external/bsd/tmux/dist/cmd-send-keys.c N src/external/bsd/tmux/dist/cmd-send-prefix.c N src/external/bsd/tmux/dist/cmd-server-info.c N src/external/bsd/tmux/dist/cmd-set-buffer.c N src/external/bsd/tmux/dist/grid.c N src/external/bsd/tmux/dist/cmd-set-environment.c N src/external/bsd/tmux/dist/cmd-set-option.c N src/external/bsd/tmux/dist/cmd-set-window-option.c N src/external/bsd/tmux/dist/cmd-show-buffer.c N src/external/bsd/tmux/dist/cmd-show-environment.c N src/external/bsd/tmux/dist/cmd-show-messages.c N src/external/bsd/tmux/dist/cmd-show-options.c N src/external/bsd/tmux/dist/cmd-source-file.c N src/external/bsd/tmux/dist/cmd-split-window.c N src/external/bsd/tmux/dist/cmd-start-server.c N src/external/bsd/tmux/dist/cmd-string.c N src/external/bsd/tmux/dist/cmd-suspend-client.c N src/external/bsd/tmux/dist/cmd-swap-pane.c N src/external/bsd/tmux/dist/cmd-swap-window.c N src/external/bsd/tmux/dist/cmd-switch-client.c N src/external/bsd/tmux/dist/cmd-unbind-key.c N src/external/bsd/tmux/dist/colour.c N src/external/bsd/tmux/dist/cm
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: jakllsch Date: Thu Sep 1 16:30:11 UTC 2016 Modified Files: src/external/bsd/tmux/dist: xmalloc.h Log Message: sprinkle __attribute__((__format__(printf.. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tmux/dist/xmalloc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/xmalloc.h diff -u src/external/bsd/tmux/dist/xmalloc.h:1.1.1.1 src/external/bsd/tmux/dist/xmalloc.h:1.2 --- src/external/bsd/tmux/dist/xmalloc.h:1.1.1.1 Wed Aug 31 09:04:04 2016 +++ src/external/bsd/tmux/dist/xmalloc.h Thu Sep 1 16:30:11 2016 @@ -32,12 +32,14 @@ int xasprintf(char **, const char *, .. __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); int xvasprintf(char **, const char *, va_list) + __attribute__((__format__ (printf, 2, 0))) __attribute__((__nonnull__ (2))); int xsnprintf(char *, size_t, const char *, ...) __attribute__((__format__ (printf, 3, 4))) __attribute__((__nonnull__ (3))) __attribute__((__bounded__ (__string__, 1, 2))); int xvsnprintf(char *, size_t, const char *, va_list) + __attribute__((__format__ (printf, 3, 0))) __attribute__((__nonnull__ (3))) __attribute__((__bounded__ (__string__, 1, 2)));
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Sat Jan 16 01:14:39 UTC 2016 Modified Files: src/external/bsd/tmux/dist: tmux.h Log Message: Add missing format string annotation. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/tmux/dist/tmux.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/tmux.h diff -u src/external/bsd/tmux/dist/tmux.h:1.6 src/external/bsd/tmux/dist/tmux.h:1.7 --- src/external/bsd/tmux/dist/tmux.h:1.6 Sun Jan 10 19:02:13 2016 +++ src/external/bsd/tmux/dist/tmux.h Sat Jan 16 01:14:39 2016 @@ -1429,7 +1429,7 @@ extern struct client *cfg_client; void start_cfg(void); int load_cfg(const char *, struct cmd_q *, char **); void set_cfg_file(const char *); -void cfg_add_cause(const char *, ...); +void printflike(1, 2) cfg_add_cause(const char *, ...); void cfg_print_causes(struct cmd_q *); void cfg_show_causes(struct session *); @@ -2081,7 +2081,7 @@ extern const struct window_mode window_c void window_copy_init_from_pane(struct window_pane *, int); void window_copy_init_for_output(struct window_pane *); void printflike(2, 3) window_copy_add(struct window_pane *, const char *, ...); -void window_copy_vadd(struct window_pane *, const char *, va_list); +void printflike(2, 0) window_copy_vadd(struct window_pane *, const char *, va_list); void window_copy_pageup(struct window_pane *); void window_copy_start_drag(struct client *, struct mouse_event *); @@ -2204,9 +2204,9 @@ void *xmalloc(size_t); void *xrealloc(void *, size_t); void *xreallocarray(void *, size_t, size_t); int printflike(2, 3) xasprintf(char **, const char *, ...); -int xvasprintf(char **, const char *, va_list); +int printflike(2, 0) xvasprintf(char **, const char *, va_list); int printflike(3, 4) xsnprintf(char *, size_t, const char *, ...); -int xvsnprintf(char *, size_t, const char *, va_list); +int printflike(3, 0) xvsnprintf(char *, size_t, const char *, va_list); /* style.c */ int style_parse(const struct grid_cell *,
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Sat Jan 16 01:14:21 UTC 2016 Modified Files: src/external/bsd/tmux/dist: log.c Log Message: Fix merge error of diagnostic pragmas. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tmux/dist/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/log.c diff -u src/external/bsd/tmux/dist/log.c:1.9 src/external/bsd/tmux/dist/log.c:1.10 --- src/external/bsd/tmux/dist/log.c:1.9 Sun Jan 10 19:02:13 2016 +++ src/external/bsd/tmux/dist/log.c Sat Jan 16 01:14:21 2016 @@ -93,9 +93,6 @@ log_vwrite(const char *msg, va_list ap) free(out); free(fmt); } -#if __GNUC_PREREQ__(4, 6) || defined(__clang__) -#pragma GCC diagnostic push -#endif /* Log a debug message. */ void @@ -108,6 +105,11 @@ log_debug(const char *msg, ...) va_end(ap); } +#if __GNUC_PREREQ__(4, 6) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif + /* Log a critical error with error string and die. */ __dead void log_fatal(const char *msg, ...) @@ -135,3 +137,7 @@ log_fatalx(const char *msg, ...) log_vwrite(fmt, ap); exit(1); } + +#if __GNUC_PREREQ__(4, 6) || defined(__clang__) +#pragma GCC diagnostic pop +#endif
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Tue Jan 7 02:11:30 UTC 2014 Modified Files: src/external/bsd/tmux/dist: input.c log.c tmux.h Log Message: Format string verification To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tmux/dist/input.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/log.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/tmux.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/input.c diff -u src/external/bsd/tmux/dist/input.c:1.4 src/external/bsd/tmux/dist/input.c:1.5 --- src/external/bsd/tmux/dist/input.c:1.4 Wed Aug 17 19:28:36 2011 +++ src/external/bsd/tmux/dist/input.c Tue Jan 7 02:11:29 2014 @@ -1,4 +1,4 @@ -/* $Id: input.c,v 1.4 2011/08/17 19:28:36 jmmv Exp $ */ +/* $Id: input.c,v 1.5 2014/01/07 02:11:29 joerg Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -49,7 +49,7 @@ /* Helper functions. */ int input_split(struct input_ctx *); int input_get(struct input_ctx *, u_int, int, int); -void input_reply(struct input_ctx *, const char *, ...); +void input_reply(struct input_ctx *, const char *, ...) __printflike(2, 3); /* Transition entry/exit handlers. */ void input_clear(struct input_ctx *); Index: src/external/bsd/tmux/dist/log.c diff -u src/external/bsd/tmux/dist/log.c:1.2 src/external/bsd/tmux/dist/log.c:1.3 --- src/external/bsd/tmux/dist/log.c:1.2 Thu Aug 25 16:41:51 2011 +++ src/external/bsd/tmux/dist/log.c Tue Jan 7 02:11:29 2014 @@ -1,4 +1,4 @@ -/* $Id: log.c,v 1.2 2011/08/25 16:41:51 joerg Exp $ */ +/* $Id: log.c,v 1.3 2014/01/07 02:11:29 joerg Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -39,7 +39,7 @@ FILE *log_file; /* Debug level. */ int log_level; -void log_vwrite(int, const char *, va_list); +void log_vwrite(int, const char *, va_list) __printflike(2, 0); __dead void log_vfatal(const char *, va_list); /* Open logging to tty. */ @@ -105,6 +105,8 @@ log_vwrite(int pri, const char *msg, va_ } /* Log a warning with error string. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" void printflike1 log_warn(const char *msg, ...) { @@ -118,6 +120,7 @@ log_warn(const char *msg, ...) free(fmt); va_end(ap); } +#pragma GCC diagnostic push /* Log a warning. */ void printflike1 Index: src/external/bsd/tmux/dist/tmux.h diff -u src/external/bsd/tmux/dist/tmux.h:1.3 src/external/bsd/tmux/dist/tmux.h:1.4 --- src/external/bsd/tmux/dist/tmux.h:1.3 Sat Sep 17 01:50:08 2011 +++ src/external/bsd/tmux/dist/tmux.h Tue Jan 7 02:11:29 2014 @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.3 2011/09/17 01:50:08 christos Exp $ */ +/* $Id: tmux.h,v 1.4 2014/01/07 02:11:29 joerg Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -80,6 +80,9 @@ extern char **environ; #define unused __attribute__ ((unused)) /* Attribute to make gcc check printf-like arguments. */ +#define vprintflike2 __attribute__ ((format (printf, 2, 0))) +#define vprintflike3 __attribute__ ((format (printf, 3, 0))) +#define vprintflike5 __attribute__ ((format (printf, 5, 0))) #define printflike1 __attribute__ ((format (printf, 1, 2))) #define printflike2 __attribute__ ((format (printf, 2, 3))) #define printflike3 __attribute__ ((format (printf, 3, 4))) @@ -1803,7 +1806,7 @@ void printflike3 screen_write_puts(struc struct grid_cell *, const char *, ...); void printflike5 screen_write_nputs(struct screen_write_ctx *, ssize_t, struct grid_cell *, int, const char *, ...); -void screen_write_vnputs(struct screen_write_ctx *, +void vprintflike5 screen_write_vnputs(struct screen_write_ctx *, ssize_t, struct grid_cell *, int, const char *, va_list); void screen_write_parsestyle( struct grid_cell *, struct grid_cell *, const char *); @@ -1980,13 +1983,13 @@ extern const struct window_mode window_c extern const struct window_mode window_copy_mode; void window_copy_init_from_pane(struct window_pane *); void window_copy_init_for_output(struct window_pane *); -void window_copy_add(struct window_pane *, const char *, ...); -void window_copy_vadd(struct window_pane *, const char *, va_list); +void printflike2 window_copy_add(struct window_pane *, const char *, ...); +void vprintflike2 window_copy_vadd(struct window_pane *, const char *, va_list); void window_copy_pageup(struct window_pane *); /* window-choose.c */ extern const struct window_mode window_choose_mode; -void window_choose_vadd( +void vprintflike3 window_choose_vadd( struct window_pane *, int, const char *, va_list); void printflike3 window_choose_add( struct window_pane *, int, const char *, ...); @@ -2066,9 +2069,9 @@ void *xmalloc(size_t); void *xrealloc(void *, size_t, size_t); void xfree(void *); int printflike2 xasprintf(char **, const char *, ...); -int xvasprintf(char **, const char *, va_list); +int vprintflike2 x
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Tue Jan 7 09:28:57 UTC 2014 Modified Files: src/external/bsd/tmux/dist: log.c Log Message: Fix build with GCC 4.5. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/log.c diff -u src/external/bsd/tmux/dist/log.c:1.3 src/external/bsd/tmux/dist/log.c:1.4 --- src/external/bsd/tmux/dist/log.c:1.3 Tue Jan 7 02:11:29 2014 +++ src/external/bsd/tmux/dist/log.c Tue Jan 7 09:28:57 2014 @@ -1,4 +1,4 @@ -/* $Id: log.c,v 1.3 2014/01/07 02:11:29 joerg Exp $ */ +/* $Id: log.c,v 1.4 2014/01/07 09:28:57 joerg Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -105,7 +105,9 @@ log_vwrite(int pri, const char *msg, va_ } /* Log a warning with error string. */ +#if __GNUC_PREREQ__(4, 6) || defined(__clang__) #pragma GCC diagnostic push +#endif #pragma GCC diagnostic ignored "-Wformat-nonliteral" void printflike1 log_warn(const char *msg, ...) @@ -120,7 +122,9 @@ log_warn(const char *msg, ...) free(fmt); va_end(ap); } +#if __GNUC_PREREQ__(4, 6) || defined(__clang__) #pragma GCC diagnostic push +#endif /* Log a warning. */ void printflike1
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Mon Jan 20 02:08:27 UTC 2014 Modified Files: src/external/bsd/tmux/dist: log.c Log Message: gcc-4.1 does not have the pragma diagnostic ignored To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tmux/dist/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/log.c diff -u src/external/bsd/tmux/dist/log.c:1.4 src/external/bsd/tmux/dist/log.c:1.5 --- src/external/bsd/tmux/dist/log.c:1.4 Tue Jan 7 04:28:57 2014 +++ src/external/bsd/tmux/dist/log.c Sun Jan 19 21:08:27 2014 @@ -1,4 +1,4 @@ -/* $Id: log.c,v 1.4 2014/01/07 09:28:57 joerg Exp $ */ +/* $Id: log.c,v 1.5 2014/01/20 02:08:27 christos Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -108,7 +108,9 @@ log_vwrite(int pri, const char *msg, va_ #if __GNUC_PREREQ__(4, 6) || defined(__clang__) #pragma GCC diagnostic push #endif +#if __GNUC_PREREQ__(4, 5) #pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif void printflike1 log_warn(const char *msg, ...) {
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Thu Jan 23 14:14:23 UTC 2014 Modified Files: src/external/bsd/tmux/dist: log.c Log Message: Unbreak clang build. Hi xtos. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tmux/dist/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/log.c diff -u src/external/bsd/tmux/dist/log.c:1.5 src/external/bsd/tmux/dist/log.c:1.6 --- src/external/bsd/tmux/dist/log.c:1.5 Mon Jan 20 02:08:27 2014 +++ src/external/bsd/tmux/dist/log.c Thu Jan 23 14:14:23 2014 @@ -1,4 +1,4 @@ -/* $Id: log.c,v 1.5 2014/01/20 02:08:27 christos Exp $ */ +/* $Id: log.c,v 1.6 2014/01/23 14:14:23 joerg Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -108,7 +108,7 @@ log_vwrite(int pri, const char *msg, va_ #if __GNUC_PREREQ__(4, 6) || defined(__clang__) #pragma GCC diagnostic push #endif -#if __GNUC_PREREQ__(4, 5) +#if __GNUC_PREREQ__(4, 5) || defined(__clang__) #pragma GCC diagnostic ignored "-Wformat-nonliteral" #endif void printflike1
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Thu Jul 24 22:59:01 UTC 2014 Modified Files: src/external/bsd/tmux/dist: log.c Log Message: Avoid playing games with format strings, just use a second printf. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tmux/dist/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/log.c diff -u src/external/bsd/tmux/dist/log.c:1.7 src/external/bsd/tmux/dist/log.c:1.8 --- src/external/bsd/tmux/dist/log.c:1.7 Thu Jul 24 15:09:24 2014 +++ src/external/bsd/tmux/dist/log.c Thu Jul 24 22:59:01 2014 @@ -73,17 +73,14 @@ log_close(void) void log_vwrite(const char *msg, va_list ap) { - char *fmt; - if (log_file == NULL) return; - if (asprintf(&fmt, "%s\n", msg) == -1) + if (vfprintf(log_file, msg, ap) == -1) exit(1); - if (vfprintf(log_file, fmt, ap) == -1) + if (fprintf(log_file, "\n") == -1) exit(1); fflush(log_file); - free(fmt); } /* Log a warning with error string. */
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Fri Jul 25 09:06:17 UTC 2014 Modified Files: src/external/bsd/tmux/dist: format.c Log Message: tty is an array and can't be null; thanks joerg@clang To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/format.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/format.c diff -u src/external/bsd/tmux/dist/format.c:1.2 src/external/bsd/tmux/dist/format.c:1.3 --- src/external/bsd/tmux/dist/format.c:1.2 Thu Jul 24 11:09:24 2014 +++ src/external/bsd/tmux/dist/format.c Fri Jul 25 05:06:17 2014 @@ -557,8 +557,7 @@ format_window_pane(struct format_tree *f format_add(ft, "pane_synchronized", "%d", !!options_get_number(&wp->window->options, "synchronize-panes")); - if (wp->tty != NULL) - format_add(ft, "pane_tty", "%s", wp->tty); + format_add(ft, "pane_tty", "%s", wp->tty); format_add(ft, "pane_pid", "%ld", (long) wp->pid); if (wp->cmd != NULL) format_add(ft, "pane_start_command", "%s", wp->cmd);
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Sun Oct 20 03:00:02 UTC 2013 Modified Files: src/external/bsd/tmux/dist: cmd-if-shell.c Log Message: remove unused variable To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/cmd-if-shell.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/cmd-if-shell.c diff -u src/external/bsd/tmux/dist/cmd-if-shell.c:1.1.1.2 src/external/bsd/tmux/dist/cmd-if-shell.c:1.2 --- src/external/bsd/tmux/dist/cmd-if-shell.c:1.1.1.2 Wed Aug 17 14:40:04 2011 +++ src/external/bsd/tmux/dist/cmd-if-shell.c Sat Oct 19 23:00:02 2013 @@ -1,4 +1,4 @@ -/* $Id: cmd-if-shell.c,v 1.1.1.2 2011/08/17 18:40:04 jmmv Exp $ */ +/* $Id: cmd-if-shell.c,v 1.2 2013/10/20 03:00:02 christos Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -97,11 +97,9 @@ cmd_if_shell_free(void *data) { struct cmd_if_shell_data *cdata = data; struct cmd_ctx *ctx = &cdata->ctx; - struct msg_exit_data exitdata; if (ctx->cmdclient != NULL) { ctx->cmdclient->references--; - exitdata.retcode = ctx->cmdclient->retcode; ctx->cmdclient->flags |= CLIENT_EXIT; } if (ctx->curclient != NULL)
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: kre Date: Fri Oct 13 09:43:50 UTC 2017 Modified Files: src/external/bsd/tmux/dist: window-client.c window-tree.c Log Message: cast pointers to uintptr_t, not uint64_t - then allow integer promotions take care of any size differences. Should fix builds of systems with 32 bit pointers (i386 et al). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tmux/dist/window-client.c \ src/external/bsd/tmux/dist/window-tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/window-client.c diff -u src/external/bsd/tmux/dist/window-client.c:1.1.1.1 src/external/bsd/tmux/dist/window-client.c:1.2 --- src/external/bsd/tmux/dist/window-client.c:1.1.1.1 Thu Oct 12 21:59:49 2017 +++ src/external/bsd/tmux/dist/window-client.c Fri Oct 13 09:43:50 2017 @@ -204,7 +204,7 @@ window_client_build(void *modedata, u_in } text = format_single(NULL, data->format, c, NULL, NULL, NULL); - mode_tree_add(data->data, NULL, item, (uint64_t)c, c->name, + mode_tree_add(data->data, NULL, item, (uintptr_t)c, c->name, text, -1); free(text); } Index: src/external/bsd/tmux/dist/window-tree.c diff -u src/external/bsd/tmux/dist/window-tree.c:1.1.1.1 src/external/bsd/tmux/dist/window-tree.c:1.2 --- src/external/bsd/tmux/dist/window-tree.c:1.1.1.1 Thu Oct 12 21:59:49 2017 +++ src/external/bsd/tmux/dist/window-tree.c Fri Oct 13 09:43:50 2017 @@ -235,7 +235,7 @@ window_tree_build_pane(struct session *s text = format_single(NULL, data->format, NULL, s, wl, wp); xasprintf(&name, "%u", idx); - mode_tree_add(data->data, parent, item, (uint64_t)wp, name, text, -1); + mode_tree_add(data->data, parent, item, (uintptr_t)wp, name, text, -1); free(text); free(name); } @@ -283,7 +283,7 @@ window_tree_build_window(struct session expanded = 0; else expanded = 1; - mti = mode_tree_add(data->data, parent, item, (uint64_t)wl, name, text, + mti = mode_tree_add(data->data, parent, item, (uintptr_t)wl, name, text, expanded); free(text); free(name); @@ -354,7 +354,7 @@ window_tree_build_session(struct session expanded = 0; else expanded = 1; - mti = mode_tree_add(data->data, NULL, item, (uint64_t)s, s->name, text, + mti = mode_tree_add(data->data, NULL, item, (uintptr_t)s, s->name, text, expanded); free(text); @@ -428,13 +428,13 @@ window_tree_build(void *modedata, u_int case WINDOW_TREE_NONE: break; case WINDOW_TREE_SESSION: - *tag = (uint64_t)data->fs.s; + *tag = (uintptr_t)data->fs.s; break; case WINDOW_TREE_WINDOW: - *tag = (uint64_t)data->fs.wl; + *tag = (uintptr_t)data->fs.wl; break; case WINDOW_TREE_PANE: - *tag = (uint64_t)data->fs.wp; + *tag = (uintptr_t)data->fs.wp; break; } }
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Wed May 3 20:12:19 UTC 2017 Modified Files: src/external/bsd/tmux/dist: tmux.h Log Message: add missing printflike To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/tmux/dist/tmux.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/tmux.h diff -u src/external/bsd/tmux/dist/tmux.h:1.9 src/external/bsd/tmux/dist/tmux.h:1.10 --- src/external/bsd/tmux/dist/tmux.h:1.9 Sat Apr 22 22:01:59 2017 +++ src/external/bsd/tmux/dist/tmux.h Wed May 3 16:12:19 2017 @@ -1977,7 +1977,7 @@ void printflike(3, 4) screen_write_puts( const struct grid_cell *, const char *, ...); void printflike(4, 5) screen_write_nputs(struct screen_write_ctx *, ssize_t, const struct grid_cell *, const char *, ...); -void screen_write_vnputs(struct screen_write_ctx *, ssize_t, +void printflike(4, 0) screen_write_vnputs(struct screen_write_ctx *, ssize_t, const struct grid_cell *, const char *, va_list); void screen_write_putc(struct screen_write_ctx *, const struct grid_cell *, u_char);
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: kamil Date: Mon Jun 25 18:41:25 UTC 2018 Modified Files: src/external/bsd/tmux/dist: window-copy.c Log Message: Avoid UB in tmux/window_copy_add_formats() Do not perform NULL pointer arithmetics. Reported with MKSANITIZER/UBSan. The patch proposed by upstream https://github.com/tmux/tmux/issues/1382 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tmux/dist/window-copy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/window-copy.c diff -u src/external/bsd/tmux/dist/window-copy.c:1.7 src/external/bsd/tmux/dist/window-copy.c:1.8 --- src/external/bsd/tmux/dist/window-copy.c:1.7 Thu Oct 12 22:17:35 2017 +++ src/external/bsd/tmux/dist/window-copy.c Mon Jun 25 18:41:25 2018 @@ -2418,12 +2418,11 @@ void window_copy_add_formats(struct window_pane *wp, struct format_tree *ft) { struct window_copy_mode_data *data = wp->modedata; - struct screen *s = &data->screen; if (wp->mode != &window_copy_mode) return; - format_add(ft, "selection_present", "%d", s->sel.flag); + format_add(ft, "selection_present", "%d", data->screen.sel.flag); format_add(ft, "scroll_position", "%d", data->oy); }
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: joerg Date: Wed Jan 8 13:45:22 UTC 2020 Modified Files: src/external/bsd/tmux/dist: tmux.h Log Message: Format string annotation for cmdq_insert_hook. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/bsd/tmux/dist/tmux.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/tmux.h diff -u src/external/bsd/tmux/dist/tmux.h:1.14 src/external/bsd/tmux/dist/tmux.h:1.15 --- src/external/bsd/tmux/dist/tmux.h:1.14 Mon Jan 6 21:03:23 2020 +++ src/external/bsd/tmux/dist/tmux.h Wed Jan 8 13:45:21 2020 @@ -2051,7 +2051,7 @@ struct cmdq_item *cmdq_get_callback1(con struct cmdq_item *cmdq_get_error(const char *); void cmdq_insert_after(struct cmdq_item *, struct cmdq_item *); void cmdq_append(struct client *, struct cmdq_item *); -void cmdq_insert_hook(struct session *, struct cmdq_item *, +void printflike(4, 5) cmdq_insert_hook(struct session *, struct cmdq_item *, struct cmd_find_state *, const char *, ...); void cmdq_continue(struct cmdq_item *); void printflike(3, 4) cmdq_format(struct cmdq_item *, const char *,
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Sun Jan 6 00:31:35 UTC 2019 Modified Files: src/external/bsd/tmux/dist: window-tree.c Log Message: don't cast pointers poorly. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/window-tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/window-tree.c diff -u src/external/bsd/tmux/dist/window-tree.c:1.3 src/external/bsd/tmux/dist/window-tree.c:1.4 --- src/external/bsd/tmux/dist/window-tree.c:1.3 Sat Jan 5 16:44:40 2019 +++ src/external/bsd/tmux/dist/window-tree.c Sat Jan 5 19:31:35 2019 @@ -454,9 +454,9 @@ window_tree_build(void *modedata, u_int break; case WINDOW_TREE_PANE: if (window_count_panes(data->fs.wl->window) == 1) - *tag = (uint64_t)data->fs.wl; + *tag = (uintptr_t)data->fs.wl; else - *tag = (uint64_t)data->fs.wp; + *tag = (uintptr_t)data->fs.wp; break; } } @@ -1100,7 +1100,7 @@ window_tree_mouse(struct window_tree_mod loop++; } if (wl != NULL) - mode_tree_set_current(data->data, (uint64_t)wl); + mode_tree_set_current(data->data, (uintptr_t)wl); return ('\r'); } if (item->type == WINDOW_TREE_WINDOW) { @@ -1114,7 +1114,7 @@ window_tree_mouse(struct window_tree_mod loop++; } if (wp != NULL) - mode_tree_set_current(data->data, (uint64_t)wp); + mode_tree_set_current(data->data, (uintptr_t)wp); return ('\r'); } return (KEYC_NONE);
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: wiz Date: Tue May 19 20:00:03 UTC 2020 Modified Files: src/external/bsd/tmux/dist: tmux.1 Log Message: Use fixed date in man page. For MKREPRO build. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tmux/dist/tmux.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/tmux.1 diff -u src/external/bsd/tmux/dist/tmux.1:1.11 src/external/bsd/tmux/dist/tmux.1:1.12 --- src/external/bsd/tmux/dist/tmux.1:1.11 Mon Jan 6 21:03:23 2020 +++ src/external/bsd/tmux/dist/tmux.1 Tue May 19 20:00:03 2020 @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate$ +.Dd January 6, 2020 .Dt TMUX 1 .Os .Sh NAME
CVS commit: src/external/bsd/tmux/dist/compat
Module Name:src Committed By: plunky Date: Wed Aug 31 20:13:31 UTC 2011 Modified Files: src/external/bsd/tmux/dist/compat: imsg-buffer.c imsg.c Log Message: extend __clang__ hack for __PCC__ also (CMSG_SPACE() is not a constant) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/compat/imsg-buffer.c \ src/external/bsd/tmux/dist/compat/imsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/compat/imsg-buffer.c diff -u src/external/bsd/tmux/dist/compat/imsg-buffer.c:1.3 src/external/bsd/tmux/dist/compat/imsg-buffer.c:1.4 --- src/external/bsd/tmux/dist/compat/imsg-buffer.c:1.3 Wed Aug 17 18:48:36 2011 +++ src/external/bsd/tmux/dist/compat/imsg-buffer.c Wed Aug 31 20:13:31 2011 @@ -1,4 +1,4 @@ -/* $Id: imsg-buffer.c,v 1.3 2011/08/17 18:48:36 jmmv Exp $ */ +/* $Id: imsg-buffer.c,v 1.4 2011/08/31 20:13:31 plunky Exp $ */ /* $OpenBSD: imsg-buffer.c,v 1.3 2010/05/26 13:56:07 nicm Exp $ */ /* @@ -228,7 +228,7 @@ struct cmsghdr *cmsg; union { struct cmsghdr hdr; -#ifdef __clang__ +#if defined(__clang__) || defined(__PCC__) char buf[128]; #else char buf[CMSG_SPACE(sizeof(int))]; Index: src/external/bsd/tmux/dist/compat/imsg.c diff -u src/external/bsd/tmux/dist/compat/imsg.c:1.3 src/external/bsd/tmux/dist/compat/imsg.c:1.4 --- src/external/bsd/tmux/dist/compat/imsg.c:1.3 Wed Aug 17 18:48:36 2011 +++ src/external/bsd/tmux/dist/compat/imsg.c Wed Aug 31 20:13:31 2011 @@ -1,4 +1,4 @@ -/* $Id: imsg.c,v 1.3 2011/08/17 18:48:36 jmmv Exp $ */ +/* $Id: imsg.c,v 1.4 2011/08/31 20:13:31 plunky Exp $ */ /* $OpenBSD: imsg.c,v 1.3 2010/05/26 13:56:07 nicm Exp $ */ /* @@ -48,7 +48,7 @@ struct cmsghdr *cmsg; union { struct cmsghdr hdr; -#ifdef __clang__ +#if defined(__clang__) || defined(__PCC__) char buf[128]; #else char buf[CMSG_SPACE(sizeof(int) * 16)];
CVS commit: src/external/bsd/tmux/dist/compat
Module Name:src Committed By: joerg Date: Mon May 30 16:20:58 UTC 2011 Modified Files: src/external/bsd/tmux/dist/compat: imsg-buffer.c imsg.c Log Message: Hacks for CMSG_SPACE() not being an ICE To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tmux/dist/compat/imsg-buffer.c \ src/external/bsd/tmux/dist/compat/imsg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/compat/imsg-buffer.c diff -u src/external/bsd/tmux/dist/compat/imsg-buffer.c:1.1.1.1 src/external/bsd/tmux/dist/compat/imsg-buffer.c:1.2 --- src/external/bsd/tmux/dist/compat/imsg-buffer.c:1.1.1.1 Thu Mar 10 09:15:41 2011 +++ src/external/bsd/tmux/dist/compat/imsg-buffer.c Mon May 30 16:20:58 2011 @@ -1,4 +1,4 @@ -/* $Id: imsg-buffer.c,v 1.1.1.1 2011/03/10 09:15:41 jmmv Exp $ */ +/* $Id: imsg-buffer.c,v 1.2 2011/05/30 16:20:58 joerg Exp $ */ /* $OpenBSD: imsg-buffer.c,v 1.3 2010/05/26 13:56:07 nicm Exp $ */ /* @@ -228,7 +228,11 @@ struct cmsghdr *cmsg; union { struct cmsghdr hdr; +#ifdef __clang__ + char buf[128]; +#else char buf[CMSG_SPACE(sizeof(int))]; +#endif } cmsgbuf; bzero(&iov, sizeof(iov)); @@ -248,7 +252,7 @@ if (buf != NULL && buf->fd != -1) { msg.msg_control = (caddr_t)&cmsgbuf.buf; - msg.msg_controllen = sizeof(cmsgbuf.buf); + msg.msg_controllen = CMSG_SPACE(sizeof(int)); cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = CMSG_LEN(sizeof(int)); cmsg->cmsg_level = SOL_SOCKET; Index: src/external/bsd/tmux/dist/compat/imsg.c diff -u src/external/bsd/tmux/dist/compat/imsg.c:1.1.1.1 src/external/bsd/tmux/dist/compat/imsg.c:1.2 --- src/external/bsd/tmux/dist/compat/imsg.c:1.1.1.1 Thu Mar 10 09:15:41 2011 +++ src/external/bsd/tmux/dist/compat/imsg.c Mon May 30 16:20:58 2011 @@ -1,4 +1,4 @@ -/* $Id: imsg.c,v 1.1.1.1 2011/03/10 09:15:41 jmmv Exp $ */ +/* $Id: imsg.c,v 1.2 2011/05/30 16:20:58 joerg Exp $ */ /* $OpenBSD: imsg.c,v 1.3 2010/05/26 13:56:07 nicm Exp $ */ /* @@ -48,7 +48,11 @@ struct cmsghdr *cmsg; union { struct cmsghdr hdr; +#ifdef __clang__ + char buf[128]; +#else char buf[CMSG_SPACE(sizeof(int) * 16)]; +#endif } cmsgbuf; struct iovec iov; ssize_t n; @@ -62,7 +66,7 @@ msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = &cmsgbuf.buf; - msg.msg_controllen = sizeof(cmsgbuf.buf); + msg.msg_controllen = CMSG_SPACE(sizeof(int) * 16); if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) { if (errno != EINTR && errno != EAGAIN) {
CVS commit: src/external/bsd/tmux/dist/compat
Module Name:src Committed By: christos Date: Thu Jan 29 03:34:37 UTC 2015 Removed Files: src/external/bsd/tmux/dist/compat: strtonum.c Log Message: no need for strtonum.c anymore. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/tmux/dist/compat/strtonum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/tmux/dist/compat
Module Name:src Committed By: christos Date: Tue Nov 26 01:26:42 UTC 2013 Removed Files: src/external/bsd/tmux/dist/compat: asprintf.c bitstring.h closefrom.c daemon.c fgetln.c forkpty-aix.c forkpty-hpux.c forkpty-sunos.c getopt.c queue.h setenv.c strcasestr.c strlcat.c strlcpy.c strsep.c tree.h unvis.c vis.c vis.h Log Message: delete things that we don't need so we don't use them accidentally. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/tmux/dist/compat/asprintf.c \ src/external/bsd/tmux/dist/compat/bitstring.h \ src/external/bsd/tmux/dist/compat/closefrom.c \ src/external/bsd/tmux/dist/compat/daemon.c \ src/external/bsd/tmux/dist/compat/fgetln.c \ src/external/bsd/tmux/dist/compat/forkpty-aix.c \ src/external/bsd/tmux/dist/compat/forkpty-sunos.c \ src/external/bsd/tmux/dist/compat/getopt.c \ src/external/bsd/tmux/dist/compat/queue.h \ src/external/bsd/tmux/dist/compat/setenv.c \ src/external/bsd/tmux/dist/compat/strcasestr.c \ src/external/bsd/tmux/dist/compat/strlcat.c \ src/external/bsd/tmux/dist/compat/strlcpy.c \ src/external/bsd/tmux/dist/compat/strsep.c \ src/external/bsd/tmux/dist/compat/tree.h \ src/external/bsd/tmux/dist/compat/unvis.c \ src/external/bsd/tmux/dist/compat/vis.c \ src/external/bsd/tmux/dist/compat/vis.h cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/tmux/dist/compat/forkpty-hpux.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/tmux/dist/compat
Module Name:src Committed By: christos Date: Sat Jun 3 14:47:25 UTC 2017 Modified Files: src/external/bsd/tmux/dist/compat: fparseln.c Log Message: remove my copyright (and clauses 3/4) To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/compat/fparseln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/compat/fparseln.c diff -u src/external/bsd/tmux/dist/compat/fparseln.c:1.1.1.2 src/external/bsd/tmux/dist/compat/fparseln.c:1.2 --- src/external/bsd/tmux/dist/compat/fparseln.c:1.1.1.2 Sat Apr 22 20:21:38 2017 +++ src/external/bsd/tmux/dist/compat/fparseln.c Sat Jun 3 10:47:25 2017 @@ -12,11 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed by Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES