Displaying 4 results from an estimated 4 matches for "nargv".
Did you mean:
argv
2002 Jun 16
1
multiple definition of `optind'
Any ideas of the best way around this problem? Should I just hack the
source code, or is there a magic switch somewhere I'm missing? I'm
assuming I can't just dismiss that function as OpenSSH is probably
based on the OpenBSD semantics.
=============================================================================
gcc -g -O2 -Wall -Wno-uninitialized -I. -I.
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...ags)
struct arglist varlist;
char **argv;
int argc;
+ struct strlist *osp;
struct strlist *sp;
#ifdef notyet
int pip[2];
@@ -711,6 +733,7 @@ evalcommand(union node *cmd, int flags)
char *lastarg;
const char *path;
int spclbltin;
+ int cmd_flag;
int execcmd;
int status;
char **nargv;
@@ -733,13 +756,47 @@ evalcommand(union node *cmd, int flags)
arglist.lastp = &arglist.list;
*arglist.lastp = NULL;
+ cmd_flag = 0;
+ execcmd = 0;
+ spclbltin = -1;
+ path = NULL;
+
argc = 0;
- for (argp = cmd->ncmd.args; argp; argp = argp->narg.next) {
- struct strlist **spp;
+...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Always set localvar_stop
...r/dash/eval.c b/usr/dash/eval.c
index 7bb636e1..6652ccc0 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -809,6 +809,8 @@ evalcommand(union node *cmd, int flags)
vflags = VEXPORT;
}
+ localvar_stop = pushlocalvars(vlocal);
+
/* Reserve one extra spot at the front for shellexec. */
nargv = stalloc(sizeof (char *) * (argc + 2));
argv = ++nargv;
@@ -828,7 +830,6 @@ evalcommand(union node *cmd, int flags)
status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);
if (unlikely(status)) {
- vlocal = 0;
bail:
exitstatus = status;
@@ -839,9 +840,6 @@ bail:
g...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...usr/dash/var.h | 3 +--
3 files changed, 29 insertions(+), 42 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index fc5a594a..77a8bded 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -737,6 +737,8 @@ evalcommand(union node *cmd, int flags)
int execcmd;
int status;
char **nargv;
+ int vflags;
+ int vlocal;
errlinno = lineno = cmd->ncmd.linno;
if (funcline)
@@ -745,7 +747,6 @@ evalcommand(union node *cmd, int flags)
/* First expand the arguments. */
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
setstackmark(&smark);
- localvar_s...