diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-06-23 21:34:41 -0700 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-06-23 21:34:41 -0700 |
| commit | 874d317334fae1ddce316f9b6f4d0ce4e434bf52 (patch) | |
| tree | 929f924d3c3696d3aa9917aca0e7048bbe3e93e8 /ex_vget.c | |
| parent | 15bd7946cc838a3151c357e4b0bc1ab85eecda62 (diff) | |
heirloom vi fixes from arch AUR
Diffstat (limited to 'ex_vget.c')
| -rw-r--r-- | ex_vget.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -317,7 +317,7 @@ again: d = xtoupper(c); else { colp = "({)}!|^~'~"; - while (d = *colp++) + while ((d = *colp++)) if (d == c) { d = *colp++; break; @@ -529,17 +529,17 @@ noteit(int must) { register int sdl = destline, sdc = destcol; - if (notecnt < 2 || !must && state == VISUAL) + if (notecnt < 2 || (!must && state == VISUAL)) return (0); splitw++; if (WBOT == WECHO) vmoveitup(1, 1); vigoto(WECHO, 0); - printf(catgets(catd, 1, 223, "%d %sline"), notecnt, notesgn); + ex_printf(catgets(catd, 1, 223, "%d %sline"), notecnt, notesgn); if (notecnt > 1) putchar('s'); if (*notenam) { - printf(" %s", notenam); + ex_printf(" %s", notenam); if (*(strend(notenam) - 1) != 'e') putchar('e'); putchar('d'); @@ -636,7 +636,7 @@ map(register int c, register struct maps *maps) if (trace) fprintf(trace,"\ntry '%s', ",maps[d].cap); #endif - if (p = maps[d].icap) { + if ((p = maps[d].icap)) { for (q=b; *p; p++, q++) { #ifdef MDEBUG if (trace) @@ -725,13 +725,13 @@ macpush(char *st, int canundo) error(catgets(catd, 1, 224, "Macro too long@ - maybe recursive?")); if (vmacp) { - strcpy(tmpbuf, vmacp); + lcpy(tmpbuf, vmacp, sizeof tmpbuf); if (!FIXUNDO) canundo = 0; /* can't undo inside a macro anyway */ } - strcpy(vmacbuf, st); + lcpy(vmacbuf, st, sizeof vmacbuf); if (vmacp) - strcat(vmacbuf, tmpbuf); + lcat(vmacbuf, tmpbuf, sizeof vmacbuf); vmacp = vmacbuf; /* arrange to be able to undo the whole macro */ if (canundo) { @@ -777,7 +777,7 @@ vudump(char *s) fprintf(trace, " undadot=%d, dot=%d, dol=%d, unddol=%d, truedol=%d\n", lineno(undadot), lineno(dot), lineno(dol), lineno(unddol), lineno(truedol)); fprintf(trace, " [\n"); - CP(savelb, linebuf); + lcpy(savelb, linebuf, sizeof savelb); fprintf(trace, "linebuf = '%s'\n", linebuf); for (p=zero+1; p<=truedol; p++) { fprintf(trace, "%o ", *p); @@ -785,7 +785,7 @@ vudump(char *s) fprintf(trace, "'%s'\n", linebuf); } fprintf(trace, "]\n"); - CP(linebuf, savelb); + lcpy(linebuf, savelb, LBSIZE); } #endif @@ -813,6 +813,7 @@ vgetcnt(void) void trapalarm(int signum) { + (void)signum; alarm(0); if (vcatch) LONGJMP(vreslab,1); |
