summaryrefslogtreecommitdiff
path: root/ex_get.c
diff options
context:
space:
mode:
Diffstat (limited to 'ex_get.c')
-rw-r--r--ex_get.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ex_get.c b/ex_get.c
index 7bca559..350de0e 100644
--- a/ex_get.c
+++ b/ex_get.c
@@ -116,7 +116,7 @@ getach(void)
}
top:
if (input) {
- if (c = *input++&0377) {
+ if ((c = *input++&0377)) {
if (verbose && !intty)
write(2, &input[-1], 1);
if (c &= TRIM)
@@ -184,13 +184,14 @@ again:
if (c == EOF)
return (c);
c &= TRIM;
- if (!inopen)
+ if (!inopen) {
if (!globp && c == CTRL('d'))
setlastchar('\n');
else if (junk(c)) {
checkjunk(c);
goto again;
}
+ }
return (c);
}
@@ -260,7 +261,7 @@ gettty(void)
if (intty && !inglobal) {
if (offset) {
holdcm = 1;
- printf(" %4d ", lineDOT() + 1);
+ ex_printf(" %4d ", lineDOT() + 1);
flush();
holdcm = 0;
}
@@ -338,7 +339,7 @@ gettty(void)
for (; c > 0; c--)
*cp++ = ' ';
}
- CP(cp, genbuf);
+ lcpy(cp, genbuf, LBSIZE - (cp - linebuf));
if (linebuf[0] == '.' && linebuf[1] == 0)
return (EOF);
return (0);