projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add "ap" and "fp" notion, fix SUCC and PRED
[unix-history]
/
usr
/
src
/
usr.bin
/
ctags
/
ctags.c
diff --git
a/usr/src/usr.bin/ctags/ctags.c
b/usr/src/usr.bin/ctags/ctags.c
index
dc4220e
..
69a06b2
100644
(file)
--- a/
usr/src/usr.bin/ctags/ctags.c
+++ b/
usr/src/usr.bin/ctags/ctags.c
@@
-1,9
+1,9
@@
-static char *sccsid = "@(#)ctags.c 4.
2 (Berkeley) 10/3
/80";
+static char *sccsid = "@(#)ctags.c 4.
3 (Berkeley) 11/24
/80";
#include <stdio.h>
#include <ctype.h>
/*
#include <stdio.h>
#include <ctype.h>
/*
- * ctags
+ * ctags
: create a tags file
*/
#define reg register
*/
#define reg register
@@
-57,6
+57,7
@@
int file_num; /* current file number */
int aflag; /* -a: append to tags */
int uflag; /* -u: update tags */
int wflag; /* -w: suppress warnings */
int aflag; /* -a: append to tags */
int uflag; /* -u: update tags */
int wflag; /* -w: suppress warnings */
+int vflag; /* -v: create vgrind style index output */
int xflag; /* -x: create cxref style output */
char lbuf[BUFSIZ];
int xflag; /* -x: create cxref style output */
char lbuf[BUFSIZ];
@@
-89,6
+90,10
@@
char *av[];
case 'w':
wflag++;
break;
case 'w':
wflag++;
break;
+ case 'v':
+ vflag++;
+ xflag++;
+ break;
case 'x':
xflag++;
break;
case 'x':
xflag++;
break;
@@
-493,6
+498,8
@@
reg NODE *node;
putc(*sp, outf);
fprintf(outf, "%c\n", searchar);
}
putc(*sp, outf);
fprintf(outf, "%c\n", searchar);
}
+ else if (vflag)
+ fprintf(stdout, "%s %s %d\n", node->func, node->file, (node->lno+63)/64);
else
fprintf(stdout, "%-16s%4d %-16s %s\n",
node->func, node->lno, node->file, node->pat);
else
fprintf(stdout, "%-16s%4d %-16s %s\n",
node->func, node->lno, node->file, node->pat);