lines for readability.
(decode_options): Don't call print_help_and_exit in default case. Print version
information to stdout.
(main): Don't call print_help_and_exit.
Waroquiers <wao@cfmu.eurocontrol.be> applied and largely revised.
(language): Added a `help' member.
(arg_type): Added an at_end constant.
(plain_C_suffixes): Some items removed from here.
(Objc_suffixes): And put here (new constant).
(Ada_help, Asm_help, default_C_help, Cplusplus_help, Cjava_help,
Cobol_help, Erlang_help, Fortran_help, HTML_help, Lisp_help,
Makefile_help, Objc_help, Pascal_help, Perl_help, PHP_help,
PS_help, Prolog_help, Python_help, Scheme_help, TeX_help,
Texinfo_help, Yacc_help, auto_help, none-help, no_lang_help): New
constants.
(PS_functions, PS_suffixes): Renamed from Postscript_functions and
Postscript_suffixes.
(lang_names): Adapted to the new language structure, new language
"objc" added (was previously merged with "proc").
(print_language_names): Some help strings corrected.
(print_help): Now takes an argument and possibly prints lang help.
(print_help): Some help strings corrected. Documents
language-specific help.
(main): Only print help after having parsed all the arguments.
(libintl.h): Include this if _LIBC. Otherwise include gettext.h.
(wchar.h): Include, maybe.
(attribute_hidden): Define if not defind.
(__getopt_initialized): Use attribute_hidden.
(__libc_argc, __libc_argv): Renamed from original_argc, etc.
(__getopt_nonoption_flags, nonoption_flags_max_len, nonoption_flags_len):
Conditional on USE_NONOPTION_FLAGS.
(SWAP_FLAGS): New definitions.
(exchange): Test USE_NONOPTION_FLAGS.
(_getopt_initialize): Test USE_NONOPTION_FLAGS.
(_getopt_internal): Error if argc < 1. New local var print_errors.
Improve test for ambiguous long option.
Add LIBIO support for error message output.
(NONOPTION_P): Test USE_NONOPTION_FLAGS.
(eval, display): New vars.
(longopts): Add --eval and --display.
(decode_options): Add -e and -d processing.
(print_help_and_exit): Update the usage string.
(main): Add support for --eval and --display.
auto-detection is enabled and the `::' qualifier is met.
(consider_token, C_entries): Several bugs corrected that tagged
some declarations even though --declarations was not used.
(plainc): New macro.
(C_entries): Use it.
(C_entries): Several cosmetic changes.
(C_entries): Invalidate the token is some cases.
(Ada_funcs): Do not tag "use type Xxxx;".
New language HTML.
(make_tag): Never generate null length tag names.
(linebuffer_init): Renamed from initbuffer. All callers changed.
(pattern): Structure renamed to `regexp', member regex renamed to
pattern.
(node_st): Member pat renamed to regex.
(pattern); New member force_explicit_name, for future use. Now
always set to true, cannot be reset.
(add_regex, regex_tag_multiline, readline): Use it.
(main): Free some global structures.
(fdesc): New member `written'.
(readline, process_file): Initialise it.
(put_entries): Set it.
(main): Use it to create entries for files without tags.
(total_size_of_entries): Do not count invalid tags.
(etags_strcasecmp): Like BSD's, for compatibility.
(strcaseeq): Make it into a macro.
which are almost always unnamed. etags.el looks for an explicit
tag name, then for an implicit one. See make_tag for details.
The change is both forwards and backwards compatible.
(make_tag): New function (was the disabled function new_pfnote).
(make_C_tag): Use it.
(arg_type): at_icregexp label removed (obsolete).
(pattern): New member multi_line for multi-line regexps.
(filebuf): A global buffer containing the whole file as a string
for multi-line regexp matching.
(need_filebuf): Global flag raised if multi-line regexps used.
(print_help): Document new regexp modifiers, remove references to
obsolete option --ignore-case-regexp.
(main): Do not set regexp syntax and translation table here.
(main): Treat -c option as a backward compatibility hack.
(main, find_entries): Init and free filebuf.
(find_entries): Call regex_tag_multiline after the regular parser.
(scan_separators): Check for untermintaed regexp and return NULL.
(analyse_regex, add_regex): Remove the ignore_case argument, which
is now a modifier to the regexp. All callers changed.
(add_regex): Manage the regexp modifiers.
(regex_tag_multiline): New function. Reads from filebuf.
(readline_internal): If necessary, copy the whole file into filebuf.
(readline): Skip multi-line regexps, leave them to regex_tag_multiline.
(add_regex): Better check for null regexps.
(readline): Check for regex matching null string.
(find_entries): Reorganisation.
sequences supported by gcc.
(find_entries): rewind unconditionally.
(find_entries): Do not call language functions directly, now calls
itself.
(find_entries): Do general initialisations here.
(CNL_SAVE_DEFINEDEF, C_entries, LOOP_ON_INPUT_LINES, F_getit)
(Ada_getit, Pascal_functions, Pascal_functions)
(prolog_skip_comment): Do not do them here.
(readline_internal): Increment lineno here.
(readline): Conditionally undo readline_internal increment.
(readline): Do not return a value.
(STDIN): New constant.
(parsing_stdin): New flag.
(longopts): New option --parse-stdin=NAME.
(print_help): Document it.
(main): Handle it.
(process_file): Split into process_file and process_file_name.
(process_file_name): New function.
(TEX_defenv): Now contains more contructs.
(TEX_cmt): Make it a static char and move it before TeX_commands.
(TeX_commands): Shorten the tag to the brace after the name.
(TeX_commands): Names now include the initial backslash.
(TeX_commands): Names do not include numeric args #n.
(TeX_commands): Correct line char number in tags.
(TEX_tabent, TEX_token): Deleted.
(TeX_commands, TEX_decode_env): Streamlined.
inadvertently lost on 2002-04-13.
* etags.c (main): Use `sort -o TAGFILE TAGFILE' instead of
`sort TAGFILE -o TAGFILE', as POSIX 1003.1-2001 disallows
the latter usage.
inadvertently lost on 2002-04-13.
(main): Use `sort -o TAGFILE TAGFILE' instead of `sort TAGFILE -o
TAGFILE', as POSIX 1003.1-2001 disallows the latter usage.
(main): New argument -d, for specifying directory.
(usage): Document.
(get_user_id): Compute
(get_home_dir): Deleted.
(get_prefix): New function, taken from main.
(main): Check whether or not we are running setuid. Move prefix
computation to get_prefix. Don't call getpwent; we don't need to
any more. Instead, move it to get_user_id().
(process_file): Print the tags from the nodes as soon as
possible, and delete the nodes. This brings down the memory
occupancy as etags to almost the same level as when the #line
directives were not parsed.
(free_fdesc): New function.
(find_entries): Use it.
(invalidate_nodes): In etags mode, do not just mark the nodes as
invalid, do delete them.
(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.