This commit was manufactured by cvs2svn to create tag
'nvi_1_34_final'.
This commit is contained in:
parent
18fd508d01
commit
f1460870b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/tags/nvi_1_34_final/; revision=17806
@ -1,18 +1,32 @@
|
||||
# @(#)Makefile 8.47 (Berkeley) 8/14/94
|
||||
# @(#)Makefile 8.51 (Berkeley) 8/17/94
|
||||
|
||||
VI= nvi
|
||||
EX= nex
|
||||
VIEW= nview
|
||||
PROG= nvi
|
||||
#CFLAGS=-g -DDEBUG
|
||||
#CFLAGS+=-pg
|
||||
LINKS= ${BINDIR}/${VI} ${BINDIR}/${EX} ${BINDIR}/${VI} ${BINDIR}/${VIEW}
|
||||
LINKS+= ${BINDIR}/${VI} ${BINDIR}/vi ${BINDIR}/${EX} ${BINDIR}/ex
|
||||
LINKS+= ${BINDIR}/${VI} ${BINDIR}/view
|
||||
MAN1= ${.CURDIR}/../USD.doc/vi.man/vi.1
|
||||
MLINKS+=vi.1 ex.1 vi.1 view.1
|
||||
MLINKS+=vi.1 nex.1 vi.1 nview.1 vi.1 nvi.1
|
||||
|
||||
|
||||
CFLAGS+=-I. -I${.CURDIR}
|
||||
#STRIP=
|
||||
DPADD+= ${LIBCURSES} ${LIBTERMCAP} ${LIBUTIL}
|
||||
LDADD+= -lcurses -ltermcap -lutil
|
||||
|
||||
.PATH: ${.CURDIR}/../common ${.CURDIR}/../ex ${.CURDIR}/../sex \
|
||||
${.CURDIR}/../vi ${.CURDIR}/../svi ${.CURDIR}/../xaw
|
||||
CLEANFILES+=nex
|
||||
|
||||
SPECHDR=compat.h excmd.h options.h
|
||||
|
||||
CLEANFILES+=${SPECHDR} ${EX}
|
||||
|
||||
# General sources.
|
||||
SRCS= cut.c delete.c exf.c line.c log.c main.c mark.c msg.c options.c \
|
||||
options_f.c put.c screen.c search.c seq.c signal.c recover.c \
|
||||
term.c trace.c util.c
|
||||
term.c trace.c util.c ${SPECHDR}
|
||||
|
||||
# Ex source.
|
||||
SRCS+= ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
|
||||
@ -43,23 +57,25 @@ SRCS+= svi_confirm.c svi_curses.c svi_ex.c svi_get.c svi_line.c \
|
||||
# Athena widget set screen source.
|
||||
SRCS+= xaw_screen.c
|
||||
|
||||
#LDADD+=-pg
|
||||
DPADD+= ${LIBCURSES} ${LIBTERM} ${LIBUTIL}
|
||||
LDADD+= -lcurses -ltermlib -lutil
|
||||
SPECHDR=compat.h excmd.h options.h
|
||||
CLEANFILES+=${SPECHDR}
|
||||
LINKS= ${BINDIR}/nvi ${BINDIR}/nex
|
||||
all: ${VI} ${EX}
|
||||
|
||||
all: nvi nex vi.0
|
||||
all: nvi nex
|
||||
nex: nvi
|
||||
rm -f nex
|
||||
ln nvi nex
|
||||
|
||||
nvi: compat.h options.h excmd.h
|
||||
${EX}: ${VI}
|
||||
rm -f ${EX}
|
||||
ln ${VI} ${EX}
|
||||
|
||||
compat.h:
|
||||
:> compat.h
|
||||
|
||||
excmd.h: excmd.h.stub excmd.c excmd.awk
|
||||
rm -f excmd.h
|
||||
cat ${.CURDIR}/../ex/excmd.h.stub > excmd.h
|
||||
awk -f ${.CURDIR}/../ex/excmd.awk ${.CURDIR}/../ex/excmd.c >> excmd.h
|
||||
|
||||
options.h: options.h.stub options.c options.awk
|
||||
rm -f options.h
|
||||
cat ${.CURDIR}/options.h.stub > options.h
|
||||
@ -70,10 +86,6 @@ excmd.h: excmd.h.stub excmd.c excmd.awk
|
||||
cat ${.CURDIR}/../ex/excmd.h.stub > excmd.h
|
||||
awk -f ${.CURDIR}/../ex/excmd.awk ${.CURDIR}/../ex/excmd.c >> excmd.h
|
||||
|
||||
vi.0:
|
||||
rm -f vi.0
|
||||
ln -s ${.CURDIR}/../USD.doc/vi.man/vi.0 vi.0
|
||||
|
||||
tags::
|
||||
-(cd ${.CURDIR} && rm -f tags && \
|
||||
ctags ../common/*.[ch] ../common/*.stub ../ex/*.[ch] ../ex/*.stub \
|
||||
@ -81,7 +93,7 @@ tags::
|
||||
|
||||
warn:: ${SRCS}
|
||||
-(cd ${.CURDIR} && gcc -Wall -O4 -DDEBUG \
|
||||
-Iobj -I. ${.ALLSRC} -lcurses -ltermlib 2>&1 | \
|
||||
-Iobj -I. ${.ALLSRC} -lcurses -ltermcap 2>&1 | \
|
||||
sed -e "/warning: .*sccsid.*defined but not used/d" \
|
||||
-e "/warning: suggest parentheses around/d" \
|
||||
-e "/In function /d" \
|
||||
@ -90,9 +102,7 @@ warn:: ${SRCS}
|
||||
-e "/warning: comparison is always 1 due /d") > \
|
||||
${.CURDIR}/WARN.OUT
|
||||
|
||||
MAN= ${.CURDIR}/../USD.doc/vi.man
|
||||
REF= ${.CURDIR}/../USD.doc/vi.ref
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
.depend: ${SPECHDR}
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
typedef struct _sex_private {
|
||||
/* INITIALIZED AT SCREEN CREATE. */
|
||||
int __unused; /* Make sure it's not empty. */
|
||||
int __sex_unused; /* Make sure it's not empty. */
|
||||
|
||||
/* PARTIALLY OR COMPLETELY COPIED FROM PREVIOUS SCREEN. */
|
||||
#ifndef SYSV_CURSES
|
||||
|
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)sex_window.c 8.6 (Berkeley) 8/4/94";
|
||||
static char sccsid[] = "@(#)sex_window.c 8.8 (Berkeley) 8/17/94";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -48,6 +48,7 @@ static char sccsid[] = "@(#)sex_window.c 8.6 (Berkeley) 8/4/94";
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "compat.h"
|
||||
#include <curses.h>
|
||||
@ -79,7 +80,7 @@ sex_window(sp, sigwinch)
|
||||
*
|
||||
* Try TIOCGWINSZ.
|
||||
*/
|
||||
row = col = 0;
|
||||
errno = row = col = 0;
|
||||
#ifdef TIOCGWINSZ
|
||||
if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) != -1) {
|
||||
row = win.ws_row;
|
||||
@ -89,7 +90,8 @@ sex_window(sp, sigwinch)
|
||||
/* If here because of a signal, TIOCGWINSZ is all we trust. */
|
||||
if (sigwinch) {
|
||||
if (row == 0 || col == 0) {
|
||||
msgq(sp, M_SYSERR, "TIOCGWINSZ");
|
||||
if (errno > 0)
|
||||
msgq(sp, M_SYSERR, "TIOCGWINSZ");
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)v_ulcase.c 8.8 (Berkeley) 7/15/94";
|
||||
static char sccsid[] = "@(#)v_ulcase.c 8.10 (Berkeley) 8/17/94";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -84,6 +84,7 @@ v_ulcase(sp, ep, vp)
|
||||
u_long cnt;
|
||||
char *p;
|
||||
|
||||
len = 0;
|
||||
lno = vp->m_start.lno;
|
||||
cno = vp->m_start.cno;
|
||||
|
||||
@ -120,7 +121,10 @@ v_ulcase(sp, ep, vp)
|
||||
|
||||
/* Check to see if we tried to move past EOF. */
|
||||
if (file_gline(sp, ep, vp->m_final.lno, &len) == NULL) {
|
||||
(void)file_gline(sp, ep, --vp->m_final.lno, &len);
|
||||
/* line number start with 1, lno zero is illegal */
|
||||
if (vp->m_final.lno > 1)
|
||||
--vp->m_final.lno;
|
||||
(void)file_gline(sp, ep, vp->m_final.lno, &len);
|
||||
vp->m_final.cno = len == 0 ? 0 : len - 1;
|
||||
}
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user