diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-07-24 16:16:11 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-07-24 16:16:11 +0000 |
commit | 9fe0ebe622331e4ca8b324440857ac3415cf231e (patch) | |
tree | da7d517118e7d40dfef8b4943e368ecbd43475cb /usr.bin/vi/ex/ex_util.c | |
parent | 4e78eb09c86098d70b62e357fffcf4c3d379074f (diff) |
bring vi/ex up to 1.71
Diffstat (limited to 'usr.bin/vi/ex/ex_util.c')
-rw-r--r-- | usr.bin/vi/ex/ex_util.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.bin/vi/ex/ex_util.c b/usr.bin/vi/ex/ex_util.c index bed242dffdb..6c4772e6154 100644 --- a/usr.bin/vi/ex/ex_util.c +++ b/usr.bin/vi/ex/ex_util.c @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "@(#)ex_util.c 10.21 (Berkeley) 5/8/96"; +static const char sccsid[] = "@(#)ex_util.c 10.23 (Berkeley) 6/19/96"; #endif /* not lint */ #include <sys/types.h> @@ -127,6 +127,8 @@ ex_ncheck(sp, force) SCR *sp; int force; { + char **ap; + /* * !!! * Historic practice: quit! or two quit's done in succession @@ -135,8 +137,11 @@ ex_ncheck(sp, force) if (!force && sp->ccnt != sp->q_ccnt + 1 && sp->cargv != NULL && sp->cargv[1] != NULL) { sp->q_ccnt = sp->ccnt; + + for (ap = sp->cargv + 1; *ap != NULL; ++ap); msgq(sp, M_ERR, -"167|More files to edit; use n[ext] to go to the next file, q[uit]! to quit"); + "167|%d more files to edit", (ap - sp->cargv) - 1); + return (1); } return (0); @@ -152,8 +157,13 @@ int ex_init(sp) SCR *sp; { - if (sp->gp->scr_screen(sp, SC_EX)) + GS *gp; + + gp = sp->gp; + + if (gp->scr_screen(sp, SC_EX)) return (1); + (void)gp->scr_attr(sp, SA_ALTERNATE, 0); sp->rows = O_VAL(sp, O_LINES); sp->cols = O_VAL(sp, O_COLUMNS); |