25 |
|
|
26 |
|
|
27 |
/* Option keys for long-only options in diskfs_common_options. */ |
/* Option keys for long-only options in diskfs_common_options. */ |
28 |
#define OPT_SLACK 600 /* --slack */ |
#define OPT_SLACK 600 /* --slack */ |
29 |
|
#define OPT_JUMP_DOWN_AT_INPUT 601 /* --jump-down-at-input */ |
30 |
|
#define OPT_JUMP_DOWN_AT_OUTPUT 602 /* --jump-down-at-output */ |
31 |
|
|
32 |
/* Common value for diskfs_common_options and diskfs_default_sync_interval. */ |
/* Common value for diskfs_common_options and diskfs_default_sync_interval. */ |
33 |
#define DEFAULT_SLACK 100 |
#define DEFAULT_SLACK 100 |
39 |
server. */ |
server. */ |
40 |
int _cons_slack = DEFAULT_SLACK; |
int _cons_slack = DEFAULT_SLACK; |
41 |
|
|
42 |
|
/* If we jump down at input. */ |
43 |
|
int _cons_jump_down_at_input; |
44 |
|
|
45 |
|
/* If we jump down at output. */ |
46 |
|
int _cons_jump_down_at_output; |
47 |
|
|
48 |
/* The filename of the console server. */ |
/* The filename of the console server. */ |
49 |
char *_cons_file; |
char *_cons_file; |
50 |
|
|
53 |
{ |
{ |
54 |
{ "slack", OPT_SLACK, "RECORDS", 0, "Max number of records the client is" |
{ "slack", OPT_SLACK, "RECORDS", 0, "Max number of records the client is" |
55 |
" allowed to lag behind the server (default " DEFAULT_SLACK_STRING ")" }, |
" allowed to lag behind the server (default " DEFAULT_SLACK_STRING ")" }, |
56 |
|
{ "jump-down-at-input", OPT_JUMP_DOWN_AT_INPUT, NULL, 0, |
57 |
|
"End scrollback when something is entered" }, |
58 |
|
{ "jump-down-at-output", OPT_JUMP_DOWN_AT_OUTPUT, NULL, 0, |
59 |
|
"End scrollback when something is printed" }, |
60 |
{ 0, 0 } |
{ 0, 0 } |
61 |
}; |
}; |
62 |
|
|
73 |
_cons_slack = atoi (arg); |
_cons_slack = atoi (arg); |
74 |
break; |
break; |
75 |
|
|
76 |
|
case OPT_JUMP_DOWN_AT_INPUT: |
77 |
|
_cons_jump_down_at_input = 1; |
78 |
|
break; |
79 |
|
|
80 |
|
case OPT_JUMP_DOWN_AT_OUTPUT: |
81 |
|
_cons_jump_down_at_output = 1; |
82 |
|
break; |
83 |
|
|
84 |
case ARGP_KEY_ARG: |
case ARGP_KEY_ARG: |
85 |
if (state->arg_num > 0) |
if (state->arg_num > 0) |
86 |
/* Too many arguments. */ |
/* Too many arguments. */ |