search for: parsenleft

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

2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...---------------------- usr/dash/input.h | 33 +++++++++++++++-- 2 files changed, 67 insertions(+), 73 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index 232bb9c4..6223a735 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -61,38 +61,7 @@ #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ #define IBUFSIZ (BUFSIZ + 1) -MKINIT -struct strpush { - struct strpush *prev; /* preceding string on stack */ - char *prevstring; - int prevnleft; - struct alias *ap; /* if push was associated with an alias */ - char *string; /* remember the string since it may change *...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...---------------------- usr/dash/input.h | 33 +++++++++++++++-- 2 files changed, 67 insertions(+), 73 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index 232bb9c4..6223a735 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -61,38 +61,7 @@ #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ #define IBUFSIZ (BUFSIZ + 1) -MKINIT -struct strpush { - struct strpush *prev; /* preceding string on stack */ - char *prevstring; - int prevnleft; - struct alias *ap; /* if push was associated with an alias */ - char *string; /* remember the string since it may change *...
2019 Jan 25
0
[klibc:update-dash] [INPUT] Kill pgetc_macro
....h | 3 --- usr/dash/parser.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index d31c45bb..9e533a47 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -134,7 +134,10 @@ RESET { int pgetc(void) { - return pgetc_macro(); + if (--parsenleft >= 0) + return (signed char)*parsenextc++; + else + return preadbuffer(); } @@ -147,7 +150,7 @@ pgetc2() { int c; do { - c = pgetc_macro(); + c = pgetc(); } while (c == PEOA); return c; } diff --git a/usr/dash/input.h b/usr/dash/input.h index 50a77971..775291b8 100644 --- a/us...
2020 Mar 28
0
[klibc:update-dash] dash: [INPUT] Kill pgetc_macro
....h | 3 --- usr/dash/parser.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index d31c45bb..9e533a47 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -134,7 +134,10 @@ RESET { int pgetc(void) { - return pgetc_macro(); + if (--parsenleft >= 0) + return (signed char)*parsenextc++; + else + return preadbuffer(); } @@ -147,7 +150,7 @@ pgetc2() { int c; do { - c = pgetc_macro(); + c = pgetc(); } while (c == PEOA); return c; } diff --git a/usr/dash/input.h b/usr/dash/input.h index 50a77971..775291b8 100644 --- a/us...
2019 Jan 25
0
[klibc:update-dash] [INPUT] Replace open-coded flushall in preadbuffer
...s <ben at decadent.org.uk> --- usr/dash/input.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index 9e533a47..f11ac842 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -245,10 +245,7 @@ preadbuffer(void) } if (unlikely(parsenleft == EOF_NLEFT || parsefile->buf == NULL)) return PEOF; - flushout(&output); -#ifdef FLUSHERR - flushout(&errout); -#endif + flushall(); more = parselleft; if (more <= 0) {
2020 Mar 28
0
[klibc:update-dash] dash: [INPUT] Replace open-coded flushall in preadbuffer
...s <ben at decadent.org.uk> --- usr/dash/input.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index 9e533a47..f11ac842 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -245,10 +245,7 @@ preadbuffer(void) } if (unlikely(parsenleft == EOF_NLEFT || parsefile->buf == NULL)) return PEOF; - flushout(&output); -#ifdef FLUSHERR - flushout(&errout); -#endif + flushall(); more = parselleft; if (more <= 0) {
2019 Jan 25
0
[klibc:update-dash] input: Remove HETIO
...n int hetio_inter; diff --git a/usr/dash/input.c b/usr/dash/input.c index aa5dcfcf..232bb9c4 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -58,10 +58,6 @@ #include "myhistedit.h" #endif -#ifdef HETIO -#include "hetio.h" -#endif - #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ #define IBUFSIZ (BUFSIZ + 1) @@ -188,11 +184,6 @@ retry: } else #endif - -#ifdef HETIO - nr = hetio_read_input(parsefile->fd); - if (nr == -255) -#endif nr = read(parsefile->fd, buf, IBUFSIZ - 1); diff --git a/usr/dash/main.c b/usr/dash/main.c index 98...
2020 Mar 28
0
[klibc:update-dash] dash: input: Remove HETIO
...n int hetio_inter; diff --git a/usr/dash/input.c b/usr/dash/input.c index aa5dcfcf..232bb9c4 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -58,10 +58,6 @@ #include "myhistedit.h" #endif -#ifdef HETIO -#include "hetio.h" -#endif - #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ #define IBUFSIZ (BUFSIZ + 1) @@ -188,11 +184,6 @@ retry: } else #endif - -#ifdef HETIO - nr = hetio_read_input(parsefile->fd); - if (nr == -255) -#endif nr = read(parsefile->fd, buf, IBUFSIZ - 1); diff --git a/usr/dash/main.c b/usr/dash/main.c index 98...