sh: Remove clearcmdentry()'s now unused argument.
This commit is contained in:
parent
ef0cb80dd4
commit
c059d82290
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218324
@ -812,7 +812,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
|||||||
* bookinging effort, since most such runs add
|
* bookinging effort, since most such runs add
|
||||||
* directories in front of the new PATH.
|
* directories in front of the new PATH.
|
||||||
*/
|
*/
|
||||||
clearcmdentry(0);
|
clearcmdentry();
|
||||||
do_clearcmdentry = 1;
|
do_clearcmdentry = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
|||||||
argc -= 2;
|
argc -= 2;
|
||||||
}
|
}
|
||||||
path = _PATH_STDPATH;
|
path = _PATH_STDPATH;
|
||||||
clearcmdentry(0);
|
clearcmdentry();
|
||||||
do_clearcmdentry = 1;
|
do_clearcmdentry = 1;
|
||||||
} else if (!strcmp(argv[1], "--")) {
|
} else if (!strcmp(argv[1], "--")) {
|
||||||
if (argc == 2)
|
if (argc == 2)
|
||||||
@ -1061,7 +1061,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
|||||||
if (lastarg)
|
if (lastarg)
|
||||||
setvar("_", lastarg, 0);
|
setvar("_", lastarg, 0);
|
||||||
if (do_clearcmdentry)
|
if (do_clearcmdentry)
|
||||||
clearcmdentry(0);
|
clearcmdentry();
|
||||||
popstackmark(&smark);
|
popstackmark(&smark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ hashcmd(int argc __unused, char **argv __unused)
|
|||||||
verbose = 0;
|
verbose = 0;
|
||||||
while ((c = nextopt("rv")) != '\0') {
|
while ((c = nextopt("rv")) != '\0') {
|
||||||
if (c == 'r') {
|
if (c == 'r') {
|
||||||
clearcmdentry(0);
|
clearcmdentry();
|
||||||
} else if (c == 'v') {
|
} else if (c == 'v') {
|
||||||
verbose++;
|
verbose++;
|
||||||
}
|
}
|
||||||
@ -494,7 +494,7 @@ hashcd(void)
|
|||||||
void
|
void
|
||||||
changepath(const char *newval)
|
changepath(const char *newval)
|
||||||
{
|
{
|
||||||
clearcmdentry(0);
|
clearcmdentry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ changepath(const char *newval)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
clearcmdentry(int firstchange)
|
clearcmdentry(void)
|
||||||
{
|
{
|
||||||
struct tblentry **tblp;
|
struct tblentry **tblp;
|
||||||
struct tblentry **pp;
|
struct tblentry **pp;
|
||||||
@ -514,8 +514,7 @@ clearcmdentry(int firstchange)
|
|||||||
for (tblp = cmdtable ; tblp < &cmdtable[CMDTABLESIZE] ; tblp++) {
|
for (tblp = cmdtable ; tblp < &cmdtable[CMDTABLESIZE] ; tblp++) {
|
||||||
pp = tblp;
|
pp = tblp;
|
||||||
while ((cmdp = *pp) != NULL) {
|
while ((cmdp = *pp) != NULL) {
|
||||||
if ((cmdp->cmdtype == CMDNORMAL &&
|
if (cmdp->cmdtype == CMDNORMAL) {
|
||||||
cmdp->param.index >= firstchange)) {
|
|
||||||
*pp = cmdp->next;
|
*pp = cmdp->next;
|
||||||
ckfree(cmdp);
|
ckfree(cmdp);
|
||||||
} else {
|
} else {
|
||||||
@ -660,7 +659,7 @@ typecmd_impl(int argc, char **argv, int cmd, const char *path)
|
|||||||
int error1 = 0;
|
int error1 = 0;
|
||||||
|
|
||||||
if (path != pathval())
|
if (path != pathval())
|
||||||
clearcmdentry(0);
|
clearcmdentry();
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
/* First look at the keywords */
|
/* First look at the keywords */
|
||||||
@ -756,7 +755,7 @@ typecmd_impl(int argc, char **argv, int cmd, const char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path != pathval())
|
if (path != pathval())
|
||||||
clearcmdentry(0);
|
clearcmdentry();
|
||||||
|
|
||||||
return error1;
|
return error1;
|
||||||
}
|
}
|
||||||
|
@ -76,4 +76,4 @@ void defun(const char *, union node *);
|
|||||||
int unsetfunc(const char *);
|
int unsetfunc(const char *);
|
||||||
int typecmd_impl(int, char **, int, const char *);
|
int typecmd_impl(int, char **, int, const char *);
|
||||||
int typecmd(int, char **);
|
int typecmd(int, char **);
|
||||||
void clearcmdentry(int);
|
void clearcmdentry(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user