summaryrefslogtreecommitdiff
path: root/libcons/opts-std-startup.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-09-17 17:25:14 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-09-17 17:25:14 +0000
commitae1ab68ad0207dce4fb0261328a5501c0fb4ddc0 (patch)
treec35ac850d2268d406e2d75b11a58d02ac7f3f783 /libcons/opts-std-startup.c
parent9ec55781e0a2d1a58834ea9bc29d555a14d524bb (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/opts-std-startup.c')
-rw-r--r--libcons/opts-std-startup.c22
1 files changed, 18 insertions, 4 deletions
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. */