Commit Graph

58 Commits

Author SHA1 Message Date
Thomas Adam
675c6b3773 Merge branch 'obsd-master'
Sync from OpenBSD.
2012-12-31 18:50:37 +00:00
Nicholas Marriott
9714880283 Change load_cfg to fix a crash reported by jasper. 2012-12-13 15:36:16 +00:00
Thomas Adam
fb83914bd7 Merge branch 'obsd-master'
Sync from OpenBSD.
2012-12-08 20:29:37 +00:00
Nicholas Marriott
8600fe054b Use strlcat not strncat in load_cfg and some other trivial tidying from
Tiago Cunha.
2012-12-06 13:06:05 +00:00
Nicholas Marriott
8264e92b37 Fix return value of load_cfg, from Thomas Adam. 2012-11-27 22:59:34 +00:00
Thomas Adam
39631edb98 Merge branch 'obsd-master'
Sync from OpenBSD.
2012-11-27 18:12:04 +00:00
Nicholas Marriott
9b8998aeec Correctly aggregate together errors from nested config files (with
source-file). Fix by Thomas Adam, reported by Sam Livingstone-Gray
2012-11-27 16:12:29 +00:00
Thomas Adam
c04aa90207 Merge branch 'obsd-master'
Sync from OpenBSD.

* obsd-master:
  Add halfpage commands to mode command string table (missed by accident), from Thomas Adam.
  Clarify some points about config files, notably that they are only read at server start. From Thomas Adam.
  Use a utility function for common code to show errors in config file, from Thomas Adam.
2012-11-22 13:24:14 +00:00
Nicholas Marriott
827b311c81 Use a utility function for common code to show errors in config file,
from Thomas Adam.
2012-11-19 10:38:06 +00:00
Tiago Cunha
1f5e6e35d5 Sync OpenBSD patchset 1151:
Make command exec functions return an enum rather than -1/0/1 values and
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence. Most of the
work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
2012-07-11 19:37:32 +00:00
Tiago Cunha
a432fcd306 Sync OpenBSD patchset 1150:
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-11 19:34:16 +00:00
Nicholas Marriott
ede8312d59 Make command exec functions return an enum rather than -1/0/1 values and
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence. Most of the
work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
2012-07-11 07:10:15 +00:00
Nicholas Marriott
df912e3540 xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
Tiago Cunha
04bf0d8efc Sync OpenBSD patchset 1113:
Ignore line continuation when escaped as \\, from Simon Nicolussi.
2012-05-22 20:50:51 +00:00
Nicholas Marriott
ac7e2f13e9 Ignore line continuation when escaped as \\, from Simon Nicolussi. 2012-05-17 21:21:31 +00:00
Tiago Cunha
4a01da19df Sync OpenBSD patchset 951:
Support \ for line continuation in the configuration file, from Julius
Plenz.
2011-08-25 21:14:23 +00:00
Nicholas Marriott
0588168a64 Support \ for line continuation in the configuration file, from Julius
Plenz.
2011-08-24 10:46:01 +00:00
Tiago Cunha
391f1f08c0 Expand the Id keyword. 2011-07-09 09:42:33 +00:00
Tiago Cunha
210b4553a5 Sync OpenBSD patchset 811:
Allow the config file parser and source-file to return "don't exit" to
the client to let attach work from configuration files.
2010-12-30 22:26:07 +00:00
Nicholas Marriott
230e39ec35 Allow the config file parser and source-file to return "don't exit" to
the client to let attach work from configuration files.
2010-12-29 21:28:32 +00:00
Tiago Cunha
0d6a64070c Sync OpenBSD patchset 704:
Fix an out-of-date comment.
2010-06-06 00:04:18 +00:00
Nicholas Marriott
608eef731a Fix an out-of-date comment. 2010-05-25 19:47:30 +00:00
Tiago Cunha
36a80b2cd6 Sync OpenBSD patchset 640:
Use the array.h code for the causes list.
2010-02-08 18:29:32 +00:00
Tiago Cunha
a32d095c97 Sync OpenBSD patchset 635:
Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode
displaying them.
2010-02-08 18:10:07 +00:00
Nicholas Marriott
4651180503 Use the array.h code for the causes list. 2010-02-06 23:22:27 +00:00
Nicholas Marriott
8aba77b7be Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode
displaying them.
2010-02-06 17:15:33 +00:00
Tiago Cunha
c12e0b0708 Sync OpenBSD patchset 567:
Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.
2009-11-28 14:50:37 +00:00
Nicholas Marriott
4ca857e0e9 Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.
2009-11-26 21:37:13 +00:00
Tiago Cunha
a5acabd923 Sync OpenBSD patchset 467:
tabs are better; ok nicm
2009-10-28 23:12:38 +00:00
Theo Deraadt
ed62d1263c tabs are better; ok nicm 2009-10-26 21:42:04 +00:00
Tiago Cunha
35b926c445 Sync OpenBSD patchset 290:
When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.
2009-08-24 16:27:03 +00:00
Tiago Cunha
2e2e762743 Sync OpenBSD patchset 289:
The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.
2009-08-24 16:24:18 +00:00
Nicholas Marriott
c7394ac4e0 When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.
2009-08-23 17:29:51 +00:00
Nicholas Marriott
43cd40e87a The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.
2009-08-23 16:45:00 +00:00
Tiago Cunha
1297c39a31 Sync OpenBSD patchset 233:
Don't leak in the (rare) case of an invalid command at the end of a file not
terminated by a \n.
2009-08-09 17:53:50 +00:00
Nicholas Marriott
b3107d26df Don't leak in the (rare) case of an invalid command at the end of a file not
terminated by a \n.
2009-08-09 08:34:17 +00:00
Tiago Cunha
56dd5dfff4 Sync OpenBSD patchset 206:
Don't babysit people and let them try to load /dev/zero or (more useful)
/dev/null if they want.
2009-07-30 21:07:23 +00:00
Nicholas Marriott
61f3fc7e4d Don't babysit people and let them try to load /dev/zero or (more useful)
/dev/null if they want.
2009-07-30 17:46:12 +00:00
Nicholas Marriott
a5830b9603 Restore $Id$ and add script to do so. 2009-06-25 16:21:32 +00:00
Nicholas Marriott
abb5e36199 Unused prototypes. Found by lint, no binary change. 2009-06-25 16:06:09 +00:00
Nicholas Marriott
9144d30848 Unused prototypes. Found by lint, no binary change. 2009-06-25 06:00:45 +00:00
Nicholas Marriott
35876eaab9 Import tmux, a terminal multiplexor allowing (among other things) a single
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one terminal and moved to another.

ok deraadt pirofti
2009-06-01 22:58:49 +00:00
Nicholas Marriott
a8ec5f1d09 stat(2) files before trying to load them to avoid problems, for example with "source-file /dev/zero".
This commit dedicated to Tom: protecting idiots from their own stupidity for more than 20 years.
2009-05-21 19:38:51 +00:00
Nicholas Marriott
75012d59c2 Close .tmux.conf... DOH. 2009-03-31 22:23:43 +00:00
Nicholas Marriott
a15f8fc4a6 Support command sequences separated by " ; ". Also clean up command printing. 2009-01-18 14:40:48 +00:00
Nicholas Marriott
ba597da72e Environment variables in configuration file. 2008-07-25 17:20:40 +00:00
Nicholas Marriott
2bd92e5f18 Lose unnecessary flags on context. 2008-06-21 10:19:36 +00:00
Nicholas Marriott
85135221f0 Handle commented lines. 2008-06-19 21:20:27 +00:00
Nicholas Marriott
0695db3889 Convert cfg.c to use cmd-string stuff. 2008-06-19 21:13:56 +00:00
Nicholas Marriott
21a9b3f6e8 Fix some stupid parser bugs, most notably forgetting to allocate space for \0. 2008-06-16 20:25:54 +00:00