Displaying 5 results from an estimated 5 matches for "evalfor".
Did you mean:
valfor
2019 Jan 25
0
[klibc:update-dash] [EVAL] Move common skipcount logic into skiploop
...be80725
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Mon, 6 Oct 2014 20:45:04 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000
[klibc] [EVAL] Move common skipcount logic into skiploop
The functions evalloop and evalfor share the logic on checking
and updating skipcount. This patch moves that into the helper
function skiploop.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/eval.c | 56 +++++++++++++++++++++++++++++++-----...
2020 Mar 28
0
[klibc:update-dash] dash: [EVAL] Move common skipcount logic into skiploop
...u>
AuthorDate: Mon, 6 Oct 2014 20:45:04 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000
[klibc] dash: [EVAL] Move common skipcount logic into skiploop
[ dash commit 598d300ffa0b9542a88feae900ccdd29e35374cf ]
The functions evalloop and evalfor share the logic on checking
and updating skipcount. This patch moves that into the helper
function skiploop.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/eval.c | 56 +++++++++++++++++++++++++++++++-----...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...ef6ec0ef..6ba64b12 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -81,16 +81,16 @@ int savestatus = -1; /* exit status of last command outside traps */
STATIC
#endif
void evaltreenr(union node *, int) __attribute__ ((__noreturn__));
-STATIC void evalloop(union node *, int);
-STATIC void evalfor(union node *, int);
-STATIC void evalcase(union node *, int);
-STATIC void evalsubshell(union node *, int);
+STATIC int evalloop(union node *, int);
+STATIC int evalfor(union node *, int);
+STATIC int evalcase(union node *, int);
+STATIC int evalsubshell(union node *, int);
STATIC void expredir(un...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...0380d1d2..a679ba31 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -81,16 +81,16 @@ int savestatus = -1; /* exit status of last command outside traps */
STATIC
#endif
void evaltreenr(union node *, int) __attribute__ ((__noreturn__));
-STATIC void evalloop(union node *, int);
-STATIC void evalfor(union node *, int);
-STATIC void evalcase(union node *, int);
-STATIC void evalsubshell(union node *, int);
+STATIC int evalloop(union node *, int);
+STATIC int evalfor(union node *, int);
+STATIC int evalcase(union node *, int);
+STATIC int evalsubshell(union node *, int);
STATIC void expredir(un...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...ct stackmark smark;
unsigned isor;
int status = 0;
+
+ setstackmark(&smark);
+
if (n == NULL) {
TRACE(("evaltree(NULL) called\n"));
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 =...