summaryrefslogtreecommitdiff
path: root/ex_vops3.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_vops3.c
parent15bd7946cc838a3151c357e4b0bc1ab85eecda62 (diff)
heirloom vi fixes from arch AUR
Diffstat (limited to 'ex_vops3.c')
-rw-r--r--ex_vops3.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/ex_vops3.c b/ex_vops3.c
index a855f16..f1a1534 100644
--- a/ex_vops3.c
+++ b/ex_vops3.c
@@ -127,7 +127,7 @@ llfind(bool pastatom, int cnt, void (*f)(int), line *limit)
*/
wasend = 0;
lf = f;
- strcpy(save, linebuf);
+ lcpy(save, linebuf, LBSIZE);
if (limit == 0)
limit = dir < 0 ? one : dol;
llimit = limit;
@@ -195,7 +195,7 @@ begin:
while (!endsent(pastatom))
if (!lnext())
goto ret;
- if (!pastatom || wcursor == linebuf && endPS())
+ if (!pastatom || (wcursor == linebuf && endPS()))
if (--cnt <= 0)
break;
if (linebuf[0] == 0) {
@@ -231,7 +231,7 @@ begin:
* If we are not at a section/paragraph division,
* advance to next.
*/
- if (wcursor == icurs && wdot == idot || wcursor != linebuf || !endPS())
+ if ((wcursor == icurs && wdot == idot) || wcursor != linebuf || !endPS())
ignore(lskipa1(""));
}
#ifdef LISPCODE
@@ -241,7 +241,7 @@ begin:
* Startup by skipping if at a ( going left or a ) going
* right to keep from getting stuck immediately.
*/
- if (dir < 0 && c == '(' || dir > 0 && c == ')') {
+ if ((dir < 0 && c == '(') || (dir > 0 && c == ')')) {
if (!lnext()) {
rc = -1;
goto ret;
@@ -257,7 +257,7 @@ begin:
*/
while (cnt > 0) {
c = *wcursor;
- if (dir < 0 && c == ')' || dir > 0 && c == '(') {
+ if ((dir < 0 && c == ')') || (dir > 0 && c == '(')) {
if (!lskipbal("()"))
goto ret;
/*
@@ -270,7 +270,7 @@ begin:
if (!lnext() || !ltosolid())
goto ret;
--cnt;
- } else if (dir < 0 && c == '(' || dir > 0 && c == ')')
+ } else if ((dir < 0 && c == '(') || (dir > 0 && c == ')'))
/* Found a higher level paren */
goto ret;
else {
@@ -297,6 +297,7 @@ endsent(bool pastatom)
register char *cp = wcursor;
register int c, d;
+ (void)pastatom;
/*
* If this is the beginning of a line, then
* check for the end of a paragraph or section.
@@ -316,7 +317,7 @@ endsent(bool pastatom)
if ((d = *++cp) == 0)
return (1);
while (any(d, ")]'"));
- if (*cp == 0 || *cp++ == ' ' && *cp == ' ')
+ if (*cp == 0 || (*cp++ == ' ' && *cp == ' '))
return (1);
tryps:
if (cp[1] == 0)
@@ -430,7 +431,7 @@ lsmatch(char *cp)
register char *scurs = cursor;
wcursor = cp;
- strcpy(sp, linebuf);
+ lcpy(sp, linebuf, LBSIZE);
*wcursor = 0;
strcpy(cursor, genbuf);
cursor = strend(linebuf) - 1;
@@ -588,7 +589,7 @@ lbrack(register int c, void (*f)(int))
getline(*addr);
if (linebuf[0] == '{' ||
#ifdef LISPCODE
- value(LISP) && linebuf[0] == '(' ||
+ (value(LISP) && linebuf[0] == '(') ||
#endif
isa(svalue(SECTIONS))) {
if (c == ']' && f != vmove) {
@@ -716,6 +717,7 @@ wskipright(char *line, char *pos)
{
int c, n;
+ (void)line;
nextc(c, pos, n);
return n;
}