diff options
author | Chet Ramey <chet.ramey@case.edu> | 2014-10-05 19:12:20 -0400 |
---|---|---|
committer | Dan Pasanen <dan.pasanen@gmail.com> | 2014-10-06 07:11:51 -0500 |
commit | 80b4d71117c25c8da61f7fd04802ca35462e79e6 (patch) | |
tree | d2b97fa6b0a9caab66ef86392df731c5a1baef15 /parse.y | |
parent | a417a51c2855f8cd538532903fbcacd234589845 (diff) | |
download | android_external_bash-80b4d71117c25c8da61f7fd04802ca35462e79e6.tar.gz android_external_bash-80b4d71117c25c8da61f7fd04802ca35462e79e6.tar.bz2 android_external_bash-80b4d71117c25c8da61f7fd04802ca35462e79e6.zip |
Bash-4.3 patch 30
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -2538,6 +2538,16 @@ shell_ungetc (c) eol_ungetc_lookahead = c; } +char * +parser_remaining_input () +{ + if (shell_input_line == 0) + return 0; + if (shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len) + return '\0'; /* XXX */ + return (shell_input_line + shell_input_line_index); +} + #ifdef INCLUDE_UNUSED /* Back the input pointer up by one, effectively `ungetting' a character. */ static void @@ -4027,8 +4037,8 @@ xparse_dolparen (base, string, indp, flags) reset_parser (); /* reset_parser clears shell_input_line and associated variables */ restore_input_line_state (&ls); - if (interactive) - token_to_read = 0; + + token_to_read = 0; /* Need to find how many characters parse_and_execute consumed, update *indp, if flags != 0, copy the portion of the string parsed into RET |