diff options
author | jilles <jilles@FreeBSD.org> | 2013-08-16 20:24:41 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-08-16 20:24:41 +0000 |
commit | e5ea8153100355ac70e39b27b48cbaa0b23187e8 (patch) | |
tree | 1876bd2ebffa9c169c9ddafa54a21b130539fead /bin | |
parent | 112e05002cfc26041a3738883f9580db26e8d45c (diff) | |
download | FreeBSD-src-e5ea8153100355ac70e39b27b48cbaa0b23187e8.zip FreeBSD-src-e5ea8153100355ac70e39b27b48cbaa0b23187e8.tar.gz |
sh: Remove unnecessary reset functions.
These are already handled by exception handlers.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/eval.c | 1 | ||||
-rw-r--r-- | bin/sh/main.c | 2 | ||||
-rw-r--r-- | bin/sh/parser.c | 9 | ||||
-rw-r--r-- | bin/sh/parser.h | 1 | ||||
-rw-r--r-- | bin/sh/redir.c | 12 | ||||
-rw-r--r-- | bin/sh/redir.h | 1 |
6 files changed, 1 insertions, 25 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 1daa3db..655bf81 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 2b99edd..295f277 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 ec15f58..a350b8b 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 92b2e37..b803f76 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 dde4384..9325545 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 d012440..ad44c4e 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); |