Displaying 3 results from an estimated 3 matches for "cmdnormal".
2020 Mar 28
0
[klibc:update-dash] dash: exec: Never rehash regular built-ins
...--git a/usr/dash/exec.c b/usr/dash/exec.c
index 8948754b..6c0a64f6 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -287,9 +287,11 @@ hashcmd(int argc, char **argv)
}
c = 0;
while ((name = *argptr) != NULL) {
- if ((cmdp = cmdlookup(name, 0)) != NULL
- && (cmdp->cmdtype == CMDNORMAL
- || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0)))
+ if ((cmdp = cmdlookup(name, 0)) &&
+ (cmdp->cmdtype == CMDNORMAL ||
+ (cmdp->cmdtype == CMDBUILTIN &&
+ !(cmdp->param.cmd->flags & BUILTIN_REGULAR) &&
+ bu...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...ntry(int firstchange)
+clearcmdentry(void)
{
struct tblentry **tblp;
struct tblentry **pp;
@@ -567,10 +600,8 @@ clearcmdentry(int firstchange)
for (tblp = cmdtable ; tblp < &cmdtable[CMDTABLESIZE] ; tblp++) {
pp = tblp;
while ((cmdp = *pp) != NULL) {
- if ((cmdp->cmdtype == CMDNORMAL &&
- cmdp->param.index >= firstchange)
- || (cmdp->cmdtype == CMDBUILTIN &&
- builtinloc >= firstchange)) {
+ if (cmdp->cmdtype == CMDNORMAL ||
+ (cmdp->cmdtype == CMDBUILTIN && builtinloc > 0)) {
*pp = cmdp->next;
c...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...str(path, "%builtin") != NULL)
- act |= DO_ALTBLTIN;
- }
/* If name is in the table, check answer will be ok */
if ((cmdp = cmdlookup(name, 0)) != NULL) {
@@ -373,17 +370,20 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
abort();
#endif
case CMDNORMAL:
- bit = DO_ALTPATH;
+ bit = DO_ALTPATH | DO_REGBLTIN;
break;
case CMDFUNCTION:
bit = DO_NOFUNC;
break;
case CMDBUILTIN:
bit = cmdp->param.cmd->flags & BUILTIN_REGULAR ?
- 0 : DO_ALTBLTIN;
+ 0 : DO_REGBLTIN;
break;
}
if (act & bit) {...