mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-10 09:42:26 +00:00
sh: Remove unnecessary reset functions.
These are already handled by exception handlers.
This commit is contained in:
parent
65f63c73cb
commit
9bb8ccd642
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254426
@ -109,7 +109,6 @@ reseteval(void)
|
||||
{
|
||||
evalskip = 0;
|
||||
loopnest = 0;
|
||||
funcnest = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -185,8 +185,6 @@ reset(void)
|
||||
{
|
||||
reseteval();
|
||||
resetinput();
|
||||
resetparser();
|
||||
resetredir();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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).
|
||||
|
@ -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 *);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user