search for: strpush

Displaying 4 results from an estimated 4 matches for "strpush".

2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...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 */ -}; -/* - * The parsefile structure pointed to by the global variable parsef...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...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 */ -}; -/* - * The parsefile structure pointed to by the global variable parsef...
2019 Jan 25
0
[klibc:update-dash] input: Allow two consecutive calls to pungetc
...(signed char)*parsefile->nextc++; else - return preadbuffer(); + c = preadbuffer(); + + parsefile->lastc[1] = parsefile->lastc[0]; + parsefile->lastc[0] = c; + + return c; } @@ -194,7 +204,7 @@ static int preadbuffer(void) #endif char savec; - while (unlikely(parsefile->strpush)) { + if (unlikely(parsefile->strpush)) { if ( parsefile->nleft == -1 && parsefile->strpush->ap && @@ -204,8 +214,7 @@ static int preadbuffer(void) return PEOA; } popstring(); - if (--parsefile->nleft >= 0) - return (signed char)*parsefile-&...
2020 Mar 28
0
[klibc:update-dash] dash: input: Allow two consecutive calls to pungetc
...(signed char)*parsefile->nextc++; else - return preadbuffer(); + c = preadbuffer(); + + parsefile->lastc[1] = parsefile->lastc[0]; + parsefile->lastc[0] = c; + + return c; } @@ -194,7 +204,7 @@ static int preadbuffer(void) #endif char savec; - while (unlikely(parsefile->strpush)) { + if (unlikely(parsefile->strpush)) { if ( parsefile->nleft == -1 && parsefile->strpush->ap && @@ -204,8 +214,7 @@ static int preadbuffer(void) return PEOA; } popstring(); - if (--parsefile->nleft >= 0) - return (signed char)*parsefile-&...