264c1fb0e3
While here, use a better WRKSRC and rebase patches.
48 lines
1.3 KiB
Text
48 lines
1.3 KiB
Text
$NetBSD: patch-aq,v 1.2 2013/01/23 17:26:07 wiz Exp $
|
|
|
|
--- common/main.c.orig 2007-11-19 03:41:42.000000000 +1100
|
|
+++ common/main.c
|
|
@@ -62,6 +62,7 @@ editor(WIN *wp, int argc, char **argv)
|
|
size_t len;
|
|
u_int flags;
|
|
int ch, flagchk, lflag, secure, startup, readonly, rval, silent;
|
|
+ int gtags = 0;
|
|
char *tag_f, *wsizearg, path[256];
|
|
CHAR_T *w;
|
|
size_t wlen;
|
|
@@ -102,11 +103,13 @@ editor(WIN *wp, int argc, char **argv)
|
|
/* Set the file snapshot flag. */
|
|
F_SET(gp, G_SNAPSHOT);
|
|
|
|
+ while ((ch = getopt(argc, argv, "c:"
|
|
#ifdef DEBUG
|
|
- while ((ch = getopt(argc, argv, "c:D:eFlRrSsT:t:vw:")) != EOF)
|
|
-#else
|
|
- while ((ch = getopt(argc, argv, "c:eFlRrSst:vw:")) != EOF)
|
|
+ "D:"
|
|
#endif
|
|
+ "eF"
|
|
+ "G"
|
|
+ "lRrSsT:t:vw:")) != EOF)
|
|
switch (ch) {
|
|
case 'c': /* Run the command. */
|
|
/*
|
|
@@ -147,6 +150,9 @@ editor(WIN *wp, int argc, char **argv)
|
|
case 'l': /* Set lisp, showmatch options. */
|
|
lflag = 1;
|
|
break;
|
|
+ case 'G': /* gtags mode. */
|
|
+ gtags = 1;
|
|
+ break;
|
|
case 'R': /* Readonly. */
|
|
readonly = 1;
|
|
break;
|
|
@@ -240,6 +246,8 @@ editor(WIN *wp, int argc, char **argv)
|
|
}
|
|
if (readonly)
|
|
*oargp++ = O_READONLY;
|
|
+ if (gtags)
|
|
+ *oargp++ = O_GTAGSMODE;
|
|
if (secure)
|
|
*oargp++ = O_SECURE;
|
|
*oargp = -1; /* Options initialization. */
|