diff options
author | sef <sef@FreeBSD.org> | 1994-08-17 22:18:26 +0000 |
---|---|---|
committer | sef <sef@FreeBSD.org> | 1994-08-17 22:18:26 +0000 |
commit | 4665d68e467585f1c553ff4de454c6bd36bf32d6 (patch) | |
tree | 2d71adcad3da854d8c73e39fcc4a54c9acb7e238 | |
parent | 09d303a872a56c74f9f5cfebe17f7cd295a448dc (diff) | |
download | FreeBSD-src-4665d68e467585f1c553ff4de454c6bd36bf32d6.zip FreeBSD-src-4665d68e467585f1c553ff4de454c6bd36bf32d6.tar.gz |
Bringing up to version 1.33.
Reviewed by: Sean Eric Fagan
93 files changed, 220 insertions, 152 deletions
diff --git a/usr.bin/vi/README b/usr.bin/vi/README index 5bece99..4af7691 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 df86a95..14bbd81 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 <sys/types.h> diff --git a/usr.bin/vi/common/delete.c b/usr.bin/vi/common/delete.c index 4edd008..1f18772 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 <sys/types.h> diff --git a/usr.bin/vi/common/exf.c b/usr.bin/vi/common/exf.c index b18565e..d417df1 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 <sys/param.h> @@ -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 12d22e4..9ce348a 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 <sys/types.h> diff --git a/usr.bin/vi/common/log.c b/usr.bin/vi/common/log.c index 09f0c27..fe9a6b1 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 <sys/types.h> diff --git a/usr.bin/vi/common/main.c b/usr.bin/vi/common/main.c index 5e4593e..b837a6d 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 <sys/param.h> @@ -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 15b0497..6461e22 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 <sys/types.h> diff --git a/usr.bin/vi/common/mem.h b/usr.bin/vi/common/mem.h index e61f7ff..53aeb79 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 f5fe595..69c4838 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 <sys/types.h> @@ -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 1c8496d..f96e0ff 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 <sys/types.h> diff --git a/usr.bin/vi/common/options_f.c b/usr.bin/vi/common/options_f.c index 6e1f060..25b7245 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 <sys/types.h> diff --git a/usr.bin/vi/common/put.c b/usr.bin/vi/common/put.c index e6dbf3a..499d637 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 <sys/types.h> diff --git a/usr.bin/vi/common/recover.c b/usr.bin/vi/common/recover.c index f218c06..f916fdb 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 <sys/param.h> diff --git a/usr.bin/vi/common/screen.c b/usr.bin/vi/common/screen.c index d3e27e7..7b95173 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 <sys/types.h> @@ -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 72d9e4b..964c413 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 <sys/types.h> diff --git a/usr.bin/vi/common/seq.c b/usr.bin/vi/common/seq.c index 7b21708..cc47fd1 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 <sys/types.h> @@ -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 38c197c..8eede33 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 68f2589..ff03bd6 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 <sys/queue.h> diff --git a/usr.bin/vi/common/term.c b/usr.bin/vi/common/term.c index 457e368..f6e1072 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 <sys/types.h> diff --git a/usr.bin/vi/common/util.c b/usr.bin/vi/common/util.c index 9845e64..5223aad 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 <sys/types.h> @@ -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 5bece99..4af7691 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 92b2a5c..500f3ba 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 335acd8..98a414e 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 d410722..ed78564 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 5f180ed..c875bf7 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 c0455a1..2ad2956 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_abbrev.c b/usr.bin/vi/ex/ex_abbrev.c index a0af8cd..49b038a 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_append.c b/usr.bin/vi/ex/ex_append.c index 97172dc..6e6a9a7 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_args.c b/usr.bin/vi/ex/ex_args.c index 9213e84..6be0330 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_argv.c b/usr.bin/vi/ex/ex_argv.c index f93aa76..200cd28 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_at.c b/usr.bin/vi/ex/ex_at.c index fc5922f..8ad6e9a 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_bang.c b/usr.bin/vi/ex/ex_bang.c index 70bbb57..e7a182b 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_cd.c b/usr.bin/vi/ex/ex_cd.c index 3732f7b..4b3d4c8 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 <sys/param.h> diff --git a/usr.bin/vi/ex/ex_delete.c b/usr.bin/vi/ex/ex_delete.c index 08c4250..3bccc2d 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_digraph.c b/usr.bin/vi/ex/ex_digraph.c index 0739923..e0de829 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 139127e..2833aeb 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_edit.c b/usr.bin/vi/ex/ex_edit.c index bfe0a2a..675b010 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_equal.c b/usr.bin/vi/ex/ex_equal.c index a80d723..317f2b2 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_exit.c b/usr.bin/vi/ex/ex_exit.c index 3f0a362..bc06aa0 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_file.c b/usr.bin/vi/ex/ex_file.c index b2c68e7..03fc4ed 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_global.c b/usr.bin/vi/ex/ex_global.c index 624bf8e..3a1dfde 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_init.c b/usr.bin/vi/ex/ex_init.c index 79b0e4b..4cba371 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_join.c b/usr.bin/vi/ex/ex_join.c index d561f0a..0d27881 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_map.c b/usr.bin/vi/ex/ex_map.c index a1f1915..d55a834 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_mark.c b/usr.bin/vi/ex/ex_mark.c index bd1e0fd..fbdb0bb 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_mkexrc.c b/usr.bin/vi/ex/ex_mkexrc.c index 095d51e..05e5221 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_move.c b/usr.bin/vi/ex/ex_move.c index 9822508..20a7a85 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_open.c b/usr.bin/vi/ex/ex_open.c index 385fdd3..b07ca5e 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_preserve.c b/usr.bin/vi/ex/ex_preserve.c index 8960f98..dbde0da 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_print.c b/usr.bin/vi/ex/ex_print.c index c3aa22f..031f1c2 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_put.c b/usr.bin/vi/ex/ex_put.c index ce44b5f..2de0caa 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_read.c b/usr.bin/vi/ex/ex_read.c index dafc4ad..6a8395b 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_screen.c b/usr.bin/vi/ex/ex_screen.c index 179ed07..ba397de 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_script.c b/usr.bin/vi/ex/ex_script.c index 59586f1..8a63e8b 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_set.c b/usr.bin/vi/ex/ex_set.c index 1ad19f7..002460e 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_shell.c b/usr.bin/vi/ex/ex_shell.c index bcbb97d..462b768 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 <sys/param.h> diff --git a/usr.bin/vi/ex/ex_shift.c b/usr.bin/vi/ex/ex_shift.c index 41cb557..b047477 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_source.c b/usr.bin/vi/ex/ex_source.c index 70b85b9..3be8c3a 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_stop.c b/usr.bin/vi/ex/ex_stop.c index 3487bbb..cb4be75 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_subst.c b/usr.bin/vi/ex/ex_subst.c index 54b6ee8..103096c 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_tag.c b/usr.bin/vi/ex/ex_tag.c index 0bb8c3e..04bff7b 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 <sys/param.h> diff --git a/usr.bin/vi/ex/ex_undo.c b/usr.bin/vi/ex/ex_undo.c index 4331696..0a20487 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_usage.c b/usr.bin/vi/ex/ex_usage.c index b6031b5..a62185f 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_util.c b/usr.bin/vi/ex/ex_util.c index e88c28f..1dec5e7 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_version.c b/usr.bin/vi/ex/ex_version.c index 31c2cb7..0348a81 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 <sys/types.h> @@ -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 cfb0c13..583bac2 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_write.c b/usr.bin/vi/ex/ex_write.c index 3dbb6e8..b6c2b1c 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_yank.c b/usr.bin/vi/ex/ex_yank.c index 7f5d280..bfe53fc 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 <sys/types.h> diff --git a/usr.bin/vi/ex/ex_z.c b/usr.bin/vi/ex/ex_z.c index a5917b3..c201b9f 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 <sys/types.h> diff --git a/usr.bin/vi/ex/excmd.c b/usr.bin/vi/ex/excmd.c index 3845768..5edabec 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 <sys/types.h> diff --git a/usr.bin/vi/ex/filter.c b/usr.bin/vi/ex/filter.c index 59a221c..ed115f3 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 <sys/types.h> diff --git a/usr.bin/vi/install/recover.script b/usr.bin/vi/install/recover.script index 9f91e4e..2fbce72 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 2900928..f8dbef6 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 <sys/types.h> diff --git a/usr.bin/vi/sex/sex_get.c b/usr.bin/vi/sex/sex_get.c index a29be5c..6bfdb70 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 <sys/types.h> diff --git a/usr.bin/vi/sex/sex_refresh.c b/usr.bin/vi/sex/sex_refresh.c index c1be816..3dfd7de 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 <sys/types.h> diff --git a/usr.bin/vi/sex/sex_screen.c b/usr.bin/vi/sex/sex_screen.c index 4338998..97147fa6 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 <sys/types.h> diff --git a/usr.bin/vi/sex/sex_term.c b/usr.bin/vi/sex/sex_term.c index 93ca048..83f605f 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 <sys/types.h> diff --git a/usr.bin/vi/sex/sex_util.c b/usr.bin/vi/sex/sex_util.c index 5acd788..b758767 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 <sys/types.h> diff --git a/usr.bin/vi/sex/sex_window.c b/usr.bin/vi/sex/sex_window.c index 37fc8ed..a594375 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_confirm.c b/usr.bin/vi/svi/svi_confirm.c index 06ef25c..3b5ed17 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_curses.c b/usr.bin/vi/svi/svi_curses.c index 523fff9..0c79e8b 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_ex.c b/usr.bin/vi/svi/svi_ex.c index 9b81080b..05e8ba8 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_get.c b/usr.bin/vi/svi/svi_get.c index db790a9..e07b352 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_line.c b/usr.bin/vi/svi/svi_line.c index 8b437e5..fd5f227 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_refresh.c b/usr.bin/vi/svi/svi_refresh.c index bc8bd92..d049a98 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_relative.c b/usr.bin/vi/svi/svi_relative.c index a1af33f..c535bb3 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_screen.c b/usr.bin/vi/svi/svi_screen.c index 05e07ea..b6e6d55 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 <sys/types.h> @@ -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 6d06d8e..c9689ae 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_split.c b/usr.bin/vi/svi/svi_split.c index 160f495..a197f82 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 <sys/types.h> @@ -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 baedfa7..7339d2f 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 <sys/types.h> diff --git a/usr.bin/vi/svi/svi_util.c b/usr.bin/vi/svi/svi_util.c index 5ba8b1e..45ff5a7 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 <sys/types.h> diff --git a/usr.bin/vi/xaw/xaw_screen.c b/usr.bin/vi/xaw/xaw_screen.c index 14a9674..214ecbd 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 <sys/queue.h> |