Skip to content

Commit 9c0f3a4

Browse files
committed
sync missing stuff from last sync
1 parent e3144b6 commit 9c0f3a4

File tree

10 files changed

+126
-90
lines changed

10 files changed

+126
-90
lines changed

compat/asprintf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ vasprintf(char **ret, const char *fmt, va_list ap)
5353

5454
*ret = xmalloc(n + 1);
5555
if ((n = vsnprintf(*ret, n + 1, fmt, ap2)) < 0) {
56-
xfree(*ret);
56+
free(*ret);
5757
goto error;
5858
}
5959

compat/queue.h

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* $Id$ */
2-
/* $OpenBSD: queue.h,v 1.31 2005/11/25 08:06:25 otto Exp $ */
1+
/* $OpenBSD: queue.h,v 1.36 2012/04/11 13:29:14 naddy Exp $ */
32
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
43

54
/*
@@ -37,7 +36,7 @@
3736
#define _SYS_QUEUE_H_
3837

3938
/*
40-
* This file defines five types of data structures: singly-linked lists,
39+
* This file defines five types of data structures: singly-linked lists,
4140
* lists, simple queues, tail queues, and circular queues.
4241
*
4342
*
@@ -83,7 +82,7 @@
8382
* For details on the use of these macros, see the queue(3) manual page.
8483
*/
8584

86-
#ifdef QUEUE_MACRO_DEBUG
85+
#if defined(QUEUE_MACRO_DEBUG) || (defined(_KERNEL) && defined(DIAGNOSTIC))
8786
#define _Q_INVALIDATE(a) (a) = ((void *)-1)
8887
#else
8988
#define _Q_INVALIDATE(a)
@@ -96,15 +95,15 @@
9695
struct name { \
9796
struct type *slh_first; /* first element */ \
9897
}
99-
98+
10099
#define SLIST_HEAD_INITIALIZER(head) \
101100
{ NULL }
102-
101+
103102
#define SLIST_ENTRY(type) \
104103
struct { \
105104
struct type *sle_next; /* next element */ \
106105
}
107-
106+
108107
/*
109108
* Singly-linked List access methods.
110109
*/
@@ -118,10 +117,10 @@ struct { \
118117
(var) != SLIST_END(head); \
119118
(var) = SLIST_NEXT(var, field))
120119

121-
#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
122-
for ((varp) = &SLIST_FIRST((head)); \
123-
((var) = *(varp)) != SLIST_END(head); \
124-
(varp) = &SLIST_NEXT((var), field))
120+
#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
121+
for ((var) = SLIST_FIRST(head); \
122+
(var) && ((tvar) = SLIST_NEXT(var, field), 1); \
123+
(var) = (tvar))
125124

126125
/*
127126
* Singly-linked List functions.
@@ -140,7 +139,7 @@ struct { \
140139
(head)->slh_first = (elm); \
141140
} while (0)
142141

143-
#define SLIST_REMOVE_NEXT(head, elm, field) do { \
142+
#define SLIST_REMOVE_AFTER(elm, field) do { \
144143
(elm)->field.sle_next = (elm)->field.sle_next->field.sle_next; \
145144
} while (0)
146145

@@ -192,6 +191,11 @@ struct { \
192191
(var)!= LIST_END(head); \
193192
(var) = LIST_NEXT(var, field))
194193

194+
#define LIST_FOREACH_SAFE(var, head, field, tvar) \
195+
for ((var) = LIST_FIRST(head); \
196+
(var) && ((tvar) = LIST_NEXT(var, field), 1); \
197+
(var) = (tvar))
198+
195199
/*
196200
* List functions.
197201
*/
@@ -270,6 +274,11 @@ struct { \
270274
(var) != SIMPLEQ_END(head); \
271275
(var) = SIMPLEQ_NEXT(var, field))
272276

277+
#define SIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \
278+
for ((var) = SIMPLEQ_FIRST(head); \
279+
(var) && ((tvar) = SIMPLEQ_NEXT(var, field), 1); \
280+
(var) = (tvar))
281+
273282
/*
274283
* Simple queue functions.
275284
*/
@@ -301,6 +310,12 @@ struct { \
301310
(head)->sqh_last = &(head)->sqh_first; \
302311
} while (0)
303312

313+
#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \
314+
if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
315+
== NULL) \
316+
(head)->sqh_last = &(elm)->field.sqe_next; \
317+
} while (0)
318+
304319
/*
305320
* Tail queue definitions.
306321
*/
@@ -319,8 +334,8 @@ struct { \
319334
struct type **tqe_prev; /* address of previous next element */ \
320335
}
321336

322-
/*
323-
* tail queue access methods
337+
/*
338+
* tail queue access methods
324339
*/
325340
#define TAILQ_FIRST(head) ((head)->tqh_first)
326341
#define TAILQ_END(head) NULL
@@ -338,11 +353,24 @@ struct { \
338353
(var) != TAILQ_END(head); \
339354
(var) = TAILQ_NEXT(var, field))
340355

356+
#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
357+
for ((var) = TAILQ_FIRST(head); \
358+
(var) != TAILQ_END(head) && \
359+
((tvar) = TAILQ_NEXT(var, field), 1); \
360+
(var) = (tvar))
361+
362+
341363
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
342364
for((var) = TAILQ_LAST(head, headname); \
343365
(var) != TAILQ_END(head); \
344366
(var) = TAILQ_PREV(var, headname, field))
345367

368+
#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
369+
for ((var) = TAILQ_LAST(head, headname); \
370+
(var) != TAILQ_END(head) && \
371+
((tvar) = TAILQ_PREV(var, headname, field), 1); \
372+
(var) = (tvar))
373+
346374
/*
347375
* Tail queue functions.
348376
*/
@@ -427,7 +455,7 @@ struct { \
427455
}
428456

429457
/*
430-
* Circular queue access methods
458+
* Circular queue access methods
431459
*/
432460
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
433461
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
@@ -442,11 +470,23 @@ struct { \
442470
(var) != CIRCLEQ_END(head); \
443471
(var) = CIRCLEQ_NEXT(var, field))
444472

473+
#define CIRCLEQ_FOREACH_SAFE(var, head, field, tvar) \
474+
for ((var) = CIRCLEQ_FIRST(head); \
475+
(var) != CIRCLEQ_END(head) && \
476+
((tvar) = CIRCLEQ_NEXT(var, field), 1); \
477+
(var) = (tvar))
478+
445479
#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
446480
for((var) = CIRCLEQ_LAST(head); \
447481
(var) != CIRCLEQ_END(head); \
448482
(var) = CIRCLEQ_PREV(var, field))
449483

484+
#define CIRCLEQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
485+
for ((var) = CIRCLEQ_LAST(head, headname); \
486+
(var) != CIRCLEQ_END(head) && \
487+
((tvar) = CIRCLEQ_PREV(var, headname, field), 1); \
488+
(var) = (tvar))
489+
450490
/*
451491
* Circular queue functions.
452492
*/

compat/tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: tree.h 2788 2012-05-03 20:39:42Z tcunha $ */
1+
/* $Id$ */
22
/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */
33
/*
44
* Copyright 2002 Niels Provos <[email protected]>

examples/h-boetes.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id$
1+
# $Id: h-boetes.conf,v 1.2 2009-10-25 21:45:26 nicm Exp $
22
#
33
# From Han Boetes.
44

examples/n-marriott.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id$
1+
# $Id: n-marriott.conf,v 1.11 2009-11-24 19:03:59 nicm Exp $
22
#
33
# By Nicholas Marriott. Public domain.
44

examples/screen-keys.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id$
1+
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $
22
#
33
# By Nicholas Marriott. Public domain.
44
#

examples/t-williams.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id$
1+
# $Id: t-williams.conf,v 1.1 2009-11-02 18:59:28 nicm Exp $
22
#
33
# ~/.tmux.conf - tmux terminal multiplexer config
44
# Thayer Williams (http://cinderwick.ca)

examples/tmux.vim

Lines changed: 60 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim syntax file
22
" Language: tmux(1) configuration file
3-
" Maintainer: Tiago Cunha <[email protected]>
3+
" Maintainer: Tiago Cunha <[email protected]>
44
" Last Change: $Date: 2010-07-27 18:29:07 $
55
" License: This file is placed in the public domain.
66

@@ -16,71 +16,67 @@ syntax case match
1616
syn keyword tmuxAction any current none
1717
syn keyword tmuxBoolean off on
1818

19-
syn keyword tmuxCmds detach[-client] ls list-sessions neww new-window
20-
syn keyword tmuxCmds bind[-key] unbind[-key] prev[ious-window] last[-window]
21-
syn keyword tmuxCmds lsk list-keys set[-option] renamew rename-window selectw
22-
syn keyword tmuxCmds select-window lsw list-windows attach[-session]
23-
syn keyword tmuxCmds send-prefix refresh[-client] killw kill-window lsc
24-
syn keyword tmuxCmds list-clients linkw link-window unlinkw unlink-window
25-
syn keyword tmuxCmds next[-window] send[-keys] swapw swap-window
26-
syn keyword tmuxCmds rename[-session] kill-session switchc switch-client
27-
syn keyword tmuxCmds has[-session] copy-mode pasteb paste-buffer
28-
syn keyword tmuxCmds new[-session] start[-server] kill-server setw
29-
syn keyword tmuxCmds set-window-option show[-options] showw show-window-options
30-
syn keyword tmuxCmds command-prompt setb set-buffer showb show-buffer lsb
31-
syn keyword tmuxCmds list-buffers deleteb delete-buffer lscm list-commands
32-
syn keyword tmuxCmds movew move-window respawnw respawn-window
33-
syn keyword tmuxCmds source[-file] info server-info clock-mode lock[-server]
34-
syn keyword tmuxCmds saveb save-buffer killp
35-
syn keyword tmuxCmds kill-pane resizep resize-pane selectp select-pane swapp
36-
syn keyword tmuxCmds swap-pane splitw split-window choose-session
37-
syn keyword tmuxCmds choose-window loadb load-buffer copyb copy-buffer suspendc
38-
syn keyword tmuxCmds suspend-client findw find-window breakp break-pane nextl
39-
syn keyword tmuxCmds next-layout rotatew rotate-window confirm[-before]
40-
syn keyword tmuxCmds clearhist clear-history selectl select-layout if[-shell]
41-
syn keyword tmuxCmds display[-message] setenv set-environment showenv
42-
syn keyword tmuxCmds show-environment choose-client displayp display-panes
43-
syn keyword tmuxCmds run[-shell] lockc lock-client locks lock-session lsp
44-
syn keyword tmuxCmds list-panes pipep pipe-pane showmsgs show-messages capturep
45-
syn keyword tmuxCmds capture-pane joinp join-pane choose-buffer
19+
syn keyword tmuxCmds
20+
\ attach[-session] detach[-client] has[-session] kill-server
21+
\ kill-session lsc list-clients lscm list-commands ls list-sessions
22+
\ lockc lock-client locks lock-session new[-session] refresh[-client]
23+
\ rename[-session] showmsgs show-messages source[-file] start[-server]
24+
\ suspendc suspend-client switchc switch-client
25+
\ copy-mode
26+
\ breakp break-pane capturep capture-pane choose-client choose-session
27+
\ choose-tree choose-window displayp display-panes findw find-window
28+
\ joinp join-pane killp kill-pane killw kill-window lastp last-pane
29+
\ last[-window] linkw link-window lsp list-panes lsw list-windows movep
30+
\ move-pane movew move-window neww new-window nextl next-layout
31+
\ next[-window] pipep pipe-pane prevl previous-layout prev[ious-window]
32+
\ renamew rename-window resizep resize-pane respawnp respawn-pane
33+
\ respawnw respawn-window rotatew rotate-window selectl select-layout
34+
\ selectp select-pane selectw select-window splitw split-window swapp
35+
\ swap-pane swapw swap-window unlinkw unlink-window
36+
\ bind[-key] lsk list-keys send[-keys] send-prefix unbind[-key]
37+
\ set[-option] setw set-window-option show[-options] showw
38+
\ show-window-options
39+
\ setenv set-environment showenv show-environment
40+
\ command-prompt confirm[-before] display[-message]
41+
\ choose-buffer clearhist clear-history deleteb delete-buffer lsb
42+
\ list-buffers loadb load-buffer pasteb paste-buffer saveb save-buffer
43+
\ setb set-buffer showb show-buffer
44+
\ clock-mode if[-shell] lock[-server] run[-shell] [server-]info
4645

47-
syn keyword tmuxOptsSet prefix prefix2 status status-fg status-bg bell-action
48-
syn keyword tmuxOptsSet default-command history-limit status-left status-right
49-
syn keyword tmuxOptsSet status-interval set-titles display-time buffer-limit
50-
syn keyword tmuxOptsSet status-left-length status-right-length status-position
51-
syn keyword tmuxOptsSet message-[command-]bg lock-after-time default-path
52-
syn keyword tmuxOptsSet message-[command-]attr status-attr set-remain-on-exit
53-
syn keyword tmuxOptsSet status-utf8 default-terminal visual-activity repeat-time
54-
syn keyword tmuxOptsSet visual-bell visual-content status-justify status-keys
55-
syn keyword tmuxOptsSet terminal-overrides status-left-attr status-left-bg
56-
syn keyword tmuxOptsSet status-left-fg status-right-attr status-right-bg
57-
syn keyword tmuxOptsSet status-right-fg update-environment base-index
58-
syn keyword tmuxOptsSet display-panes-colour display-panes-time default-shell
59-
syn keyword tmuxOptsSet set-titles-string lock-command lock-server
60-
syn keyword tmuxOptsSet mouse-select-pane message-limit quiet escape-time
61-
syn keyword tmuxOptsSet pane-active-border-bg pane-active-border-fg
62-
syn keyword tmuxOptsSet pane-border-bg pane-border-fg message-[command-]fg
63-
syn keyword tmuxOptsSet display-panes-active-colour alternate-screen
64-
syn keyword tmuxOptsSet detach-on-destroy word-separators
65-
syn keyword tmuxOptsSet destroy-unattached exit-unattached set-clipboard
66-
syn keyword tmuxOptsSet bell-on-alert mouse-select-window mouse-utf8
46+
syn keyword tmuxOptsSet
47+
\ buffer-limit escape-time exit-unattached exit-unattached quiet
48+
\ set-clipboard
49+
\ base-index bell-action bell-on-alert default-command default-path
50+
\ default-shell default-terminal destroy-unattached detach-on-destroy
51+
\ display-panes-[active-]colour display-[panes-]time history-limit
52+
\ lock-after-time lock-command lock-server message-[command-]attr
53+
\ message-[command-]bg message-[command-]fg message-limit
54+
\ mouse-resize-pane mouse-select-pane mouse-select-window mouse-utf8
55+
\ pane-[active-]border-bg pane-[active-]border-fg prefix prefix2
56+
\ renumber-windows repeat-time set-remain-on-exit set-titles
57+
\ set-titles-string status status-attr status-bg status-fg
58+
\ status-interval status-justify status-keys status-left
59+
\ status-left-attr status-left-bg status-left-fg status-left-length
60+
\ status-position status-right status-right-attr status-right-bg
61+
\ status-right-fg status-right-length status-utf8 terminal-overrides
62+
\ update-environment visual-activity visual-bell visual-content
63+
\ visual-silence word-separators
6764

68-
syn keyword tmuxOptsSetw monitor-activity aggressive-resize force-width
69-
syn keyword tmuxOptsSetw force-height remain-on-exit uft8 mode-fg mode-bg
70-
syn keyword tmuxOptsSetw mode-keys clock-mode-colour clock-mode-style
71-
syn keyword tmuxOptsSetw xterm-keys mode-attr window-status-attr
72-
syn keyword tmuxOptsSetw window-status-bg window-status-fg automatic-rename
73-
syn keyword tmuxOptsSetw main-pane-width main-pane-height monitor-content
74-
syn keyword tmuxOptsSetw window-status-current-attr window-status-current-bg
75-
syn keyword tmuxOptsSetw window-status-current-fg mode-mouse synchronize-panes
76-
syn keyword tmuxOptsSetw window-status-format window-status-current-format
77-
syn keyword tmuxOptsSetw window-status-activity-attr
78-
syn keyword tmuxOptsSetw window-status-activity-bg window-status-activity-fg
79-
syn keyword tmuxOptsSetw window-status-bell-attr
80-
syn keyword tmuxOptsSetw window-status-bell-bg window-status-bell-fg
81-
syn keyword tmuxOptsSetw window-status-content-attr
82-
syn keyword tmuxOptsSetw window-status-content-bg window-status-content-fg
83-
syn keyword tmuxOptsSetw pane-base-index other-pane-height other-pane-width
65+
syn keyword tmuxOptsSetw
66+
\ aggressive-resize alternate-screen automatic-rename
67+
\ c0-change-interval c0-change-trigger clock-mode-colour
68+
\ clock-mode-style force-height force-width layout-history-limit
69+
\ main-pane-height main-pane-width mode-attr mode-bg mode-fg move-keys
70+
\ mode-mouse monitor-activity monitor-content monitor-silence
71+
\ other-pane-height other-pane-width pane-base-index remain-on-exit
72+
\ synchronize-panes utf8 window-status-bell-attr window-status-bell-bg
73+
\ window-status-bell-fg window-status-content-attr
74+
\ window-status-content-bg window-status-content-fg
75+
\ window-status-activity-attr window-status-activity-bg
76+
\ window-status-activity-fg window-status-attr
77+
\ window-status-[current-]attr window-status-[current-]bg
78+
\ window-status-[current-]fg window-status-[current-]format
79+
\ window-status-separator xterm-keys wrap-search
8480

8581
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
8682

examples/vim-keys.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id$
1+
# $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $
22
#
33
# vim-keys.conf, v1.2 2010/09/12
44
#

www/index.html.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
<p id="upper-left-title">tmux</p>
1313
<ul id="left-menu">
1414
<li><a href="http://downloads.sourceforge.net/tmux/tmux-%%VERSION%%.tar.gz">Download</a></li>
15-
<li><a href="http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/NOTES">Release Notes</a></li>
15+
<li><a href="http://tmux.git.sourceforge.net/git/gitweb.cgi?p=tmux/tmux;a=blob;f=NOTES">Release Notes</a></li>
1616
<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=tmux&sektion=1">Manual Page</a></li>
17-
<li><a href="http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/FAQ">FAQ</a></li>
17+
<li><a href="http://tmux.git.sourceforge.net/git/gitweb.cgi?p=tmux/tmux;a=blob;f=FAQ">FAQ</a></li>
1818
<li><a href="http://www.openbsd.org/faq/faq7.html#tmux">tmux in the OpenBSD FAQ</a></li>
19-
<li><a href="http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/examples/">Examples</a></li>
19+
<li><a href="http://tmux.git.sourceforge.net/git/gitweb.cgi?p=tmux/tmux;a=tree;f=examples">Examples</a></li>
2020
<li>&nbsp;</li>
2121
<li class="menu-headings">Source Code</li>
22-
<li><a href="http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/">SourceForge</a></li>
22+
<li><a href="http://tmux.git.sourceforge.net/git/gitweb.cgi?p=tmux/tmux;a=tree">SourceForge</a></li>
2323
<li><a href="http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/tmux/">OpenBSD</a></li>
2424
<li>&nbsp;</li>
2525
<li class="menu-headings">Support</li>

0 commit comments

Comments
 (0)