summaryrefslogtreecommitdiff
path: root/ex_get.c
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
commit874d317334fae1ddce316f9b6f4d0ce4e434bf52 (patch)
tree929f924d3c3696d3aa9917aca0e7048bbe3e93e8 /ex_get.c
parent15bd7946cc838a3151c357e4b0bc1ab85eecda62 (diff)
heirloom vi fixes from arch AUR
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);