diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-09-13 23:40:10 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-09-13 23:40:10 +0000 |
commit | cc60ad8bb9596cafe94f48de9ea030ce01e22404 (patch) | |
tree | ba7b74a5ab8d70d7505c514c6d63929a9bcaded3 /libcons/opts-std-startup.c | |
parent | fad9d77677aca4ce2fd11705f87adca9b0524ecf (diff) | |
download | hurd-cc60ad8bb9596cafe94f48de9ea030ce01e22404.tar.gz hurd-cc60ad8bb9596cafe94f48de9ea030ce01e22404.tar.bz2 hurd-cc60ad8bb9596cafe94f48de9ea030ce01e22404.zip |
2002-09-14 Marcus Brinkmann <marcus@gnu.org>
* Makefile (SRCS): Add vcons-input.c.
* vcons-input.c: New file.
* vcons-scrollback.c (_cons_vcons_scrollback): New function.
(cons_vcons_scrollback): Reimplement in terms of
_cons_vcons_scrollback.
* cons.h (cons_scroll_t): New type.
(cons_vcons_scrollback): Update prototype.
* priv.h (_cons_jump_down_at_input): New extern.
(_cons_jump_down_at_output): Likewise.
(_cons_vcons_scrollback): New prototype.
* opts-std-startup.c (OPT_JUMP_DOWN_AT_INPUT): New macro.
(OPT_JUMP_DOWN_AT_OUTPUT): Likewise.
(_cons_jump_down_at_input): New variable.
(_cons_jump_down_at_output): Likewise.
(startup_options): Add new options --jump-down-at-input and
--jump-down-at-output.
(parse_startup_opt): Handle these new options.
* file-changed.c (cons_S_file_changed): Support the jump down at
output option.
Diffstat (limited to 'libcons/opts-std-startup.c')
-rw-r--r-- | libcons/opts-std-startup.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libcons/opts-std-startup.c b/libcons/opts-std-startup.c index c4a7d7bd..f64f60fc 100644 --- a/libcons/opts-std-startup.c +++ b/libcons/opts-std-startup.c @@ -25,7 +25,9 @@ /* Option keys for long-only options in diskfs_common_options. */ -#define OPT_SLACK 600 /* --slack */ +#define OPT_SLACK 600 /* --slack */ +#define OPT_JUMP_DOWN_AT_INPUT 601 /* --jump-down-at-input */ +#define OPT_JUMP_DOWN_AT_OUTPUT 602 /* --jump-down-at-output */ /* Common value for diskfs_common_options and diskfs_default_sync_interval. */ #define DEFAULT_SLACK 100 @@ -37,6 +39,12 @@ server. */ int _cons_slack = DEFAULT_SLACK; +/* If we jump down at input. */ +int _cons_jump_down_at_input; + +/* If we jump down at output. */ +int _cons_jump_down_at_output; + /* The filename of the console server. */ char *_cons_file; @@ -45,6 +53,10 @@ 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-at-input", OPT_JUMP_DOWN_AT_INPUT, NULL, 0, + "End scrollback when something is entered" }, + { "jump-down-at-output", OPT_JUMP_DOWN_AT_OUTPUT, NULL, 0, + "End scrollback when something is printed" }, { 0, 0 } }; @@ -61,6 +73,14 @@ parse_startup_opt (int opt, char *arg, struct argp_state *state) _cons_slack = atoi (arg); break; + case OPT_JUMP_DOWN_AT_INPUT: + _cons_jump_down_at_input = 1; + break; + + case OPT_JUMP_DOWN_AT_OUTPUT: + _cons_jump_down_at_output = 1; + break; + case ARGP_KEY_ARG: if (state->arg_num > 0) /* Too many arguments. */ |