1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673
|
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/build/Makefile ./build/Makefile
*** /usr/src/usr.bin/nvi-1.66.org/build/Makefile Tue May 5 15:57:21 1998
--- ./build/Makefile Sun Aug 16 03:22:53 1998
***************
*** 3,9 ****
# from: @(#)Makefile.in 8.56 (Berkeley) 5/18/96
WARNS= 0
! CPPFLAGS+=-I${.CURDIR} -I${.CURDIR}/../include
LDADD+= -lcurses -ltermcap
DPADD+= ${LIBCURSES} ${LIBTERMCAP}
--- 3,9 ----
# from: @(#)Makefile.in 8.56 (Berkeley) 5/18/96
WARNS= 0
! CPPFLAGS+=-I${.CURDIR} -I${.CURDIR}/../include -DGTAGS
LDADD+= -lcurses -ltermcap
DPADD+= ${LIBCURSES} ${LIBTERMCAP}
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/common/main.c ./common/main.c
*** /usr/src/usr.bin/nvi-1.66.org/common/main.c Tue May 5 15:57:26 1998
--- ./common/main.c Sun Aug 16 03:27:19 1998
***************
*** 63,68 ****
--- 63,71 ----
size_t len;
u_int flags;
int ch, fd, flagchk, lflag, startup, readonly, rval, silent;
+ #ifdef GTAGS
+ int gtags = 0;
+ #endif
char *tag_f, *wsizearg;
char path[256];
***************
*** 113,123 ****
--- 116,135 ----
/* Set the file snapshot flag. */
F_SET(gp, G_SNAPSHOT);
+ #ifdef GTAGS
+ #ifdef DEBUG
+ while ((ch = getopt(argc, argv, "c:D:eFGlRrsT:t:vw:")) != EOF)
+ #else
+ while ((ch = getopt(argc, argv, "c:eFGlRrst:vw:")) != EOF)
+ #endif
+ #else
#ifdef DEBUG
while ((ch = getopt(argc, argv, "c:D:eFlRrsT:t:vw:")) != EOF)
#else
while ((ch = getopt(argc, argv, "c:eFlRrst:vw:")) != EOF)
#endif
+ #endif
+
switch (ch) {
case 'c': /* Run the command. */
/*
***************
*** 167,172 ****
--- 179,189 ----
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;
***************
*** 258,263 ****
--- 275,284 ----
{ int oargs[4], *oargp = oargs;
if (readonly) /* Command-line options. */
*oargp++ = O_READONLY;
+ #ifdef GTAGS
+ if (gtags)
+ *oargp++ = O_GTAGSMODE;
+ #endif
if (lflag) {
*oargp++ = O_LISP;
*oargp++ = O_SHOWMATCH;
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/common/options.c ./common/options.c
*** /usr/src/usr.bin/nvi-1.66.org/common/options.c Tue May 5 15:57:26 1998
--- ./common/options.c Sun Aug 16 03:29:51 1998
***************
*** 80,85 ****
--- 80,89 ----
{"filec", NULL, OPT_STR, 0},
/* O_FLASH HPUX */
{"flash", NULL, OPT_1BOOL, 0},
+ #ifdef GTAGS
+ /* O_GTAGSMODE FreeBSD, NetBSD */
+ {"gtagsmode", NULL, OPT_0BOOL, 0},
+ #endif
/* O_HARDTABS 4BSD */
{"hardtabs", NULL, OPT_NUM, 0},
/* O_ICLOWER 4.4BSD */
***************
*** 240,245 ****
--- 244,252 ----
{"eb", O_ERRORBELLS}, /* 4BSD */
{"ed", O_EDCOMPATIBLE}, /* 4BSD */
{"ex", O_EXRC}, /* System V (undocumented) */
+ #ifdef GTAGS
+ {"gt", O_GTAGSMODE}, /* FreeBSD, NetBSD */
+ #endif
{"ht", O_HARDTABS}, /* 4BSD */
{"ic", O_IGNORECASE}, /* 4BSD */
{"li", O_LINES}, /* 4.4BSD */
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/docs/USD.doc/vi.man/vi.1 ./docs/USD.doc/vi.man/vi.1
*** /usr/src/usr.bin/nvi-1.66.org/docs/USD.doc/vi.man/vi.1 Tue May 5 15:57:31 1998
--- ./docs/USD.doc/vi.man/vi.1 Sun Aug 16 03:34:12 1998
***************
*** 40,46 ****
.SH SYNOPSIS
.B ex
[\c
! .B -eFRrsv\c
] [\c
.BI -c " cmd"\c
] [\c
--- 40,46 ----
.SH SYNOPSIS
.B ex
[\c
! .B -eFGRrsv\c
] [\c
.BI -c " cmd"\c
] [\c
***************
*** 51,57 ****
.br
.B vi
[\c
! .B -eFlRrv\c
] [\c
.BI -c " cmd"\c
] [\c
--- 51,57 ----
.br
.B vi
[\c
! .B -eFGlRrv\c
] [\c
.BI -c " cmd"\c
] [\c
***************
*** 62,68 ****
.br
.B view
[\c
! .B -eFRrv\c
] [\c
.BI -c " cmd"\c
] [\c
--- 62,68 ----
.br
.B view
[\c
! .B -eFGRrv\c
] [\c
.BI -c " cmd"\c
] [\c
***************
*** 135,140 ****
--- 135,143 ----
(The default is to make a copy in case someone else modifies
the file during your edit session.)
.TP
+ .B \-G
+ Start editing in gtags mode, as if the gtagsmode option was set.
+ .TP
.B \-l
Start editing with the lisp and showmatch options set.
.TP
***************
*** 441,446 ****
--- 444,451 ----
.TP
.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-^>"
Switch to the most recently edited file.
***************
*** 952,957 ****
--- 957,965 ----
.B "rew[ind][!]"
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.
.TP
***************
*** 1121,1126 ****
--- 1129,1137 ----
.TP
.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]"
Set the spacing between hardware tab settings.
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/ex/ex.h ./ex/ex.h
*** /usr/src/usr.bin/nvi-1.66.org/ex/ex.h Tue May 5 15:57:37 1998
--- ./ex/ex.h Sun Aug 16 03:35:58 1998
***************
*** 162,167 ****
--- 162,170 ----
#define E_NEWLINE 0x00800000 /* Found ending <newline>. */
#define E_USELASTCMD 0x01000000 /* Use the last command. */
#define E_VISEARCH 0x02000000 /* It's really a vi search command. */
+ #ifdef GTAGS
+ #define E_REFERENCE 0x04000000 /* locate function references */
+ #endif
u_int32_t flags; /* Current flags. */
};
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/ex/ex_cmd.c ./ex/ex_cmd.c
*** /usr/src/usr.bin/nvi-1.66.org/ex/ex_cmd.c Tue May 5 15:57:37 1998
--- ./ex/ex_cmd.c Sun Aug 16 03:38:03 1998
***************
*** 302,307 ****
--- 302,314 ----
"!",
"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
/*
* !!!
* Adding new commands starting with 's' may break the substitute command code
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/ex/ex_tag.c ./ex/ex_tag.c
*** /usr/src/usr.bin/nvi-1.66.org/ex/ex_tag.c Tue May 5 15:57:41 1998
--- ./ex/ex_tag.c Sun Aug 16 03:46:43 1998
***************
*** 46,51 ****
--- 46,55 ----
static int compare __P((char *, char *, char *));
static void ctag_file __P((SCR *, TAGF *, char *, char **, size_t *));
static int ctag_search __P((SCR *, char *, 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 *));
static char *linear_search __P((char *, char *, char *));
***************
*** 89,94 ****
--- 93,117 ----
return (0);
}
+ #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 -- ^]
* :tag[!] [string]
***************
*** 138,143 ****
--- 161,172 ----
}
/* 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);
***************
*** 963,969 ****
--- 992,1120 ----
(void)nonblank(sp, sp->lno, &sp->cno);
return (0);
}
+ #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 --
* Search the list of tags files for a tag, and return tag queue.
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/include/ex_def.h ./include/ex_def.h
*** /usr/src/usr.bin/nvi-1.66.org/include/ex_def.h Tue May 5 15:57:42 1998
--- ./include/ex_def.h Sun Aug 16 03:49:40 1998
***************
*** 47,78 ****
#define C_RECOVER 46
#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
--- 47,79 ----
#define C_RECOVER 46
#define C_RESIZE 47
#define C_REWIND 48
! #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 -c -r -N /usr/src/usr.bin/nvi-1.66.org/include/ex_extern.h ./include/ex_extern.h
*** /usr/src/usr.bin/nvi-1.66.org/include/ex_extern.h Tue May 5 15:57:42 1998
--- ./include/ex_extern.h Sun Aug 16 03:50:24 1998
***************
*** 92,97 ****
--- 92,100 ----
char *, char **, size_t *, regex_t *, u_int));
void re_error __P((SCR *, int, regex_t *));
int ex_tag_first __P((SCR *, char *));
+ #ifdef GTAGS
+ int ex_rtag_push __P((SCR *, EXCMD *));
+ #endif
int ex_tag_push __P((SCR *, EXCMD *));
int ex_tag_next __P((SCR *, EXCMD *));
int ex_tag_prev __P((SCR *, EXCMD *));
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/include/options_def.h ./include/options_def.h
*** /usr/src/usr.bin/nvi-1.66.org/include/options_def.h Tue May 5 15:57:42 1998
--- ./include/options_def.h Sun Aug 16 03:54:45 1998
***************
*** 16,77 ****
#define O_EXTENDED 15
#define O_FILEC 16
#define O_FLASH 17
! #define O_HARDTABS 18
! #define O_ICLOWER 19
! #define O_IGNORECASE 20
! #define O_KEYTIME 21
! #define O_LEFTRIGHT 22
! #define O_LINES 23
! #define O_LISP 24
! #define O_LIST 25
! #define O_LOCKFILES 26
! #define O_MAGIC 27
! #define O_MATCHTIME 28
! #define O_MESG 29
! #define O_MODELINE 30
! #define O_MSGCAT 31
! #define O_NOPRINT 32
! #define O_NUMBER 33
! #define O_OCTAL 34
! #define O_OPEN 35
! #define O_OPTIMIZE 36
! #define O_PARAGRAPHS 37
! #define O_PRINT 38
! #define O_PROMPT 39
! #define O_READONLY 40
! #define O_RECDIR 41
! #define O_REDRAW 42
! #define O_REMAP 43
! #define O_REPORT 44
! #define O_RULER 45
! #define O_SCROLL 46
! #define O_SEARCHINCR 47
! #define O_SECTIONS 48
! #define O_SECURE 49
! #define O_SHELL 50
! #define O_SHELLMETA 51
! #define O_SHIFTWIDTH 52
! #define O_SHOWMATCH 53
! #define O_SHOWMODE 54
! #define O_SIDESCROLL 55
! #define O_SLOWOPEN 56
! #define O_SOURCEANY 57
! #define O_TABSTOP 58
! #define O_TAGLENGTH 59
! #define O_TAGS 60
! #define O_TERM 61
! #define O_TERSE 62
! #define O_TILDEOP 63
! #define O_TIMEOUT 64
! #define O_TTYWERASE 65
! #define O_VERBOSE 66
! #define O_W1200 67
! #define O_W300 68
! #define O_W9600 69
! #define O_WARN 70
! #define O_WINDOW 71
! #define O_WRAPLEN 72
! #define O_WRAPMARGIN 73
! #define O_WRAPSCAN 74
! #define O_WRITEANY 75
! #define O_OPTIONCOUNT 76
--- 16,78 ----
#define O_EXTENDED 15
#define O_FILEC 16
#define O_FLASH 17
! #define O_GTAGSMODE 18
! #define O_HARDTABS 19
! #define O_ICLOWER 20
! #define O_IGNORECASE 21
! #define O_KEYTIME 22
! #define O_LEFTRIGHT 23
! #define O_LINES 24
! #define O_LISP 25
! #define O_LIST 26
! #define O_LOCKFILES 27
! #define O_MAGIC 28
! #define O_MATCHTIME 29
! #define O_MESG 30
! #define O_MODELINE 31
! #define O_MSGCAT 32
! #define O_NOPRINT 33
! #define O_NUMBER 34
! #define O_OCTAL 35
! #define O_OPEN 36
! #define O_OPTIMIZE 37
! #define O_PARAGRAPHS 38
! #define O_PRINT 39
! #define O_PROMPT 40
! #define O_READONLY 41
! #define O_RECDIR 42
! #define O_REDRAW 43
! #define O_REMAP 44
! #define O_REPORT 45
! #define O_RULER 46
! #define O_SCROLL 47
! #define O_SEARCHINCR 48
! #define O_SECTIONS 49
! #define O_SECURE 50
! #define O_SHELL 51
! #define O_SHELLMETA 52
! #define O_SHIFTWIDTH 53
! #define O_SHOWMATCH 54
! #define O_SHOWMODE 55
! #define O_SIDESCROLL 56
! #define O_SLOWOPEN 57
! #define O_SOURCEANY 58
! #define O_TABSTOP 59
! #define O_TAGLENGTH 60
! #define O_TAGS 61
! #define O_TERM 62
! #define O_TERSE 63
! #define O_TILDEOP 64
! #define O_TIMEOUT 65
! #define O_TTYWERASE 66
! #define O_VERBOSE 67
! #define O_W1200 68
! #define O_W300 69
! #define O_W9600 70
! #define O_WARN 71
! #define O_WINDOW 72
! #define O_WRAPLEN 73
! #define O_WRAPMARGIN 74
! #define O_WRAPSCAN 75
! #define O_WRITEANY 76
! #define O_OPTIONCOUNT 77
diff -c -r -N /usr/src/usr.bin/nvi-1.66.org/vi/v_ex.c ./vi/v_ex.c
*** /usr/src/usr.bin/nvi-1.66.org/vi/v_ex.c Tue May 5 15:57:45 1998
--- ./vi/v_ex.c Sun Aug 16 03:55:38 1998
***************
*** 221,226 ****
--- 221,231 ----
ARGS *ap[2], a;
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));
return (v_exec_ex(sp, vp, &cmd));
|