Bringing up to version 1.33.

Reviewed by:	Sean Eric Fagan
This commit is contained in:
Sean Eric Fagan 1994-08-17 22:18:26 +00:00
parent 57eb4d53f7
commit 6d20d793f5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2094
93 changed files with 220 additions and 152 deletions

View File

@ -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.

View File

@ -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>

View File

@ -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>

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -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);

View File

@ -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>

View File

@ -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));

View File

@ -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. */

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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));

View File

@ -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>

View File

@ -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) {

View File

@ -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));

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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.)

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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);
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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",

View File

@ -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>

View File

@ -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);

View File

@ -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>

View File

@ -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>

View File

@ -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>