search for: pushfile

Displaying 7 results from an estimated 7 matches for "pushfile".

Did you mean: authfile
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...01,7 @@ setinputfd(int fd, int push) parsefile->fd = fd; if (parsefile->buf == NULL) parsefile->buf = ckmalloc(IBUFSIZ); - parselleft = parsenleft = 0; + parsefile->lleft = parsefile->nleft = 0; plinno = 1; } @@ -440,8 +415,8 @@ setinputstring(char *string) { INTOFF; pushfile(); - parsenextc = string; - parsenleft = strlen(string); + parsefile->nextc = string; + parsefile->nleft = strlen(string); parsefile->buf = NULL; plinno = 1; INTON; @@ -459,10 +434,6 @@ pushfile(void) { struct parsefile *pf; - parsefile->nleft = parsenleft; - parsefile->ll...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...01,7 @@ setinputfd(int fd, int push) parsefile->fd = fd; if (parsefile->buf == NULL) parsefile->buf = ckmalloc(IBUFSIZ); - parselleft = parsenleft = 0; + parsefile->lleft = parsefile->nleft = 0; plinno = 1; } @@ -440,8 +415,8 @@ setinputstring(char *string) { INTOFF; pushfile(); - parsenextc = string; - parsenleft = strlen(string); + parsefile->nextc = string; + parsefile->nleft = strlen(string); parsefile->buf = NULL; plinno = 1; INTON; @@ -459,10 +434,6 @@ pushfile(void) { struct parsefile *pf; - parsefile->nleft = parsenleft; - parsefile->ll...
2019 Jan 25
0
[klibc:update-dash] input: Make preadbuffer static
...put.c | 4 ++-- usr/dash/input.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index f11ac842..aa5dcfcf 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -109,6 +109,7 @@ EditLine *el; /* cookie for editline package */ STATIC void pushfile(void); static int preadfd(void); static void setinputfd(int fd, int push); +static int preadbuffer(void); #ifdef mkinit INCLUDE <stdio.h> @@ -222,8 +223,7 @@ retry: * 4) Process input up to the next newline, deleting nul characters. */ -int -preadbuffer(void) +static int preadbuff...
2020 Mar 28
0
[klibc:update-dash] dash: input: Make preadbuffer static
...put.c | 4 ++-- usr/dash/input.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/usr/dash/input.c b/usr/dash/input.c index f11ac842..aa5dcfcf 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -109,6 +109,7 @@ EditLine *el; /* cookie for editline package */ STATIC void pushfile(void); static int preadfd(void); static void setinputfd(int fd, int push); +static int preadbuffer(void); #ifdef mkinit INCLUDE <stdio.h> @@ -222,8 +223,7 @@ retry: * 4) Process input up to the next newline, deleting nul characters. */ -int -preadbuffer(void) +static int preadbuff...
2019 Jan 25
0
[klibc:update-dash] input: Allow two consecutive calls to pungetc
...+ parsefile->unget = sp->unget; + memcpy(parsefile->lastc, sp->lastc, sizeof(sp->lastc)); /*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/ parsefile->strpush = sp->prev; if (sp != &(parsefile->basestrpush)) @@ -439,6 +452,7 @@ pushfile(void) pf->fd = -1; pf->strpush = NULL; pf->basestrpush.prev = NULL; + pf->unget = 0; parsefile = pf; } diff --git a/usr/dash/input.h b/usr/dash/input.h index ad8b463d..ec97c1d6 100644 --- a/usr/dash/input.h +++ b/usr/dash/input.h @@ -49,6 +49,12 @@ struct strpush { int prev...
2020 Mar 28
0
[klibc:update-dash] dash: input: Allow two consecutive calls to pungetc
...+ parsefile->unget = sp->unget; + memcpy(parsefile->lastc, sp->lastc, sizeof(sp->lastc)); /*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/ parsefile->strpush = sp->prev; if (sp != &(parsefile->basestrpush)) @@ -439,6 +452,7 @@ pushfile(void) pf->fd = -1; pf->strpush = NULL; pf->basestrpush.prev = NULL; + pf->unget = 0; parsefile = pf; } diff --git a/usr/dash/input.h b/usr/dash/input.h index ad8b463d..ec97c1d6 100644 --- a/usr/dash/input.h +++ b/usr/dash/input.h @@ -49,6 +49,12 @@ struct strpush { int prev...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...;/') != NULL) { tryexec(argv[0], argv, envp); diff --git a/usr/dash/input.c b/usr/dash/input.c index 7f99d4a..11f7a3f 100644 --- a/usr/dash/input.c +++ b/usr/dash/input.c @@ -452,7 +452,6 @@ out: void setinputfd(int fd, int push) { - (void) fcntl(fd, F_SETFD, FD_CLOEXEC); if (push) { pushfile(); parsefile->buf = 0; diff --git a/usr/dash/redir.c b/usr/dash/redir.c index 9e0fae5..6ffde0c 100644 --- a/usr/dash/redir.c +++ b/usr/dash/redir.c @@ -345,26 +345,19 @@ popredir(int drop) INCLUDE "redir.h" RESET { - clearredir(0); -} - -#endif - -/* - * Discard all saved file d...