sh: Remove unnecessary reset functions.

These are already handled by exception handlers.
This commit is contained in:
jilles 2013-08-16 20:24:41 +00:00
parent 112e05002c
commit e5ea815310
6 changed files with 1 additions and 25 deletions

View File

@ -109,7 +109,6 @@ reseteval(void)
{
evalskip = 0;
loopnest = 0;
funcnest = 0;
}

View File

@ -185,8 +185,6 @@ reset(void)
{
reseteval();
resetinput();
resetparser();
resetredir();
}
/*

View File

@ -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).

View File

@ -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 *);

View File

@ -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)

View File

@ -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);