summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2013-08-11 20:03:12 +0000
committerpeter <peter@FreeBSD.org>2013-08-11 20:03:12 +0000
commit5f2a1d653696ec5457bfd044f0ebcd873bfc3c80 (patch)
tree7c1ae67d07b93aea05bfea51c590c1112b65042b /usr.bin
parent324febaf01918418f99998aa5537126ac98c9df0 (diff)
downloadFreeBSD-src-5f2a1d653696ec5457bfd044f0ebcd873bfc3c80.zip
FreeBSD-src-5f2a1d653696ec5457bfd044f0ebcd873bfc3c80.tar.gz
Update nvi-1.79 to 2.1.1-4334a8297f
This is the gsoc-2011 project to clean up and backport multibyte support from other nvi forks in a form we can use. USE_WIDECHAR is on unless building for the rescue crunchgen. This should allow editing in the native locale encoding. USE_ICONV depends on make.conf having 'WITH_ICONV=YES' for now. This adds the ability to do things like edit a KOI8-R file while having $LANG set to (say) en_US.UTF-8. iconv is used to transcode the characters for display. Other points: * It uses gencat and catopen/etc instead of homegrown msg catalog stuff. * A lot of stuff has been trimmed out, eg: the perl and tcl bindings which we could never use in base anyway. * It uses ncursesw when in widechar mode. This could be interesting. GSoC info: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/zy/1 Repo at: https://github.com/lichray/nvi2 Obtained from: Zhihao Yuan <lichray@gmail.com>
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vi/Makefile85
-rw-r--r--usr.bin/vi/catalog/Makefile194
-rw-r--r--usr.bin/vi/config.h198
-rw-r--r--usr.bin/vi/pathnames.h26
-rw-r--r--usr.bin/vi/port.h170
5 files changed, 239 insertions, 434 deletions
diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile
index 048c35b..033c472 100644
--- a/usr.bin/vi/Makefile
+++ b/usr.bin/vi/Makefile
@@ -2,14 +2,12 @@
# $FreeBSD$
#
-SRCDIR= ${.CURDIR}/../../contrib/nvi
-
-CFLAGS+= -DGTAGS
+.include <bsd.own.mk>
-#if using ncurses:
-CFLAGS+= -DSYSV_CURSES
+SRCDIR= ${.CURDIR}/../../contrib/nvi
+SUBDIR+= catalog
-WARNS?= 0
+WARNS?= 0 # some warn issues on 32 bit machines
VI= nvi
EX= nex
@@ -17,6 +15,8 @@ VIEW= nview
PROG= nvi
+CFLAGS+= -D__REGEX_PRIVATE
+
LINKS= ${BINDIR}/${VI} ${BINDIR}/${EX} ${BINDIR}/${VI} ${BINDIR}/${VIEW}
LINKS+= ${BINDIR}/${VI} ${BINDIR}/vi ${BINDIR}/${EX} ${BINDIR}/ex
LINKS+= ${BINDIR}/${VI} ${BINDIR}/view
@@ -25,34 +25,38 @@ MAN= ${SRCDIR}/docs/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
-CATALOGS= dutch english french german polish ru_RU.KOI8-R spanish swedish \
- uk_UA.KOI8-U
-NLLINKS= nl_NL
-ENLINKS= en_AU en_CA en_GB en_NZ en_US
-FRLINKS= fr_BE fr_CA fr_CH fr_FR
-DELINKS= de_AT de_CH de_DE
-ESLINKS= es_ES
-SVLINKS= sv_SE
-PLLINKS= pl_PL
-
.PATH: ${SRCDIR}/common
.PATH: ${SRCDIR}/ex
.PATH: ${SRCDIR}/cl
.PATH: ${SRCDIR}/vi
+.PATH: ${SRCDIR}/regex
+
+CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/regex
+
+DPADD= ${LIBUTIL}
+LDADD= -lutil
-CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRCDIR}/include
+.if defined(RESCUE) || defined(RELEASE_CRUNCH)
+DPADD+= ${LIBNCURSES}
+LDADD+= -lncurses
+.else
+CFLAGS+= -DUSE_WIDECHAR
+DPADD+= ${LIBNCURSESW}
+LDADD+= -lncursesw
+.endif
-DPADD= ${LIBNCURSES}
-LDADD= -lncurses
+.if ${MK_ICONV} == "yes" && !defined(RESCUE) && !defined(RELEASE_CRUNCH)
+CFLAGS+= -DUSE_ICONV
+.endif
CLEANFILES+=${EX}
# Vi curses sources
-SRCS+= cl_bsd.c cl_funcs.c cl_main.c cl_read.c cl_screen.c cl_term.c
+SRCS+= cl_funcs.c cl_main.c cl_read.c cl_screen.c cl_term.c
# General sources.
-SRCS+= cut.c delete.c exf.c key.c line.c log.c main.c mark.c msg.c options.c \
- options_f.c put.c screen.c search.c seq.c recover.c util.c
+SRCS+= conv.c cut.c delete.c encoding.c exf.c key.c line.c log.c main.c mark.c msg.c options.c \
+ options_f.c put.c recover.c screen.c search.c seq.c util.c
# Ex source.
SRCS+= ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
@@ -63,7 +67,7 @@ SRCS+= ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
ex_read.c ex_screen.c ex_script.c ex_set.c ex_shell.c \
ex_shift.c ex_source.c ex_stop.c ex_subst.c ex_tag.c \
ex_txt.c ex_undo.c ex_usage.c ex_util.c ex_version.c ex_visual.c \
- ex_write.c ex_yank.c ex_z.c ex_tcl.c ex_perl.c
+ ex_write.c ex_yank.c ex_z.c
# Vi source.
SRCS+= getc.c v_at.c v_ch.c v_cmd.c v_delete.c v_ex.c v_increment.c v_init.c \
@@ -75,38 +79,7 @@ SRCS+= getc.c v_at.c v_ch.c v_cmd.c v_delete.c v_ex.c v_increment.c v_init.c \
# Vi screen source.
SRCS+= vs_line.c vs_msg.c vs_refresh.c vs_relative.c vs_smap.c vs_split.c
-FILES= ${CATALOGS:S;^;${SRCDIR}/catalog/;}
-FILESDIR= /usr/share/vi/catalog
-SYMLINKS=
-.for l in ${NLLINKS}
-SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${ENLINKS}
-SYMLINKS+= english ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= english ${FILESDIR}/$l.ISO8859-15
-SYMLINKS+= english ${FILESDIR}/$l.US-ASCII
-.endfor
-SYMLINKS+= english ${FILESDIR}/POSIX
-SYMLINKS+= english ${FILESDIR}/C
-.for l in ${FRLINKS}
-SYMLINKS+= french ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= french ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${DELINKS}
-SYMLINKS+= german ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= german ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${ESLINKS}
-SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${SVLINKS}
-SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-1
-SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-15
-.endfor
-.for l in ${PLLINKS}
-SYMLINKS+= polish ${FILESDIR}/$l.ISO8859-2
-.endfor
+# Wide char regex
+SRCS+= regcomp.c regerror.c regexec.c regfree.c
.include <bsd.prog.mk>
diff --git a/usr.bin/vi/catalog/Makefile b/usr.bin/vi/catalog/Makefile
new file mode 100644
index 0000000..482b5b8
--- /dev/null
+++ b/usr.bin/vi/catalog/Makefile
@@ -0,0 +1,194 @@
+# $Id: Makefile,v 9.0 2012/10/19 15:13:11 zy Exp $
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+V= ${.CURDIR}/../../../contrib/nvi
+
+.if ${MK_ICONV} == yes
+UCAT= dutch english french german polish spanish swedish
+.else
+# turn on WITH_ICONV=yes if you want UTF-8
+UCAT=
+.endif
+
+CAT= dutch english french german polish ru_RU.KOI8-R spanish swedish \
+ uk_UA.KOI8-U zh_CN.GB2312
+
+SCAN= ${V}/cl/*.c ${V}/common/*.c ${V}/ex/*.c ${V}/vi/*.c
+
+.PATH: ${V}/catalog
+
+all: dump
+
+build-tools: dump
+
+.for c in ${UCAT}
+CAT+= ${c}.UTF-8
+CLEANFILES+=${c}.UTF-8.base
+$c.UTF-8.base: ${c}.base
+.if ${c} == "polish"
+ iconv -f ISO8859-2 -t UTF-8 ${.ALLSRC} > ${.TARGET}
+.else
+ iconv -f ISO8859-1 -t UTF-8 ${.ALLSRC} > ${.TARGET}
+.endif
+.endfor
+
+CAT+= zh_CN.UTF-8 uk_UA.UTF-8 ru_RU.UTF-8
+CLEANFILES+= zh_CN.UTF-8.base uk_UA.UTF-8.base ru_RU.UTF-8.base
+zh_CN.UTF-8.base: zh_CN.GB2312.base
+ iconv -f GB2312 -t UTF-8 ${.ALLSRC} > ${.TARGET}
+
+uk_UA.UTF-8.base: uk_UA.KOI8-U.base
+ iconv -f KOI8-U -t UTF-8 ${.ALLSRC} > ${.TARGET}
+
+ru_RU.UTF-8.base: ru_RU.KOI8-R.base
+ iconv -f KOI8-R -t UTF-8 ${.ALLSRC} > ${.TARGET}
+
+.for c in ${CAT}
+${c}: ${c}.base
+ @echo "... $c"; \
+ rm -f $c; \
+ sort -u ${.ALLSRC} | \
+ awk '{ \
+ if ($$1 == 1) { \
+ print "\nMESSAGE NUMBER 1 IS NOT LEGAL"; \
+ exit 1; \
+ } \
+ if (++nline > $$1) { \
+ print "DUPLICATE MESSAGE NUMBER " $$1; \
+ exit 1; \
+ } \
+ print $0; \
+ }' | \
+ sed -e '1s/^/$$set 1~$$quote "~/; 1y/~/\n/' | \
+ gencat $c /dev/stdin; \
+ chmod 444 $c; \
+ if grep DUPLICATE $c > /dev/null; then \
+ grep DUPLICATE $@; \
+ fi; \
+ if grep 'NOT LEGAL' $c > /dev/null; then \
+ grep 'NOT LEGAL' $@; \
+ fi
+.endfor
+
+CHK= dutch.check english.check french.check german.check \
+ polish.check ru_RU.KOI8-R.check spanish.check swedish.check \
+ uk_UA.KOI8-U.check zh_CN.GB2312.check
+check: ${CHK}
+.for c in ${CAT}
+${c}.check: ${c}.base
+ @echo "... $c"; \
+ f=${.ALLSRC:S;.base$;;}; \
+ (echo "Unused message id's (this is okay):"; \
+ awk '{ \
+ while (++nline < $$1) \
+ printf "%03d\n", nline; \
+ }' < $$f.base; \
+ echo =========================; \
+ echo "MISSING ERROR MESSAGES (Please add!):"; \
+ awk '{print $$1}' < $$f.base | sort -u > __ck1; \
+ awk '{print $$1}' < english.base | sort -u > __ck2; \
+ comm -13 __ck1 __ck2; \
+ echo =========================; \
+ echo "Extra error messages (just delete them):"; \
+ comm -23 __ck1 __ck2; \
+ echo =========================; \
+ echo "MESSAGES WITH THE SAME MESSAGE ID's (FIX!):"; \
+ for j in \
+ `sed '/^$$/d' < $$f.base | LANG=C sort -u | \
+ awk '{print $$1}' | uniq -d`; do \
+ egrep $$j $$f.base; \
+ done; \
+ echo =========================; \
+ echo "Duplicate messages, both id and message (this is okay):"; \
+ sed '/^$$/d' < $$f.base | LANG=C sort | uniq -c | \
+ awk '$$1 != 1 { print $$0 }' | sort -n; \
+ echo =========================) > $c
+.endfor
+
+english.base: dump ${SCAN} #Makefile
+ ./dump ${SCAN} |\
+ sed -e '/|/!d' \
+ -e 's/|/ "/' \
+ -e 's/^"//' |\
+ sort -nu > $@
+
+
+dump: dump.c
+ ${CC} -o dump ${.ALLSRC}
+
+CLEANFILES+= dump ${CAT} english.base *.check __ck1 __ck2
+
+CATALOGS= ${CAT}
+NLLINKS= nl_NL
+ENLINKS= en_AU en_CA en_GB en_NZ en_US
+FRLINKS= fr_BE fr_CA fr_CH fr_FR
+DELINKS= de_AT de_CH de_DE
+ESLINKS= es_ES
+SVLINKS= sv_SE
+PLLINKS= pl_PL
+
+FILES= ${CATALOGS}
+FILESDIR= /usr/share/vi/catalog
+SYMLINKS=
+.for l in ${NLLINKS}
+SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-1
+SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-15
+.endfor
+.for l in ${ENLINKS}
+SYMLINKS+= english ${FILESDIR}/$l.ISO8859-1
+SYMLINKS+= english ${FILESDIR}/$l.ISO8859-15
+SYMLINKS+= english ${FILESDIR}/$l.US-ASCII
+.endfor
+SYMLINKS+= english ${FILESDIR}/POSIX
+SYMLINKS+= english ${FILESDIR}/C
+.for l in ${FRLINKS}
+SYMLINKS+= french ${FILESDIR}/$l.ISO8859-1
+SYMLINKS+= french ${FILESDIR}/$l.ISO8859-15
+.endfor
+.for l in ${DELINKS}
+SYMLINKS+= german ${FILESDIR}/$l.ISO8859-1
+SYMLINKS+= german ${FILESDIR}/$l.ISO8859-15
+.endfor
+.for l in ${ESLINKS}
+SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-1
+SYMLINKS+= spanish ${FILESDIR}/$l.ISO8859-15
+.endfor
+.for l in ${SVLINKS}
+SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-1
+SYMLINKS+= swedish ${FILESDIR}/$l.ISO8859-15
+.endfor
+.for l in ${PLLINKS}
+SYMLINKS+= polish ${FILESDIR}/$l.ISO8859-2
+.endfor
+# iconv not required for these.
+SYMLINKS+= ru_RU.KOI8-R ${FILESDIR}/ru_SU.KOI8-R
+SYMLINKS+= zh_CN.GB2312 ${FILESDIR}/zh_CN.GB18030
+SYMLINKS+= zh_CN.GB2312 ${FILESDIR}/zh_CN.GBK
+SYMLINKS+= zh_CN.GB2312 ${FILESDIR}/zh_CN.eucCN
+.if ${MK_ICONV} == yes
+.for l in ${NLLINKS}
+SYMLINKS+= dutch.UTF-8 ${FILESDIR}/$l.UTF-8
+.endfor
+.for l in ${ENLINKS}
+SYMLINKS+= english.UTF-8 ${FILESDIR}/$l.UTF-8
+.endfor
+.for l in ${FRLINKS}
+SYMLINKS+= french.UTF-8 ${FILESDIR}/$l.UTF-8
+.endfor
+.for l in ${DELINKS}
+SYMLINKS+= german.UTF-8 ${FILESDIR}/$l.UTF-8
+.endfor
+.for l in ${ESLINKS}
+SYMLINKS+= spanish.UTF-8 ${FILESDIR}/$l.UTF-8
+.endfor
+.for l in ${SVLINKS}
+SYMLINKS+= swedish.UTF-8 ${FILESDIR}/$l.UTF-8
+.endfor
+.for l in ${PLLINKS}
+SYMLINKS+= polish.UTF-8 ${FILESDIR}/$l.UTF-8
+.endfor
+.endif
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/vi/config.h b/usr.bin/vi/config.h
index a8bee67..94e7808 100644
--- a/usr.bin/vi/config.h
+++ b/usr.bin/vi/config.h
@@ -1,195 +1,23 @@
-/* config.h. Generated automatically by configure. */
-/* config.h.in. Generated automatically from configure.in by autoheader. */
+/* $Id: config.h.in,v 9.5 2013/03/11 01:20:53 zy Exp $ */
/* $FreeBSD$ */
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
-
-/* Define if your struct stat has st_blksize. */
-#define HAVE_ST_BLKSIZE 1
-
-/* Define if you have <vfork.h>. */
-/* #undef HAVE_VFORK_H */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef mode_t */
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef pid_t */
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if your <sys/time.h> declares struct tm. */
-/* #undef TM_IN_SYS_TIME */
-
-/* Define vfork as fork if vfork does not work. */
-/* #undef vfork */
-
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef ssize_t */
-
/* Define if you want a debugging version. */
/* #undef DEBUG */
-/* Define if you have a System V-style (broken) gettimeofday. */
-/* #undef HAVE_BROKEN_GETTIMEOFDAY */
-
-/* Define if you have a Ultrix-style (broken) vdisable. */
-/* #undef HAVE_BROKEN_VDISABLE */
-
-/* Define if you have a BSD version of curses. */
-#ifndef SYSV_CURSES
-#define HAVE_BSD_CURSES 1
-#endif
-
-/* Define if you have the curses(3) addnstr function. */
-#define HAVE_CURSES_ADDNSTR 1
-
-/* Define if you have the curses(3) beep function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_BEEP 1
-#endif
-
-/* Define if you have the curses(3) flash function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_FLASH 1
-#endif
-
-/* Define if you have the curses(3) idlok function. */
-#define HAVE_CURSES_IDLOK 1
-
-/* Define if you have the curses(3) keypad function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_KEYPAD 1
-#endif
-
-/* Define if you have the curses(3) newterm function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_NEWTERM 1
-#endif
-
-/* Define if you have the curses(3) setupterm function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_SETUPTERM 1
-#endif
-
-/* Define if you have the curses(3) tigetstr/tigetnum functions. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_TIGETSTR 1
-#endif
-
-/* Define if you have the chsize(2) system call. */
-/* #undef HAVE_FTRUNCATE_CHSIZE */
-
-/* Define if you have the ftruncate(2) system call. */
-#define HAVE_FTRUNCATE_FTRUNCATE 1
-
-/* Define if you have fcntl(2) style locking. */
-/* #undef HAVE_LOCK_FCNTL */
-
-/* Define if you have flock(2) style locking. */
-#define HAVE_LOCK_FLOCK 1
-
-/* Define if you want to compile in the Perl interpreter. */
-/* #undef HAVE_PERL_INTERP */ /* XXX: SET IN Makefile CFLAGS */
-
-/* Define if your Perl is at least 5.003_01. */
-/* #undef HAVE_PERL_5_003_01 */ /* XXX: SET IN Makefile CFLAGS */
-
-/* Define if you have the Berkeley style revoke(2) system call. */
-#define HAVE_REVOKE 1
-
-/* Define if you have <sys/mman.h> */
-#define HAVE_SYS_MMAN_H 1
-
-/* Define if you have <sys/select.h> */
-/* #undef HAVE_SYS_SELECT_H 1 */
-
-/* Define if you have the System V style pty calls. */
-/* #undef HAVE_SYS5_PTY */
-
-/* Define if you want to compile in the Tcl interpreter. */
-/* #define HAVE_TCL_INTERP */ /* XXX: SET IN Makefile CFLAGS */
-
-/* Define if your sprintf returns a pointer, not a length. */
-/* #undef SPRINTF_RET_CHARPNT */
-
-/* Define if you have the bsearch function. */
-#define HAVE_BSEARCH 1
-
-/* Define if you have the gethostname function. */
-#define HAVE_GETHOSTNAME 1
-
-/* Define if you have the getopt function. */
-#define HAVE_GETOPT 1
-
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if you have the memchr function. */
-#define HAVE_MEMCHR 1
-
-/* Define if you have the memcpy function. */
-#define HAVE_MEMCPY 1
-
-/* Define if you have the memmove function. */
-#define HAVE_MEMMOVE 1
-
-/* Define if you have the memset function. */
-#define HAVE_MEMSET 1
-
-/* Define if you have the mkstemp function. */
-#define HAVE_MKSTEMP 1
-
-/* Define if you have the mmap function. */
-#define HAVE_MMAP 1
-
-/* Define if you have the select function. */
-#define HAVE_SELECT 1
-
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
-
-/* Define if you have the snprintf function. */
-#define HAVE_SNPRINTF 1
-
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
-/* Define if you have the strerror function. */
-#define HAVE_STRERROR 1
-
-/* Define if you have the strpbrk function. */
-#define HAVE_STRPBRK 1
-
-/* Define if you have the strsep function. */
-#define HAVE_STRSEP 1
+/* Define when using wide characters */
+/* #define USE_WIDECHAR set by Makefile */
-/* Define if you have the strtol function. */
-#define HAVE_STRTOL 1
+/* Define when iconv can be used */
+/* #define USE_ICONV set by Makefile */
-/* Define if you have the strtoul function. */
-#define HAVE_STRTOUL 1
+/* Define when the 2nd argument of iconv(3) is not const */
+/* #undef ICONV_TRADITIONAL */
-/* Define if you have the unsetenv function. */
-#define HAVE_UNSETENV 1
+/* Define if you have <libutil.h> */
+#define HAVE_LIBUTIL_H
-/* Define if you have the valloc function. */
-#define HAVE_VALLOC 1
+/* Define if you have <ncurses.h> */
+#define HAVE_NCURSES_H
-/* Define if you have the vsnprintf function. */
-#define HAVE_VSNPRINTF 1
+/* Define if you have <term.h> */
+#define HAVE_TERM_H
diff --git a/usr.bin/vi/pathnames.h b/usr.bin/vi/pathnames.h
index 72c8bb3..49d58fe 100644
--- a/usr.bin/vi/pathnames.h
+++ b/usr.bin/vi/pathnames.h
@@ -1,19 +1,15 @@
-/* @(#)pathnames.h.in 8.4 (Berkeley) 6/26/96 */
+/* $Id: pathnames.h.in,v 8.7 2012/04/23 08:34:52 zy Exp $ */
/* $FreeBSD$ */
/* Read standard system paths first. */
#include <paths.h>
-#ifndef _PATH_BSHELL
-#define _PATH_BSHELL "/bin/sh"
-#endif
-
#ifndef _PATH_EXRC
#define _PATH_EXRC ".exrc"
#endif
#ifndef _PATH_MSGCAT
-#define _PATH_MSGCAT "/usr/share/vi/catalog/"
+#define _PATH_MSGCAT "/usr/share/vi/catalog/"
#endif
#ifndef _PATH_NEXRC
@@ -21,15 +17,7 @@
#endif
#ifndef _PATH_PRESERVE
-#define _PATH_PRESERVE "/var/tmp/vi.recover"
-#endif
-
-#ifndef _PATH_SYSV_PTY
-#define _PATH_SYSV_PTY "/dev/ptmx"
-#endif
-
-#ifndef _PATH_SENDMAIL
-#define _PATH_SENDMAIL "/usr/sbin/sendmail"
+#define _PATH_PRESERVE "/var/tmp/vi.recover/"
#endif
#ifndef _PATH_SYSEXRC
@@ -39,11 +27,3 @@
#ifndef _PATH_TAGS
#define _PATH_TAGS "tags"
#endif
-
-#ifndef _PATH_TMP
-#define _PATH_TMP "/tmp"
-#endif
-
-#ifndef _PATH_TTY
-#define _PATH_TTY "/dev/tty"
-#endif
diff --git a/usr.bin/vi/port.h b/usr.bin/vi/port.h
deleted file mode 100644
index bdd5faf..0000000
--- a/usr.bin/vi/port.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/* @(#)port.h.in 8.13 (Berkeley) 6/12/96 */
-
-/* $FreeBSD$ */
-
-/*
- * Declare the basic types, if they aren't already declared. Named and
- * some system's db.h files protect them with __BIT_TYPES_DEFINED__.
- */
-#ifndef __BIT_TYPES_DEFINED__
-#define __BIT_TYPES_DEFINED__
-
-
-
-
-
-#endif
-
-/*
- * XXX
- * Some versions of System V changed the number of arguments to gettimeofday
- * without changing the name.
- */
-#ifdef HAVE_BROKEN_GETTIMEOFDAY
-#define gettimeofday(tv, tz) gettimeofday(tv)
-#endif
-
-/*
- * XXX
- * If we don't have mmap, we fake it with read and write, but we'll
- * still need the header information.
- */
-#ifndef HAVE_SYS_MMAN_H
-#define MAP_SHARED 1 /* share changes */
-#define MAP_PRIVATE 2 /* changes are private */
-#define PROT_READ 0x1 /* pages can be read */
-#define PROT_WRITE 0x2 /* pages can be written */
-#define PROT_EXEC 0x4 /* pages can be executed */
-#endif
-
-/*
- * XXX
- * POSIX 1003.1 names for file descriptors.
- */
-#ifndef STDERR_FILENO
-#define STDIN_FILENO 0 /* ANSI C #defines */
-#define STDOUT_FILENO 1
-#define STDERR_FILENO 2
-#endif
-
-/*
- * XXX
- * POSIX 1003.1 names for seek settings.
- */
-#ifndef SEEK_END
-#define SEEK_SET 0 /* POSIX 1003.1 seek values */
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-/*
- * Hack _POSIX_VDISABLE to \377 since Ultrix doesn't honor _POSIX_VDISABLE
- * (treats it as ^@). The symptom is that the ^@ keystroke immediately
- * drops core.
- */
-#ifdef HAVE_BROKEN_VDISABLE
-#undef _POSIX_VDISABLE
-#define _POSIX_VDISABLE ((unsigned char)'\377')
-#endif
-
-/*
- * XXX
- * POSIX 1003.1 tty disabling character.
- */
-#ifndef _POSIX_VDISABLE
-#define _POSIX_VDISABLE 0 /* Some systems used 0. */
-#endif
-
-/*
- * XXX
- * 4.4BSD extension to only set the software termios bits.
- */
-#ifndef TCSASOFT /* 4.4BSD extension. */
-#define TCSASOFT 0
-#endif
-
-/*
- * XXX
- * POSIX 1003.1 maximum path length.
- */
-#ifndef MAXPATHLEN
-#ifdef PATH_MAX
-#define MAXPATHLEN PATH_MAX
-#else
-#define MAXPATHLEN 1024
-#endif
-#endif
-
-/*
- * XXX
- * MIN, MAX, historically in <sys/param.h>
- */
-#ifndef MAX
-#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
-#endif
-#ifndef MIN
-#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
-#endif
-
-/*
- * XXX
- * "DB" isn't always portable, and we want the private information.
- */
-#define DB L__DB
-#undef pgno_t /* IRIX has its own version. */
-#define pgno_t L__db_pgno_t
-
-/*
- * XXX
- * 4.4BSD extension to provide lock values in the open(2) call.
- */
-#ifndef O_EXLOCK
-#define O_EXLOCK 0
-#endif
-
-#ifndef O_SHLOCK
-#define O_SHLOCK 0
-#endif
-
-/*
- * XXX
- * POSIX 1003.1 bad file format errno.
- */
-#ifndef EFTYPE
-#define EFTYPE EINVAL
-#endif
-
-/*
- * XXX
- * POSIX 1003.2 RE length limit.
- */
-#ifndef _POSIX2_RE_DUP_MAX
-#define _POSIX2_RE_DUP_MAX 255
-#endif
-
-/*
- * XXX
- * 4.4BSD extension to determine if a program dropped core from the exit
- * status.
- */
-#ifndef WCOREDUMP
-#define WCOREDUMP(a) 0
-#endif
-
-/*
- * XXX
- * Endian-ness of the machine.
- */
-#if !defined(LITTLE_ENDIAN)
-#define LITTLE_ENDIAN 1234
-#endif
-#if !defined(BIG_ENDIAN)
-#define BIG_ENDIAN 4321
-#endif
-#if !defined(BYTE_ORDER)
-#if WORDS_BIGENDIAN == 1
-#define BYTE_ORDER BIG_ENDIAN
-#else
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-#endif
OpenPOWER on IntegriCloud