-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdctags.diff
More file actions
106 lines (99 loc) · 3.18 KB
/
dctags.diff
File metadata and controls
106 lines (99 loc) · 3.18 KB
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
Index: entry.c
===================================================================
--- entry.c (revision 781)
+++ entry.c (working copy)
@@ -141,7 +141,7 @@
static void addPseudoTags (void)
{
- if (! Option.xref)
+ if (! Option.xref || ! Option.rel)
{
char format [11];
const char *formatComment = "unknown format";
@@ -823,6 +823,10 @@
if (! tag->isFileEntry)
length = writeXrefEntry (tag);
}
+ else if (Option.rel)
+ {
+
+ }
else if (Option.etags)
length = writeEtagsEntry (tag);
else
Index: options.c
===================================================================
--- options.c (revision 781)
+++ options.c (working copy)
@@ -148,6 +148,7 @@
FALSE, /* --tag-relative */
FALSE, /* --totals */
FALSE, /* --line-directives */
+ FALSE, /* --rel */
#ifdef DEBUG
0, 0 /* -D, -b */
#endif
@@ -274,6 +275,8 @@
{1," Enable verbose messages describing actions on each source file."},
{1," --version"},
{1," Print version identifier to standard output."},
+ {1," --rel"},
+ {1," Print class rel pairs.."},
{1, NULL}
};
@@ -1365,6 +1368,13 @@
exit (0);
}
+static void processRelOption (
+ const char *const option __unused__,
+ const char *const parameter __unused__)
+{
+ Option.rel = TRUE;
+}
+
/*
* Option tables
*/
@@ -1391,6 +1401,7 @@
{ "options", processOptionFile, FALSE },
{ "sort", processSortOption, TRUE },
{ "version", processVersionOption, TRUE },
+ { "rel", processRelOption, TRUE },
};
static booleanOption BooleanOptions [] = {
Index: options.h
===================================================================
--- options.h (revision 781)
+++ options.h (working copy)
@@ -108,6 +108,7 @@
boolean tagRelative; /* --tag-relative file paths relative to tag file */
boolean printTotals; /* --totals print cumulative statistics */
boolean lineDirectives; /* --linedirectives process #line directives */
+ boolean rel; /* --rel print rel pairs */
#ifdef DEBUG
long debugLevel; /* -D debugging output */
unsigned long breakLine;/* -b source line at which to call lineBreak() */
Index: c.c
===================================================================
--- c.c (revision 781)
+++ c.c (working copy)
@@ -1154,6 +1154,9 @@
e.kindName = tagName (type);
e.kind = tagLetter (type);
+ if ((!strcmp(e.kindName, "class") || !strcmp(e.kindName, "struct")) && vStringValue(st->parentClasses))
+ printf("%50s\t --D \t %50s\n", e.name, vStringValue(st->parentClasses));
+
findScopeHierarchy (scope, st);
addOtherFields (&e, type, st, scope, typeRef);
Index: main.c
===================================================================
--- main.c (revision 781)
+++ main.c (working copy)
@@ -126,7 +126,7 @@
{
boolean toStdout = FALSE;
- if (Option.xref || Option.filter ||
+ if (Option.xref || Option.rel || Option.filter ||
(Option.tagFileName != NULL && (strcmp (Option.tagFileName, "-") == 0
#if defined (VMS)
|| strcmp (Option.tagFileName, "sys$output") == 0