summaryrefslogtreecommitdiff
path: root/editors/nvi-m17n
diff options
context:
space:
mode:
authorjlam <jlam>2003-07-16 09:33:46 +0000
committerjlam <jlam>2003-07-16 09:33:46 +0000
commite664449b954368894a4fd85edc962c90bc7b4903 (patch)
tree491111004206c0c3cb92ae9f1dd439e854e373be /editors/nvi-m17n
parentf6cad14a16265838094c96c2784856bdf35df1a9 (diff)
downloadpkgsrc-e664449b954368894a4fd85edc962c90bc7b4903.tar.gz
Initial work in merging bits of the pkgviews branch into modern pkgsrc.
Currently, the pkgviews/buildlink2 integration is incomplete. People who work on this branch should also check out src/usr.sbin/pkg_install from the pkgviews branch.
Diffstat (limited to 'editors/nvi-m17n')
-rw-r--r--editors/nvi-m17n/DESCR24
-rw-r--r--editors/nvi-m17n/MESSAGE7
-rw-r--r--editors/nvi-m17n/Makefile82
-rw-r--r--editors/nvi-m17n/PLIST31
-rw-r--r--editors/nvi-m17n/distinfo11
-rwxr-xr-xeditors/nvi-m17n/files/nvi-m17n9
-rw-r--r--editors/nvi-m17n/patches/patch-aa107
-rw-r--r--editors/nvi-m17n/patches/patch-ab16
-rw-r--r--editors/nvi-m17n/patches/patch-ac30
-rw-r--r--editors/nvi-m17n/patches/patch-ad22
-rw-r--r--editors/nvi-m17n/patches/patch-global556
11 files changed, 0 insertions, 895 deletions
diff --git a/editors/nvi-m17n/DESCR b/editors/nvi-m17n/DESCR
deleted file mode 100644
index c37c20cf106..00000000000
--- a/editors/nvi-m17n/DESCR
+++ /dev/null
@@ -1,24 +0,0 @@
-This ports contains multilingualized nex/nvi.
-
-nex/nvi is a freely redistributable implementation of ex/vi text
-editors originally distributed as part of the Fourth Berkeley
-Software Distribution (4BSD), by the University of California,
-Berkeley.
-
-Multilingual patch enables you to use the following multilingual
-encoding methods, such as:
- none iso-8859-[1234789] latin1 latin2
- euc-jp-1978 euc-jp euc-jp-1983 euc-jp-1990 euc-cn euc-kr
- iso-2022-cn iso-2022-jp iso-2022-kr
- iso-2022-7-1 iso-2022-7-2 iso-2022-8-2
- sjis big5 hz euc-tw
-Multilingual support has been set up to use some of the above (guess from
-the name of the ports/packages) as default value.
-You can change encoding style on the fly, or by setting up ~/.exrc.
-With configurations, for Japanese encodings, you can also enjoy the
-embedded canna support.
-See /usr/local/share/vi/README.* for details of multilingual patch.
-
-original distribution site:
- ftp://ftp.cs.berkeley.edu/ucb/4bsd/nvi-1.79.tar.gz
- ftp://ftp.foretune.co.jp/pub/tools/nvi-m17n/
diff --git a/editors/nvi-m17n/MESSAGE b/editors/nvi-m17n/MESSAGE
deleted file mode 100644
index dd5f2d0626c..00000000000
--- a/editors/nvi-m17n/MESSAGE
+++ /dev/null
@@ -1,7 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.2 2002/09/24 12:29:57 wiz Exp $
-
-Read ${PREFIX}/share/vi/README.* for controlling multilingual
-facilities.
-
-===========================================================================
diff --git a/editors/nvi-m17n/Makefile b/editors/nvi-m17n/Makefile
deleted file mode 100644
index 107062a4c4d..00000000000
--- a/editors/nvi-m17n/Makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# $NetBSD: Makefile,v 1.23 2003/03/29 12:40:45 jmmv Exp $
-# FreeBSD Id: Makefile,v 1.11 1999/04/17 10:51:03 itojun Exp
-
-DISTNAME= nvi-1.79
-PKGNAME= nvi-m17n-1.79.19991117
-PKGREVISION= 1
-WRKSRC= ${WRKDIR}/${DISTNAME}/build
-CATEGORIES= editors
-MASTER_SITES= ftp://sleepy.vwh.net/pub/ \
- ftp://ftp.foretune.co.jp/pub/tools/nvi-m17n/
-
-PATCH_SITES= ftp://lkbreth.foretune.co.jp/pub/tools/nvi-m17n/
-PATCHFILES= nvi-1.79.m17n-19991117.diff.gz
-
-MAINTAINER= itojun@itojun.org
-COMMENT= Clone of vi/ex, with multilingual patch
-
-CONFLICTS= vigor-[0-9]* nvi-[0-9]*
-
-USE_BUILDLINK2= YES
-GNU_CONFIGURE= YES
-PATCH_DIST_ARGS=-d ${WRKSRC}/.. --forward --quiet -E -p1 -f
-CONFIGURE_ENV= OPTFLAG='-D_PATH_SYSEXRC=\"${PREFIX}/etc/vi.exrc\"'
-CONFIGURE_ARGS+=--enable-multibyte --program-prefix=n
-
-.include "../../mk/bsd.prefs.mk"
-
-PATCH_FUZZ_FACTOR= -F1
-
-.if !defined(USE_CANNA) || ${USE_CANNA} == YES
-.include "../../inputmethod/canna-lib/buildlink2.mk"
-CONFIGURE_ARGS+=--enable-canna=${BUILDLINK_PREFIX.canna-lib}
-CANNA_OPT.euc-jp=canna cannactrl cannakey=
-CANNA_OPT.sjis=${CANNA_OPT.euc-jp}
-CANNA_OPT.iso-2022-jp=${CANNA_OPT.euc-jp}
-.endif
-
-PLIST_TMP= ${WRKDIR}/PLIST
-PLIST_SRC+= ${PKGDIR}/PLIST ${PLIST_TMP}
-
-AUTODETECT.euc-jp=jp
-AUTODETECT.sjis=jp
-AUTODETECT.iso-2022-jp=jp
-
-AUTODETECT.euc-cn=cn
-AUTODETECT.big5=cn
-AUTODETECT.hz=cn
-AUTODETECT.iso-2022-cn=cn
-
-AUTODETECT.euc-tw=tw
-
-AUTODETECT.euc-kr=kr
-AUTODETECT.iso-2022-kr=kr
-
-ENCODING+= iso-2022-cn iso-2022-jp iso-2022-kr
-ENCODING+= euc-jp euc-cn euc-kr sjis big5 euc-tw hz
-
-post-patch:
-.if ${OPSYS} == "NetBSD"
- ${RM} -f ${WRKSRC}/../include/sys/queue.h
-.endif
-
-post-build:
-.for encoding in ${ENCODING}
- @${SED} -e 's|$${CANNA_OPT}|${CANNA_OPT.${encoding}}|' \
- -e 's|$${AUTODETECT}|${AUTODETECT.${encoding}}|' \
- -e 's|$${ENCODING}|${encoding}|g' \
- -e 's|$${PREFIX}|${PREFIX}|' \
- ${FILESDIR}/nvi-m17n > ${WRKDIR}/nvi-${encoding}
- @${ECHO} "bin/nvi-${encoding}" >> ${PLIST_TMP}
-.endfor
-
-post-install:
-.for encoding in ${ENCODING}
- @${INSTALL_SCRIPT} ${WRKDIR}/nvi-${encoding} ${PREFIX}/bin
-.endfor
- @${CP} ${WRKSRC}/../docs.m17n/README.english \
- ${PREFIX}/share/vi/
- @${CP} ${WRKSRC}/../docs.m17n/README.japanese \
- ${PREFIX}/share/vi/
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/editors/nvi-m17n/PLIST b/editors/nvi-m17n/PLIST
deleted file mode 100644
index 715ad913cfc..00000000000
--- a/editors/nvi-m17n/PLIST
+++ /dev/null
@@ -1,31 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:23:16 zuntum Exp $
-bin/nvi
-bin/nex
-bin/nview
-bin/regular
-bin/qregular
-man/man1/nvi.1
-man/man1/nex.1
-man/man1/nview.1
-share/vi/README.english
-share/vi/README.japanese
-share/vi/recover
-share/vi/catalog/dutch
-share/vi/catalog/english
-share/vi/catalog/french
-share/vi/catalog/german
-share/vi/catalog/ru_SU.KOI8-R
-share/vi/catalog/spanish
-share/vi/catalog/swedish
-share/vi/perl/forall.pl
-share/vi/perl/make.pl
-share/vi/perl/tk.pl
-share/vi/perl/wc.pl
-share/vi/tcl/errors.tcl
-share/vi/tcl/gnats.tcl
-share/vi/tcl/mailprocs.tcl
-share/vi/tcl/wc.tcl
-@dirrm share/vi/catalog
-@dirrm share/vi/perl
-@dirrm share/vi/tcl
-@dirrm share/vi
diff --git a/editors/nvi-m17n/distinfo b/editors/nvi-m17n/distinfo
deleted file mode 100644
index 64db812597b..00000000000
--- a/editors/nvi-m17n/distinfo
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: distinfo,v 1.3 2001/10/25 07:46:28 itojun Exp $
-
-SHA1 (nvi-1.79.tar.gz) = f6b54e532e06b00b8892d0a0362c5b361cfc9643
-Size (nvi-1.79.tar.gz) = 1295351 bytes
-SHA1 (nvi-1.79.m17n-19991117.diff.gz) = b242733c5da3c3797be0bd0c1829f7d0cebe451a
-Size (nvi-1.79.m17n-19991117.diff.gz) = 166609 bytes
-SHA1 (patch-aa) = c246b1533dfbfc93ad9c0a8ea8cff5db157c9ee8
-SHA1 (patch-ab) = f7a382af11f200467ac994d90e108e97c7602b13
-SHA1 (patch-ac) = 738f4b3d51b6b39f2cc4b2cffeb1a1ea412aed89
-SHA1 (patch-ad) = 21b5df4bb13b248f6f1ffe7ca69d91a4eae83561
-SHA1 (patch-global) = 118bfdcefba77c37c07b29d0c68fb8bbf02cb10e
diff --git a/editors/nvi-m17n/files/nvi-m17n b/editors/nvi-m17n/files/nvi-m17n
deleted file mode 100755
index b977641b370..00000000000
--- a/editors/nvi-m17n/files/nvi-m17n
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-EXINIT0="set ${CANNA_OPT} autodetect=${AUTODETECT} fileencoding=${ENCODING} displayencoding=${ENCODING} inputencoding=${ENCODING} noskipdisplay"
-if [ -f ~/.exrc ]; then
- EXINIT="$EXINIT0 `sed -e '/^set /!d' -e 's/^set //' < ~/.exrc | tr '\012' ' '`"
-else
- EXINIT=$EXINIT0
-fi
-export EXINIT
-exec ${PREFIX}/bin/nvi "$@"
diff --git a/editors/nvi-m17n/patches/patch-aa b/editors/nvi-m17n/patches/patch-aa
deleted file mode 100644
index 0fa8dae5d52..00000000000
--- a/editors/nvi-m17n/patches/patch-aa
+++ /dev/null
@@ -1,107 +0,0 @@
-$NetBSD: patch-aa,v 1.2 1999/12/28 05:37:28 wiz Exp $
-*** Makefile.in.orig Thu Mar 6 13:19:46 1997
---- Makefile.in Thu Mar 6 13:23:40 1997
-***************
-*** 87,95 ****
- cd $(bindir) && $(chmod) $(emode) `echo vi | sed '$(transform)'`
- cd $(bindir) && $(rm) -f `echo ex | sed '$(transform)'`
- cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'`
-! cd $(bindir) && $(ln) \
- `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'`
-! cd $(bindir) && $(ln) \
- `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'`
- cd $(bindir) && $(rm) -f regular qregular
- $(cp) regular $(bindir)/regular
---- 87,95 ----
- cd $(bindir) && $(chmod) $(emode) `echo vi | sed '$(transform)'`
- cd $(bindir) && $(rm) -f `echo ex | sed '$(transform)'`
- cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'`
-! cd $(bindir) && $(ln) -s \
- `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'`
-! cd $(bindir) && $(ln) -s \
- `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'`
- cd $(bindir) && $(rm) -f regular qregular
- $(cp) regular $(bindir)/regular
-***************
-*** 97,115 ****
- cd $(bindir) && $(chmod) $(emode) regular qregular
- [ -d $(mandir) ] || \
- ($(mkdir) $(mandir) && $(chmod) $(dmode) $(mandir))
-! [ -d $(mandir)/cat1 ] || \
-! ($(mkdir) $(mandir)/cat1 && $(chmod) $(dmode) $(mandir)/cat1)
- @echo "Installing man pages: $(mandir) ..."
-! cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'`
-! $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.0 \
-! $(mandir)/cat1/`echo vi.0 | sed '$(transform)'`
-! cd $(mandir)/cat1 && $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'`
-! cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'`
-! cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'`
-! cd $(mandir)/cat1 && $(ln) \
-! `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'`
-! cd $(mandir)/cat1 && $(ln) \
-! `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'`
- [ -d $(mandir)/man1 ] || \
- ($(mkdir) $(mandir)/man1 && $(chmod) $(dmode) $(mandir)/man1)
- cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'`
---- 97,115 ----
- cd $(bindir) && $(chmod) $(emode) regular qregular
- [ -d $(mandir) ] || \
- ($(mkdir) $(mandir) && $(chmod) $(dmode) $(mandir))
-! # [ -d $(mandir)/cat1 ] || \
-! # ($(mkdir) $(mandir)/cat1 && $(chmod) $(dmode) $(mandir)/cat1)
- @echo "Installing man pages: $(mandir) ..."
-! # cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'`
-! # $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.0 \
-! # $(mandir)/cat1/`echo vi.0 | sed '$(transform)'`
-! # cd $(mandir)/cat1 && $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'`
-! # cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'`
-! # cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'`
-! # cd $(mandir)/cat1 && $(ln) -s \
-! # `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'`
-! # cd $(mandir)/cat1 && $(ln) -s \
-! # `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'`
- [ -d $(mandir)/man1 ] || \
- ($(mkdir) $(mandir)/man1 && $(chmod) $(dmode) $(mandir)/man1)
- cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'`
-***************
-*** 118,126 ****
- cd $(mandir)/man1 && $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'`
-! cd $(mandir)/man1 && $(ln) \
- `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'`
-! cd $(mandir)/man1 && $(ln) \
- `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'`
-
- cat= dutch english french german ru_SU.KOI8-R spanish swedish
---- 118,126 ----
- cd $(mandir)/man1 && $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'`
-! cd $(mandir)/man1 && $(ln) -s \
- `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'`
-! cd $(mandir)/man1 && $(ln) -s \
- `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'`
-
- cat= dutch english french german ru_SU.KOI8-R spanish swedish
-***************
-*** 163,171 ****
- cd $(bindir) && $(rm) -f `echo vi | sed '$(transform)'`
- cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'`
- cd $(bindir) && $(rm) -f regular qregular
-! cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'`
-! cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'`
-! cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'`
---- 163,171 ----
- cd $(bindir) && $(rm) -f `echo vi | sed '$(transform)'`
- cd $(bindir) && $(rm) -f `echo view | sed '$(transform)'`
- cd $(bindir) && $(rm) -f regular qregular
-! # cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'`
-! # cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'`
-! # cd $(mandir)/cat1 && $(rm) -f `echo view.0 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo ex.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo vi.1 | sed '$(transform)'`
- cd $(mandir)/man1 && $(rm) -f `echo view.1 | sed '$(transform)'`
diff --git a/editors/nvi-m17n/patches/patch-ab b/editors/nvi-m17n/patches/patch-ab
deleted file mode 100644
index 25ab0adda77..00000000000
--- a/editors/nvi-m17n/patches/patch-ab
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ab,v 1.3 1999/12/28 05:37:28 wiz Exp $
---- configure.bad Fri Jun 26 02:22:51 1998
-+++ configure Fri Jun 26 02:23:39 1998
-@@ -1686,10 +1686,8 @@
- case "$host_os" in
- bsdi2.1)
- vi_cannapath="/usr/contrib/canna";;
-- freebsd2.2*|freebsd3*)
-- vi_cannapath="/usr/local";;
-- freebsd2*)
-- vi_cannapath="/usr/local/canna";;
-+ freebsd*|netbsd*|openbsd*)
-+ vi_cannapath="${prefix}";;
- *)
- vi_cannapath="/usr/local/canna";;
- esac
diff --git a/editors/nvi-m17n/patches/patch-ac b/editors/nvi-m17n/patches/patch-ac
deleted file mode 100644
index 545ade50c01..00000000000
--- a/editors/nvi-m17n/patches/patch-ac
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2001/10/25 07:46:29 itojun Exp $
-
---- ../ex/ex_cscope.c.orig Mon Sep 16 04:59:30 1996
-+++ ../ex/ex_cscope.c Thu Oct 25 16:43:51 2001
-@@ -232,14 +232,14 @@
- * name regardless so that we can use it as a base for searches.
- */
- if (stat(dname, &sb)) {
-- msgq(sp, M_SYSERR, dname);
-+ msgq(sp, M_SYSERR, "%s", dname);
- return (1);
- }
- if (S_ISDIR(sb.st_mode)) {
- (void)snprintf(path, sizeof(path),
- "%s/%s", dname, CSCOPE_DBFILE);
- if (stat(path, &sb)) {
-- msgq(sp, M_SYSERR, path);
-+ msgq(sp, M_SYSERR, "%s", path);
- return (1);
- }
- dbname = CSCOPE_DBFILE;
-@@ -762,7 +762,7 @@
-
- io_err: if (feof(csc->from_fp))
- errno = EIO;
-- msgq_str(sp, M_SYSERR, "%s", csc->dname);
-+ msgq_str(sp, M_SYSERR, csc->dname, "%s");
- terminate(sp, csc, 0);
- return (1);
- }
diff --git a/editors/nvi-m17n/patches/patch-ad b/editors/nvi-m17n/patches/patch-ad
deleted file mode 100644
index 8eae1670618..00000000000
--- a/editors/nvi-m17n/patches/patch-ad
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2001/10/25 07:46:29 itojun Exp $
-
---- ../common/exf.c.orig Thu Oct 25 16:43:16 2001
-+++ ../common/exf.c Thu Oct 25 16:43:52 2001
-@@ -887,7 +887,7 @@
- * Note that this code is harmless if you're using libc 4.6.x.
- */
- if (LF_ISSET(FS_APPEND) && lseek(fd, (off_t)0, SEEK_END) < 0) {
-- msgq(sp, M_SYSERR, name);
-+ msgq(sp, M_SYSERR, "%s", name);
- return (1);
- }
- #endif
-@@ -1004,7 +1004,7 @@
- *--s = '.';
- }
- }
-- msgq(sp, M_INFO, s);
-+ msgq(sp, M_INFO, "%s", s);
- if (nf)
- FREE_SPACE(sp, p, 0);
- return (0);
diff --git a/editors/nvi-m17n/patches/patch-global b/editors/nvi-m17n/patches/patch-global
deleted file mode 100644
index 729ac6a389e..00000000000
--- a/editors/nvi-m17n/patches/patch-global
+++ /dev/null
@@ -1,556 +0,0 @@
-$NetBSD: patch-global,v 1.1 2000/05/08 11:52:12 sakamoto Exp $
-
-diff -NrU2 ../build/Makefile.in ../../nvi-1.79/build/Makefile.in
---- ../build/Makefile.in Mon May 8 16:05:17 2000
-+++ ../../nvi-1.79/build/Makefile.in Mon May 8 16:06:15 2000
-@@ -4,5 +4,5 @@
- CC= @CC@
- OPTFLAG=@OPTFLAG@
--CFLAGS= -c $(OPTFLAG) @CFLAGS@ -I. -I$(srcdir)/include @CPPFLAGS@
-+CFLAGS= -c $(OPTFLAG) @CFLAGS@ -I. -I$(srcdir)/include @CPPFLAGS@ -DGTAGS
- LDFLAGS=@LDFLAGS@
- PERL= @vi_cv_path_perl@
-diff -NrU2 ../common/main.c ../../nvi-1.79/common/main.c
---- ../common/main.c Sat Oct 12 07:28:28 1996
-+++ ../../nvi-1.79/common/main.c Mon May 8 16:06:15 2000
-@@ -65,4 +65,7 @@
- u_int flags;
- int ch, flagchk, lflag, secure, startup, readonly, rval, silent;
-+#ifdef GTAGS
-+ int gtags = 0;
-+#endif
- char *tag_f, *wsizearg, path[256];
-
-@@ -114,4 +117,11 @@
- F_SET(gp, G_SNAPSHOT);
-
-+#ifdef GTAGS
-+#ifdef DEBUG
-+ while ((ch = getopt(argc, argv, "c:D:eFGlRrSsT:t:vw:")) != EOF)
-+#else
-+ while ((ch = getopt(argc, argv, "c:eFGlRrSst:vw:")) != EOF)
-+#endif
-+#else
- #ifdef DEBUG
- while ((ch = getopt(argc, argv, "c:D:eFlRrSsT:t:vw:")) != EOF)
-@@ -119,4 +129,5 @@
- while ((ch = getopt(argc, argv, "c:eFlRrSst:vw:")) != EOF)
- #endif
-+#endif
- switch (ch) {
- case 'c': /* Run the command. */
-@@ -155,4 +166,9 @@
- F_CLR(gp, G_SNAPSHOT);
- break;
-+#ifdef GTAGS
-+ case 'G': /* gtags mode. */
-+ gtags = 1;
-+ break;
-+#endif
- case 'l': /* Set lisp, showmatch options. */
- lflag = 1;
-@@ -253,4 +269,8 @@
- if (readonly)
- *oargp++ = O_READONLY;
-+#ifdef GTAGS
-+ if (gtags)
-+ *oargp++ = O_GTAGSMODE;
-+#endif
- if (secure)
- *oargp++ = O_SECURE;
-diff -NrU2 ../common/options.c ../../nvi-1.79/common/options.c
---- ../common/options.c Mon May 8 16:05:18 2000
-+++ ../../nvi-1.79/common/options.c Mon May 8 16:20:26 2000
-@@ -129,4 +129,8 @@
- /* O_FLASH HPUX */
- {"flash", NULL, OPT_1BOOL, 0},
-+#ifdef GTAGS
-+/* O_GTAGSMODE FreeBSD2.2 */
-+ {"gtagsmode", NULL, OPT_0BOOL, 0},
-+#endif
- /* O_HARDTABS 4BSD */
- {"hardtabs", NULL, OPT_NUM, 0},
-@@ -313,4 +317,7 @@
- #ifdef MULTIBYTE
- {"fe", O_FILEENCODING}, /* MULTIBYTE */
-+#endif
-+#ifdef GTAGS
-+ {"gt", O_GTAGSMODE}, /* GTAGS */
- #endif
- {"ht", O_HARDTABS}, /* 4BSD */
-diff -NrU2 ../docs/USD.doc/vi.man/vi.1 ../../nvi-1.79/docs/USD.doc/vi.man/vi.1
---- ../docs/USD.doc/vi.man/vi.1 Fri Oct 11 10:34:05 1996
-+++ ../../nvi-1.79/docs/USD.doc/vi.man/vi.1 Mon May 8 16:06:15 2000
-@@ -18,5 +18,5 @@
- .B ex
- [\c
--.B -eFRrSsv\c
-+.B -eFGRrSsv\c
- ] [\c
- .BI -c " cmd"\c
-@@ -29,5 +29,5 @@
- .B vi
- [\c
--.B -eFlRrSv\c
-+.B -eFGlRrSv\c
- ] [\c
- .BI -c " cmd"\c
-@@ -40,5 +40,5 @@
- .B view
- [\c
--.B -eFRrSv\c
-+.B -eFGRrSv\c
- ] [\c
- .BI -c " cmd"\c
-@@ -122,4 +122,7 @@
- Start editing with the lisp and showmatch options set.
- .TP
-+.B \-G
-+Start editing in gtags mode, as if the gtagsmode option was set.
-+.TP
- .B \-R
- Start editing in read-only mode, as if the command name was
-@@ -430,4 +433,6 @@
- .B "<control-]>"
- Push a tag reference onto the tag stack.
-+In gtagsmode, if at the first column of line,
-+locate function references otherwise function definitions.
- .TP
- .B "<control-^>"
-@@ -941,4 +946,7 @@
- Rewind the argument list.
- .TP
-+.B "rta[g][!] tagstring"
-+Edit the file refering the specified tag. (Only in gtagsmode)
-+.TP
- .B "se[t] [option[=[value]] ...] [nooption ...] [option? ...] [all]"
- Display or set editor options.
-@@ -1110,4 +1118,7 @@
- .B "flash [on]"
- Flash the screen instead of beeping the keyboard on error.
-+.TP
-+.B "gtagsmode, gt [off]"
-+Use GTAGS and GRTAGS instead of tags.
- .TP
- .B "hardtabs, ht [8]"
-diff -NrU2 ../ex/ex.h ../../nvi-1.79/ex/ex.h
---- ../ex/ex.h Mon May 8 16:05:18 2000
-+++ ../../nvi-1.79/ex/ex.h Mon May 8 16:06:15 2000
-@@ -165,4 +165,7 @@
- #define E_USELASTCMD 0x02000000 /* Use the last command. */
- #define E_VISEARCH 0x04000000 /* It's really a vi search command. */
-+#ifdef GTAGS
-+#define E_REFERENCE 0x08000000 /* locate function references */
-+#endif
- u_int32_t flags; /* Current flags. */
- };
-diff -NrU2 ../ex/ex_cmd.c ../../nvi-1.79/ex/ex_cmd.c
---- ../ex/ex_cmd.c Wed Oct 23 22:31:01 1996
-+++ ../../nvi-1.79/ex/ex_cmd.c Mon May 8 16:06:15 2000
-@@ -303,4 +303,11 @@
- "rew[ind][!]",
- "re-edit all the files in the file argument list"},
-+#ifdef GTAGS
-+/* C_RTAG */
-+ {"rtag", ex_rtag_push, E_NEWSCREEN,
-+ "!w1o",
-+ "rta[g][!] [string]",
-+ "edit the file containing the tag"},
-+#endif
- /*
- * !!!
-diff -NrU2 ../ex/ex_tag.c ../../nvi-1.79/ex/ex_tag.c
---- ../ex/ex_tag.c Mon Sep 16 05:02:43 1996
-+++ ../../nvi-1.79/ex/ex_tag.c Mon May 8 16:06:15 2000
-@@ -47,4 +47,8 @@
- static void ctag_file __P((SCR *, TAGF *, char *, char **, size_t *));
- static int ctag_search __P((SCR *, char *, size_t, char *));
-+#ifdef GTAGS
-+static int getentry __P((char *, char **, char **, char **));
-+static TAGQ *gtag_slist __P((SCR *, char *, int));
-+#endif
- static int ctag_sfile __P((SCR *, TAGF *, TAGQ *, char *));
- static TAGQ *ctag_slist __P((SCR *, char *));
-@@ -90,4 +94,23 @@
- }
-
-+#ifdef GTAGS
-+/*
-+ * ex_rtag_push -- ^]
-+ * :rtag[!] [string]
-+ *
-+ * Enter a new TAGQ context based on a ctag string.
-+ *
-+ * PUBLIC: int ex_rtag_push __P((SCR *, EXCMD *));
-+ */
-+int
-+ex_rtag_push(sp, cmdp)
-+ SCR *sp;
-+ EXCMD *cmdp;
-+{
-+ F_SET(cmdp, E_REFERENCE);
-+ return ex_tag_push(sp, cmdp);
-+}
-+#endif
-+
- /*
- * ex_tag_push -- ^]
-@@ -139,4 +162,10 @@
-
- /* Get the tag information. */
-+#ifdef GTAGS
-+ if (O_ISSET(sp, O_GTAGSMODE)) {
-+ if ((tqp = gtag_slist(sp, exp->tag_last, F_ISSET(cmdp, E_REFERENCE))) == NULL)
-+ return (1);
-+ } else
-+#endif
- if ((tqp = ctag_slist(sp, exp->tag_last)) == NULL)
- return (1);
-@@ -970,4 +999,127 @@
- }
-
-+#ifdef GTAGS
-+/*
-+ * getentry --
-+ * get tag information from current line.
-+ *
-+ * gtags temporary file format.
-+ * <tag> <lineno> <file> <image>
-+ *
-+ * sample.
-+ * +------------------------------------------------
-+ * |main 30 main.c main(argc, argv)
-+ * |func 21 subr.c func(arg)
-+ */
-+static int
-+getentry(buf, tag, file, line)
-+ char *buf, **tag, **file, **line;
-+{
-+ char *p = buf;
-+
-+ for (*tag = p; *p && !isspace(*p); p++) /* tag name */
-+ ;
-+ if (*p == 0)
-+ goto err;
-+ *p++ = 0;
-+ for (; *p && isspace(*p); p++) /* (skip blanks) */
-+ ;
-+ if (*p == 0)
-+ goto err;
-+ *line = p; /* line no */
-+ for (*line = p; *p && !isspace(*p); p++)
-+ ;
-+ if (*p == 0)
-+ goto err;
-+ *p++ = 0;
-+ for (; *p && isspace(*p); p++) /* (skip blanks) */
-+ ;
-+ if (*p == 0)
-+ goto err;
-+ *file = p; /* file name */
-+ for (*file = p; *p && !isspace(*p); p++)
-+ ;
-+ if (*p == 0)
-+ goto err;
-+ *p = 0;
-+
-+ /* value check */
-+ if (strlen(*tag) && strlen(*line) && strlen(*file) && atoi(*line) > 0)
-+ return 1; /* OK */
-+err:
-+ return 0; /* ERROR */
-+}
-+
-+/*
-+ * gtag_slist --
-+ * Search the list of tags files for a tag, and return tag queue.
-+ */
-+static TAGQ *
-+gtag_slist(sp, tag, ref)
-+ SCR *sp;
-+ char *tag;
-+ int ref;
-+{
-+ EX_PRIVATE *exp;
-+ TAGF *tfp;
-+ TAGQ *tqp;
-+ size_t len;
-+ int echk;
-+ TAG *tp;
-+ char *name, *file, *line;
-+ char command[BUFSIZ];
-+ char buf[BUFSIZ];
-+ FILE *fp;
-+
-+ /* Allocate and initialize the tag queue structure. */
-+ len = strlen(tag);
-+ CALLOC_GOTO(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + len + 1);
-+ CIRCLEQ_INIT(&tqp->tagq);
-+ tqp->tag = tqp->buf;
-+ memcpy(tqp->tag, tag, (tqp->tlen = len) + 1);
-+
-+ /*
-+ * Find the tag, only display missing file messages once, and
-+ * then only if we didn't find the tag.
-+ */
-+ snprintf(command, sizeof(command), "global -%s '%s' 2>/dev/null", ref ? "rx" : "x", tag);
-+ if (fp = popen(command, "r")) {
-+ while (fgets(buf, sizeof(buf), fp)) {
-+ if (buf[strlen(buf)-1] == '\n') /* chop(buf) */
-+ buf[strlen(buf)-1] = 0;
-+ else
-+ while (fgetc(fp) != '\n')
-+ ;
-+ if (getentry(buf, &name, &file, &line) == 0) {
-+ echk = 1;
-+ F_SET(tfp, TAGF_ERR);
-+ break;
-+ }
-+ CALLOC_GOTO(sp, tp,
-+ TAG *, 1, sizeof(TAG) + strlen(file) + 1 + strlen(line) + 1);
-+ tp->fname = tp->buf;
-+ strcpy(tp->fname, file);
-+ tp->fnlen = strlen(file);
-+ tp->search = tp->fname + tp->fnlen + 1;
-+ strcpy(tp->search, line);
-+ CIRCLEQ_INSERT_TAIL(&tqp->tagq, tp, q);
-+ }
-+ pclose(fp);
-+ }
-+
-+ /* Check to see if we found anything. */
-+ if (tqp->tagq.cqh_first == (void *)&tqp->tagq) {
-+ msgq_str(sp, M_ERR, tag, "162|%s: tag not found");
-+ free(tqp);
-+ return (NULL);
-+ }
-+
-+ tqp->current = tqp->tagq.cqh_first;
-+ return (tqp);
-+
-+alloc_err:
-+ return (NULL);
-+}
-+#endif
- /*
- * ctag_slist --
-diff -NrU2 ../include/ex_def.h ../../nvi-1.79/include/ex_def.h
---- ../include/ex_def.h Wed Oct 23 22:53:09 1996
-+++ ../../nvi-1.79/include/ex_def.h Mon May 8 16:06:15 2000
-@@ -48,31 +48,32 @@
- #define C_RESIZE 47
- #define C_REWIND 48
--#define C_SUBSTITUTE 49
--#define C_SCRIPT 50
--#define C_SET 51
--#define C_SHELL 52
--#define C_SOURCE 53
--#define C_STOP 54
--#define C_SUSPEND 55
--#define C_T 56
--#define C_TAG 57
--#define C_TAGNEXT 58
--#define C_TAGPOP 59
--#define C_TAGPREV 60
--#define C_TAGTOP 61
--#define C_TCLCMD 62
--#define C_UNDO 63
--#define C_UNABBREVIATE 64
--#define C_UNMAP 65
--#define C_V 66
--#define C_VERSION 67
--#define C_VISUAL_EX 68
--#define C_VISUAL_VI 69
--#define C_VIUSAGE 70
--#define C_WRITE 71
--#define C_WN 72
--#define C_WQ 73
--#define C_XIT 74
--#define C_YANK 75
--#define C_Z 76
--#define C_SUBTILDE 77
-+#define C_RTAG 49
-+#define C_SUBSTITUTE 50
-+#define C_SCRIPT 51
-+#define C_SET 52
-+#define C_SHELL 53
-+#define C_SOURCE 54
-+#define C_STOP 55
-+#define C_SUSPEND 56
-+#define C_T 57
-+#define C_TAG 58
-+#define C_TAGNEXT 59
-+#define C_TAGPOP 60
-+#define C_TAGPREV 61
-+#define C_TAGTOP 62
-+#define C_TCLCMD 63
-+#define C_UNDO 64
-+#define C_UNABBREVIATE 65
-+#define C_UNMAP 66
-+#define C_V 67
-+#define C_VERSION 68
-+#define C_VISUAL_EX 69
-+#define C_VISUAL_VI 70
-+#define C_VIUSAGE 71
-+#define C_WRITE 72
-+#define C_WN 73
-+#define C_WQ 74
-+#define C_XIT 75
-+#define C_YANK 76
-+#define C_Z 77
-+#define C_SUBTILDE 78
-diff -NrU2 ../include/ex_extern.h ../../nvi-1.79/include/ex_extern.h
---- ../include/ex_extern.h Wed Oct 23 22:53:10 1996
-+++ ../../nvi-1.79/include/ex_extern.h Mon May 8 16:06:15 2000
-@@ -90,4 +90,5 @@
- void re_error __P((SCR *, int, regex_t *));
- int ex_tag_first __P((SCR *, char *));
-+int ex_rtag_push __P((SCR *, EXCMD *));
- int ex_tag_push __P((SCR *, EXCMD *));
- int ex_tag_next __P((SCR *, EXCMD *));
-diff -NrU2 ../include/options_def.h ../../nvi-1.79/include/options_def.h
---- ../include/options_def.h Mon May 8 16:05:18 2000
-+++ ../../nvi-1.79/include/options_def.h Mon May 8 16:24:38 2000
-@@ -25,65 +25,66 @@
- #define O_FILEENCODING 24
- #define O_FLASH 25
--#define O_HARDTABS 26
--#define O_ICLOWER 27
--#define O_IGNORECASE 28
--#define O_INPUTENCODING 29
--#define O_KEYTIME 30
--#define O_LEFTRIGHT 31
--#define O_LINES 32
--#define O_LISP 33
--#define O_LIST 34
--#define O_LOCKFILES 35
--#define O_MAGIC 36
--#define O_MATCHTIME 37
--#define O_MESG 38
--#define O_MODELINE 39
--#define O_MSGCAT 40
--#define O_NOPRINT 41
--#define O_NUMBER 42
--#define O_OCTAL 43
--#define O_OPEN 44
--#define O_OPTIMIZE 45
--#define O_PARAGRAPHS 46
--#define O_PATH 47
--#define O_PRINT 48
--#define O_PROMPT 49
--#define O_READONLY 50
--#define O_RECDIR 51
--#define O_REDRAW 52
--#define O_REMAP 53
--#define O_REPORT 54
--#define O_RULER 55
--#define O_SCROLL 56
--#define O_SEARCHINCR 57
--#define O_SECTIONS 58
--#define O_SECURE 59
--#define O_SHELL 60
--#define O_SHELLMETA 61
--#define O_SHIFTWIDTH 62
--#define O_SHOWMATCH 63
--#define O_SHOWMODE 64
--#define O_SIDESCROLL 65
--#define O_SKIPDISPLAY 66
--#define O_SLOWOPEN 67
--#define O_SOURCEANY 68
--#define O_TABSTOP 69
--#define O_TAGLENGTH 70
--#define O_TAGS 71
--#define O_TERM 72
--#define O_TERSE 73
--#define O_TILDEOP 74
--#define O_TIMEOUT 75
--#define O_TTYWERASE 76
--#define O_VERBOSE 77
--#define O_W1200 78
--#define O_W300 79
--#define O_W9600 80
--#define O_WARN 81
--#define O_WINDOW 82
--#define O_WINDOWNAME 83
--#define O_WRAPLEN 84
--#define O_WRAPMARGIN 85
--#define O_WRAPSCAN 86
--#define O_WRITEANY 87
--#define O_OPTIONCOUNT 88
-+#define O_GTAGSMODE 26
-+#define O_HARDTABS 27
-+#define O_ICLOWER 28
-+#define O_IGNORECASE 29
-+#define O_INPUTENCODING 30
-+#define O_KEYTIME 31
-+#define O_LEFTRIGHT 32
-+#define O_LINES 33
-+#define O_LISP 34
-+#define O_LIST 35
-+#define O_LOCKFILES 36
-+#define O_MAGIC 37
-+#define O_MATCHTIME 38
-+#define O_MESG 39
-+#define O_MODELINE 40
-+#define O_MSGCAT 41
-+#define O_NOPRINT 42
-+#define O_NUMBER 43
-+#define O_OCTAL 44
-+#define O_OPEN 45
-+#define O_OPTIMIZE 46
-+#define O_PARAGRAPHS 47
-+#define O_PATH 48
-+#define O_PRINT 49
-+#define O_PROMPT 50
-+#define O_READONLY 51
-+#define O_RECDIR 52
-+#define O_REDRAW 53
-+#define O_REMAP 54
-+#define O_REPORT 55
-+#define O_RULER 56
-+#define O_SCROLL 57
-+#define O_SEARCHINCR 58
-+#define O_SECTIONS 59
-+#define O_SECURE 60
-+#define O_SHELL 61
-+#define O_SHELLMETA 62
-+#define O_SHIFTWIDTH 63
-+#define O_SHOWMATCH 64
-+#define O_SHOWMODE 65
-+#define O_SIDESCROLL 66
-+#define O_SKIPDISPLAY 67
-+#define O_SLOWOPEN 68
-+#define O_SOURCEANY 69
-+#define O_TABSTOP 70
-+#define O_TAGLENGTH 71
-+#define O_TAGS 72
-+#define O_TERM 73
-+#define O_TERSE 74
-+#define O_TILDEOP 75
-+#define O_TIMEOUT 76
-+#define O_TTYWERASE 77
-+#define O_VERBOSE 78
-+#define O_W1200 79
-+#define O_W300 80
-+#define O_W9600 81
-+#define O_WARN 82
-+#define O_WINDOW 83
-+#define O_WINDOWNAME 84
-+#define O_WRAPLEN 85
-+#define O_WRAPMARGIN 86
-+#define O_WRAPSCAN 87
-+#define O_WRITEANY 88
-+#define O_OPTIONCOUNT 89
-diff -NrU2 ../vi/v_ex.c ../../nvi-1.79/vi/v_ex.c
---- ../vi/v_ex.c Mon May 8 16:05:18 2000
-+++ ../../nvi-1.79/vi/v_ex.c Mon May 8 16:06:15 2000
-@@ -227,4 +227,9 @@
- EXCMD cmd;
-
-+#ifdef GTAGS
-+ if (O_ISSET(sp, O_GTAGSMODE) && vp->m_start.cno == 0)
-+ ex_cinit(&cmd, C_RTAG, 0, OOBLNO, 0, 0, ap);
-+ else
-+#endif
- ex_cinit(&cmd, C_TAG, 0, OOBLNO, 0, 0, ap);
- ex_cadd(&cmd, &a, VIP(sp)->keyw, strlen(VIP(sp)->keyw));