1 2007-05-18 Francesco Potortì <pot@gnu.org>
3 * etags.c: Extern definitions of some more pointer functions for
4 standalone compilation, especially important for 64bit platforms.
5 (main, print_help): --members is now the default for etags.
6 (C_entries): Parse start of C comment as a space == end of token.
7 This is not necessary for C++ comment, already parsed as newline.
9 2007-02-05 Francesco Potortì <pot@gnu.org>
11 * etags.c (default_C_help, Cplusplus_help, PHP_help, print_help)
12 (main): Now --members is the default for etags, not for ctags yet.
14 2007-01-02 Francesco Potortì <pot@gnu.org>
16 * etags.c (longopts): New undocumented option --no-duplicates.
17 (no_duplicates): Static variables for the above option.
18 (print_help): Do not print help for --no-warn, now undocumented.
19 (add_node): Allow duplicate tags in ctags mode unless --no-duplicates.
20 (main): Pass the -u option to sort in ctags mode.
22 2006-12-28 Francesco Potortì <pot@gnu.org>
24 * etags.c (readline): When creating a relative file name from a
25 #line directive, leave the file name alone. The previous
26 behaviour was to make it relative to the tags file directory,
27 under the hypothesis that the #line directive file name was
28 relative to the directory of the tagged file. That hypothesis is
29 wrong with Cpp and Lex.
31 2006-12-20 Francesco Potortì <pot@gnu.org>
33 * etags.c (C_entries): DEFUN names were longer by one: corrected.
34 (Makefile_targets): Do not include spaces in tag names.
36 2006-08-12 Kevin Ryde <user42@zip.com.au>
38 * etags.c (readline): Check for double quote after #line.
40 2006-08-12 Jan Djärv <jan.h.d@swipnet.se>
42 * etags.c (readline): sscanf could in principle return 2.
44 2006-08-12 Francesco Potortì <pot@gnu.org>
46 * etags.c (readline): lno is unsigned.
47 (TeX_commands): Use p++ (rather than *p++) to increment p.
48 (Lua_functions): Explicitely discard LOOKING_AT's return value.
50 2006-08-07 Masatake YAMATO <jet@gyve.org>
52 * etags.c (TEX_mode): Check getc retruns EOF.
53 File ended without newline causes infinite loop.
55 2002-07-14 Adrian Aichner <adrian@xemacs.org> (tiny change)
57 * etags.c: It's XEmacs, not Xemacs: change all the occurences.
59 2006-07-10 Francesco Potortì <pot@gnu.org>
61 * etags.c [ETAGS_REGEXPS]: #ifdef's deleted, define unconditionally.
62 [LONG_OPTIONS]: Changed to NO_LONG_OPTIONS, now normally undefined.
63 (Objc_suffixes): Suggest using --lang=c for full help.
64 (C_entries): Initialise savetoken to 0 to shut up the compiler.
66 2006-07-10 Francesco Potortì <pot@gnu.org>
68 * etags.c (absolute_filename): Free unused space (cosmetic change).
69 (in_word_set): In C, also tag #undef symbols.
71 2006-05-02 Francesco Potortì <pot@gnu.org>
73 * etags.c (Perl_functions): Free space allocated for var package.
74 (Erlang_functions): Possibly free space allocated for var last.
75 (Prolog_functions): Possibly free space allocated for var last.
77 2005-11-18 Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp> (tiny change)
79 * etags.c (main): Cxref mode writes to stdout: do not close tagf,
80 which was never opened.
82 2005-09-27 Francesco Potortì <pot@gnu.org>
84 * etags.c: Preliminary Forth support.
85 (prolog_pr): Cast strlen to int before comparison.
86 (LOOKING_AT, LOOKING_AT_NOCASE): Let the preprocessor check that
87 the second argument is indeed a literal string.
88 (main): In append mode, sort the tags file after writing it.
90 2005-09-27 Emanuele Giaquinta <emanuele.giaquinta@gmail.com> (tiny change)
92 * etags.c (longopts, print_help, main): The -a (--append) option
93 can be used in ctags also; for one, the Linux make file uses it.
95 2004-09-13 Francesco Potortì <pot@gnu.org>
97 * etags.c (main): When relative file names are given as argument,
98 make them relative to the current working dir, rather than
99 relative to the output tags file, if the latter is in /dev.
101 2004-09-13 David A. Capello <dacap@users.sourceforge.net> (tiny change)
103 * etags.c: (Lua_suffixes, Lua_help, lang_names, Lua_functions):
104 Support the Lua scripting language <http://www.lua.org>.
106 2004-09-13 Francesco Potortì <pot@gnu.org>
108 * etags.c [EXIT_SUCCESS, EXIT_FAILURE]: Define them when no
109 <stdlib.h> is available.
110 (enum sym_type): New st_C_attribute value for parsing
111 gcc's __attribute__. Deleted st_C_typespec value.
112 (gperf, in_word_set): Use gperf 3, options changed. Added the
113 __attribute__ keyword, removed all the st_C_typespec keywords,
114 changed attribute for Java to (C_JAVA & !C_PLPL).
115 (inattribute): New global bool, part of the C state machine.
116 (cblev): Identifier renamed to bracelev throughout.
117 (consider_token, C_entries): Numerous changes for making the
118 parser more robust and adding support for __attribute__.
120 2004-09-08 Francesco Potortì <pot@gnu.org>
122 * etags.c: Add arch taglines
123 [LONG_OPTIONS]: make it TRUE (ifdef) or FALSE for ease of use.
124 [GOOD, BAD]: renamed to EXIT_SUCCESS, EXIT_FAILURE.
125 (suggest_asking_for_help): Fix having macros in a printf statement.
126 (consider_token): check C++ `operator' only when the token len is
129 2003-01-09 Francesco Potortì <pot@gnu.org>
131 * etags.c: changes for language-sepcific help by Philippe
132 Waroquiers <wao@cfmu.eurocontrol.be> applied and largely revised.
133 (language): Added a `help' member.
134 (arg_type): Added an at_end constant.
135 (plain_C_suffixes): Some items removed from here.
136 (Objc_suffixes): And put here (new constant).
137 (Ada_help, Asm_help, default_C_help, Cplusplus_help, Cjava_help,
138 Cobol_help, Erlang_help, Fortran_help, HTML_help, Lisp_help,
139 Makefile_help, Objc_help, Pascal_help, Perl_help, PHP_help,
140 PS_help, Prolog_help, Python_help, Scheme_help, TeX_help,
141 Texinfo_help, Yacc_help, auto_help, none-help, no_lang_help): New
143 (PS_functions, PS_suffixes): Renamed from Postscript_functions and
145 (lang_names): Adapted to the new language structure, new language
146 "objc" added (was previously merged with "proc").
147 (print_language_names): Some help strings corrected.
148 (print_help): Now takes an argument and possibly prints lang help.
149 (print_help): Some help strings corrected. Documents
150 language-specific help.
151 (main): Only print help after having parsed all the arguments.
153 2002-09-03 Francesco Potorti` <pot@gnu.org>
155 * etags.c (regex_tag_multiline, readline): Never pass pfnote a
156 string that cannot be freed.
158 2002-08-30 Francesco Potorti` <pot@gnu.org>
160 * etags.c (consider_token, C_entries): Switch to C++ parsing when
161 auto-detection is enabled and the `::' qualifier is met.
162 (consider_token, C_entries): Several bugs corrected that tagged
163 some declarations even though --declarations was not used.
166 (C_entries): Several cosmetic changes.
167 (C_entries): Invalidate the token is some cases.
169 2002-08-29 Francesco Potorti` <pot@gnu.org>
171 * etags.c (C_entries): Corrected a problem with const C++ funcs.
172 (ignoreindent): Renamed from noindentypedefs.
173 (cjava, cplpl): They are now macros instead of local vars.
175 2002-08-28 Francesco Potorti` <pot@gnu.org>
177 * etags.c (HTML_labels): Tag ID= also.
179 2002-08-27 Francesco Potorti` <pot@gnu.org>
181 * etags.c (Ada_funcs): Do not tag "use type Xxxx;".
183 2002-06-25 Francesco Potorti` <pot@gnu.org>
185 * etags.c: New language HTML.
186 (make_tag): Never generate null length tag names.
187 (linebuffer_init): Renamed from initbuffer. All callers changed.
188 (pattern): Structure renamed to `regexp', member regex renamed to
190 (node_st): Member pat renamed to regex.
191 (pattern); New member force_explicit_name, for future use. Now
192 always set to true, cannot be reset.
193 (add_regex, regex_tag_multiline, readline): Use it.
194 (main): Free some global structures.
196 2002-06-21 Francesco Potorti` <pot@gnu.org>
198 * etags.c (fdesc): New member `written'.
199 (readline, process_file): Initialise it.
200 (put_entries): Set it.
201 (main): Use it to create entries for files without tags.
202 (total_size_of_entries): Do not count invalid tags.
203 (etags_strcasecmp): Like BSD's, for compatibility.
204 (strcaseeq): Make it into a macro.
206 2002-06-21 Francesco Potorti` <pot@gnu.org>
208 * etags.c: (F_getit, Fortran_functions, Ada_getit, Asm_labels)
209 (Python_functions, PHP_functions, PHP_functions, PHP_functions)
210 (PHP_functions, PHP_functions, Cobol_paragraphs)
211 (Makefile_targets, Postscript_functions, Texinfo_nodes)
212 (prolog_pr, erlang_func, erlang_attribute)
213 (Perl_functions, Perl_functions, Pascal_functions)
214 (TeX_commands, get_tag): Use make_tag instead of pfnote.
215 (get_tag): Prototype changed, all callers changed.
217 2002-06-20 Francesco Potorti` <pot@gnu.org>
219 * etags.c: Use, together with etags.el, an optimised form of tags,
220 which are almost always unnamed. etags.el looks for an explicit
221 tag name, then for an implicit one. See make_tag for details.
222 The change is both forwards and backwards compatible.
223 (make_tag): New function (was the disabled function new_pfnote).
224 (make_C_tag): Use it.
226 2002-06-19 Francesco Potorti` <pot@gnu.org>
228 * etags.c (add_regex): Invalid regexp modifiers are ignored.
229 (Makefile_targets): Tag variables unless --no-globals.
230 (LOOP_ON_INPUT_LINES): Serious bug corrected.
232 2002-06-13 Francesco Potorti` <pot@gnu.org>
234 * etags.c (erlang_atom, erlang_attribute): Bugs corrected.
235 (invalidate_nodes): Bug corrected.
236 (print_help): Better help for regexps.
238 2002-06-12 Francesco Potorti` <pot@gnu.org>
240 * etags.c (arg_type): at_icregexp label removed (obsolete).
241 (pattern): New member multi_line for multi-line regexps.
242 (filebuf): A global buffer containing the whole file as a string
243 for multi-line regexp matching.
244 (need_filebuf): Global flag raised if multi-line regexps used.
245 (print_help): Document new regexp modifiers, remove references to
246 obsolete option --ignore-case-regexp.
247 (main): Do not set regexp syntax and translation table here.
248 (main): Treat -c option as a backward compatibility hack.
249 (main, find_entries): Init and free filebuf.
250 (find_entries): Call regex_tag_multiline after the regular parser.
251 (scan_separators): Check for untermintaed regexp and return NULL.
252 (analyse_regex, add_regex): Remove the ignore_case argument, which
253 is now a modifier to the regexp. All callers changed.
254 (add_regex): Manage the regexp modifiers.
255 (regex_tag_multiline): New function. Reads from filebuf.
256 (readline_internal): If necessary, copy the whole file into filebuf.
257 (readline): Skip multi-line regexps, leave them to regex_tag_multiline.
259 2002-06-11 Francesco Potorti` <pot@gnu.org>
261 * etags.c (add_regex): Better check for null regexps.
262 (readline): Check for regex matching null string.
264 2002-06-07 Francesco Potorti` <pot@gnu.org>
266 * etags.c (find_entries): Reorganisation.
268 2002-06-07 Francesco Potorti` <pot@gnu.org>
270 * etags.c (scan_separators): Support all character escape
271 sequences supported by gcc.
272 (find_entries): rewind unconditionally.
273 (find_entries): Do not call language functions directly, now calls
275 (find_entries): Do general initialisations here.
276 (CNL_SAVE_DEFINEDEF, C_entries, LOOP_ON_INPUT_LINES, F_getit)
277 (Ada_getit, Pascal_functions, Pascal_functions)
278 (prolog_skip_comment): Do not do them here.
279 (readline_internal): Increment lineno here.
280 (readline): Conditionally undo readline_internal increment.
281 (readline): Do not return a value.
283 2002-06-06 Francesco Potorti` <pot@gnu.org>
285 * etags.c (enum arg_type): New label at_stdin.
286 (STDIN): New constant.
287 (parsing_stdin): New flag.
288 (longopts): New option --parse-stdin=NAME.
289 (print_help): Document it.
291 (process_file): Split into process_file and process_file_name.
292 (process_file_name): New function.
294 2002-06-06 Francesco Potorti` <pot@gnu.org>
296 * etags.c (main): Avoid a buffer overrun with sprintf.
297 (TEX_cmt): Make it a static char and move it before TeX_commands.
298 (TeX_commands): Skip comments.
299 (TEX_defenv): Now contains more contructs.
300 (TeX_commands): Shorten the tag to the brace after the name.
301 (TeX_commands): Allow for names with embedded spaces.
302 (TeX_commands): Names now include the initial backslash.
303 (TeX_commands): Names do not include numeric args #n.
304 (TeX_commands): Correct line char number in tags.
305 (TEX_tabent, TEX_token): Deleted.
306 (TeX_commands, TEX_decode_env): Streamlined.
308 2002-05-31 Paul Eggert <eggert@twinsun.com>
310 * etags.c (main): Use `sort -o TAGFILE TAGFILE' instead of
311 `sort TAGFILE -o TAGFILE', as POSIX 1003.1-2001 disallows
314 2002-04-22 Francesco Potorti` <pot@gnu.org>
316 * etags.c: (last_node): Make it a global variable.
317 (process_file): Print the tags from the nodes as soon as
318 possible, and delete the nodes. This brings down the memory
319 occupancy as etags to almost the same level as when the #line
320 directives were not parsed.
321 (free_fdesc): New function.
322 (find_entries): Use it.
323 (invalidate_nodes): In etags mode, do not just mark the nodes as
324 invalid, do delete them.
326 2002-04-16 Francesco Potorti` <pot@gnu.org>
328 * etags.c (find_entries): Bug fix in list management.
330 2002-04-15 Francesco Potorti` <pot@gnu.org>
332 * etags.c (get_language_from_filename): Add one argument.
333 (strcaseeq): New function.
334 (get_language_from_filename): Use it to do a case insenstitive
335 comparison if called with appropriate args.
336 (find_entries): Try with case insensitive match.
337 (process_file): Bug fixed.
339 2002-04-13 Francesco Potorti` <pot@gnu.org>
341 * etags.c (find_entries): Delete tags previously obtained from
342 file xxx.c's #line directives when parsing file xxx.y. This is
343 generally done for automatically generated files containing
344 #line directives. This handles the case when xxx.y is tagged
345 before xxx.c, and the entries of xxx.c pointing to xxx.y should
347 (language): Added the metasource member. Initializers changed.
348 (invalidate_nodes): New function.
350 2002-03-21 Francesco Potorti` <pot@gnu.org>
352 * etags.c (readline): Discard lines after having found a #line
353 directive pointing to an already tagged file. This handles the
354 case when xxx.y is tagged before xxx.c, and the entries of
355 xxx.c pointing to xxx.y should be discarded.
357 2002-03-15 Francesco Potorti` <pot@gnu.org>
359 * etags.c (fdesc): New structure for keeping track of input files.
360 (fdesc): Remove `file' member (a string) and use instead a pointer
361 to a file description structure.
362 (curfile, curfiledir, curtagfname, curlang, nocharno,
363 forced_lang): Global variables removed in favor of fdhead and
364 curfdp, pointers to file description strucures.
365 (longopts, main, print_help): Use the CTAGS conditional to include
366 or exclude options that work on etags or ctags only.
367 (process_file, find_entries, pfnote, add_node, put_entries,
368 readline): Use fdhead and curfdp.
369 (process_file, find_entries): Do not take an arg string, all
372 2002-03-13 Francesco Potorti` <pot@gnu.org>
374 * etags.c (longopts, print_help, main): Test CTAGS to disallow
375 options that are not right for either etags or ctags.
377 2002-03-12 Francesco Potorti` <pot@gnu.org>
379 * etags.c (number_len, total_size_of_entries): Define them also
380 in CTAGS mode, because gcc does not compile all refs away.
381 (Python_functions, PHP_functions): Name tags, for ctags' sake.
382 (TeX_commands): Name tags. Correction of old disabled code.
384 2002-03-06 Francesco Potorti` <pot@gnu.org>
386 * etags.c (Python_functions): Consider indented "def" and "class".
388 2002-03-05 Francesco Potorti` <pot@gnu.org>
390 * etags.c (curfiledir, curtagfname): New global variables.
391 (process_file): Initialise them.
392 (readline): Canonicalize the name found in #line directive.
394 2002-03-05 Francesco Potorti` <pot@gnu.org>
396 * etags.c: Honour #line directives.
397 (no_line_directive): New global var; set it for old behaviour.
398 (main): Remove some #ifdef in the getopt switch.
399 (add_node, put_entries): Code added to merge different chunks of
400 nodes referring to the same file. Currently the tags are just
401 appended, without any check for duplicates.
402 (Perl_functions): Do not special case ctags.
403 (readline): Identify #line directives and do the right thing.
404 (nocharno, invalidcharno): New global vars.
405 (process_file): Reset nocharno.
406 (readline): Set nocharno.
407 (pfnote): Read nocharno and maybe put invalidcharno in node.
408 (total_size_of_entries, put_entries): Use invalidcharno.
410 2002-03-04 Francesco Potorti` <pot@gnu.org>
412 * etags.c: Keep the whole tag table in memory, even in etags mode.
413 (main): Call put_entries here even in CTAGS mode.
414 (main, process_file): Check the return values of fclose and pclose.
415 (process_file): Do not call put_entries after parsing each file.
416 (process_file): Canonicalise file names even for ctags.
417 (process_file): Set curfile here...
418 (find_entries): ... not here any more.
419 (add_node): In etags mode, build a linked list of entries (on
420 right pointer) for each file, and link the first entry of each
422 (put_entries): Print here the name of the file.
423 (put_entries): Print the entries starting from the first file.
424 (number_len, total_size_of_entries): Define these only iin etags
425 mode, make the second work only on the right nodes.
427 2002-01-03 Francesco Potorti` <pot@gnu.org>
429 * etags.c: Make all global variables static.
431 2001-12-21 Francesco Potorti` <pot@gnu.org>
433 * etags.c (Perl_functions): Tag packages and use them in sub tags.
434 (get_tag): Return a pointer to the tag that is found.
436 2001-12-21 Francesco Potorti` <pot@gnu.org>
438 * etags.c (LOOKING_AT): Use !intoken instead of iswhite.
439 (F_takeprec): Renamed from takeprec. All callers changed.
440 (F_getit): Renamed from getit. All callers changed.
441 (nocase_tail): Renamed from tail. All callers changed.
442 (Ada_getit): Renamed from adagetit. All callers changed.
443 (L_getit): Simplified by using get_tag.
444 (Perl_functions, Postscript_functions, erlang_attribute): Use the
446 (notinname): Removed '[' and added ')' to the recognised chars.
447 (LOOKING_AT, get_tag, PHP_functions): Use notinname.
448 (Ada_getit, Ada_funcs, Python_functions, Scheme_functions):
449 Clarified, using strneq or notinname.
450 (L_isdef, L_isquote): Removed.
451 (Lisp_functions, L_getit): Clarified.
453 2001-12-17 Francesco Potorti` <pot@gnu.org>
455 * etags.c: [P_]: Renamed to __P for consistency with config.h.
456 [HAVE_CONFIG_H]: Let config.h deal with __P.
457 [__STDC__] [!HAVE_CONFIG_H]: Define PTR as in config.h.
458 [!__STDC__] [!HAVE_CONFIG_H]: Do not undefine static, because
460 [HAVE_CONFIG_H] [!PTR]: Define PTR (for use with Xemacs).
461 [HAVE_CONFIG_H] [!__P]: Define __P (for use with Xemacs).
462 (xmalloc, xrealloc): Use PTR instead of long *.
463 (bool): Make it a define, not a typedef, for C++ compilers.
464 (pattern): Members renamed to avoid name clash in some C++ compilers.
465 (get_language_from_langname): Use const argument.
467 2001-12-12 Francesco Potorti` <pot@gnu.org>
469 * etags.c (PHP_functions): New function by Diez B. Roggisch,
470 heavily adapted by me, for parsing PHP.
471 (LOOKING_AT): New macro.
472 (Perl_functions, Python_functions, PHP_functions)
473 (Scheme_functions, Texinfo_nodes): Use it.
474 (Perl_functions): Use strneq.
475 (prolog_pred): Renamed to prolog_pr.
476 (prolog_pr): Recognise Prolog rules (thanks to Geert Kloosterman)
477 in addition to predicates.
478 [ETAGS_REGEXPS] [!HAVE_CONFIG_H] [__CYGWIN__]: Prevent
479 unmodified compile, as Cygwin's regex.h is incompatible with us
480 (thanks to Markus Hoenicka).
481 [!HAVE_CONFIG_H] [!__STDC__]: #define const as the empty string.
483 2001-05-11 Francesco Potorti` <pot@gnu.org>
485 * etags.c (add_regex): Reset the whole newly allocated pattern
486 buffer instead of the individual members. It's safer and works
489 2001-02-23 Francesco Potorti` <pot@gnu.org>
491 * etags.c (enum sym_type): New label st_C_template.
492 (gperf input): Use it for switching to C++ from C.
493 (consider_token): Do it.
495 2001-02-16 Francesco Potorti` <pot@gnu.org>
497 * etags.c (C_entries): Initialise typdefcblev to quiet compilers.
499 2001-02-06 Francesco Potorti` <pot@gnu.org>
501 * etags.c [!HAVE_CONFIG_H] [!__STDC__]: #define static as nothing.
503 2001-01-31 Francesco Potorti` <pot@gnu.org>
505 * etags.c: [NDEBUG] #undef assert and #define it as ((void)0), for
506 the sake of some buggy assert.h (e.g. in MinGW and sunos4 pcc).
507 (C_entries): Tag token renamed to still_in_token because sunos4
508 pcc wants to expand it as the token() macro even though it has no
511 2001-01-30 Francesco Potorti` <pot@gnu.org>
513 * etags.c: [WIN32-NATIVE]: #undef MSDOS, #undef WINDOWSNT and
514 #define it for the sake of Xemacs.
515 [WINDOWSNT]: #undef HAVE_NTGUI even if built without
516 HAVE_CONFIG_H. This change only affects a standalone etags.
517 [WINDOWSNT]: #undef DOS_NT and #define it even if built with
518 HAVE_CONFIG_H. This change does nothing in Emacs, as DOS_NT is
519 always defined when HAVE_CONFIG_H and WINDOWS are both defined.
520 [!HAVE_UNISTD_H]: use defined(WINDOWSNT) instead of the bare
521 WINDOWSNT, as this is the correct way to use it.
523 2001-01-28 Francesco Potorti` <pot@gnu.org>
525 * etags.c: Be capable to parse nested struct-like structures.
526 (structdef, structtag): Struct state machine revisited.
527 (struct tok): Revisited.
528 (cstack, nestlev, instruct): New struct and macros.
529 (pushclass_above, popclass_above, write_classname): New functions
530 for dealing with nested class names, inspired by Mykola Dzyuba.
531 (consider_token, make_C_tag, C_entries): Many changes for dealing
532 with arbitrarily nested structures.
533 (etags_getcwd): #if MSDOS, not #ifdef MSDOS!
534 (C_entries): Consider templates in C++.
535 (sym_type): New constant st_C_class for detecting "class" also in
537 (C_AUTO): New macro for automatic detection of C++.
538 (consider_token): Automatic set C++ mode.
539 (C_entries): New security check for yacc.
540 (print_language_names, print_help): Mention the autodetect
541 feature, do not show help for the -C option, now mostly useless.
542 (C_entries): Tag C++ forward declarations if --declarations.
543 (C_entries): Don't be fooled by things like XDEFUN.
544 (consider_token): Discard asm pseudo function.
546 2001-01-25 Francesco Potorti` <pot@potorti.it>
548 * etags.c (struct tok): Renamed from struct token.
549 (token): Renamed from tok.
550 (structtype): Make it a local variable.
552 (xrnew): Change the synopsis.
553 (typedefs_or_cplusplus): Renamed from typedefs_and_cplusplus.
554 (grow_linebuffer): Don't call xrnew when not needed.
555 (token): buffer renamed to line.
556 (C_entries): Three calls to inibuffer moved here from main.
557 (C_entries): Removed all references to var methodlen, delete it.
558 (linebuffer_setlen): Was grow_buffer, now also sets len.
559 (consider_token, C_entries, Pascal_functions): Use it.
560 (C_entries): Preventing problems relative to extern "C".
561 (C_entries): Can tag more than one variable or func separated by
562 comma when --declarations is used.
563 (C_entries): More accurate tagging of members and declarations.
564 (yacc_rules): Was global, made local to C_entries.
565 (next_token_is_func): Removed.
566 (fvdef): New constants fdefunkey, fdefunname.
567 (consider_token, C_entries): Use them.
568 (C_entries): Build proper lisp names for Emacs DEFUNs.
570 2001-01-15 Francesco Potorti` <pot@pot.cnuce.cnr.it>
572 * etags.c (print_language_names): Print filenames in addition to
575 2001-01-12 Francesco Potorti` <pot@gnu.org>
577 * etags.c (get_language_from_langname): Renamed from
578 get_language_from_name.
579 (get_language_from_filename): Renamed from
580 get_language_from_suffix. Now first looks for the complete file
582 (language): New member char **filenames.
583 (Makefile_filenames): List of possible filenames for makefiles.
584 (lang_names): Added a NULL member for every entry, added an entry
586 (Makefile_targets): New function, inspired by Assar Westerlund
589 2000-11-07 Francesco Potortì <pot@pot.cnuce.cnr.it>
591 * etags.c (Texinfo_nodes): Renamed from Texinfo_fuctions and made
592 it conformant to the style of the rest of the code.
594 2000-02-10 Francesco Potorti` <pot@gnu.org>
596 * etags.c (iswhite): Redefined not to consider '\0' as white
597 space, and use it throughout in place of isspace, thus preventing a
598 potential signed char to int conversion problem.
599 (MSDOS): #undefine befere redefining
601 2000-02-04 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
603 * etags.c (many functions): Add prototypes.
605 2000-01-31 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
607 * etags.c [MSDOS]: Set MSDOS to 1 if #defined, 0 otherwise.
608 (get_compressor_from_suffix, process_file): Use MSDOS in if clause.
609 (etags_strchr, etags_strrchr): Use const char * and int as arguments.
610 (getenv, getcwd): Only declare them if necessary.
611 (EMACS_NAME): New constant macro.
612 (print_version): Use it.
613 (P_) [__STDC__]: Macro for defining function prototypes.
615 2000-01-18 Fabrice Popineau <Fabrice.Popineau@supelec.fr>
617 * etags.c [WINDOWSNT]: #include <direct.h>
619 2000-01-18 Martin Buchholz <martin@xemacs.org>
621 * etags.c (all functions): Made them static.
622 (all functions): Write prototypes.
624 1999-11-19 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
626 * etags.c (_GNU_SOURCE): Define only if undefined.
627 (get_scheme): Declaration deleted.
628 (main): error was called with an integer as second arg, instead of
630 (canonicalize_filename): Bug removed.
632 1999-11-18 Dave Love <d.love@dl.ac.uk>
634 * etags.c (C_entries): Rename label `intoken', avoiding K&R
635 lossage from name clash with macro.
637 1999-09-14 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
639 * etags.c: Add suffix psw for PSWrap.
640 (L_getit): Generalize a "cp!=' '" into "!isspace(*cp)".
641 (Postscript_functions): Add code for PSWrap.
642 (Scheme_functions): Use local pointer and new get_tag function.
643 (get_tag): New name for old get_scheme.
644 (process_file): Do not free NULL when file does not exist.
645 (typdef): ttypedefseen renamed to tkeyseen, new label ttypeseen.
646 (C_entries): Modifications that make --members tag even inside
647 typedefs and C nested structs (one level only).
648 (consider_token): Corrected a bug which prevented tagging of enum
650 (C_stab_entry): Added if, for, while, switch, return as
651 st_C_ignore. This makes it simpler to work when cblev!=0.
653 1999-04-21 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
655 * etags.c (C_entries): tag member function declarations when
656 --declarations is used.
658 1999-04-20 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
660 * etags.c (C_entries, consider_token): C++ `operator' now is
661 tagged in most cases.
662 As before, :: is not recognised if surrounded by spaces.
664 1999-01-14 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
666 * etags.c (relative_filename): Account for DOS file names such
667 that is impossible to make one relative to another.
669 1998-10-09 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
671 * etags.c (sym_type): New st_C_extern tag.
672 (gperf input): Use it for spotting external declarations.
673 (print_help): Document the new behaviour of --declarations.
674 (fvextern): New global variable.
675 (consider_token, C_entries): Use it.
677 1998-06-19 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
679 * etags.c (HAVE_GETCWD) [WINDOWSNT]: Define if undefined.
680 (etags_getcwd): Remove test for WINDOWSNT.
682 1998-06-16 Eli Zaretskii <eliz@is.elta.co.il>
684 * etags.c (process_file) [MSDOS]: If foo.c.gz is not found, try
685 foo.cgz, foo.cz, etc.
687 1998-06-15 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
689 * etags.c (declarations): New global switch.
690 (longopts): Describe it.
691 (print_help): Document it.
693 (process_file): Don't process a file twice.
695 1998-06-02 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
697 * etags.c (Fortran_functions): No tags for "procedure".
699 1998-05-29 Eli Zaretskii <eliz@is.elta.co.il>
701 * etags.c (get_compressor_from_suffix): Second argument EXTPTR, if
702 non-zero, returns a pointer to where the extension begins; callers
704 [MSDOS]: Support DOS file names by handling e.g. foo.cgz as if it
707 1998-05-18 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
709 * etags.c (sym_type, C_stab_entry): New constant st_C_operator.
710 (fvdev): New constant foperator.
711 (consider_token): Use it to get "operator" in C++.
712 (C_entries): Extend length of operator@ function name.
713 (C_entries): Use foperator when necessary.
715 1998-05-13 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
717 * etags.c (main) [!ETAGS_REGEXPS]: Do not call free_patterns.
719 1998-05-12 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
721 * etags.c (compressor): New struct for compressed files.
722 (get_compressor_from_suffix): New function.
723 (get_language_from_suffix): Use it. Also, semantics changed.
724 (process_file): Consider compressed files, close file.
725 (find_entries): Use different call arg for get_language_from_suffix,
728 1998-05-11 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
730 * etags.c (main): Call free_tree.
731 (find_entries): Do not free curfile.
732 (pfnote): Cosmetic change: NULL and '\0' where appropriate.
733 (prolog_pred, erlang_func, substitute): Cast strlen to int when
735 (canonicalize_filename): Shut up compiler warning.
736 (Perl_functions): Make tag significant.
738 1997-11-27 Dave Love <d.love@dl.ac.uk>
740 * etags.c (longopts, optstring): New option --ignore-case-regex (-c).
741 (argument_type): New member at_icregexp.
742 (lc_trans): New global.
743 (main): Fill lc_trans. Process -c args.
744 (add_regex): New arg determining whether to use translation table.
745 (analyse_regex): New arg. Use it for add_regex.
747 1997-09-30 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
749 * etags.c (init): Cosmetic change: NULL --> '\0'.
750 (erlang_attribute): Bug corrected (uninitialized variable).
751 (filename_is_absolute): New function replaces absolutefn macro and
752 corrects a bug. All callers changed.
753 (canonicalize_filename): New function.
754 (process_file, etags_getcwd, absolute_dirname): Use it.
755 (relative_filename, absolute_filename): Removed var shadowing.
756 (C_entries, Pascal_functions): Add fake initializations to keep
758 (TeX_functions, Prolog_functions, Erlang_functions): Cleanup.
760 1997-09-20 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
762 * etags.c (xrnew): New macro. All callers of xrealloc changed.
763 (language): New typedef (was struct lang_entry).
764 (curlang): New global variable.
765 (node): typedef renamed from NODE.
766 (linebuffer): New typedef (was struct linebuffer).
767 (pattern): New typedef (was struct pattern). Some members added.
768 Now used as element of a linked list.
769 (patterns, num_patterns): Global variables deleted.
770 (p_head): New global variable.
771 (forced_lang): New global variable (replaces lang_func).
772 (get_language_from_name, get_language_from_interpreter,
773 get_language_from_suffix): Semantics changed. All callers changed.
774 (last_node): New global variable.
775 (free_tree, add_node, put_entries, total_size_of_entries): Change
776 name of local vars to avoid clashes with typedef node.
777 (number_len): Rewritten for elegance.
778 (token): New typedef replaces TOKEN.
779 (analyse_regex, add_regex): Rewritten for new functionality.
780 (free_patterns): New function called from main and add_regex.
781 (initbuffer, readline_internal, readline, grow_linebuffer):
782 Change name of local vars to avoid clashes with typedef
784 (readline): Rewritten for new functionality.
786 1997-09-04 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
788 * etags.c: (Scheme_suffixes): New suffix ".ss".
789 (print_help): --globals is now used for more than C-type languages.
790 (Perl_functions): Tag global variables ("my" and "local").
792 1997-08-22 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
794 * etags.c (print_help): Some messages clarified.
795 (LOOP_ON_INPUT_LINES): New macro.
796 (just_read_file, Fortran_functions, Asm_labels, Perl_functions,
797 Python_functions, Cobol_paragraphs, Pascal_functions,
798 Lisp_functions, Postscript_functions, Scheme_functions,
799 TeX_functions, Prolog_functions, Erlang_functions): Use it.
800 (Cobol_paragraphs, Postscript_functions, TeX_functions,
801 Prolog_functions, Erlang_functions): Use a local variable instead
802 of the global variable dbp.
803 (Pascal_functions, L_isquote, Scheme_functions): Use GNU coding
804 standard indentation.
806 1997-08-21 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
808 * etags.c (Python_suffixes, lang_names, Python_functions): Python
810 (skip_spaces, skip_non_spaces): Utility functions.
811 (find_entries, takeprec, getit, Fortran_functions, Perl_functions,
812 Python_functions, L_getit, Lisp_functions, Scheme_functions,
813 prolog_pred, erlanf_func, erlang_attribute): Use them.
814 (eat_white): Deleted.
816 1997-08-20 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
818 * etags.c (CHAR, init): Keep into account non US-ASCII
819 characters and compilers with default signed chars.
820 (L_getit): Tag "(defstruct (foo", "(defun (operator" and similar
823 1997-07-04 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
825 * (C_stab_entry): "interface" in Java behaves like "class".
827 1997-06-23 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
829 * etags.c: (HAVE_NTGUI) [WINDOWSNT]: #undef if HAVE_CONFIG_H.
830 (main): Put interval syntax here.
831 (add_regex): And remove it from here.
833 1997-06-17 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
835 * etags.c (suggest_asking_for_help): Provide a
836 meaningful help message with and without LONG_OPTIONS.
838 1997-06-09 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
840 * etags.c: <io.h> [MSDOS]: Include it, don't include string.h.
841 <stdlib.h, string.h>: Don't test MSDOS when including them.
842 (white, nonam, endtk): Like elsewhere, use \r instead of \013.
843 (put_entries): Correctly use %ld instead of %d in printf.
845 1997-06-04 Francesco Potorti` <F.Potorti@cnuce.cnr.it>
847 * etags.c: <unistd.h> [HAVE_UNISTD_H]: Include conditionally, else
848 declare getcwd if HAVE_GETCWD.
849 (consider_token): Dead break instruction removed.