Displaying 9 results from an estimated 9 matches for "flushout".
2019 Jan 25
0
[klibc:update-dash] input: Remove HETIO
...] = 1;
- new->c_cc[VTIME] = 0;
- new->c_lflag &= ~ICANON; /* unbuffered input */
- new->c_lflag &= ~ECHO;
- tcsetattr(0, TCSANOW, new);
-}
-
-void input_home(int *cursor) /* Command line input routines */
-{
- while (*cursor > 0) {
- out1c('\b');
- --*cursor;
- }
- flushout(out1);
-}
-
-
-void input_delete(int cursor)
-{
- int j = 0;
-
- memmove(parsenextc + cursor, parsenextc + cursor + 1,
- BUFSIZ - cursor - 1);
- for (j = cursor; j < (BUFSIZ - 1); j++) {
- if (!*(parsenextc + j))
- break;
- else
- out1c(*(parsenextc + j));
- }
-
- out1str(" \b")...
2020 Mar 28
0
[klibc:update-dash] dash: input: Remove HETIO
...] = 1;
- new->c_cc[VTIME] = 0;
- new->c_lflag &= ~ICANON; /* unbuffered input */
- new->c_lflag &= ~ECHO;
- tcsetattr(0, TCSANOW, new);
-}
-
-void input_home(int *cursor) /* Command line input routines */
-{
- while (*cursor > 0) {
- out1c('\b');
- --*cursor;
- }
- flushout(out1);
-}
-
-
-void input_delete(int cursor)
-{
- int j = 0;
-
- memmove(parsenextc + cursor, parsenextc + cursor + 1,
- BUFSIZ - cursor - 1);
- for (j = cursor; j < (BUFSIZ - 1); j++) {
- if (!*(parsenextc + j))
- break;
- else
- out1c(*(parsenextc + j));
- }
-
- out1str(" \b")...
2019 Jan 25
0
[klibc:update-dash] [INPUT] Replace open-coded flushall in preadbuffer
...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
...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: eval: Fail immediately with redirections errors for simple command
...48,30 +859,19 @@ evalcommand(union node *cmd, int flags)
!(cmdentry.u.cmd->flags & BUILTIN_REGULAR)) {
find_command(argv[0], &cmdentry, cmd_flag | DO_ERR,
unlikely(path) ? path : pathval());
- if (cmdentry.cmdtype == CMDUNKNOWN) {
- status = 127;
-#ifdef FLUSHERR
- flushout(&errout);
-#endif
- goto bail;
- }
- }
-
- if (status) {
-bail:
- exitstatus = status;
-
- /* We have a redirection error. */
- if (spclbltin > 0)
- exraise(EXERROR);
-
- goto out;
}
jp = NULL;
/* Execute the command. */
switch (cmdentry.cmdtype) {
+ case CMDUNKNOWN:
+...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...nd if xflag is set. */
@@ -789,53 +836,24 @@ evalcommand(union node *cmd, int flags)
outstr(expandstr(ps4val()), out);
sep = 0;
sep = eprintlist(out, varlist.list, sep);
- eprintlist(out, arglist.list, sep);
+ eprintlist(out, osp, sep);
outcslow('\n', out);
#ifdef FLUSHERR
flushout(out);
#endif
}
- execcmd = 0;
- spclbltin = -1;
-
/* Now locate the command. */
- if (argc) {
- const char *oldpath;
- int cmd_flag = DO_ERR;
-
- path += 5;
- oldpath = path;
- for (;;) {
- find_command(argv[0], &cmdentry, cmd_flag, path);
- if (cmdentry.cmdtype == CMDUNKNOWN) {...
2020 Mar 28
0
[klibc:update-dash] dash: main: Print \n upon EOF (CTRL-D) when run interactively
.../main.c
index e8e42565..6d53e009 100644
--- a/usr/dash/main.c
+++ b/usr/dash/main.c
@@ -221,8 +221,15 @@ cmdloop(int top)
if (!top || numeof >= 50)
break;
if (!stoppedjobs()) {
- if (!Iflag)
+ if (!Iflag) {
+ if (iflag) {
+ out2c('\n');
+#ifdef FLUSHERR
+ flushout(out2);
+#endif
+ }
break;
+ }
out2str("\nUse \"exit\" to leave shell.\n");
}
numeof++;
2019 Jan 25
0
[klibc:update-dash] input: Move all input state into parsefile
...= '\0';
@@ -298,13 +272,13 @@ again:
HistEvent he;
INTOFF;
history(hist, &he, whichprompt == 1? H_ENTER : H_APPEND,
- parsenextc);
+ parsefile->nextc);
INTON;
}
#endif
if (vflag) {
- out2str(parsenextc);
+ out2str(parsefile->nextc);
#ifdef FLUSHERR
flushout(out2);
#endif
@@ -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--;
}
/*
@@ -3...
2020 Mar 28
0
[klibc:update-dash] dash: input: Move all input state into parsefile
...= '\0';
@@ -298,13 +272,13 @@ again:
HistEvent he;
INTOFF;
history(hist, &he, whichprompt == 1? H_ENTER : H_APPEND,
- parsenextc);
+ parsefile->nextc);
INTON;
}
#endif
if (vflag) {
- out2str(parsenextc);
+ out2str(parsefile->nextc);
#ifdef FLUSHERR
flushout(out2);
#endif
@@ -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--;
}
/*
@@ -3...