search for: popstr

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

Did you mean: opstr
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...mp;& - parsenextc[-1] != ' ' && parsenextc[-1] != '\t' + parsefile->nleft == -1 && + parsefile->strpush->ap && + parsefile->nextc[-1] != ' ' && + parsefile->nextc[-1] != '\t' ) { return PEOA; } popstring(); - if (--parsenleft >= 0) - return (signed char)*parsenextc++; + if (--parsefile->nleft >= 0) + return (signed char)*parsefile->nextc++; } - if (unlikely(parsenleft == EOF_NLEFT || parsefile->buf == NULL)) + if (unlikely(parsefile->nleft == EOF_NLEFT || + parsef...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...mp;& - parsenextc[-1] != ' ' && parsenextc[-1] != '\t' + parsefile->nleft == -1 && + parsefile->strpush->ap && + parsefile->nextc[-1] != ' ' && + parsefile->nextc[-1] != '\t' ) { return PEOA; } popstring(); - if (--parsenleft >= 0) - return (signed char)*parsenextc++; + if (--parsefile->nleft >= 0) + return (signed char)*parsefile->nextc++; } - if (unlikely(parsenleft == EOF_NLEFT || parsefile->buf == NULL)) + if (unlikely(parsefile->nleft == EOF_NLEFT || + parsef...
2019 Jan 25
0
[klibc:update-dash] input: Allow two consecutive calls to pungetc
...c 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->nextc++; + return pgetc(); } if (unlikely(parsefile->nleft == EOF_NLEFT || parsefile->buf == NULL)) @@ -290,15 +299,14 @@ again: } /* - * Undo the last call to pgetc. Only one character may be...
2020 Mar 28
0
[klibc:update-dash] dash: input: Allow two consecutive calls to pungetc
...c 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->nextc++; + return pgetc(); } if (unlikely(parsefile->nleft == EOF_NLEFT || parsefile->buf == NULL)) @@ -290,15 +299,14 @@ again: } /* - * Undo the last call to pgetc. Only one character may be...
2019 Jan 25
0
[klibc:update-dash] input: Make preadbuffer static
.../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] eval: Restore input files in evalcommand
...*/ @@ -486,8 +493,7 @@ popfile(void) void popallfiles(void) { - while (parsefile != &basepf) - popfile(); + unwindfiles(&basepf); } diff --git a/usr/dash/input.h b/usr/dash/input.h index ec97c1d6..a9c05174 100644 --- a/usr/dash/input.h +++ b/usr/dash/input.h @@ -97,5 +97,6 @@ void popstring(void); int setinputfile(const char *, int); void setinputstring(char *); void popfile(void); +void unwindfiles(struct parsefile *); void popallfiles(void); void closescript(void);
2020 Mar 28
0
[klibc:update-dash] dash: input: Make preadbuffer static
.../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: eval: Restore input files in evalcommand
...*/ @@ -486,8 +493,7 @@ popfile(void) void popallfiles(void) { - while (parsefile != &basepf) - popfile(); + unwindfiles(&basepf); } diff --git a/usr/dash/input.h b/usr/dash/input.h index ec97c1d6..a9c05174 100644 --- a/usr/dash/input.h +++ b/usr/dash/input.h @@ -97,5 +97,6 @@ void popstring(void); int setinputfile(const char *, int); void setinputstring(char *); void popfile(void); +void unwindfiles(struct parsefile *); void popallfiles(void); void closescript(void);