diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 1daa3db9159f..655bf81306f9 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -109,7 +109,6 @@ reseteval(void) { evalskip = 0; loopnest = 0; - funcnest = 0; } diff --git a/bin/sh/main.c b/bin/sh/main.c index 2b99eddaa2d9..295f27708bd5 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -185,8 +185,6 @@ reset(void) { reseteval(); resetinput(); - resetparser(); - resetredir(); } /* diff --git a/bin/sh/parser.c b/bin/sh/parser.c index ec15f587e34a..a350b8b60ecf 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -210,6 +210,7 @@ parsecmd(int interact) heredoclist = NULL; tokpushback = 0; + checkkwd = 0; doprompt = interact; if (doprompt) setprompt(1); @@ -1822,14 +1823,6 @@ parsearith: { } /* end of readtoken */ -void -resetparser(void) -{ - tokpushback = 0; - checkkwd = 0; -} - - /* * Returns true if the text contains nothing to expand (no dollar signs * or backquotes). diff --git a/bin/sh/parser.h b/bin/sh/parser.h index 92b2e37b0487..b803f76dbe64 100644 --- a/bin/sh/parser.h +++ b/bin/sh/parser.h @@ -79,7 +79,6 @@ extern const char *const parsekwd[]; union node *parsecmd(int); void fixredir(union node *, const char *, int); -void resetparser(void); int goodname(const char *); int isassignment(const char *); char *getprompt(void *); diff --git a/bin/sh/redir.c b/bin/sh/redir.c index dde4384b401f..932554578e89 100644 --- a/bin/sh/redir.c +++ b/bin/sh/redir.c @@ -319,18 +319,6 @@ popredir(void) INTON; } -/* - * Undo all redirections. Called on error or interrupt. - */ - -void -resetredir(void) -{ - while (redirlist) - popredir(); -} - - /* Return true if fd 0 has already been redirected at least once. */ int fd0_redirected_p(void) diff --git a/bin/sh/redir.h b/bin/sh/redir.h index d012440a4383..ad44c4eddd8c 100644 --- a/bin/sh/redir.h +++ b/bin/sh/redir.h @@ -40,7 +40,6 @@ union node; void redirect(union node *, int); void popredir(void); -void resetredir(void); int fd0_redirected_p(void); void clearredir(void);