diff --git a/usr.bin/vi/README b/usr.bin/vi/README index 5bece992908..4af7691c6be 100644 --- a/usr.bin/vi/README +++ b/usr.bin/vi/README @@ -1,8 +1,8 @@ -# @(#)README 8.84 (Berkeley) 8/15/94 +# @(#)README 8.85 (Berkeley) 8/17/94 -This is the README for version 1.32 of nex/nvi, a freely redistributable +This is the README for version 1.33 of nex/nvi, a freely redistributable replacement for the Berkeley ex and vi text editors. The compressed or -gzip'd archive, for this and future versions, can be retrieved by using +gzip'd archives for this and future versions, can be retrieved by using anonymous ftp to ftp.cs.berkeley.edu, from the file ucb/4bsd/nvi.tar.Z, or ucb/4bsd/nvi.tar.gz. diff --git a/usr.bin/vi/common/cut.c b/usr.bin/vi/common/cut.c index df86a95983b..14bbd81846e 100644 --- a/usr.bin/vi/common/cut.c +++ b/usr.bin/vi/common/cut.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)cut.c 8.32 (Berkeley) 7/28/94"; +static const char sccsid[] = "@(#)cut.c 8.33 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/delete.c b/usr.bin/vi/common/delete.c index 4edd008e6f0..1f1877277f3 100644 --- a/usr.bin/vi/common/delete.c +++ b/usr.bin/vi/common/delete.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)delete.c 8.10 (Berkeley) 4/26/94"; +static const char sccsid[] = "@(#)delete.c 8.11 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/exf.c b/usr.bin/vi/common/exf.c index b18565e2d0a..d417df19ca8 100644 --- a/usr.bin/vi/common/exf.c +++ b/usr.bin/vi/common/exf.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)exf.c 8.94 (Berkeley) 8/7/94"; +static const char sccsid[] = "@(#)exf.c 8.96 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -361,7 +361,14 @@ file_init(sp, frp, rcv_name, force) */ set_alt_name(sp, sp->frp == NULL ? NULL : sp->frp->name); - /* Switch... */ + /* + * Switch... + * + * !!! + * Note, because the EXF structure is examine at interrupt time, + * the underlying DB structures have to be consistent as soon as + * it's assigned to an SCR structure. + */ ++ep->refcnt; sp->ep = ep; sp->frp = frp; diff --git a/usr.bin/vi/common/line.c b/usr.bin/vi/common/line.c index 12d22e481dd..9ce348a36b6 100644 --- a/usr.bin/vi/common/line.c +++ b/usr.bin/vi/common/line.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)line.c 8.30 (Berkeley) 6/30/94"; +static const char sccsid[] = "@(#)line.c 8.31 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/log.c b/usr.bin/vi/common/log.c index 09f0c27fe0f..fe9a6b1dfd0 100644 --- a/usr.bin/vi/common/log.c +++ b/usr.bin/vi/common/log.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)log.c 8.16 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)log.c 8.17 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/main.c b/usr.bin/vi/common/main.c index 5e4593e5703..b837a6ddf89 100644 --- a/usr.bin/vi/common/main.c +++ b/usr.bin/vi/common/main.c @@ -32,13 +32,13 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1992, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)main.c 8.103 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)main.c 8.105 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -219,6 +219,9 @@ main(argc, argv) * tricky. If an error is returned, we may or may not have a * screen structure. If we have a screen structure, put it on a * display queue so that the error messages get displayed. + * + * !!! + * Signals not on, no need to block them for queue manipulation. */ if (screen_init(NULL, &sp, flags)) { if (sp != NULL) @@ -439,8 +442,10 @@ main(argc, argv) (void *)&__global_list->dq) if ((sp = __global_list->hq.cqh_first) != (void *)&__global_list->hq) { + SIGBLOCK(__global_list); CIRCLEQ_REMOVE(&sp->gp->hq, sp, q); CIRCLEQ_INSERT_TAIL(&sp->gp->dq, sp, q); + SIGUNBLOCK(__global_list); } else break; @@ -493,6 +498,10 @@ gs_init() if (gp == NULL) err(1, NULL); + /* + * !!! + * Signals not on, no need to block them for queue manipulation. + */ CIRCLEQ_INIT(&gp->dq); CIRCLEQ_INIT(&gp->hq); LIST_INIT(&gp->msgq); diff --git a/usr.bin/vi/common/mark.c b/usr.bin/vi/common/mark.c index 15b04974fc0..6461e22c03a 100644 --- a/usr.bin/vi/common/mark.c +++ b/usr.bin/vi/common/mark.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)mark.c 8.19 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)mark.c 8.20 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/mem.h b/usr.bin/vi/common/mem.h index e61f7ffb643..53aeb7948f8 100644 --- a/usr.bin/vi/common/mem.h +++ b/usr.bin/vi/common/mem.h @@ -30,19 +30,35 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)mem.h 8.6 (Berkeley) 6/20/94 + * @(#)mem.h 8.8 (Berkeley) 8/16/94 */ /* Increase the size of a malloc'd buffer. Two versions, one that * returns, one that jumps to an error label. */ #define BINC_GOTO(sp, lp, llen, nlen) { \ - if ((nlen) > llen && binc(sp, &(lp), &(llen), nlen)) \ + void *__bincp; \ + if ((nlen) > llen) { \ + if ((__bincp = binc(sp, lp, &(llen), nlen)) == NULL) \ goto binc_err; \ + /* \ + * !!! \ + * Possible pointer conversion. \ + */ \ + lp = __bincp; \ + } \ } #define BINC_RET(sp, lp, llen, nlen) { \ - if ((nlen) > llen && binc(sp, &(lp), &(llen), nlen)) \ + void *__bincp; \ + if ((nlen) > llen) { \ + if ((__bincp = binc(sp, lp, &(llen), nlen)) == NULL) \ return (1); \ + /* \ + * !!! \ + * Possible pointer conversion. \ + */ \ + lp = __bincp; \ + } \ } /* @@ -175,4 +191,4 @@ #define MEMMOVE(p, t, len) memmove(p, t, (len) * sizeof(*(p))) #define MEMSET(p, value, len) memset(p, value, (len) * sizeof(*(p))) -int binc __P((SCR *, void *, size_t *, size_t)); +void *binc __P((SCR *, void *, size_t *, size_t)); diff --git a/usr.bin/vi/common/msg.c b/usr.bin/vi/common/msg.c index f5fe595f44b..69c4838c80c 100644 --- a/usr.bin/vi/common/msg.c +++ b/usr.bin/vi/common/msg.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)msg.c 8.9 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)msg.c 8.11 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -222,7 +222,8 @@ msg_app(gp, sp, inv_video, p, len) } /* Get enough memory for the message. */ -store: if (len > mp->blen && binc(sp, &mp->mbuf, &mp->blen, len)) +store: if (len > mp->blen && + (mp->mbuf = binc(sp, mp->mbuf, &mp->blen, len)) == NULL) goto ret; /* Store the message. */ diff --git a/usr.bin/vi/common/options.c b/usr.bin/vi/common/options.c index 1c8496d1d01..f96e0ff7665 100644 --- a/usr.bin/vi/common/options.c +++ b/usr.bin/vi/common/options.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)options.c 8.64 (Berkeley) 7/27/94"; +static const char sccsid[] = "@(#)options.c 8.65 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/options_f.c b/usr.bin/vi/common/options_f.c index 6e1f060f284..25b72455d00 100644 --- a/usr.bin/vi/common/options_f.c +++ b/usr.bin/vi/common/options_f.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)options_f.c 8.34 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)options_f.c 8.35 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/put.c b/usr.bin/vi/common/put.c index e6dbf3ae496..499d637299b 100644 --- a/usr.bin/vi/common/put.c +++ b/usr.bin/vi/common/put.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)put.c 8.9 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)put.c 8.10 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/recover.c b/usr.bin/vi/common/recover.c index f218c0645d3..f916fdb4c16 100644 --- a/usr.bin/vi/common/recover.c +++ b/usr.bin/vi/common/recover.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)recover.c 8.72 (Berkeley) 7/21/94"; +static const char sccsid[] = "@(#)recover.c 8.73 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/screen.c b/usr.bin/vi/common/screen.c index d3e27e7da21..7b95173692e 100644 --- a/usr.bin/vi/common/screen.c +++ b/usr.bin/vi/common/screen.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)screen.c 8.64 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)screen.c 8.66 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -300,7 +300,9 @@ screen_end(sp) } /* Remove the screen from the displayed queue. */ + SIGBLOCK(sp->gp); CIRCLEQ_REMOVE(&sp->gp->dq, sp, q); + SIGUNBLOCK(sp->gp); /* Free the screen itself. */ FREE(sp, sizeof(SCR)); diff --git a/usr.bin/vi/common/search.c b/usr.bin/vi/common/search.c index 72d9e4b2b9d..964c4132f62 100644 --- a/usr.bin/vi/common/search.c +++ b/usr.bin/vi/common/search.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)search.c 8.46 (Berkeley) 7/2/94"; +static const char sccsid[] = "@(#)search.c 8.47 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/seq.c b/usr.bin/vi/common/seq.c index 7b217084aaa..cc47fd177de 100644 --- a/usr.bin/vi/common/seq.c +++ b/usr.bin/vi/common/seq.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)seq.c 8.30 (Berkeley) 7/15/94"; +static const char sccsid[] = "@(#)seq.c 8.32 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -63,13 +63,13 @@ static char sccsid[] = "@(#)seq.c 8.30 (Berkeley) 7/15/94"; int seq_set(sp, name, nlen, input, ilen, output, olen, stype, flags) SCR *sp; - char *name, *input, *output; + CHAR_T *name, *input, *output; size_t nlen, ilen, olen; enum seqtype stype; int flags; { - SEQ *lastqp, *qp; CHAR_T *p; + SEQ *lastqp, *qp; int sv_errno; /* @@ -145,6 +145,7 @@ mem1: errno = sv_errno; } /* Set the fast lookup bit. */ + if (qp->input[0] < MAX_BIT_SEQ) bit_set(sp->gp->seqb, qp->input[0]); return (0); @@ -157,7 +158,7 @@ mem1: errno = sv_errno; int seq_delete(sp, input, ilen, stype) SCR *sp; - char *input; + CHAR_T *input; size_t ilen; enum seqtype stype; { @@ -195,7 +196,7 @@ SEQ * seq_find(sp, lastqp, input, ilen, stype, ispartialp) SCR *sp; SEQ **lastqp; - char *input; + CHAR_T *input; size_t ilen; enum seqtype stype; int *ispartialp; @@ -268,9 +269,9 @@ seq_dump(sp, stype, isname) enum seqtype stype; int isname; { + CHAR_T *p; SEQ *qp; int cnt, len, olen; - CHAR_T *p; cnt = 0; for (qp = sp->gp->seqq.lh_first; qp != NULL; qp = qp->q.le_next) { @@ -315,10 +316,10 @@ seq_save(sp, fp, prefix, stype) char *prefix; enum seqtype stype; { + CHAR_T *p; SEQ *qp; size_t olen; int ch; - char *p; /* Write a sequence command for all keys the user defined. */ for (qp = sp->gp->seqq.lh_first; qp != NULL; qp = qp->q.le_next) { diff --git a/usr.bin/vi/common/seq.h b/usr.bin/vi/common/seq.h index 38c197cd754..8eede33d0ef 100644 --- a/usr.bin/vi/common/seq.h +++ b/usr.bin/vi/common/seq.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)seq.h 8.11 (Berkeley) 7/17/94 + * @(#)seq.h 8.12 (Berkeley) 8/16/94 */ /* @@ -56,11 +56,11 @@ enum seqtype { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT }; struct _seq { LIST_ENTRY(_seq) q; /* Linked list of all sequences. */ enum seqtype stype; /* Sequence type. */ - char *name; /* Sequence name (if any). */ + CHAR_T *name; /* Sequence name (if any). */ size_t nlen; /* Name length. */ - char *input; /* Sequence input keys. */ + CHAR_T *input; /* Sequence input keys. */ size_t ilen; /* Input keys length. */ - char *output; /* Sequence output keys. */ + CHAR_T *output; /* Sequence output keys. */ size_t olen; /* Output keys length. */ #define SEQ_FUNCMAP 0x01 /* If unresolved function key.*/ @@ -69,11 +69,11 @@ struct _seq { u_int8_t flags; }; -int seq_delete __P((SCR *, char *, size_t, enum seqtype)); +int seq_delete __P((SCR *, CHAR_T *, size_t, enum seqtype)); int seq_dump __P((SCR *, enum seqtype, int)); -SEQ *seq_find __P((SCR *, SEQ **, char *, size_t, enum seqtype, int *)); +SEQ *seq_find __P((SCR *, SEQ **, CHAR_T *, size_t, enum seqtype, int *)); void seq_init __P((SCR *)); int seq_mdel __P((SEQ *)); int seq_save __P((SCR *, FILE *, char *, enum seqtype)); -int seq_set __P((SCR *, char *, size_t, - char *, size_t, char *, size_t, enum seqtype, int)); +int seq_set __P((SCR *, CHAR_T *, size_t, + CHAR_T *, size_t, CHAR_T *, size_t, enum seqtype, int)); diff --git a/usr.bin/vi/common/signal.c b/usr.bin/vi/common/signal.c index 68f25891616..ff03bd6a419 100644 --- a/usr.bin/vi/common/signal.c +++ b/usr.bin/vi/common/signal.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)signal.c 8.32 (Berkeley) 7/23/94"; +static const char sccsid[] = "@(#)signal.c 8.33 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/term.c b/usr.bin/vi/common/term.c index 457e368b683..f6e10727f95 100644 --- a/usr.bin/vi/common/term.c +++ b/usr.bin/vi/common/term.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)term.c 8.79 (Berkeley) 8/2/94"; +static const char sccsid[] = "@(#)term.c 8.80 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/common/util.c b/usr.bin/vi/common/util.c index 9845e644955..5223aade3e2 100644 --- a/usr.bin/vi/common/util.c +++ b/usr.bin/vi/common/util.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)util.c 8.71 (Berkeley) 8/8/94"; +static const char sccsid[] = "@(#)util.c 8.73 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -59,40 +59,38 @@ static char sccsid[] = "@(#)util.c 8.71 (Berkeley) 8/8/94"; * binc -- * Increase the size of a buffer. */ -int -binc(sp, argp, bsizep, min) +void * +binc(sp, bp, bsizep, min) SCR *sp; /* sp MAY BE NULL!!! */ - void *argp; + void *bp; size_t *bsizep, min; { size_t csize; - void *bpp; /* If already larger than the minimum, just return. */ if (min && *bsizep >= min) - return (0); + return (bp); - bpp = *(char **)argp; csize = *bsizep + MAX(min, 256); - REALLOC(sp, bpp, void *, csize); + REALLOC(sp, bp, void *, csize); - if (bpp == NULL) { + if (bp == NULL) { /* * Theoretically, realloc is supposed to leave any already * held memory alone if it can't get more. Don't trust it. */ *bsizep = 0; - return (1); + return (NULL); } /* * Memory is guaranteed to be zero-filled, various parts of * nvi depend on this. */ - memset((char *)bpp + *bsizep, 0, csize - *bsizep); - *(char **)argp = bpp; + memset((char *)bp + *bsizep, 0, csize - *bsizep); *bsizep = csize; - return (0); + return (bp); } + /* * nonblank -- * Set the column number of the first non-blank character diff --git a/usr.bin/vi/docs/README b/usr.bin/vi/docs/README index 5bece992908..4af7691c6be 100644 --- a/usr.bin/vi/docs/README +++ b/usr.bin/vi/docs/README @@ -1,8 +1,8 @@ -# @(#)README 8.84 (Berkeley) 8/15/94 +# @(#)README 8.85 (Berkeley) 8/17/94 -This is the README for version 1.32 of nex/nvi, a freely redistributable +This is the README for version 1.33 of nex/nvi, a freely redistributable replacement for the Berkeley ex and vi text editors. The compressed or -gzip'd archive, for this and future versions, can be retrieved by using +gzip'd archives for this and future versions, can be retrieved by using anonymous ftp to ftp.cs.berkeley.edu, from the file ucb/4bsd/nvi.tar.Z, or ucb/4bsd/nvi.tar.gz. diff --git a/usr.bin/vi/docs/bugs.current b/usr.bin/vi/docs/bugs.current index 92b2a5c3b43..500f3ba6d51 100644 --- a/usr.bin/vi/docs/bugs.current +++ b/usr.bin/vi/docs/bugs.current @@ -6,9 +6,6 @@ List of known bugs: + The option sidescroll is completely wrong, and setting it does more harm than good. -+ We're not blocking signals when manipulating the SCR/EXF chains. - This is necessary, since we walk them on signal receipt. - + When nvi edits files that don't have trailing newlines, it appends one, regardless. diff --git a/usr.bin/vi/docs/changelog b/usr.bin/vi/docs/changelog index 335acd86392..98a414e8318 100644 --- a/usr.bin/vi/docs/changelog +++ b/usr.bin/vi/docs/changelog @@ -1,3 +1,10 @@ +1.32 -> 1.33 Wed Aug 17 09:31:41 1994 (PUBLICLY AVAILABLE VERSION) + + Get back 5K of data space for the sccsid strings. + + Fix bug where cG fix in version 1.31 broke cw cursor positioning + when the change command extended the line. + + Fix core dump in map/seq code if character larger than 7 bits. + + Block signals when manipulating the SCR chains. + + Fix memory allocation for machines with multiple pointer sizes. 1.31 -> 1.32 Mon Aug 15 14:27:49 1994 + Turn off recno mmap call for Solaris 2.4/SunOS 5.4. 1.30 -> 1.31 Sun Aug 14 13:13:35 1994 diff --git a/usr.bin/vi/docs/features b/usr.bin/vi/docs/features index d410722db5d..ed785644a10 100644 --- a/usr.bin/vi/docs/features +++ b/usr.bin/vi/docs/features @@ -1,21 +1,18 @@ -List of things that should be added at some point: +List of things that should be added: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -+ X11 interface. - ++ X11 (Tk, Motif, Xaw) interface. ++ Interpreted language (Perl5, Scheme, Tcl) ++ Ports: Windows, Windows NT, MSDOS + Message catalogs. - + Forms editing package; use RE's to verify field contents. - + Internationalization, including wide character support. ++ Support for single line window editing, including full editing + capability on the vi colon command line. ++ Rob Pike's sam style RE's. -+ Make db, curses real libraries that we load against instead of - compiling directly. - -+ Full editing capability on the : command line. - -+ Rob Pike's sam RE's. - +List of suggested features: +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + Filename completion. While on the subject of completion, it would be nice to have the completion mechanism found in tcsh version >= 6.03. For instance, the completion for the `:cd' command will be directories @@ -23,8 +20,6 @@ List of things that should be added at some point: set at that moment, and for `:set un' will be all options that are set at that moment. The completion for `:< count' will be the flags. -List of suggested features: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + Add a "push" command that would push a file on the tags stack. (Essentially make tags a special case of the stack, and make the stack more general purpose.) diff --git a/usr.bin/vi/docs/internals/gdb.script b/usr.bin/vi/docs/internals/gdb.script index 5f180edcd64..c875bf73a01 100644 --- a/usr.bin/vi/docs/internals/gdb.script +++ b/usr.bin/vi/docs/internals/gdb.script @@ -1,4 +1,4 @@ -# @(#)gdb.script 8.2 (Berkeley) 9/29/93 +# @(#)gdb.script 8.3 (Berkeley) 8/16/94 # display the SVI screen map # usage dmap(sp) @@ -39,10 +39,19 @@ define tmap end end -# display the SVI private structure +# display the private structures +define vip + print *((VI_PRIVATE *)sp->vi_private) +end define svp print *((SVI_PRIVATE *)sp->svi_private) end +define exp + print *((EX_PRIVATE *)sp->ex_private) +end +define sxp + print *((SEX_PRIVATE *)sp->sex_private) +end # display the marks define markp diff --git a/usr.bin/vi/ex/ex.c b/usr.bin/vi/ex/ex.c index c0455a1f996..2ad29562b75 100644 --- a/usr.bin/vi/ex/ex.c +++ b/usr.bin/vi/ex/ex.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex.c 8.155 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)ex.c 8.156 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_abbrev.c b/usr.bin/vi/ex/ex_abbrev.c index a0af8cd8d13..49b038a3dc5 100644 --- a/usr.bin/vi/ex/ex_abbrev.c +++ b/usr.bin/vi/ex/ex_abbrev.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_abbrev.c 8.12 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)ex_abbrev.c 8.13 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_append.c b/usr.bin/vi/ex/ex_append.c index 97172dc4ab0..6e6a9a77746 100644 --- a/usr.bin/vi/ex/ex_append.c +++ b/usr.bin/vi/ex/ex_append.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_append.c 8.22 (Berkeley) 8/7/94"; +static const char sccsid[] = "@(#)ex_append.c 8.23 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_args.c b/usr.bin/vi/ex/ex_args.c index 9213e84417a..6be03309139 100644 --- a/usr.bin/vi/ex/ex_args.c +++ b/usr.bin/vi/ex/ex_args.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_args.c 8.27 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_args.c 8.28 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_argv.c b/usr.bin/vi/ex/ex_argv.c index f93aa76e303..200cd285778 100644 --- a/usr.bin/vi/ex/ex_argv.c +++ b/usr.bin/vi/ex/ex_argv.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_argv.c 8.36 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_argv.c 8.37 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_at.c b/usr.bin/vi/ex/ex_at.c index fc5922fb61f..8ad6e9af849 100644 --- a/usr.bin/vi/ex/ex_at.c +++ b/usr.bin/vi/ex/ex_at.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_at.c 8.25 (Berkeley) 8/1/94"; +static const char sccsid[] = "@(#)ex_at.c 8.26 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_bang.c b/usr.bin/vi/ex/ex_bang.c index 70bbb57c052..e7a182b30ca 100644 --- a/usr.bin/vi/ex/ex_bang.c +++ b/usr.bin/vi/ex/ex_bang.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_bang.c 8.33 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)ex_bang.c 8.34 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_cd.c b/usr.bin/vi/ex/ex_cd.c index 3732f7b2465..4b3d4c82607 100644 --- a/usr.bin/vi/ex/ex_cd.c +++ b/usr.bin/vi/ex/ex_cd.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_cd.c 8.16 (Berkeley) 8/8/94"; +static const char sccsid[] = "@(#)ex_cd.c 8.17 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_delete.c b/usr.bin/vi/ex/ex_delete.c index 08c4250e3c1..3bccc2dcb7d 100644 --- a/usr.bin/vi/ex/ex_delete.c +++ b/usr.bin/vi/ex/ex_delete.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_delete.c 8.12 (Berkeley) 8/5/94"; +static const char sccsid[] = "@(#)ex_delete.c 8.13 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_digraph.c b/usr.bin/vi/ex/ex_digraph.c index 07399234ba9..e0de8295adb 100644 --- a/usr.bin/vi/ex/ex_digraph.c +++ b/usr.bin/vi/ex/ex_digraph.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_digraph.c 8.6 (Berkeley) 3/25/94"; +static const char sccsid[] = "@(#)ex_digraph.c 8.7 (Berkeley) 8/17/94"; #endif /* not lint */ #ifndef NO_DIGRAPH diff --git a/usr.bin/vi/ex/ex_display.c b/usr.bin/vi/ex/ex_display.c index 139127e602b..2833aebad5d 100644 --- a/usr.bin/vi/ex/ex_display.c +++ b/usr.bin/vi/ex/ex_display.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_display.c 8.21 (Berkeley) 8/3/94"; +static const char sccsid[] = "@(#)ex_display.c 8.22 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_edit.c b/usr.bin/vi/ex/ex_edit.c index bfe0a2ae24a..675b010b7b4 100644 --- a/usr.bin/vi/ex/ex_edit.c +++ b/usr.bin/vi/ex/ex_edit.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_edit.c 8.18 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_edit.c 8.19 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_equal.c b/usr.bin/vi/ex/ex_equal.c index a80d72352db..317f2b2b146 100644 --- a/usr.bin/vi/ex/ex_equal.c +++ b/usr.bin/vi/ex/ex_equal.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_equal.c 8.6 (Berkeley) 4/26/94"; +static const char sccsid[] = "@(#)ex_equal.c 8.7 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_exit.c b/usr.bin/vi/ex/ex_exit.c index 3f0a3622a2a..bc06aa00419 100644 --- a/usr.bin/vi/ex/ex_exit.c +++ b/usr.bin/vi/ex/ex_exit.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_exit.c 8.13 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_exit.c 8.14 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_file.c b/usr.bin/vi/ex/ex_file.c index b2c68e762dc..03fc4ed21d2 100644 --- a/usr.bin/vi/ex/ex_file.c +++ b/usr.bin/vi/ex/ex_file.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_file.c 8.10 (Berkeley) 8/8/94"; +static const char sccsid[] = "@(#)ex_file.c 8.11 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_global.c b/usr.bin/vi/ex/ex_global.c index 624bf8e5113..3a1dfdeec5d 100644 --- a/usr.bin/vi/ex/ex_global.c +++ b/usr.bin/vi/ex/ex_global.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_global.c 8.41 (Berkeley) 8/9/94"; +static const char sccsid[] = "@(#)ex_global.c 8.42 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_init.c b/usr.bin/vi/ex/ex_init.c index 79b0e4b9a4a..4cba371e958 100644 --- a/usr.bin/vi/ex/ex_init.c +++ b/usr.bin/vi/ex/ex_init.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_init.c 8.16 (Berkeley) 8/8/94"; +static const char sccsid[] = "@(#)ex_init.c 8.17 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_join.c b/usr.bin/vi/ex/ex_join.c index d561f0a5bd6..0d27881d829 100644 --- a/usr.bin/vi/ex/ex_join.c +++ b/usr.bin/vi/ex/ex_join.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_join.c 8.12 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)ex_join.c 8.13 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_map.c b/usr.bin/vi/ex/ex_map.c index a1f1915bc70..d55a8348556 100644 --- a/usr.bin/vi/ex/ex_map.c +++ b/usr.bin/vi/ex/ex_map.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_map.c 8.17 (Berkeley) 7/16/94"; +static const char sccsid[] = "@(#)ex_map.c 8.18 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_mark.c b/usr.bin/vi/ex/ex_mark.c index bd1e0fd5140..fbdb0bbb045 100644 --- a/usr.bin/vi/ex/ex_mark.c +++ b/usr.bin/vi/ex/ex_mark.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_mark.c 8.6 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)ex_mark.c 8.7 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_mkexrc.c b/usr.bin/vi/ex/ex_mkexrc.c index 095d51e5586..05e52212365 100644 --- a/usr.bin/vi/ex/ex_mkexrc.c +++ b/usr.bin/vi/ex/ex_mkexrc.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_mkexrc.c 8.12 (Berkeley) 7/15/94"; +static const char sccsid[] = "@(#)ex_mkexrc.c 8.13 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_move.c b/usr.bin/vi/ex/ex_move.c index 98225089d32..20a7a85e25b 100644 --- a/usr.bin/vi/ex/ex_move.c +++ b/usr.bin/vi/ex/ex_move.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_move.c 8.17 (Berkeley) 8/8/94"; +static const char sccsid[] = "@(#)ex_move.c 8.18 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_open.c b/usr.bin/vi/ex/ex_open.c index 385fdd3cd92..b07ca5ea4d1 100644 --- a/usr.bin/vi/ex/ex_open.c +++ b/usr.bin/vi/ex/ex_open.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_open.c 8.4 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)ex_open.c 8.5 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_preserve.c b/usr.bin/vi/ex/ex_preserve.c index 8960f98adf8..dbde0da2a3b 100644 --- a/usr.bin/vi/ex/ex_preserve.c +++ b/usr.bin/vi/ex/ex_preserve.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_preserve.c 8.12 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_preserve.c 8.13 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_print.c b/usr.bin/vi/ex/ex_print.c index c3aa22f00c0..031f1c25618 100644 --- a/usr.bin/vi/ex/ex_print.c +++ b/usr.bin/vi/ex/ex_print.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_print.c 8.14 (Berkeley) 8/7/94"; +static const char sccsid[] = "@(#)ex_print.c 8.15 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_put.c b/usr.bin/vi/ex/ex_put.c index ce44b5faa27..2de0caa85da 100644 --- a/usr.bin/vi/ex/ex_put.c +++ b/usr.bin/vi/ex/ex_put.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_put.c 8.6 (Berkeley) 7/23/94"; +static const char sccsid[] = "@(#)ex_put.c 8.7 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_read.c b/usr.bin/vi/ex/ex_read.c index dafc4adfba9..6a8395b44c9 100644 --- a/usr.bin/vi/ex/ex_read.c +++ b/usr.bin/vi/ex/ex_read.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_read.c 8.39 (Berkeley) 8/9/94"; +static const char sccsid[] = "@(#)ex_read.c 8.40 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_screen.c b/usr.bin/vi/ex/ex_screen.c index 179ed07a0af..ba397de3123 100644 --- a/usr.bin/vi/ex/ex_screen.c +++ b/usr.bin/vi/ex/ex_screen.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_screen.c 8.13 (Berkeley) 6/27/94"; +static const char sccsid[] = "@(#)ex_screen.c 8.14 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_script.c b/usr.bin/vi/ex/ex_script.c index 59586f1e176..8a63e8bae88 100644 --- a/usr.bin/vi/ex/ex_script.c +++ b/usr.bin/vi/ex/ex_script.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_script.c 8.17 (Berkeley) 7/23/94"; +static const char sccsid[] = "@(#)ex_script.c 8.18 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_set.c b/usr.bin/vi/ex/ex_set.c index 1ad19f71ae9..002460ebf92 100644 --- a/usr.bin/vi/ex/ex_set.c +++ b/usr.bin/vi/ex/ex_set.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_set.c 8.4 (Berkeley) 7/22/94"; +static const char sccsid[] = "@(#)ex_set.c 8.5 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_shell.c b/usr.bin/vi/ex/ex_shell.c index bcbb97d317f..462b768649d 100644 --- a/usr.bin/vi/ex/ex_shell.c +++ b/usr.bin/vi/ex/ex_shell.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_shell.c 8.24 (Berkeley) 8/5/94"; +static const char sccsid[] = "@(#)ex_shell.c 8.25 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_shift.c b/usr.bin/vi/ex/ex_shift.c index 41cb557d7c5..b047477947c 100644 --- a/usr.bin/vi/ex/ex_shift.c +++ b/usr.bin/vi/ex/ex_shift.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_shift.c 8.14 (Berkeley) 3/14/94"; +static const char sccsid[] = "@(#)ex_shift.c 8.15 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_source.c b/usr.bin/vi/ex/ex_source.c index 70b85b9568b..3be8c3a5591 100644 --- a/usr.bin/vi/ex/ex_source.c +++ b/usr.bin/vi/ex/ex_source.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_source.c 8.5 (Berkeley) 8/8/94"; +static const char sccsid[] = "@(#)ex_source.c 8.6 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_stop.c b/usr.bin/vi/ex/ex_stop.c index 3487bbb6d75..cb4be754a05 100644 --- a/usr.bin/vi/ex/ex_stop.c +++ b/usr.bin/vi/ex/ex_stop.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_stop.c 8.7 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)ex_stop.c 8.8 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_subst.c b/usr.bin/vi/ex/ex_subst.c index 54b6ee85097..103096c945c 100644 --- a/usr.bin/vi/ex/ex_subst.c +++ b/usr.bin/vi/ex/ex_subst.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_subst.c 8.57 (Berkeley) 8/7/94"; +static const char sccsid[] = "@(#)ex_subst.c 8.58 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_tag.c b/usr.bin/vi/ex/ex_tag.c index 0bb8c3e6982..04bff7bc4ff 100644 --- a/usr.bin/vi/ex/ex_tag.c +++ b/usr.bin/vi/ex/ex_tag.c @@ -35,7 +35,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_tag.c 8.43 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_tag.c 8.44 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_undo.c b/usr.bin/vi/ex/ex_undo.c index 43316967050..0a20487668a 100644 --- a/usr.bin/vi/ex/ex_undo.c +++ b/usr.bin/vi/ex/ex_undo.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_undo.c 8.7 (Berkeley) 8/9/94"; +static const char sccsid[] = "@(#)ex_undo.c 8.8 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_usage.c b/usr.bin/vi/ex/ex_usage.c index b6031b5caa1..a62185fcbb3 100644 --- a/usr.bin/vi/ex/ex_usage.c +++ b/usr.bin/vi/ex/ex_usage.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_usage.c 8.19 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)ex_usage.c 8.20 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_util.c b/usr.bin/vi/ex/ex_util.c index e88c28f0e80..1dec5e76f6f 100644 --- a/usr.bin/vi/ex/ex_util.c +++ b/usr.bin/vi/ex/ex_util.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_util.c 8.12 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_util.c 8.13 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_version.c b/usr.bin/vi/ex/ex_version.c index 31c2cb711ca..0348a812b72 100644 --- a/usr.bin/vi/ex/ex_version.c +++ b/usr.bin/vi/ex/ex_version.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_version.c 8.62 (Berkeley) 8/15/94"; +static const char sccsid[] = "@(#)ex_version.c 8.64 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -62,10 +62,10 @@ ex_version(sp, ep, cmdp) EXF *ep; EXCMDARG *cmdp; { - static time_t then = 776975285; + static const time_t then = 777130317; (void)ex_printf(EXCOOKIE, -"Version 1.32, %sThe CSRG, University of California, Berkeley.\n", +"Version 1.33, %sThe CSRG, University of California, Berkeley.\n", ctime(&then)); return (0); } diff --git a/usr.bin/vi/ex/ex_visual.c b/usr.bin/vi/ex/ex_visual.c index cfb0c139f77..583bac261f8 100644 --- a/usr.bin/vi/ex/ex_visual.c +++ b/usr.bin/vi/ex/ex_visual.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_visual.c 8.13 (Berkeley) 7/18/94"; +static const char sccsid[] = "@(#)ex_visual.c 8.14 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_write.c b/usr.bin/vi/ex/ex_write.c index 3dbb6e84a08..b6c2b1c9fb6 100644 --- a/usr.bin/vi/ex/ex_write.c +++ b/usr.bin/vi/ex/ex_write.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_write.c 8.36 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)ex_write.c 8.37 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_yank.c b/usr.bin/vi/ex/ex_yank.c index 7f5d2800294..bfe53fce4a9 100644 --- a/usr.bin/vi/ex/ex_yank.c +++ b/usr.bin/vi/ex/ex_yank.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_yank.c 8.5 (Berkeley) 5/17/94"; +static const char sccsid[] = "@(#)ex_yank.c 8.6 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/ex_z.c b/usr.bin/vi/ex/ex_z.c index a5917b31597..c201b9f7ce9 100644 --- a/usr.bin/vi/ex/ex_z.c +++ b/usr.bin/vi/ex/ex_z.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ex_z.c 8.6 (Berkeley) 7/23/94"; +static const char sccsid[] = "@(#)ex_z.c 8.7 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/excmd.c b/usr.bin/vi/ex/excmd.c index 38457686234..5edabecf471 100644 --- a/usr.bin/vi/ex/excmd.c +++ b/usr.bin/vi/ex/excmd.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)excmd.c 8.58 (Berkeley) 8/9/94"; +static const char sccsid[] = "@(#)excmd.c 8.59 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/ex/filter.c b/usr.bin/vi/ex/filter.c index 59a221c01cb..ed115f3ac93 100644 --- a/usr.bin/vi/ex/filter.c +++ b/usr.bin/vi/ex/filter.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)filter.c 8.43 (Berkeley) 8/7/94"; +static const char sccsid[] = "@(#)filter.c 8.44 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/install/recover.script b/usr.bin/vi/install/recover.script index 9f91e4e2bcc..2fbce723b12 100644 --- a/usr.bin/vi/install/recover.script +++ b/usr.bin/vi/install/recover.script @@ -1,29 +1,43 @@ -# @(#)recover.script 8.4 (Berkeley) 8/13/94 +# @(#)recover.script 8.7 (Berkeley) 8/16/94 +# +# Script to recover nvi edit sessions. # -# Recover nvi editor files: RECDIR=/var/tmp/vi.recover SENDMAIL=/usr/lib/sendmail echo 'Recovering nvi editor sessions.' -# Unmodified nvi editor backup files are either zero length or -# have the execute bit set. Delete both cases. +# Check editor backup files. vibackup=`echo $RECDIR/vi.*` if [ "$vibackup" != "$RECDIR/vi.*" ]; then for i in $vibackup; do + # Only test files that are readable. + if test ! -r $i; then + continue + fi + + # Unmodified nvi editor backup files either have the + # execute bit set or are zero length. Delete them. if test -x $i -o ! -s $i; then rm $i fi done fi -# It is possible to get incomplete recovery files, if the editor -# crashes at the right time. Delete any recovery files without -# corresponding backup files, otherwise send mail to the user. +# It is possible to get incomplete recovery files, if the editor crashes +# at the right time. virecovery=`echo $RECDIR/recover.*` if [ "$virecovery" != "$RECDIR/recover.*" ]; then for i in $virecovery; do + # Only test files that are readable. + if test ! -r $i; then + continue + fi + + # Delete any recovery files that are zero length, corrupted, + # or that have no corresponding backup file. Else send mail + # to the user. recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i` - if test ! -n $recfile -a -s $recfile; then + if test -n "$recfile" -a -s "$recfile"; then $SENDMAIL -t < $i else rm $i diff --git a/usr.bin/vi/sex/sex_confirm.c b/usr.bin/vi/sex/sex_confirm.c index 2900928963d..f8dbef6eabb 100644 --- a/usr.bin/vi/sex/sex_confirm.c +++ b/usr.bin/vi/sex/sex_confirm.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sex_confirm.c 8.7 (Berkeley) 4/13/94"; +static const char sccsid[] = "@(#)sex_confirm.c 8.8 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/sex/sex_get.c b/usr.bin/vi/sex/sex_get.c index a29be5ce082..6bfdb70b3d4 100644 --- a/usr.bin/vi/sex/sex_get.c +++ b/usr.bin/vi/sex/sex_get.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sex_get.c 8.37 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)sex_get.c 8.38 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/sex/sex_refresh.c b/usr.bin/vi/sex/sex_refresh.c index c1be816b4e4..3dfd7de0422 100644 --- a/usr.bin/vi/sex/sex_refresh.c +++ b/usr.bin/vi/sex/sex_refresh.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sex_refresh.c 8.14 (Berkeley) 7/15/94"; +static const char sccsid[] = "@(#)sex_refresh.c 8.15 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/sex/sex_screen.c b/usr.bin/vi/sex/sex_screen.c index 433899819ad..97147fa6a2b 100644 --- a/usr.bin/vi/sex/sex_screen.c +++ b/usr.bin/vi/sex/sex_screen.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sex_screen.c 8.47 (Berkeley) 7/21/94"; +static const char sccsid[] = "@(#)sex_screen.c 8.48 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/sex/sex_term.c b/usr.bin/vi/sex/sex_term.c index 93ca048928c..83f605f11e8 100644 --- a/usr.bin/vi/sex/sex_term.c +++ b/usr.bin/vi/sex/sex_term.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sex_term.c 8.38 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)sex_term.c 8.39 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/sex/sex_util.c b/usr.bin/vi/sex/sex_util.c index 5acd788f617..b75876708dc 100644 --- a/usr.bin/vi/sex/sex_util.c +++ b/usr.bin/vi/sex/sex_util.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sex_util.c 8.15 (Berkeley) 7/16/94"; +static const char sccsid[] = "@(#)sex_util.c 8.16 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/sex/sex_window.c b/usr.bin/vi/sex/sex_window.c index 37fc8edadf2..a594375e223 100644 --- a/usr.bin/vi/sex/sex_window.c +++ b/usr.bin/vi/sex/sex_window.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)sex_window.c 8.6 (Berkeley) 8/4/94"; +static const char sccsid[] = "@(#)sex_window.c 8.7 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_confirm.c b/usr.bin/vi/svi/svi_confirm.c index 06ef25c1bb8..3b5ed17ad4d 100644 --- a/usr.bin/vi/svi/svi_confirm.c +++ b/usr.bin/vi/svi/svi_confirm.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_confirm.c 8.8 (Berkeley) 4/13/94"; +static const char sccsid[] = "@(#)svi_confirm.c 8.9 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_curses.c b/usr.bin/vi/svi/svi_curses.c index 523fff99856..0c79e8b4274 100644 --- a/usr.bin/vi/svi/svi_curses.c +++ b/usr.bin/vi/svi/svi_curses.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_curses.c 8.3 (Berkeley) 8/7/94"; +static const char sccsid[] = "@(#)svi_curses.c 8.4 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_ex.c b/usr.bin/vi/svi/svi_ex.c index 9b81080bcb0..05e8ba89add 100644 --- a/usr.bin/vi/svi/svi_ex.c +++ b/usr.bin/vi/svi/svi_ex.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_ex.c 8.54 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)svi_ex.c 8.55 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_get.c b/usr.bin/vi/svi/svi_get.c index db790a954ee..e07b3525f21 100644 --- a/usr.bin/vi/svi/svi_get.c +++ b/usr.bin/vi/svi/svi_get.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_get.c 8.25 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)svi_get.c 8.26 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_line.c b/usr.bin/vi/svi/svi_line.c index 8b437e5690d..fd5f2277b1c 100644 --- a/usr.bin/vi/svi/svi_line.c +++ b/usr.bin/vi/svi/svi_line.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_line.c 8.25 (Berkeley) 5/16/94"; +static const char sccsid[] = "@(#)svi_line.c 8.26 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_refresh.c b/usr.bin/vi/svi/svi_refresh.c index bc8bd92c1ac..d049a9896a5 100644 --- a/usr.bin/vi/svi/svi_refresh.c +++ b/usr.bin/vi/svi/svi_refresh.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_refresh.c 8.60 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)svi_refresh.c 8.61 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_relative.c b/usr.bin/vi/svi/svi_relative.c index a1af33fe9c9..c535bb3d5b0 100644 --- a/usr.bin/vi/svi/svi_relative.c +++ b/usr.bin/vi/svi/svi_relative.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_relative.c 8.16 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)svi_relative.c 8.17 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_screen.c b/usr.bin/vi/svi/svi_screen.c index 05e07eaeb6f..b6e6d55b02c 100644 --- a/usr.bin/vi/svi/svi_screen.c +++ b/usr.bin/vi/svi/svi_screen.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_screen.c 8.91 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)svi_screen.c 8.93 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -320,11 +320,15 @@ svi_dtoh(sp, emsg) FREE(_HMAP(tsp), SIZE_HMAP(tsp) * sizeof(SMAP)); _HMAP(tsp) = NULL; } + SIGBLOCK(sp->gp); CIRCLEQ_REMOVE(&sp->gp->dq, tsp, q); CIRCLEQ_INSERT_TAIL(&sp->gp->hq, tsp, q); + SIGUNBLOCK(sp->gp); } + SIGBLOCK(sp->gp); CIRCLEQ_REMOVE(&sp->gp->hq, sp, q); CIRCLEQ_INSERT_TAIL(&sp->gp->dq, sp, q); + SIGUNBLOCK(sp->gp); if (hidden > 1) msgq(sp, M_INFO, "%s backgrounded %d screens; use :display to list the screens", diff --git a/usr.bin/vi/svi/svi_smap.c b/usr.bin/vi/svi/svi_smap.c index 6d06d8ecd78..c9689ae0cbb 100644 --- a/usr.bin/vi/svi/svi_smap.c +++ b/usr.bin/vi/svi/svi_smap.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_smap.c 8.46 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)svi_smap.c 8.47 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_split.c b/usr.bin/vi/svi/svi_split.c index 160f49556c4..a197f829ab3 100644 --- a/usr.bin/vi/svi/svi_split.c +++ b/usr.bin/vi/svi/svi_split.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_split.c 8.46 (Berkeley) 8/9/94"; +static const char sccsid[] = "@(#)svi_split.c 8.48 (Berkeley) 8/17/94"; #endif /* not lint */ #include @@ -256,6 +256,7 @@ svi_split(sp, argv, argc) } /* Everything's initialized, put the screen on the displayed queue.*/ + SIGBLOCK(sp->gp); if (splitup) { /* Link in before the parent. */ CIRCLEQ_INSERT_BEFORE(&sp->gp->dq, sp, tsp, q); @@ -263,6 +264,7 @@ svi_split(sp, argv, argc) /* Link in after the parent. */ CIRCLEQ_INSERT_AFTER(&sp->gp->dq, sp, tsp, q); } + SIGUNBLOCK(sp->gp); /* Clear the current information lines in both screens. */ MOVE(sp, INFOLINE(sp), 0); @@ -333,8 +335,10 @@ svi_bg(csp) } /* Move the old screen to the hidden queue. */ + SIGBLOCK(csp->gp); CIRCLEQ_REMOVE(&csp->gp->dq, csp, q); CIRCLEQ_INSERT_TAIL(&csp->gp->hq, csp, q); + SIGUNBLOCK(csp->gp); /* Switch screens. */ csp->nextdisp = sp; @@ -428,8 +432,10 @@ svi_fg(csp, name) } /* Move the old screen to the hidden queue. */ + SIGBLOCK(csp->gp); CIRCLEQ_REMOVE(&csp->gp->dq, csp, q); CIRCLEQ_INSERT_TAIL(&csp->gp->hq, csp, q); + SIGUNBLOCK(csp->gp); return (0); } @@ -527,8 +533,10 @@ svi_swap(csp, nsp, name) * the exit will delete the old one, if we're foregrounding, the fg * code will move the old one to the hidden queue. */ + SIGBLOCK(sp->gp); CIRCLEQ_REMOVE(&sp->gp->hq, sp, q); CIRCLEQ_INSERT_AFTER(&csp->gp->dq, csp, sp, q); + SIGUNBLOCK(sp->gp); F_SET(sp, S_REDRAW); return (0); diff --git a/usr.bin/vi/svi/svi_term.c b/usr.bin/vi/svi/svi_term.c index baedfa7f931..7339d2fbd33 100644 --- a/usr.bin/vi/svi/svi_term.c +++ b/usr.bin/vi/svi/svi_term.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_term.c 8.5 (Berkeley) 8/14/94"; +static const char sccsid[] = "@(#)svi_term.c 8.6 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/svi/svi_util.c b/usr.bin/vi/svi/svi_util.c index 5ba8b1e6e6a..45ff5a78a24 100644 --- a/usr.bin/vi/svi/svi_util.c +++ b/usr.bin/vi/svi/svi_util.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)svi_util.c 8.53 (Berkeley) 8/12/94"; +static const char sccsid[] = "@(#)svi_util.c 8.54 (Berkeley) 8/17/94"; #endif /* not lint */ #include diff --git a/usr.bin/vi/xaw/xaw_screen.c b/usr.bin/vi/xaw/xaw_screen.c index 14a9674ffef..214ecbd5a19 100644 --- a/usr.bin/vi/xaw/xaw_screen.c +++ b/usr.bin/vi/xaw/xaw_screen.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)xaw_screen.c 8.6 (Berkeley) 5/21/94"; +static const char sccsid[] = "@(#)xaw_screen.c 8.7 (Berkeley) 8/17/94"; #endif /* not lint */ #include