search for: pushstr

Displaying 6 results from an estimated 6 matches for "pushstr".

Did you mean: bus_str
2019 Jan 25
0
[klibc:update-dash] input: Allow two consecutive calls to pungetc
...Undo the last call to pgetc. Only one character may be pushed back. + * Undo a call to pgetc. Only two characters may be pushed back. * PEOF may be pushed back. */ void pungetc(void) { - parsefile->nleft++; - parsefile->nextc--; + parsefile->unget++; } /* @@ -322,6 +330,8 @@ pushstring(char *s, void *ap) sp = parsefile->strpush = &(parsefile->basestrpush); sp->prevstring = parsefile->nextc; sp->prevnleft = parsefile->nleft; + sp->unget = parsefile->unget; + memcpy(sp->lastc, parsefile->lastc, sizeof(sp->lastc)); sp->ap = (struct...
2020 Mar 28
0
[klibc:update-dash] dash: input: Allow two consecutive calls to pungetc
...Undo the last call to pgetc. Only one character may be pushed back. + * Undo a call to pgetc. Only two characters may be pushed back. * PEOF may be pushed back. */ void pungetc(void) { - parsefile->nleft++; - parsefile->nextc--; + parsefile->unget++; } /* @@ -322,6 +330,8 @@ pushstring(char *s, void *ap) sp = parsefile->strpush = &(parsefile->basestrpush); sp->prevstring = parsefile->nextc; sp->prevnleft = parsefile->nleft; + sp->unget = parsefile->unget; + memcpy(sp->lastc, parsefile->lastc, sizeof(sp->lastc)); sp->ap = (struct...
2019 Jan 25
0
[klibc:update-dash] input: Make preadbuffer static
...e; diff --git a/usr/dash/input.h b/usr/dash/input.h index 775291b8..90ff6c33 100644 --- a/usr/dash/input.h +++ b/usr/dash/input.h @@ -52,7 +52,6 @@ extern char *parsenextc; /* next character in input buffer */ int pgetc(void); int pgetc2(void); -int preadbuffer(void); void pungetc(void); void pushstring(char *, void *); void popstring(void);
2020 Mar 28
0
[klibc:update-dash] dash: input: Make preadbuffer static
...e; diff --git a/usr/dash/input.h b/usr/dash/input.h index 775291b8..90ff6c33 100644 --- a/usr/dash/input.h +++ b/usr/dash/input.h @@ -52,7 +52,6 @@ extern char *parsenextc; /* next character in input buffer */ int pgetc(void); int pgetc2(void); -int preadbuffer(void); void pungetc(void); void pushstring(char *, void *); void popstring(void);
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...@ -312,7 +286,7 @@ again: *q = savec; - return (signed char)*parsenextc++; + return (signed char)*parsefile->nextc++; } /* @@ -323,8 +297,8 @@ again: void pungetc(void) { - parsenleft++; - parsenextc--; + parsefile->nleft++; + parsefile->nextc--; } /* @@ -346,15 +320,15 @@ pushstring(char *s, void *ap) parsefile->strpush = sp; } else sp = parsefile->strpush = &(parsefile->basestrpush); - sp->prevstring = parsenextc; - sp->prevnleft = parsenleft; + sp->prevstring = parsefile->nextc; + sp->prevnleft = parsefile->nleft; sp->ap = (stru...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...@ -312,7 +286,7 @@ again: *q = savec; - return (signed char)*parsenextc++; + return (signed char)*parsefile->nextc++; } /* @@ -323,8 +297,8 @@ again: void pungetc(void) { - parsenleft++; - parsenextc--; + parsefile->nleft++; + parsefile->nextc--; } /* @@ -346,15 +320,15 @@ pushstring(char *s, void *ap) parsefile->strpush = sp; } else sp = parsefile->strpush = &(parsefile->basestrpush); - sp->prevstring = parsenextc; - sp->prevnleft = parsenleft; + sp->prevstring = parsefile->nextc; + sp->prevnleft = parsefile->nleft; sp->ap = (stru...