search for: builtinloc

Displaying 3 results from an estimated 3 matches for "builtinloc".

Did you mean: builtincc
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...= padvance(&path, dest)) >= 0) { + while (p = path, (len = padvance_magic(&path, dest, 0)) >= 0) { c = *p; p = stalloc(len); diff --git a/usr/dash/exec.c b/usr/dash/exec.c index 04ee2ba9..8948754b 100644 --- a/usr/dash/exec.c +++ b/usr/dash/exec.c @@ -92,7 +92,7 @@ STATIC int builtinloc = -1; /* index in path of %builtin, or -1 */ STATIC void tryexec(char *, char **, char **); STATIC void printentry(struct tblentry *); -STATIC void clearcmdentry(int); +STATIC void clearcmdentry(void); STATIC struct tblentry *cmdlookup(const char *, int); STATIC void delete_cmd_entry(void);...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Never rehash regular built-ins
...4f6 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) && + builtinloc > 0))) delete_cmd_entry(); find_command(name,...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...-393,11 +393,13 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) /* If %builtin not in path, check for builtin next */ bcmd = find_builtin(name); - if (bcmd && (bcmd->flags & BUILTIN_REGULAR || ( - act & DO_ALTPATH ? !(act & DO_ALTBLTIN) : builtinloc <= 0 - ))) + if (bcmd && ((bcmd->flags & BUILTIN_REGULAR) | (act & DO_ALTPATH) | + (builtinloc <= 0))) goto builtin_success; + if (act & DO_REGBLTIN) + goto fail; + /* We have to search path. */ prev = -1; /* where to start */ if (cmdp && cmdp...