search for: numeof

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

Did you mean: nameof
2019 Jan 25
0
[klibc:update-dash] eval: Fix exit status when calling eval/dot with no commands
...tus to be used by ".". I think the easiest way to fix this is to prevent null commands from affecting status in cmdloop, as attached. An alternative could be to change the outer if condition to exclude n == NULL, but I didn't do that because the change of job_warning and clearing of numeof make sense to me even for null commands. Besides, when debug tracing is enabled, null commands have a visible effect that should remain. Note that this fixes the problem with . but the same problem can be present in other locations. For example, false eval " " &&...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Fix exit status when calling eval/dot with no commands
...tus to be used by ".". I think the easiest way to fix this is to prevent null commands from affecting status in cmdloop, as attached. An alternative could be to change the outer if condition to exclude n == NULL, but I didn't do that because the change of job_warning and clearing of numeof make sense to me even for null commands. Besides, when debug tracing is enabled, null commands have a visible effect that should remain. Note that this fixes the problem with . but the same problem can be present in other locations. For example, false eval " " &&...
2020 Mar 28
0
[klibc:update-dash] dash: main: Print \n upon EOF (CTRL-D) when run interactively
...chings <ben at decadent.org.uk> --- usr/dash/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr/dash/main.c b/usr/dash/main.c index e8e42565..6d53e009 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -221,8 +221,15 @@ cmdloop(int top) if (!top || numeof >= 50) break; if (!stoppedjobs()) { - if (!Iflag) + if (!Iflag) { + if (iflag) { + out2c('\n'); +#ifdef FLUSHERR + flushout(out2); +#endif + } break; + } out2str("\nUse \"exit\" to leave shell.\n"); } numeof++;
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...nion node *, int); +int evaltree(union node *, int); void evalbackcmd(union node *, struct backcmd *); extern int evalskip; diff --git a/usr/dash/main.c b/usr/dash/main.c index 497ac160..fcd3e7d2 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -225,11 +225,13 @@ cmdloop(int top) } numeof++; } else if (nflag == 0) { + int i; + job_warning = (job_warning == 2) ? 1 : 0; numeof = 0; - evaltree(n, 0); + i = evaltree(n, 0); if (n) - status = exitstatus; + status = i; } popstackmark(&smark);
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...nion node *, int); +int evaltree(union node *, int); void evalbackcmd(union node *, struct backcmd *); extern int evalskip; diff --git a/usr/dash/main.c b/usr/dash/main.c index 497ac160..fcd3e7d2 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -225,11 +225,13 @@ cmdloop(int top) } numeof++; } else if (nflag == 0) { + int i; + job_warning = (job_warning == 2) ? 1 : 0; numeof = 0; - evaltree(n, 0); + i = evaltree(n, 0); if (n) - status = exitstatus; + status = i; } popstackmark(&smark);
2019 Jan 25
0
[klibc:update-dash] input: Remove HETIO
...r/dash/main.c index 985e8c4e..bedb6635 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -60,10 +60,6 @@ #include "exec.h" #include "cd.h" -#ifdef HETIO -#include "hetio.h" -#endif - #define PROFILE 0 int rootpid; @@ -206,10 +202,6 @@ cmdloop(int top) int numeof = 0; TRACE(("cmdloop(%d) called\n", top)); -#ifdef HETIO - if(iflag && top) - hetio_init(); -#endif for (;;) { int skip; diff --git a/usr/dash/trap.c b/usr/dash/trap.c index b8470437..a6997d4f 100644 --- a/usr/dash/trap.c +++ b/usr/dash/trap.c @@ -52,10 +52,6 @@ #incl...
2020 Mar 28
0
[klibc:update-dash] dash: input: Remove HETIO
...r/dash/main.c index 985e8c4e..bedb6635 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -60,10 +60,6 @@ #include "exec.h" #include "cd.h" -#ifdef HETIO -#include "hetio.h" -#endif - #define PROFILE 0 int rootpid; @@ -206,10 +202,6 @@ cmdloop(int top) int numeof = 0; TRACE(("cmdloop(%d) called\n", top)); -#ifdef HETIO - if(iflag && top) - hetio_init(); -#endif for (;;) { int skip; diff --git a/usr/dash/trap.c b/usr/dash/trap.c index b8470437..a6997d4f 100644 --- a/usr/dash/trap.c +++ b/usr/dash/trap.c @@ -52,10 +52,6 @@ #incl...