search for: funcnod

Displaying 7 results from an estimated 7 matches for "funcnod".

Did you mean: funcnode
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Do not allow break to break across function calls
...pana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/eval.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index ccd5e0c0..204f1e57 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -928,9 +928,11 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) struct jmploc jmploc; int e; int savefuncline; + int saveloopnest; saveparam = shellparam; savefuncline = funcline; + saveloopnest = loopnest; savehandler = handler; if ((e = setjmp(jmploc.loc))) { goto funcdone; @@ -940,6 +942,7 @@ evalf...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Do not allow break to break across function calls
...pana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/eval.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index 1c76d4c5..e0c21f94 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -928,9 +928,11 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) struct jmploc jmploc; int e; int savefuncline; + int saveloopnest; saveparam = shellparam; savefuncline = funcline; + saveloopnest = loopnest; savehandler = handler; if ((e = setjmp(jmploc.loc))) { goto funcdone; @@ -940,6 +942,7 @@ evalf...
2019 Jan 25
0
[klibc:update-dash] eval: Variable assignments on functions are no longer persistent
...r/dash/eval.c b/usr/dash/eval.c index 5fd1c7c1..2f662e3e 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -886,7 +886,6 @@ raise: break; case CMDFUNCTION: - poplocalvars(1); if (evalfun(cmdentry.u.func, argc, argv, flags)) goto raise; break; @@ -971,9 +970,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) shellparam.p = argv + 1; shellparam.optind = 1; shellparam.optoff = -1; - pushlocalvars(); evaltree(func->n.ndefun.body, flags & EV_TESTED); - poplocalvars(0); funcdone: INTOFF; loopnest = saveloopnest;
2020 Mar 28
0
[klibc:update-dash] dash: eval: Variable assignments on functions are no longer persistent
...r/dash/eval.c b/usr/dash/eval.c index e28e56cb..722066e5 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -886,7 +886,6 @@ raise: break; case CMDFUNCTION: - poplocalvars(1); if (evalfun(cmdentry.u.func, argc, argv, flags)) goto raise; break; @@ -971,9 +970,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags) shellparam.p = argv + 1; shellparam.optind = 1; shellparam.optoff = -1; - pushlocalvars(); evaltree(func->n.ndefun.body, flags & EV_TESTED); - poplocalvars(0); funcdone: INTOFF; loopnest = saveloopnest;
2011 Jun 14
0
klibc 1.5.23 release
...Gerrit Pape (4): [klibc] [EVAL] Fix command -- crash [klibc] [EVAL] Don't clear eflag in evalbackcmd [klibc] [EVAL] Check exit for eval NSUBSHELL [klibc] [INPUT] Use exit status 127 when the script to run does not exist Harald van Dijk (2): [klibc] [EVAL] Let funcnode refer to a function definition, not its first command [klibc] [SHELL] Improve LINENO support Herbert Xu (22): [klibc] [VAR] Add localvars nesting [klibc] [VAR] Fix poplocalvar leak [klibc] [VAR] Move unsetvar functionality into setvareq [klibc] [VAR] Replace cmde...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...union node *, int, struct backcmd *); +STATIC int evalcommand(union node *, int, struct backcmd *); #else -STATIC void evalcommand(union node *, int); +STATIC int evalcommand(union node *, int); #endif STATIC int evalbltin(const struct builtincmd *, int, char **, int); STATIC int evalfun(struct funcnode *, int, char **, int); @@ -170,11 +170,13 @@ evalstring(char *s, int flags) setstackmark(&smark); status = 0; - while ((n = parsecmd(0)) != NEOF) { - evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT)); + for (; (n = parsecmd(0)) != NEOF; popstackmark(&smark)) { + int i; + + i...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...union node *, int, struct backcmd *); +STATIC int evalcommand(union node *, int, struct backcmd *); #else -STATIC void evalcommand(union node *, int); +STATIC int evalcommand(union node *, int); #endif STATIC int evalbltin(const struct builtincmd *, int, char **, int); STATIC int evalfun(struct funcnode *, int, char **, int); @@ -170,11 +170,13 @@ evalstring(char *s, int flags) setstackmark(&smark); status = 0; - while ((n = parsecmd(0)) != NEOF) { - evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT)); + for (; (n = parsecmd(0)) != NEOF; popstackmark(&smark)) { + int i; + + i...