search for: basepf

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

Did you mean: basepa
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...struct strpush basestrpush; /* so pushing one is fast */ -}; - - -int plinno = 1; /* input line number */ -int parsenleft; /* copy of parsefile->nleft */ -MKINIT int parselleft; /* copy of parsefile->lleft */ -char *parsenextc; /* copy of parsefile->nextc */ MKINIT struct parsefile basepf; /* top level input file */ MKINIT char basebuf[IBUFSIZ]; /* buffer for top level input file */ struct parsefile *parsefile = &basepf; /* current input file */ @@ -114,10 +83,12 @@ INCLUDE "error.h" INIT { basepf.nextc = basepf.buf = basebuf; + basepf.linno = 1; } RESET { -...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...struct strpush basestrpush; /* so pushing one is fast */ -}; - - -int plinno = 1; /* input line number */ -int parsenleft; /* copy of parsefile->nleft */ -MKINIT int parselleft; /* copy of parsefile->lleft */ -char *parsenextc; /* copy of parsefile->nextc */ MKINIT struct parsefile basepf; /* top level input file */ MKINIT char basebuf[IBUFSIZ]; /* buffer for top level input file */ struct parsefile *parsefile = &basepf; /* current input file */ @@ -114,10 +83,12 @@ INCLUDE "error.h" INIT { basepf.nextc = basepf.buf = basebuf; + basepf.linno = 1; } RESET { -...
2019 Jan 25
0
[klibc:update-dash] eval: Restore input files in evalcommand
.../usr/dash/input.c +++ b/usr/dash/input.c @@ -479,6 +479,13 @@ popfile(void) } +void unwindfiles(struct parsefile *stop) +{ + while (parsefile != stop) + popfile(); +} + + /* * Return to top level. */ @@ -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(...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Restore input files in evalcommand
.../usr/dash/input.c +++ b/usr/dash/input.c @@ -479,6 +479,13 @@ popfile(void) } +void unwindfiles(struct parsefile *stop) +{ + while (parsefile != stop) + popfile(); +} + + /* * Return to top level. */ @@ -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(...