Displaying 3 results from an estimated 3 matches for "lasttoken".
Did you mean:
last_token
2020 Mar 28
0
[klibc:update-dash] dash: parser: Do not push token back before parseheredoc
...e peektoken instead
of readtoken as the following code needs to use the same token
again. However, this is wrong when we're in a here-document as
it will clobber the saved token without resetting the tokpushback
flag.
This patch fixes it by doing the tokpushback after parseheredoc
and setting lasttoken again if parseheredoc was called.
Reported-by: Ron Yorston <rmy at frippery.org>
Fixes: 7c245aa8ed33 ("[PARSER] Simplify EOF/newline handling in...")
Fixes: ee5cbe9fd6bc ("[SHELL] Optimize dash -c "command" to avoid a fork")
Signed-off-by: Herbert Xu <herbert...
2019 Jan 25
0
[klibc:update-dash] [SHELL] Optimize dash -c "command" to avoid a fork
...s returned by readtoken */
-#include "token.h"
+#include "token_vars.h"
@@ -86,7 +86,7 @@ struct heredoc *heredoclist; /* list of here documents to read */
int doprompt; /* if set, prompt the user */
int needprompt; /* true if interactive and at start of line */
int lasttoken; /* last token read */
-MKINIT int tokpushback; /* last token pushed back */
+int tokpushback; /* last token pushed back */
char *wordtext; /* text of last word returned by readtoken */
int checkkwd;
struct nodelist *backquotelist;
@@ -210,6 +210,7 @@ list(int nlflag)
parseheredoc();...
2020 Mar 28
0
[klibc:update-dash] dash: [SHELL] Optimize dash -c "command" to avoid a fork
...s returned by readtoken */
-#include "token.h"
+#include "token_vars.h"
@@ -86,7 +86,7 @@ struct heredoc *heredoclist; /* list of here documents to read */
int doprompt; /* if set, prompt the user */
int needprompt; /* true if interactive and at start of line */
int lasttoken; /* last token read */
-MKINIT int tokpushback; /* last token pushed back */
+int tokpushback; /* last token pushed back */
char *wordtext; /* text of last word returned by readtoken */
int checkkwd;
struct nodelist *backquotelist;
@@ -210,6 +210,7 @@ list(int nlflag)
parseheredoc();...