search for: linno

Displaying 8 results from an estimated 8 matches for "linno".

Did you mean: lineno
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...char *string; /* remember the string since it may change */ -}; -/* - * The parsefile structure pointed to by the global variable parsefile - * contains information about the current file being read. - */ - -MKINIT -struct parsefile { - struct parsefile *prev; /* preceding file on stack */ - int linno; /* current line */ - int fd; /* file descriptor (or -1 if string) */ - int nleft; /* number of chars left in this line */ - int lleft; /* number of chars left in this buffer */ - char *nextc; /* next char in buffer */ - char *buf; /* input buffer */ - struct strpush *strpush; /* for pushing...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...char *string; /* remember the string since it may change */ -}; -/* - * The parsefile structure pointed to by the global variable parsefile - * contains information about the current file being read. - */ - -MKINIT -struct parsefile { - struct parsefile *prev; /* preceding file on stack */ - int linno; /* current line */ - int fd; /* file descriptor (or -1 if string) */ - int nleft; /* number of chars left in this line */ - int lleft; /* number of chars left in this buffer */ - char *nextc; /* next char in buffer */ - char *buf; /* input buffer */ - struct strpush *strpush; /* for pushing...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...t;)); goto out; @@ -317,6 +321,8 @@ exexit: exraise(EXEXIT); } + popstackmark(&smark); + return exitstatus; } @@ -396,14 +402,12 @@ evalfor(union node *n, int flags) struct arglist arglist; union node *argp; struct strlist *sp; - struct stackmark smark; int status; errlinno = lineno = n->nfor.linno; if (funcline) lineno -= funcline - 1; - setstackmark(&smark); arglist.lastp = &arglist.list; for (argp = n->nfor.args ; argp ; argp = argp->narg.next) { expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); @@ -420,7 +424,6 @@ evalfor(union no...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...TRACE(("evaltree(NULL) called\n")); goto out; @@ -221,8 +223,7 @@ evaltree(union node *n, int flags) break; #endif case NNOT: - evaltree(n->nnot.com, EV_TESTED); - status = !exitstatus; + status = !evaltree(n->nnot.com, EV_TESTED); goto setstatus; case NREDIR: errlinno = lineno = n->nredir.linno; @@ -230,11 +231,8 @@ evaltree(union node *n, int flags) lineno -= funcline - 1; expredir(n->nredir.redirect); pushredir(n->nredir.redirect); - status = redirectsafe(n->nredir.redirect, REDIR_PUSH); - if (!status) { - evaltree(n->nredir.n, fla...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...TRACE(("evaltree(NULL) called\n")); goto out; @@ -221,8 +223,7 @@ evaltree(union node *n, int flags) break; #endif case NNOT: - evaltree(n->nnot.com, EV_TESTED); - status = !exitstatus; + status = !evaltree(n->nnot.com, EV_TESTED); goto setstatus; case NREDIR: errlinno = lineno = n->nredir.linno; @@ -230,11 +231,8 @@ evaltree(union node *n, int flags) lineno -= funcline - 1; expredir(n->nredir.redirect); pushredir(n->nredir.redirect); - status = redirectsafe(n->nredir.redirect, REDIR_PUSH); - if (!status) { - evaltree(n->nredir.n, fla...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Do not allow break to break across function calls
...lparam; savefuncline = funcline; + saveloopnest = loopnest; savehandler = handler; if ((e = setjmp(jmploc.loc))) { goto funcdone; @@ -940,6 +942,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) shellparam.malloc = 0; func->count++; funcline = func->n.ndefun.linno; + loopnest = 0; INTON; shellparam.nparam = argc - 1; shellparam.p = argv + 1; @@ -950,6 +953,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) poplocalvars(0); funcdone: INTOFF; + loopnest = saveloopnest; funcline = savefuncline; freefunc(func); freeparam(&...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Do not allow break to break across function calls
...lparam; savefuncline = funcline; + saveloopnest = loopnest; savehandler = handler; if ((e = setjmp(jmploc.loc))) { goto funcdone; @@ -940,6 +942,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) shellparam.malloc = 0; func->count++; funcline = func->n.ndefun.linno; + loopnest = 0; INTON; shellparam.nparam = argc - 1; shellparam.p = argv + 1; @@ -950,6 +953,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) poplocalvars(0); funcdone: INTOFF; + loopnest = saveloopnest; funcline = savefuncline; freefunc(func); freeparam(&...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
..., 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_stop = pushlocalvars(); file_stop = parse...