(ml_readline_with_intr): New function.
Showing
2 changed files
with
9 additions
and
0 deletions
... | @@ -320,6 +320,7 @@ extern void ml_clear_interrupt __P ((void)); | ... | @@ -320,6 +320,7 @@ extern void ml_clear_interrupt __P ((void)); |
320 | extern void ml_readline_init __P ((void)); | 320 | extern void ml_readline_init __P ((void)); |
321 | extern int ml_reread __P ((const char *prompt, char **text)); | 321 | extern int ml_reread __P ((const char *prompt, char **text)); |
322 | extern char *ml_readline __P((char *prompt)); | 322 | extern char *ml_readline __P((char *prompt)); |
323 | extern char *ml_readline_with_intr __P((char *prompt)); | ||
323 | 324 | ||
324 | extern char *alias_expand __P ((char *name)); | 325 | extern char *alias_expand __P ((char *name)); |
325 | extern void alias_destroy __P ((char *name)); | 326 | extern void alias_destroy __P ((char *name)); | ... | ... |
... | @@ -176,6 +176,14 @@ ml_readline (char *prompt) | ... | @@ -176,6 +176,14 @@ ml_readline (char *prompt) |
176 | return ml_readline_internal (); | 176 | return ml_readline_internal (); |
177 | } | 177 | } |
178 | 178 | ||
179 | char * | ||
180 | ml_readline_with_intr (char *prompt) | ||
181 | { | ||
182 | char *str = ml_readline (prompt); | ||
183 | if (_interrupted) | ||
184 | printf ("\n"); | ||
185 | return str; | ||
186 | } | ||
179 | 187 | ||
180 | #ifdef WITH_READLINE | 188 | #ifdef WITH_READLINE |
181 | 189 | ... | ... |
-
Please register or sign in to post a comment