Download raw body.
vi(1), removing unused variables
On Mon, Apr 20, 2026 at 10:47:45AM +0200, Theo Buehler wrote:
> On Mon, Apr 20, 2026 at 09:33:47AM +0200, Walter Alejandro Iglesias wrote:
> > I'm tired of seeing those warning messages each time I compile.
>
> Committed, thanks.
>
> I changed one thing:
>
> > - TAILQ_FOREACH(tp, &tiq, q) {
> > + TAILQ_FOREACH(tp, &tiq, q)
> > if (db_append(sp, 1, lno++, tp->lb, tp->len))
> > return (1);
> > - cnt++;
> > - }
>
> I left the braces here since I think removing braces to save a line is
> a bad trade off in general and in this case style(9) explicitly permits
> and suggests it.
Since we're at it, how about we remove trailing white spaces?
Index: cl/cl_funcs.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_funcs.c,v
diff -u -p -u -p -r1.24 cl_funcs.c
--- cl/cl_funcs.c 20 Apr 2026 08:44:48 -0000 1.24
+++ cl/cl_funcs.c 20 Apr 2026 09:36:12 -0000
@@ -100,7 +100,7 @@ cl_attr(SCR *sp, scr_attr_t attribute, i
*
* Note that the :command input is a true vi input mode, e.g., input
* maps and abbreviations are being done. So, we need to be able to
- * switch back into the vi screen mode, without flashing the screen.
+ * switch back into the vi screen mode, without flashing the screen.
*
* To make matters worse, the curses initscr() and endwin() calls will
* do this automatically -- so, this attribute isn't as controlled by
@@ -294,7 +294,7 @@ cl_deleteln(SCR *sp)
return (deleteln() == ERR);
}
-/*
+/*
* cl_ex_adjust --
* Adjust the screen for ex. This routine is purely for standalone
* ex programs. All special purpose, all special case.
@@ -515,7 +515,7 @@ cl_suspend(SCR *sp, int *allowedp)
*
* Setting allowedp to 0 will cause the editor to reject the command.
*/
- if (F_ISSET(sp, SC_EX)) {
+ if (F_ISSET(sp, SC_EX)) {
/* Save the terminal settings, and restore the original ones. */
if (F_ISSET(clp, CL_STDIN_TTY)) {
(void)tcgetattr(STDIN_FILENO, &t);
@@ -605,7 +605,7 @@ cl_suspend(SCR *sp, int *allowedp)
/*
* cl_usage --
* Print out the curses usage messages.
- *
+ *
* PUBLIC: void cl_usage(void);
*/
void
Index: cl/cl_read.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_read.c,v
diff -u -p -u -p -r1.23 cl_read.c
--- cl/cl_read.c 2 Sep 2021 11:19:02 -0000 1.23
+++ cl/cl_read.c 20 Apr 2026 09:36:12 -0000
@@ -174,7 +174,7 @@ tty_retry:
break;
}
}
-
+
/*
* The user can enter a key in the editor to quote a character. If we
* get here and the next key is supposed to be quoted, do what we can.
@@ -269,7 +269,7 @@ err: if (errno == EINTR)
return (rval);
}
-/*
+/*
* cl_resize --
* Reset the options for a resize event.
*/
Index: cl/cl_screen.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_screen.c,v
diff -u -p -u -p -r1.28 cl_screen.c
--- cl/cl_screen.c 18 Apr 2017 01:45:33 -0000 1.28
+++ cl/cl_screen.c 20 Apr 2026 09:36:12 -0000
@@ -58,7 +58,7 @@ cl_screen(SCR *sp, u_int32_t flags)
return (1);
F_CLR(gp, G_SRESTART);
}
-
+
/* See if we're already in the right mode. */
if ((LF_ISSET(SC_EX) && F_ISSET(sp, SC_SCR_EX)) ||
(LF_ISSET(SC_VI) && F_ISSET(sp, SC_SCR_VI)))
Index: common/cut.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/cut.c,v
diff -u -p -u -p -r1.18 cut.c
--- common/cut.c 30 Jul 2025 22:19:13 -0000 1.18
+++ common/cut.c 20 Apr 2026 09:36:12 -0000
@@ -175,7 +175,7 @@ copyloop:
}
return (0);
-cut_line_err:
+cut_line_err:
text_lfree(&cbp->textq);
cbp->len = 0;
cbp->flags = 0;
Index: common/exf.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/exf.c,v
diff -u -p -u -p -r1.50 exf.c
--- common/exf.c 15 Feb 2024 00:55:01 -0000 1.50
+++ common/exf.c 20 Apr 2026 09:36:12 -0000
@@ -272,7 +272,7 @@ file_init(SCR *sp, FREF *frp, char *rcv_
* be read. This isn't useful for single files from a command
* line, but it's quite useful for "vi *.c", since you can skip
* past files that you can't read.
- */
+ */
open_err = 1;
goto oerr;
}
@@ -1084,7 +1084,7 @@ file_backup(SCR *sp, char *name, char *b
bp = NULL;
wfname = cmd.argv[0]->bp;
}
-
+
/* Open the backup file, avoiding lurkers. */
if (stat(wfname, &sb) == 0) {
if (!S_ISREG(sb.st_mode)) {
@@ -1386,7 +1386,7 @@ file_lock(SCR *sp, char *name, int *fdp,
{
if (!O_ISSET(sp, O_LOCKFILES))
return (LOCK_SUCCESS);
-
+
/* Set close-on-exec flag so locks are not inherited by shell cmd. */
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
msgq_str(sp, M_SYSERR, name, "%s");
Index: common/key.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/key.c,v
diff -u -p -u -p -r1.20 key.c
--- common/key.c 21 Apr 2022 17:50:29 -0000 1.20
+++ common/key.c 20 Apr 2026 09:36:12 -0000
@@ -570,10 +570,10 @@ append: if (v_event_append(sp, argp))
*/
if (LF_ISSET(EC_INTERRUPT | EC_TIMEOUT))
return (0);
-
+
newmap: evp = &gp->i_event[gp->i_next];
- /*
+ /*
* If the next event in the queue isn't a character event, return
* it, we're done.
*/
@@ -582,7 +582,7 @@ newmap: evp = &gp->i_event[gp->i_next];
QREM(1);
return (0);
}
-
+
/*
* If the key isn't mappable because:
*
Index: common/line.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/line.c,v
diff -u -p -u -p -r1.17 line.c
--- common/line.c 30 Jul 2025 22:19:13 -0000 1.17
+++ common/line.c 20 Apr 2026 09:36:12 -0000
@@ -190,7 +190,7 @@ db_delete(SCR *sp, recno_t lno)
ex_emsg(sp, NULL, EXM_NOFILEYET);
return (1);
}
-
+
/* Update marks, @ and global commands. */
if (mark_insdel(sp, LINE_DELETE, lno))
return (1);
@@ -245,7 +245,7 @@ db_append(SCR *sp, int update, recno_t l
ex_emsg(sp, NULL, EXM_NOFILEYET);
return (1);
}
-
+
/* Update file. */
key.data = &lno;
key.size = sizeof(lno);
@@ -313,7 +313,7 @@ db_insert(SCR *sp, recno_t lno, char *p,
ex_emsg(sp, NULL, EXM_NOFILEYET);
return (1);
}
-
+
/* Update file. */
key.data = &lno;
key.size = sizeof(lno);
@@ -372,7 +372,7 @@ db_set(SCR *sp, recno_t lno, char *p, si
ex_emsg(sp, NULL, EXM_NOFILEYET);
return (1);
}
-
+
/* Log before change. */
log_line(sp, lno, LOG_LINE_RESET_B);
@@ -422,7 +422,7 @@ db_exist(SCR *sp, recno_t lno)
if (lno == OOBLNO)
return (0);
-
+
/*
* Check the last-line number cache. Adjust the cached line
* number for the lines used by the text input buffers.
@@ -454,7 +454,7 @@ db_last(SCR *sp, recno_t *lnop)
ex_emsg(sp, NULL, EXM_NOFILEYET);
return (1);
}
-
+
/*
* Check the last-line number cache. Adjust the cached line
* number for the lines used by the text input buffers.
Index: common/main.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/main.c,v
diff -u -p -u -p -r1.43 main.c
--- common/main.c 24 Oct 2021 21:24:17 -0000 1.43
+++ common/main.c 20 Apr 2026 09:36:12 -0000
@@ -104,7 +104,7 @@ editor(GS *gp, int argc, char *argv[])
if (!strcmp(getprogname(), "nview") ||
!strcmp(getprogname(), "view"))
readonly = 1;
-
+
/* Vi is the default. */
LF_INIT(SC_VI);
}
@@ -401,7 +401,7 @@ editor(GS *gp, int argc, char *argv[])
* we're not in raw mode. We can't switch to raw mode because the
* vi initialization will switch to xterm's alternate screen, causing
* us to lose the messages we're pausing to make sure the user read.
- * So, wait for a complete line.
+ * So, wait for a complete line.
*/
if (F_ISSET(sp, SC_SCR_EX)) {
p = msg_cmsg(sp, CMSG_CONT_R, &len);
Index: common/options.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/options.c,v
diff -u -p -u -p -r1.30 options.c
--- common/options.c 12 Feb 2024 16:42:42 -0000 1.30
+++ common/options.c 20 Apr 2026 09:36:12 -0000
@@ -964,7 +964,7 @@ opts_save(SCR *sp, FILE *fp)
return (0);
}
-/*
+/*
* opts_search --
* Search for an option.
*
@@ -989,7 +989,7 @@ opts_search(char *name)
if ((op = bsearch(&otmp, optlist, sizeof(optlist) / sizeof(OPTLIST) - 1,
sizeof(OPTLIST), opts_cmp)) != NULL)
return (op);
-
+
/*
* Check to see if the name is the prefix of one (and only one)
* option. If so, return the option.
@@ -1009,7 +1009,7 @@ opts_search(char *name)
return (found);
}
-/*
+/*
* opts_nomatch --
* Standard nomatch error message for options.
*
Index: ex/ex.h
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex.h,v
diff -u -p -u -p -r1.11 ex.h
--- ex/ex.h 27 May 2016 09:18:12 -0000 1.11
+++ ex/ex.h 20 Apr 2026 09:36:13 -0000
@@ -217,7 +217,7 @@ typedef enum {
/* Ex address error types. */
enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };
-/* Ex common tag error messages. */
+/* Ex common tag error messages. */
typedef enum {
TAG_BADLNO, /* Tag line doesn't exist. */
TAG_EMPTY, /* Tags stack is empty. */
Index: ex/ex_argv.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_argv.c,v
diff -u -p -u -p -r1.21 ex_argv.c
--- ex/ex_argv.c 2 Aug 2025 20:14:58 -0000 1.21
+++ ex/ex_argv.c 20 Apr 2026 09:36:13 -0000
@@ -498,7 +498,7 @@ argv_lexp(SCR *sp, EXCMD *excp, char *pa
dname = ".";
dlen = 0;
name = path;
- } else {
+ } else {
if (p == path) {
dname = "/";
dlen = 1;
@@ -546,7 +546,7 @@ argv_lexp(SCR *sp, EXCMD *excp, char *pa
/*
* If we didn't find a match, complain that the expansion
* failed. We can't know for certain that's the error, but
- * it's a good guess, and it matches historic practice.
+ * it's a good guess, and it matches historic practice.
*/
msgq(sp, M_ERR, "Shell expansion failed");
return (1);
Index: ex/ex_cmd.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_cmd.c,v
diff -u -p -u -p -r1.12 ex_cmd.c
--- ex/ex_cmd.c 13 Jul 2018 20:06:10 -0000 1.12
+++ ex/ex_cmd.c 20 Apr 2026 09:36:13 -0000
@@ -253,7 +253,7 @@ EXCMDLIST const cmds[] = {
"prev[ious][!]",
"edit the previous file in the file argument list"},
/* C_PUT */
- {"put", ex_put,
+ {"put", ex_put,
E_ADDR1|E_AUTOPRINT|E_ADDR_ZERO|E_ADDR_ZERODEF,
"b",
"[line] pu[t] [buffer]",
Index: ex/ex_filter.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_filter.c,v
diff -u -p -u -p -r1.15 ex_filter.c
--- ex/ex_filter.c 1 Aug 2016 18:27:35 -0000 1.15
+++ ex/ex_filter.c 20 Apr 2026 09:36:13 -0000
@@ -34,7 +34,7 @@ static int filter_ldisplay(SCR *, FILE *
* replace the original text with the stdout/stderr output of
* the utility.
*
- * PUBLIC: int ex_filter(SCR *,
+ * PUBLIC: int ex_filter(SCR *,
* PUBLIC: EXCMD *, MARK *, MARK *, MARK *, char *, enum filtertype);
*/
int
Index: ex/ex_global.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_global.c,v
diff -u -p -u -p -r1.18 ex_global.c
--- ex/ex_global.c 20 Apr 2026 08:44:48 -0000 1.18
+++ ex/ex_global.c 20 Apr 2026 09:36:13 -0000
@@ -267,7 +267,7 @@ ex_g_insdel(SCR *sp, lnop_t op, recno_t
/* If range less than the line, ignore it. */
if (rp->stop < lno)
continue;
-
+
/*
* If range greater than the line, decrement or
* increment the range.
Index: ex/ex_read.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_read.c,v
diff -u -p -u -p -r1.14 ex_read.c
--- ex/ex_read.c 18 Apr 2017 01:45:35 -0000 1.14
+++ ex/ex_read.c 20 Apr 2026 09:36:13 -0000
@@ -233,7 +233,7 @@ ex_read(SCR *sp, EXCMD *cmdp)
default:
ex_emsg(sp, cmdp->argv[0]->bp, EXM_FILECOUNT);
return (1);
-
+
}
break;
default:
Index: ex/ex_script.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_script.c,v
diff -u -p -u -p -r1.27 ex_script.c
--- ex/ex_script.c 18 Apr 2017 01:45:35 -0000 1.27
+++ ex/ex_script.c 20 Apr 2026 09:36:13 -0000
@@ -354,7 +354,7 @@ sscr_check_input(SCR *sp)
gp = sp->gp;
rval = 0;
- /* Allocate space for pfd. */
+ /* Allocate space for pfd. */
nfds = 1;
TAILQ_FOREACH(tsp, &gp->dq, q)
if (F_ISSET(sp, SC_SCRIPT))
Index: ex/ex_subst.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_subst.c,v
diff -u -p -u -p -r1.31 ex_subst.c
--- ex/ex_subst.c 23 Jun 2023 15:06:45 -0000 1.31
+++ ex/ex_subst.c 20 Apr 2026 09:36:13 -0000
@@ -154,7 +154,7 @@ subagain: return (ex_subagain(sp, cmdp))
if (re_compile(sp, ptrn, t - ptrn,
&sp->subre, &sp->subre_len, &sp->subre_c, RE_C_SUBST))
return (1);
-
+
flags = SUB_FIRST;
sp->searchdir = FORWARD;
}
@@ -288,7 +288,7 @@ ex_subtilde(SCR *sp, EXCMD *cmdp)
* Do the substitution. This stuff is *really* tricky. There are lots of
* special cases, and general nastiness. Don't mess with it unless you're
* pretty confident.
- *
+ *
* The nasty part of the substitution is what happens when the replacement
* string contains newlines. It's a bit tricky -- consider the information
* that has to be retained for "s/f\(o\)o/^M\1^M\1/". The solution here is
@@ -926,7 +926,7 @@ re_compile(SCR *sp, char *ptrn, size_t p
*
* XXX
* Regcomp isn't 8-bit clean, so the pattern is nul-terminated
- * for now. There's just no other solution.
+ * for now. There's just no other solution.
*/
MALLOC(sp, *ptrnp, plen + 1);
if (*ptrnp != NULL) {
@@ -951,7 +951,7 @@ re_compile(SCR *sp, char *ptrn, size_t p
*/
if ((rval = regcomp(rep, ptrn, /* plen, */ reflags)) != 0) {
if (!LF_ISSET(RE_C_SILENT))
- re_error(sp, rval, rep);
+ re_error(sp, rval, rep);
return (1);
}
Index: ex/ex_tag.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_tag.c,v
diff -u -p -u -p -r1.26 ex_tag.c
--- ex/ex_tag.c 24 Oct 2021 21:24:17 -0000 1.26
+++ ex/ex_tag.c 20 Apr 2026 09:36:13 -0000
@@ -213,7 +213,7 @@ alloc_err:
return (1);
}
-/*
+/*
* ex_tag_next --
* Switch context to the next TAG.
*
@@ -244,7 +244,7 @@ ex_tag_next(SCR *sp, EXCMD *cmdp)
return (0);
}
-/*
+/*
* ex_tag_prev --
* Switch context to the next TAG.
*
Index: ex/ex_txt.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_txt.c,v
diff -u -p -u -p -r1.17 ex_txt.c
--- ex/ex_txt.c 30 Apr 2020 10:40:21 -0000 1.17
+++ ex/ex_txt.c 20 Apr 2026 09:36:13 -0000
@@ -335,7 +335,7 @@ ins_ch: if (LF_ISSET(TXT_BEAUTIFY) &&
done: return (rval);
-err:
+err:
alloc_err:
return (1);
}
Index: ex/ex_util.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_util.c,v
diff -u -p -u -p -r1.9 ex_util.c
--- ex/ex_util.c 6 Jan 2016 22:28:52 -0000 1.9
+++ ex/ex_util.c 20 Apr 2026 09:36:13 -0000
@@ -171,7 +171,7 @@ ex_emsg(SCR *sp, char *p, exm_t which)
msgq(sp, M_ERR, "Buffer %s is empty", p);
break;
case EXM_FILECOUNT:
- msgq_str(sp, M_ERR, p,
+ msgq_str(sp, M_ERR, p,
"%s: expanded into too many file names");
break;
case EXM_NOCANON:
Index: vi/v_delete.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/v_delete.c,v
diff -u -p -u -p -r1.8 v_delete.c
--- vi/v_delete.c 12 Nov 2014 04:28:41 -0000 1.8
+++ vi/v_delete.c 20 Apr 2026 09:36:13 -0000
@@ -80,7 +80,7 @@ v_delete(SCR *sp, VICMD *vp)
*
* This currently matches the check made in v_yank(), I'm hoping that
* they should be consistent...
- */
+ */
if (!F_ISSET(vp, VM_LMODE)) {
F_CLR(vp, VM_RCM_MASK);
F_SET(vp, VM_RCM_SET);
Index: vi/v_ex.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/v_ex.c,v
diff -u -p -u -p -r1.13 v_ex.c
--- vi/v_ex.c 6 Jan 2016 22:28:52 -0000 1.13
+++ vi/v_ex.c 20 Apr 2026 09:36:13 -0000
@@ -582,7 +582,7 @@ v_ecl_exec(SCR *sp)
msgq(sp, M_BERR, "No ex command to execute");
return (1);
}
-
+
/* Push the command on the command stack. */
if (ex_run_str(sp, NULL, p, len, 0, 0))
return (1);
Index: vi/v_screen.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/v_screen.c,v
diff -u -p -u -p -r1.9 v_screen.c
--- vi/v_screen.c 6 Jan 2016 22:28:52 -0000 1.9
+++ vi/v_screen.c 20 Apr 2026 09:36:13 -0000
@@ -42,7 +42,7 @@ v_screen(SCR *sp, VICMD *vp)
"Enter <CR> to execute a command, :q to exit");
return (1);
}
-
+
/*
* Try for the next lower screen, or, go back to the first
* screen on the stack.
Index: vi/v_search.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/v_search.c,v
diff -u -p -u -p -r1.14 v_search.c
--- vi/v_search.c 6 Jan 2016 22:28:52 -0000 1.14
+++ vi/v_search.c 20 Apr 2026 09:36:13 -0000
@@ -137,7 +137,7 @@ v_exaddr(SCR *sp, VICMD *vp, dir_t dir)
*/
if (!KEYS_WAITING(sp))
F_SET(&gp->excmd, E_SEARCH_WMSG);
-
+
/* Save the current line/column. */
s_lno = sp->lno;
s_cno = sp->cno;
@@ -169,7 +169,7 @@ v_exaddr(SCR *sp, VICMD *vp, dir_t dir)
cmdp = &gp->excmd;
if (ex_range(sp, cmdp, &err))
return (1);
-
+
/*
* Remember where any remaining command information is, and clean
* up the fake ex command.
@@ -204,7 +204,7 @@ v_exaddr(SCR *sp, VICMD *vp, dir_t dir)
*/
if (ISMOTION(vp))
return (v_correct(sp, vp, F_ISSET(cmdp, E_DELTA)));
-
+
/*
* !!!
* Historically, if it wasn't a motion command, a delta in the search
@@ -250,7 +250,7 @@ v_exaddr(SCR *sp, VICMD *vp, dir_t dir)
tlen = sizeof(buf) - 1;
if (v_event_push(sp, NULL, buf, tlen, CH_NOMAP | CH_QUOTED))
return (1);
-
+
/* Don't refresh until after 'z' happens. */
F_SET(VIP(sp), VIP_S_REFRESH);
}
@@ -352,7 +352,7 @@ v_search(SCR *sp, VICMD *vp, char *ptrn,
*/
if (!KEYS_WAITING(sp))
LF_SET(SEARCH_WMSG);
-
+
switch (dir) {
case BACKWARD:
if (b_search(sp,
Index: vi/v_txt.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/v_txt.c,v
diff -u -p -u -p -r1.36 v_txt.c
--- vi/v_txt.c 26 Dec 2022 19:16:04 -0000 1.36
+++ vi/v_txt.c 20 Apr 2026 09:36:13 -0000
@@ -221,7 +221,7 @@ txt_map_end(SCR *sp)
#define UNMAP_TST \
FL_ISSET(ec_flags, EC_MAPINPUT) && LF_ISSET(TXT_INFOLINE)
-/*
+/*
* Internally, we maintain tp->lno and tp->cno, externally, everyone uses
* sp->lno and sp->cno. Make them consistent as necessary.
*/
@@ -2549,7 +2549,7 @@ txt_isrch(SCR *sp, VICMD *vp, TEXT *tp,
FL_CLR(*is_flagsp, IS_RUNNING);
return (0);
}
-
+
/*
* Remember the input line and discard the special input map,
* but don't overwrite the input line on the screen.
@@ -2563,7 +2563,7 @@ txt_isrch(SCR *sp, VICMD *vp, TEXT *tp,
/*
* Specify a starting point and search. If we find a match, move to
* it and refresh the screen. If we didn't find the match, then we
- * beep the screen. When searching from the original cursor position,
+ * beep the screen. When searching from the original cursor position,
* we have to move the cursor, otherwise, we don't want to move the
* cursor in case the text at the current position continues to match.
*/
@@ -2596,7 +2596,7 @@ txt_isrch(SCR *sp, VICMD *vp, TEXT *tp,
F_SET(sp, SC_TINPUT | SC_TINPUT_INFO);
/* Reset the line number of the input line. */
- tp->lno = TMAP[0].lno;
+ tp->lno = TMAP[0].lno;
/*
* If the colon command-line moved, i.e. the screen scrolled,
Index: vi/v_yank.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/v_yank.c,v
diff -u -p -u -p -r1.7 v_yank.c
--- vi/v_yank.c 12 Nov 2014 04:28:41 -0000 1.7
+++ vi/v_yank.c 20 Apr 2026 09:36:13 -0000
@@ -65,7 +65,7 @@ v_yank(SCR *sp, VICMD *vp)
*
* This currently matches the check made in v_delete(), I'm hoping
* that they should be consistent...
- */
+ */
if (!F_ISSET(vp, VM_LMODE)) {
F_CLR(vp, VM_RCM_MASK);
F_SET(vp, VM_RCM_SET);
Index: vi/vs_msg.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/vs_msg.c,v
diff -u -p -u -p -r1.20 vs_msg.c
--- vi/vs_msg.c 18 Apr 2017 01:45:35 -0000 1.20
+++ vi/vs_msg.c 20 Apr 2026 09:36:13 -0000
@@ -140,7 +140,7 @@ vs_busy(SCR *sp, const char *msg, busy_t
(void)gp->scr_refresh(sp, 0);
}
-/*
+/*
* vs_home --
* Home the cursor to the bottom row, left-most column.
*
Index: vi/vs_smap.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/vs_smap.c,v
diff -u -p -u -p -r1.9 vs_smap.c
--- vi/vs_smap.c 6 Jan 2016 22:28:52 -0000 1.9
+++ vi/vs_smap.c 20 Apr 2026 09:36:13 -0000
@@ -684,7 +684,7 @@ vs_sm_up(SCR *sp, MARK *rp, recno_t coun
if (echanged) {
rp->lno = smp->lno;
rp->cno = vs_colpos(sp, smp->lno,
- (O_ISSET(sp, O_LEFTRIGHT) ?
+ (O_ISSET(sp, O_LEFTRIGHT) ?
smp->coff : (smp->soff - 1) * sp->cols) +
sp->rcm % sp->cols);
}
@@ -912,7 +912,7 @@ vs_sm_down(SCR *sp, MARK *rp, recno_t co
if (ychanged) {
rp->lno = smp->lno;
rp->cno = vs_colpos(sp, smp->lno,
- (O_ISSET(sp, O_LEFTRIGHT) ?
+ (O_ISSET(sp, O_LEFTRIGHT) ?
smp->coff : (smp->soff - 1) * sp->cols) +
sp->rcm % sp->cols);
}
Index: vi/vs_split.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/vs_split.c,v
diff -u -p -u -p -r1.17 vs_split.c
--- vi/vs_split.c 20 Apr 2026 08:44:48 -0000 1.17
+++ vi/vs_split.c 20 Apr 2026 09:36:13 -0000
@@ -234,7 +234,7 @@ vs_discard(SCR *sp, SCR **spp)
*spp = sp;
if (sp == NULL)
return (0);
-
+
/*
* Make no effort to clean up the discarded screen's information. If
* it's not exiting, we'll do the work when the user redisplays it.
--
Walter
vi(1), removing unused variables