diff options
author | rcyeske <rcyeske> | 2001-02-19 20:45:11 +0000 |
---|---|---|
committer | rcyeske <rcyeske> | 2001-02-19 20:45:11 +0000 |
commit | 74f06e31b48eb29f7fa171b0aa14fdf30ace0f18 (patch) | |
tree | 5c38d04f337f9714d4c574de79e2a3a1da21375a | |
parent | 440e1f6484c68c6570890544738f142487dca819 (diff) | |
download | ratpoison-74f06e31b48eb29f7fa171b0aa14fdf30ace0f18.zip |
added more_input routine
-rw-r--r-- | src/input.c | 10 | ||||
-rw-r--r-- | src/input.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c index ffba346..41b4e2e 100644 --- a/src/input.c +++ b/src/input.c @@ -161,6 +161,12 @@ update_input_window (screen_info *s, char *prompt, char *input, int input_len) char * get_input (char *prompt) { + return get_more_input (prompt, ""); +} + +char * +get_more_input (char *prompt, char *preinput) +{ screen_info *s = current_screen (); int cur_len = 0; /* Current length of the string. */ int allocated_len=100; /* The amount of memory we allocated for str */ @@ -178,6 +184,10 @@ get_input (char *prompt) exit (EXIT_FAILURE); } + /* load in the preinput */ + strcpy (str, preinput); + cur_len = strlen (preinput); + /* We don't want to draw overtop of the program bar. */ hide_bar (s); diff --git a/src/input.h b/src/input.h index dd7c44b..3a21471 100644 --- a/src/input.h +++ b/src/input.h @@ -25,6 +25,7 @@ char *keysym_to_string (KeySym keysym, unsigned int modifier); void cook_keycode (KeyCode keycode, KeySym *keysym, unsigned int *mod); char *get_input (char *prompt); +char *get_more_input (char *prompt, char *preinput); void read_key (KeySym *keysym, unsigned int *mode); #endif /* ! _RATPOISON_INPUT_H */ |