From 74f06e31b48eb29f7fa171b0aa14fdf30ace0f18 Mon Sep 17 00:00:00 2001 From: rcyeske Date: Mon, 19 Feb 2001 20:45:11 +0000 Subject: added more_input routine --- src/input.c | 10 ++++++++++ src/input.h | 1 + 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/input.c b/src/input.c index ffba346..41b4e2e 100644 --- a/src/input.c +++ b/src/input.c @@ -160,6 +160,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. */ @@ -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 */ -- cgit v1.2.3