From 874d317334fae1ddce316f9b6f4d0ce4e434bf52 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Tue, 23 Jun 2026 21:34:41 -0700 Subject: heirloom vi fixes from arch AUR --- ex.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ex.c') diff --git a/ex.c b/ex.c index a6b5121..ab620c1 100644 --- a/ex.c +++ b/ex.c @@ -154,7 +154,7 @@ erropen(void) void usage(void) { - printf(catgets(catd, 1, 1, "\ + ex_printf(catgets(catd, 1, 1, "\ Usage: %s [- | -s] [-l] [-L] [-R] [-r [file]] [-t tag]\n\ [-v] [-V] [-w size] [+cmd | -c cmd] file...\n"), progname); @@ -166,7 +166,7 @@ void needarg(int c) { erropen(); - printf(catgets(catd, 1, 2, + ex_printf(catgets(catd, 1, 2, "%s: option requires an argument -- %c\n"), progname, c); usage(); } @@ -175,7 +175,7 @@ void invopt(int c) { erropen(); - printf(catgets(catd, 1, 3, "%s: illegal option -- %c\n"), progname, c); + ex_printf(catgets(catd, 1, 3, "%s: illegal option -- %c\n"), progname, c); usage(); } @@ -399,8 +399,6 @@ main(register int ac, register char *av[]) while (ac) { if (av[0][0] == '+') { firstpat = &av[0][1]; - if (*firstpat == '\0') - needarg('+'); } else if (av[0][0] == '-') { arggroup: c = av[0][1]; @@ -437,7 +435,7 @@ arggroup: trace = fopen(tracef, "w"); #define tracbuf NULL if (trace == NULL) - printf(catgets(catd, 1, 4, + ex_printf(catgets(catd, 1, 4, "Trace create error\n")); else setbuf(trace, tracbuf); -- cgit v1.2.3