diff options
author | Tavis Ormandy <taviso@gentoo.org> | 2003-07-31 12:28:33 +0000 |
---|---|---|
committer | Tavis Ormandy <taviso@gentoo.org> | 2003-07-31 12:28:33 +0000 |
commit | ac2d668d2d82c8a97d60a0ae5ac58d958c2a4f99 (patch) | |
tree | 591a6aa923abe0fcdf59201b8fbeae33a7df3fc8 /app-shells/csh/files | |
parent | fixing #24290 (diff) | |
download | gentoo-2-ac2d668d2d82c8a97d60a0ae5ac58d958c2a4f99.tar.gz gentoo-2-ac2d668d2d82c8a97d60a0ae5ac58d958c2a4f99.tar.bz2 gentoo-2-ac2d668d2d82c8a97d60a0ae5ac58d958c2a4f99.zip |
fixing #24290
Diffstat (limited to 'app-shells/csh/files')
-rw-r--r-- | app-shells/csh/files/digest-csh-1.29-r2 | 1 | ||||
-rw-r--r-- | app-shells/csh/files/retype-input.diff | 89 |
2 files changed, 90 insertions, 0 deletions
diff --git a/app-shells/csh/files/digest-csh-1.29-r2 b/app-shells/csh/files/digest-csh-1.29-r2 new file mode 100644 index 000000000000..ebc0d877f98b --- /dev/null +++ b/app-shells/csh/files/digest-csh-1.29-r2 @@ -0,0 +1 @@ +MD5 9637b9572e66e992305dfed9909098e2 csh-1.29.tar.gz 179592 diff --git a/app-shells/csh/files/retype-input.diff b/app-shells/csh/files/retype-input.diff new file mode 100644 index 000000000000..f063170eb10e --- /dev/null +++ b/app-shells/csh/files/retype-input.diff @@ -0,0 +1,89 @@ +--- file.c.orig 2003-06-12 20:41:07.000000000 +0100 ++++ file.c 2003-07-31 12:07:34.000000000 +0100 +@@ -92,7 +92,7 @@ + + static void setup_tty(int); + static void back_to_col_1(void); +-static int pushback(Char *); ++static int pushback(Char *, int); + static void catn(Char *, Char *, int); + static void copyn(Char *, Char *, int); + static Char filetype(Char *, Char *); +@@ -167,7 +167,7 @@ + * Push string contents back into tty queue + */ + static int +-pushback(Char *string) ++pushback(Char *string, int doecho) + { + struct termios tty, tty_normal; + char buf[TTYHOG], svchars[TTYHOG]; +@@ -181,13 +181,14 @@ + (void)sigaddset(&sigset, SIGINT); + (void)sigprocmask(SIG_BLOCK, &sigset, &osigset); + (void)tcgetattr(SHOUT, &tty); +- tty_normal = tty; +- tty.c_lflag &= ~(ECHOKE | ECHO | ECHOE | ECHOK | ECHONL | ECHOPRT | ECHOCTL); +- /* FIONREAD works only in noncanonical mode. */ +- tty.c_lflag &= ~ICANON; +- tty.c_cc[VMIN] = 0; +- (void)tcsetattr(SHOUT, TCSADRAIN, &tty); +- ++ if (!doecho) { ++ tty_normal = tty; ++ tty.c_lflag &= ~(ECHOKE | ECHO | ECHOE | ECHOK | ECHONL | ECHOPRT | ECHOCTL); ++ /* FIONREAD works only in noncanonical mode. */ ++ tty.c_lflag &= ~ICANON; ++ tty.c_cc[VMIN] = 0; ++ (void)tcsetattr(SHOUT, TCSADRAIN, &tty); ++ } + for (retrycnt = 5; ; retrycnt--) { + /* + * Push back characters. +@@ -243,7 +244,8 @@ + (void)tcsetattr(SHOUT, TCSADRAIN, &tty); + (void)ioctl(SHOUT, FIONREAD, (ioctl_t) &i); + #endif +- (void)tcsetattr(SHOUT, TCSADRAIN, &tty_normal); ++ if (!doecho) ++ (void)tcsetattr(SHOUT, TCSADRAIN, &tty_normal); + (void)sigprocmask(SIG_SETMASK, &osigset, NULL); + + return nsv; +@@ -380,6 +382,7 @@ + /* + * Cause pending line to be printed + */ ++#if 0 + static void + retype(void) + { +@@ -389,6 +392,7 @@ + tty.c_lflag |= PENDIN; + (void)tcsetattr(SHOUT, TCSADRAIN, &tty); + } ++#endif + + static void + beep(void) +@@ -710,15 +714,20 @@ + } + if (command == LIST) /* Always retype after a LIST */ + should_retype = TRUE; ++#if 0 + if (pushback(inputline)) + should_retype = TRUE; ++#endif + if (should_retype) { + if (command == RECOGNIZE) + (void) fputc('\n', cshout); + printprompt(); + } ++#if 0 + if (should_retype) + retype(); ++#endif ++ pushback(inputline, should_retype); + } + setup_tty(OFF); + return (num_read); |