summaryrefslogtreecommitdiffstats
path: root/contrib/nvi/common/main.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-04-18 23:36:52 +0000
committerjkh <jkh@FreeBSD.org>1997-04-18 23:36:52 +0000
commitc87043915bcfdce2b8ed90750a5f5ed2ee987535 (patch)
tree39809647dfb0188b77313938742b106bf2b0d919 /contrib/nvi/common/main.c
parent385cd60e059598672473eaed82f6c2bc41774df1 (diff)
downloadFreeBSD-src-c87043915bcfdce2b8ed90750a5f5ed2ee987535.zip
FreeBSD-src-c87043915bcfdce2b8ed90750a5f5ed2ee987535.tar.gz
Enable GLOBAL tags support for nvi.
Submitted-By: Shigio Yamaguchi <shigio@wafu.netgate.net>
Diffstat (limited to 'contrib/nvi/common/main.c')
-rw-r--r--contrib/nvi/common/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/nvi/common/main.c b/contrib/nvi/common/main.c
index 6fb2ed1..7e95803 100644
--- a/contrib/nvi/common/main.c
+++ b/contrib/nvi/common/main.c
@@ -64,6 +64,9 @@ editor(gp, argc, argv)
size_t len;
u_int flags;
int ch, flagchk, lflag, secure, startup, readonly, rval, silent;
+#ifdef GTAGS
+ int gtags = 0;
+#endif
char *tag_f, *wsizearg, path[256];
/* Initialize the busy routine, if not defined by the screen. */
@@ -113,11 +116,19 @@ editor(gp, argc, argv)
/* Set the file snapshot flag. */
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)
#else
while ((ch = getopt(argc, argv, "c:eFlRrSst:vw:")) != EOF)
#endif
+#endif
switch (ch) {
case 'c': /* Run the command. */
/*
@@ -154,6 +165,11 @@ editor(gp, argc, argv)
case 'F': /* No snapshot. */
F_CLR(gp, G_SNAPSHOT);
break;
+#ifdef GTAGS
+ case 'G': /* gtags mode. */
+ gtags = 1;
+ break;
+#endif
case 'l': /* Set lisp, showmatch options. */
lflag = 1;
break;
@@ -252,6 +268,10 @@ editor(gp, argc, argv)
}
if (readonly)
*oargp++ = O_READONLY;
+#ifdef GTAGS
+ if (gtags)
+ *oargp++ = O_GTAGSMODE;
+#endif
if (secure)
*oargp++ = O_SECURE;
*oargp = -1; /* Options initialization. */
OpenPOWER on IntegriCloud