From ae1ab68ad0207dce4fb0261328a5501c0fb4ddc0 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Tue, 17 Sep 2002 17:25:14 +0000 Subject: 2002-09-17 Marcus Brinkmann * 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. --- libcons/ChangeLog | 9 +++++++++ libcons/opts-std-startup.c | 22 ++++++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) (limited to 'libcons') 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 + + * 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 * 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. */ -- cgit v1.2.3