search for: cmdbuiltin

Displaying 6 results from an estimated 6 matches for "cmdbuiltin".

Did you mean: cgbuiltin
2020 Mar 28
0
[klibc:update-dash] dash: exec: Never rehash regular built-ins
...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) && + builtinloc > 0))) delete_cmd_entry();...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...arglist.lastp; - expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); - for (sp = *spp; sp; sp = sp->next) + for (;;) { + find_command(arglist.list->text, &cmdentry, + cmd_flag | DO_REGBLTIN, pathval()); + + /* implement bltin and command here */ + if (cmdentry.cmdtype != CMDBUILTIN) + break; + + pseudovarflag = cmdentry.u.cmd->flags & BUILTIN_ASSIGN; + if (likely(spclbltin < 0)) { + spclbltin = + cmdentry.u.cmd->flags & + BUILTIN_SPECIAL + ; + } + execcmd = cmdentry.u.cmd == EXECCMD; + if (likely(cmdentry.u.cmd != COMMANDCMD)) +...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...s = 0; + vlocal = 0; path = NULL; argc = 0; @@ -770,6 +773,8 @@ evalcommand(union node *cmd, int flags) find_command(arglist.list->text, &cmdentry, cmd_flag | DO_REGBLTIN, pathval()); + vlocal++; + /* implement bltin and command here */ if (cmdentry.cmdtype != CMDBUILTIN) break; @@ -780,6 +785,7 @@ evalcommand(union node *cmd, int flags) cmdentry.u.cmd->flags & BUILTIN_SPECIAL ; + vlocal = spclbltin ^ BUILTIN_SPECIAL; } execcmd = cmdentry.u.cmd == EXECCMD; if (likely(cmdentry.u.cmd != COMMANDCMD)) @@ -798,6 +804,9 @@ eval...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...-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; ckfree(cmdp); } else { diff --git a/usr/dash/exec.h b/usr/dash/exec.h index e241b742..f394f3f7 10...
2019 Jan 25
0
[klibc:update-dash] eval: Restore input files in evalcommand
...mark smark; union node *argp; @@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags) TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags)); setstackmark(&smark); localvar_stop = pushlocalvars(); + file_stop = parsefile; back_exitstatus = 0; cmdentry.cmdtype = CMDBUILTIN; @@ -896,6 +898,7 @@ out: if (cmd->ncmd.redirect) popredir(execcmd); unwindredir(redir_stop); + unwindfiles(file_stop); unwindlocalvars(localvar_stop); if (lastarg) /* dsl: I think this is intended to be used to support diff --git a/usr/dash/input.c b/usr/dash/input.c index e53423c...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Restore input files in evalcommand
...mark smark; union node *argp; @@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags) TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags)); setstackmark(&smark); localvar_stop = pushlocalvars(); + file_stop = parsefile; back_exitstatus = 0; cmdentry.cmdtype = CMDBUILTIN; @@ -896,6 +898,7 @@ out: if (cmd->ncmd.redirect) popredir(execcmd); unwindredir(redir_stop); + unwindfiles(file_stop); unwindlocalvars(localvar_stop); if (lastarg) /* dsl: I think this is intended to be used to support diff --git a/usr/dash/input.c b/usr/dash/input.c index e53423c...