diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-09-17 17:25:14 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-09-17 17:25:14 +0000 |
commit | ae1ab68ad0207dce4fb0261328a5501c0fb4ddc0 (patch) | |
tree | c35ac850d2268d406e2d75b11a58d02ac7f3f783 /libcons | |
parent | 9ec55781e0a2d1a58834ea9bc29d555a14d524bb (diff) |
2002-09-17 Marcus Brinkmann <marcus@gnu.org>
* opts-std-startup.c (OPT_NO_JUMP_DOWN_ON_INPUT): New macro.
(OPT_NO_JUMP_DOWN_ON_OUTPUT): Likewise.
(_cons_jump_down_on_input): Default to 1.
(startup_options): Add new options --no-jump-down-on-input and
--no-jump-down-on-output.
(parse_startup_opt): Handle these new options.
Diffstat (limited to 'libcons')
-rw-r--r-- | libcons/ChangeLog | 9 | ||||
-rw-r--r-- | libcons/opts-std-startup.c | 22 |
2 files changed, 27 insertions, 4 deletions
diff --git a/libcons/ChangeLog b/libcons/ChangeLog index b9aeef5d..5a34bd41 100644 --- a/libcons/ChangeLog +++ b/libcons/ChangeLog @@ -1,3 +1,12 @@ +2002-09-17 Marcus Brinkmann <marcus@gnu.org> + + * opts-std-startup.c (OPT_NO_JUMP_DOWN_ON_INPUT): New macro. + (OPT_NO_JUMP_DOWN_ON_OUTPUT): Likewise. + (_cons_jump_down_on_input): Default to 1. + (startup_options): Add new options --no-jump-down-on-input and + --no-jump-down-on-output. + (parse_startup_opt): Handle these new options. + 2002-09-16 Marcus Brinkmann <marcus@gnu.org> * cons.h: Add prototype for cons_vcons_clear. diff --git a/libcons/opts-std-startup.c b/libcons/opts-std-startup.c index 2490737d..085f960b 100644 --- a/libcons/opts-std-startup.c +++ b/libcons/opts-std-startup.c @@ -25,9 +25,11 @@ /* Option keys for long-only options in diskfs_common_options. */ -#define OPT_SLACK 600 /* --slack */ -#define OPT_JUMP_DOWN_ON_INPUT 601 /* --jump-down-on-input */ -#define OPT_JUMP_DOWN_ON_OUTPUT 602 /* --jump-down-on-output */ +#define OPT_SLACK 600 /* --slack */ +#define OPT_JUMP_DOWN_ON_INPUT 601 /* --jump-down-on-input */ +#define OPT_NO_JUMP_DOWN_ON_INPUT 602 /* --no-jump-down-on-input */ +#define OPT_JUMP_DOWN_ON_OUTPUT 603 /* --jump-down-on-output */ +#define OPT_NO_JUMP_DOWN_ON_OUTPUT 604 /* --no-jump-down-on-output */ /* Common value for diskfs_common_options and diskfs_default_sync_interval. */ #define DEFAULT_SLACK 100 @@ -40,7 +42,7 @@ int _cons_slack = DEFAULT_SLACK; /* If we jump down on input. */ -int _cons_jump_down_on_input; +int _cons_jump_down_on_input = 1; /* If we jump down on output. */ int _cons_jump_down_on_output; @@ -54,9 +56,13 @@ startup_options[] = { "slack", OPT_SLACK, "RECORDS", 0, "Max number of records the client is" " allowed to lag behind the server (default " DEFAULT_SLACK_STRING ")" }, { "jump-down-on-input", OPT_JUMP_DOWN_ON_INPUT, NULL, 0, + "End scrollback when something is entered (default)" }, + { "no-jump-down-on-input", OPT_NO_JUMP_DOWN_ON_INPUT, NULL, 0, "End scrollback when something is entered" }, { "jump-down-on-output", OPT_JUMP_DOWN_ON_OUTPUT, NULL, 0, "End scrollback when something is printed" }, + { "no-jump-down-on-output", OPT_NO_JUMP_DOWN_ON_OUTPUT, NULL, 0, + "End scrollback when something is printed (default)" }, { 0, 0 } }; @@ -77,10 +83,18 @@ parse_startup_opt (int opt, char *arg, struct argp_state *state) _cons_jump_down_on_input = 1; break; + case OPT_NO_JUMP_DOWN_ON_INPUT: + _cons_jump_down_on_input = 0; + break; + case OPT_JUMP_DOWN_ON_OUTPUT: _cons_jump_down_on_output = 1; break; + case OPT_NO_JUMP_DOWN_ON_OUTPUT: + _cons_jump_down_on_output = 0; + break; + case ARGP_KEY_ARG: if (state->arg_num > 0) /* Too many arguments. */ |