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
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1093
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.1093
Problem: Support for outdated tags format slows down tag parsing.
Solution: Remove FEAT_TAG_OLDSTATIC.
Files: runtime/doc/tagsrch.txt, src/feature.h, src/tag.c, src/version.c
*** ../vim-8.1.1092/runtime/doc/tagsrch.txt 2019-02-13 21:19:09.503999092 +0100
--- runtime/doc/tagsrch.txt 2019-03-30 20:56:01.965618011 +0100
***************
*** 529,556 ****
part of the gnat package.
! The lines in the tags file must have one of these three formats:
1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
! 2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
! 3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
! The first is a normal tag, which is completely compatible with Vi. It is the
! only format produced by traditional ctags implementations. This is often used
! for functions that are global, also referenced in other files.
The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR>
also works. The <CR> and <NL> characters can never appear inside a line.
! *tag-old-static*
! The second format is for a static tag only. It is obsolete now, replaced by
! the third format. It is only supported by Elvis 1.x and Vim and a few
! versions of ctags. A static tag is often used for functions that are local,
! only referenced in the file {tagfile}. Note that for the static tag, the two
! occurrences of {tagfile} must be exactly the same. Also see |tags-option|
! below, for how static tags are used.
!
! The third format is new. It includes additional information in optional
fields at the end of each line. It is backwards compatible with Vi. It is
only supported by new versions of ctags (such as Exuberant ctags).
--- 529,549 ----
part of the gnat package.
! The lines in the tags file must have one of these two formats:
1. {tagname} {TAB} {tagfile} {TAB} {tagaddress}
! 2. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} ..
! Previously an old format was supported, see |tag-old-static|.
!
! The first format is a normal tag, which is completely compatible with Vi. It
! is the only format produced by traditional ctags implementations. This is
! often used for functions that are global, also referenced in other files.
The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR>
also works. The <CR> and <NL> characters can never appear inside a line.
! The second format is new. It includes additional information in optional
fields at the end of each line. It is backwards compatible with Vi. It is
only supported by new versions of ctags (such as Exuberant ctags).
***************
*** 558,565 ****
be any identifier. It cannot contain a <Tab>.
{TAB} One <Tab> character. Note: previous versions allowed any
white space here. This has been abandoned to allow spaces in
! {tagfile}. It can be re-enabled by including the
! |+tag_any_white| feature at compile time. *tag-any-white*
{tagfile} The file that contains the definition of {tagname}. It can
have an absolute or relative path. It may contain environment
variables and wildcards (although the use of wildcards is
--- 551,557 ----
be any identifier. It cannot contain a <Tab>.
{TAB} One <Tab> character. Note: previous versions allowed any
white space here. This has been abandoned to allow spaces in
! {tagfile}.
{tagfile} The file that contains the definition of {tagname}. It can
have an absolute or relative path. It may contain environment
variables and wildcards (although the use of wildcards is
***************
*** 613,620 ****
The value '2' should be used then:
!_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~
! The other tag that Vim recognizes, but only when compiled with the
! |+multi_byte| feature, is the encoding of the tags file:
!_TAG_FILE_ENCODING<Tab>utf-8<Tab>{anything} ~
Here "utf-8" is the encoding used for the tags. Vim will then convert the tag
being searched for from 'encoding' to the encoding of the tags file. And when
--- 606,612 ----
The value '2' should be used then:
!_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~
! The other tag that Vim recognizes is the encoding of the tags file:
!_TAG_FILE_ENCODING<Tab>utf-8<Tab>{anything} ~
Here "utf-8" is the encoding used for the tags. Vim will then convert the tag
being searched for from 'encoding' to the encoding of the tags file. And when
***************
*** 653,658 ****
--- 645,665 ----
followed by white space and a '('. This will find macro names and function
names with a type prepended. {the extra searches are not in Vi}
+
+ *tag-old-static*
+ Until March 2019 (patch 8.1.1092) an outdated format was supported:
+ {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress}
+
+ This format is for a static tag only. It is obsolete now, replaced by
+ the second format. It is only supported by Elvis 1.x, older Vim versions and
+ a few versions of ctags. A static tag is often used for functions that are
+ local, only referenced in the file {tagfile}. Note that for the static tag,
+ the two occurrences of {tagfile} must be exactly the same. Also see
+ |tags-option| below, for how static tags are used.
+
+ The support was removed, since when you can update to the new Vim version you
+ should also be able to update ctags to one that supports the second format.
+
==============================================================================
6. Include file searches *include-search* *definition-search*
*E387* *E388* *E389*
*** ../vim-8.1.1092/src/feature.h 2019-03-22 17:03:01.779689390 +0100
--- src/feature.h 2019-03-30 20:48:58.697388584 +0100
***************
*** 305,316 ****
#endif
/*
! * +tag_old_static Old style static tags: "file:tag file ..". Slows
! * down tag searching a bit.
*/
- #ifdef FEAT_NORMAL
- # define FEAT_TAG_OLDSTATIC
- #endif
/*
* +cscope Unix only: Cscope support.
--- 305,313 ----
#endif
/*
! * +tag_old_static Old style static tags: "file:tag file ..".
! * Support was removed in 8.1.1093.
*/
/*
* +cscope Unix only: Cscope support.
*** ../vim-8.1.1092/src/tag.c 2019-03-30 19:11:58.530574234 +0100
--- src/tag.c 2019-03-30 20:58:31.360196405 +0100
***************
*** 1964,1991 ****
break;
}
- #ifdef FEAT_TAG_OLDSTATIC
- /*
- * Check for old style static tag: "file:tag file .."
- */
- tagp.fname = NULL;
- for (p = lbuf; p < tagp.tagname_end; ++p)
- {
- if (*p == ':')
- {
- if (tagp.fname == NULL)
- tagp.fname = tagp.tagname_end + 1;
- if (fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
- && tagp.fname[p - lbuf] == TAB)
- {
- // found one
- tagp.tagname = p + 1;
- break;
- }
- }
- }
- #endif
-
/*
* Skip this line if the length of the tag is different and
* there is no regexp, or the tag is too short.
--- 1964,1969 ----
***************
*** 2098,2107 ****
/*
* Can be a matching tag, isolate the file name and command.
*/
! #ifdef FEAT_TAG_OLDSTATIC
! if (tagp.fname == NULL)
! #endif
! tagp.fname = tagp.tagname_end + 1;
tagp.fname_end = vim_strchr(tagp.fname, TAB);
tagp.command = tagp.fname_end + 1;
if (tagp.fname_end == NULL)
--- 2076,2082 ----
/*
* Can be a matching tag, isolate the file name and command.
*/
! tagp.fname = tagp.tagname_end + 1;
tagp.fname_end = vim_strchr(tagp.fname, TAB);
tagp.command = tagp.fname_end + 1;
if (tagp.fname_end == NULL)
***************
*** 2201,2214 ****
is_static = FALSE;
if (!is_etag) /* emacs tags are never static */
#endif
! {
! #ifdef FEAT_TAG_OLDSTATIC
! if (tagp.tagname != lbuf)
! is_static = TRUE; /* detected static tag before */
! else
! #endif
! is_static = test_for_static(&tagp);
! }
/* decide in which of the sixteen tables to store this
* match */
--- 2176,2182 ----
is_static = FALSE;
if (!is_etag) /* emacs tags are never static */
#endif
! is_static = test_for_static(&tagp);
/* decide in which of the sixteen tables to store this
* match */
***************
*** 2870,2892 ****
{
char_u *p;
- #ifdef FEAT_TAG_OLDSTATIC
- int len;
-
- /*
- * Check for old style static tag: "file:tag file .."
- */
- len = (int)(tagp->fname_end - tagp->fname);
- p = tagp->tagname + len;
- if ( p < tagp->tagname_end
- && *p == ':'
- && fnamencmp(tagp->tagname, tagp->fname, len) == 0)
- {
- tagp->tagname = p + 1;
- return TRUE;
- }
- #endif
-
/*
* Check for new style static tag ":...<Tab>file:[<Tab>...]"
*/
--- 2838,2843 ----
*** ../vim-8.1.1092/src/version.c 2019-03-30 20:31:19.020816257 +0100
--- src/version.c 2019-03-30 21:03:07.281770175 +0100
***************
*** 605,615 ****
#else
"-tag_binary",
#endif
- #ifdef FEAT_TAG_OLDSTATIC
- "+tag_old_static",
- #else
"-tag_old_static",
- #endif
"-tag_any_white",
#ifdef FEAT_TCL
# ifdef DYNAMIC_TCL
--- 605,611 ----
*** ../vim-8.1.1092/src/version.c 2019-03-30 20:31:19.020816257 +0100
--- src/version.c 2019-03-30 21:03:07.281770175 +0100
***************
*** 777,778 ****
--- 773,776 ----
{ /* Add new patch number below this line */
+ /**/
+ 1093,
/**/
--
"Hit any key to continue" does _not_ mean you can hit the on/off button!
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|