(strcaseeq): New function.
(get_language_from_filename): Use it to do a case insenstitive
comparison if called with appropriate args.
(find_entries): Try with case insensitive match.
(process_file): Bug fixed.
the command line, in either order.
* etags.c (find_entries): Delete tags previously obtained from
file xxx.c's #line directives when parsing file xxx.y. This is
generally done for automatically generated files containing
#line directives. This handles the case when xxx.y is tagged
before xxx.c, and the entries of xxx.c pointing to xxx.y should
be discarded.
(language): Added the metasource member. Initializers changed.
(invalidate_nodes): New function.
(readline): Discard lines after having found a #line
directive pointing to an already tagged file. This handles the
case when xxx.y is tagged before xxx.c, and the entries of
xxx.c pointing to xxx.y should be discarded.
(fdesc): New structure for keeping track of input files.
(fdesc): Remove `file' member (a string) and use instead a pointer
to a file description structure.
(curfile, curfiledir, curtagfname, curlang, nocharno,
forced_lang): Global variables removed in favor of fdhead and
curfdp, pointers to file description strucures.
(longopts, main, print_help): Use the CTAGS conditional to include
or exclude options that work on etags or ctags only.
(process_file, find_entries, pfnote, add_node, put_entries,
readline): Use fdhead and curfdp.
(process_file, find_entries): Do not take an arg string, all
callers changed.
* etags.c (longopts, print_help, main): Test CTAGS to disallow
options that are not right for either etags or ctags.
* etags.c (number_len, total_size_of_entries): Define them also
in CTAGS mode, because gcc does not compile all refs away.
(MAX_DATA_LEN, MAX_SCORES): New.
(SCORE_FILE_PREFIX): If HAVE_SHARED_GAME_DIR is not defined,
default to ~/.emacs.d/games.
(get_user_id): Don't zero uid in the case where we can't get the
username.
(lose): New function.
(main): Actually use `max', and default it to MAX_SCORES.
Correctly handle new default for SCORE_FILE_PREFIX. Use `lose'
function.
(read_score): Handle the case of reading unamelen characters, then
finishing. Use mktemp if mkstemp isn't available.
(lock_file, unlock_file): Delete unused versions.
(lock_file): Always sleep, even if we unlinked the lock file.
(get_user_id): Take struct passwd as an argument.
(get_home_dir): New function.
(main): Read in user information here. Discover home directory if
necessary.
(read_score): Trim newline only in `getline' case.
(struct score_entry): Add username field.
(push_score): Use it.
(get_user_id): New function.
(main): Don't malloc excessively.
(main): Use username field.
(read_score): Read it.
(push_score): Handle it.
(write_scores) Write it.
(read_score): Handle arbitrary length data.
(Python_functions, PHP_functions): Name tags, for ctags' sake.
(TeX_commands): Name tags. Correction of old disabled code.
* etags.c (curfiledir, curtagfname): New global variables.
(process_file): Initialise them.
(readline): Canonicalize the name found in #line directive.
(no_line_directive): New global var; set it for old behaviour.
(main): Remove some #ifdef in the getopt switch.
(add_node, put_entries): Code added to merge different chunks of
nodes referring to the same file. Currently the tags are just
appended, without any check for duplicates.
(Perl_functions): Do not special case ctags.
(readline): Identify #line directives and do the right thing.
(nocharno, invalidcharno): New global vars.
(process_file): Reset nocharno.
(readline): Set nocharno.
(pfnote): Read nocharno and maybe put invalidcharno in node.
(total_size_of_entries, put_entries): Use invalidcharno.
* etags.c: Keep the whole tag table in memory, even in etags mode.
(main): Call put_entries here even in CTAGS mode.
(main, process_file): Check the return values of fclose and pclose.
(process_file): Do not call put_entries after parsing each file.
(process_file): Canonicalise file names even for ctags.
(process_file): Set curfile here...
(find_entries): ... not here any more.
(add_node): In etags mode, build a linked list of entries (on
right pointer) for each file, and link the first entry of each
file on left nodes.
(put_entries): Print here the name of the file.
(put_entries): Print the entries starting from the first file.
(number_len, total_size_of_entries): Define these only iin etags
mode, make the second work only on the right nodes.
* etags.c: Make all global variables static.
(AWK, TMPDIR): Work around portability problem in broken shells that
don't understand `: ${VAR=val}'.
(SORT_K_OPTIONS): New var, for hosts that conform to POSIX 1003.1-2001.
Prefer the new -k option to the traditional +M -N option.
(AWK, TMPDIR): Work around portability problem in broken shells that
don't understand `: ${VAR=val}'.
(SORT_K_OPTIONS): New var, for hosts that conform to POSIX 1003.1-2001.
Prefer the new -k option to the traditional +M -N option.