Displaying 8 results from an estimated 8 matches for "eof_nleft".
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...+++++++++++++------------------------------------
usr/dash/input.h | 33 +++++++++++++++--
2 files changed, 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...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...+++++++++++++------------------------------------
usr/dash/input.h | 33 +++++++++++++++--
2 files changed, 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...
2019 Jan 25
0
[klibc:update-dash] [INPUT] Replace open-coded flushall in preadbuffer
...ecadent.org.uk>
---
usr/dash/input.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/usr/dash/input.c b/usr/dash/input.c
index 9e533a47..f11ac842 100644
--- a/usr/dash/input.c
+++ b/usr/dash/input.c
@@ -245,10 +245,7 @@ preadbuffer(void)
}
if (unlikely(parsenleft == EOF_NLEFT || parsefile->buf == NULL))
return PEOF;
- flushout(&output);
-#ifdef FLUSHERR
- flushout(&errout);
-#endif
+ flushall();
more = parselleft;
if (more <= 0) {
2020 Mar 28
0
[klibc:update-dash] dash: [INPUT] Replace open-coded flushall in preadbuffer
...ecadent.org.uk>
---
usr/dash/input.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/usr/dash/input.c b/usr/dash/input.c
index 9e533a47..f11ac842 100644
--- a/usr/dash/input.c
+++ b/usr/dash/input.c
@@ -245,10 +245,7 @@ preadbuffer(void)
}
if (unlikely(parsenleft == EOF_NLEFT || parsefile->buf == NULL))
return PEOF;
- flushout(&output);
-#ifdef FLUSHERR
- flushout(&errout);
-#endif
+ flushall();
more = parselleft;
if (more <= 0) {
2019 Jan 25
0
[klibc:update-dash] input: Allow two consecutive calls to pungetc
...left == -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 pushed back.
+ * Undo a call to pgetc. Only two characters may be pushed back.
* PEOF may be pushed back.
*/
void
pungetc(void)
{
- parsefile->nleft+...
2020 Mar 28
0
[klibc:update-dash] dash: input: Allow two consecutive calls to pungetc
...left == -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 pushed back.
+ * Undo a call to pgetc. Only two characters may be pushed back.
* PEOF may be pushed back.
*/
void
pungetc(void)
{
- parsefile->nleft+...
2019 Jan 25
0
[klibc:update-dash] input: Remove HETIO
..._reset_term(void);
-
-extern int hetio_inter;
diff --git a/usr/dash/input.c b/usr/dash/input.c
index aa5dcfcf..232bb9c4 100644
--- a/usr/dash/input.c
+++ b/usr/dash/input.c
@@ -58,10 +58,6 @@
#include "myhistedit.h"
#endif
-#ifdef HETIO
-#include "hetio.h"
-#endif
-
#define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */
#define IBUFSIZ (BUFSIZ + 1)
@@ -188,11 +184,6 @@ retry:
} else
#endif
-
-#ifdef HETIO
- nr = hetio_read_input(parsefile->fd);
- if (nr == -255)
-#endif
nr = read(parsefile->fd, buf, IBUFSIZ - 1);
diff --git a/usr/dash/main....
2020 Mar 28
0
[klibc:update-dash] dash: input: Remove HETIO
..._reset_term(void);
-
-extern int hetio_inter;
diff --git a/usr/dash/input.c b/usr/dash/input.c
index aa5dcfcf..232bb9c4 100644
--- a/usr/dash/input.c
+++ b/usr/dash/input.c
@@ -58,10 +58,6 @@
#include "myhistedit.h"
#endif
-#ifdef HETIO
-#include "hetio.h"
-#endif
-
#define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */
#define IBUFSIZ (BUFSIZ + 1)
@@ -188,11 +184,6 @@ retry:
} else
#endif
-
-#ifdef HETIO
- nr = hetio_read_input(parsefile->fd);
- if (nr == -255)
-#endif
nr = read(parsefile->fd, buf, IBUFSIZ - 1);
diff --git a/usr/dash/main....