projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Flush out the last dregs in the terminal before quitting when
[unix-history]
/
usr
/
src
/
usr.bin
/
ex
/
ex_get.c
diff --git
a/usr/src/usr.bin/ex/ex_get.c
b/usr/src/usr.bin/ex/ex_get.c
index
f39715a
..
29e0039
100644
(file)
--- a/
usr/src/usr.bin/ex/ex_get.c
+++ b/
usr/src/usr.bin/ex/ex_get.c
@@
-5,7
+5,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char *sccsid = "@(#)ex_get.c 7.
8
(Berkeley) %G%";
+static char *sccsid = "@(#)ex_get.c 7.
9
(Berkeley) %G%";
#endif not lint
#include "ex.h"
#endif not lint
#include "ex.h"
@@
-71,7
+71,7
@@
peekcd()
getach()
{
register int c;
getach()
{
register int c;
- static char inline[BUFSIZ];
+ static char in
put
line[BUFSIZ];
c = peekc;
if (c != 0) {
c = peekc;
if (c != 0) {
@@
-95,25
+95,25
@@
top:
}
flush();
if (intty) {
}
flush();
if (intty) {
- c = read(0, in
line, sizeof in
line - 4);
+ c = read(0, in
putline, sizeof input
line - 4);
if (c < 0)
return (lastc = EOF);
if (c < 0)
return (lastc = EOF);
- if (c == 0 || inline[c-1] != '\n')
- inline[c++] = CTRL('d');
- if (inline[c-1] == '\n')
+ if (c == 0 || in
put
line[c-1] != '\n')
+ in
put
line[c++] = CTRL('d');
+ if (in
put
line[c-1] == '\n')
noteinp();
noteinp();
- inline[c] = 0;
+ in
put
line[c] = 0;
for (c--; c >= 0; c--)
for (c--; c >= 0; c--)
- if (inline[c] == 0)
- inline[c] = QUOTE;
- input = inline;
+ if (in
put
line[c] == 0)
+ in
put
line[c] = QUOTE;
+ input = in
put
line;
goto top;
}
goto top;
}
- c = read(0, in
line, sizeof in
line - 1);
+ c = read(0, in
putline, sizeof input
line - 1);
if(c <= 0)
return(lastc = EOF);
if(c <= 0)
return(lastc = EOF);
- inline[c] = '\0';
- input = inline;
+ in
put
line[c] = '\0';
+ input = in
put
line;
goto top;
}
goto top;
}