summaryrefslogtreecommitdiffstats
path: root/libidu
Commit message (Collapse)AuthorAgeFilesLines
* avoid warnings, adjust for const-correctnessJim Meyering2008-06-241-4/+4
| | | | | | | | | | | | | | * libidu/scanners.c (long_options_c, long_options_asm) (long_options_text, long_options_perl): Add initializers. * src/fid.c (long_options): Add initializers. * src/fnid.c (long_options): Add initializers. * src/lid.c (ATTRIBUTE_UNUSED): Define. (long_options): Add initializers. (report_nothing): Mark parameter as unused. (get_editor_argv, report_edit): Adjust for const-correctness. * src/mkid.c (long_options): Add initializers. (report_statistics): Don't subtract "void*" pointers. Cast to "char*". * src/xtokid.c (long_options): Add initializers.
* remove redundant "const" in declarationsJim Meyering2008-06-241-5/+5
| | | | | | | | | | * libidu/scanners.c (languages_0, long_options_c): Likewise. (long_options_asm, long_options_text, long_options_perl): Likewise. * src/fid.c (long_options): Likewise. * src/fnid.c (long_options): Likewise. * src/lid.c (long_options): Likewise. * src/mkid.c (long_options): Likewise. * src/xtokid.c (long_options): Likewise.
* sync maint.mk from coreutils, and adjust to conformJim Meyering2008-06-141-4/+4
| | | | | | | | * libidu/scanners.c (long_options_c, long_options_asm): Add "const". (long_options_text, long_options_perl): Likewise. * src/fnid.c (long_options): Likewise. * src/lid.c (long_options): Likewise. * src/xtokid.c (long_options): Likewise.
* recognize more suffixes: .mk, .ac, .bz2, .lzma.Jim Meyering2008-05-191-1/+5
| | | | | | * libidu/id-lang.map: Add .mk -> make, .ac -> m4. Handle .bz2 and .lzma, too. * NEWS: Mention this. Add a few more news items.
* tighten scope in libidu/, tooJim Meyering2008-05-176-41/+43
| | | | | | | | | | | | | | | | | | Mark with "extern" the symbols that belong that way. Make the others static. * libidu/dynvec.h (dv_fill): * libidu/fnprint.c (cw_dlink): * libidu/hash.h (qsort_cmp_t): * libidu/idfile.h (io_func_t): * libidu/scanners.c (lang_args_obstack, languages_0, languages_N): (language_help_me, language_getopt, get_language): (lang_args_index): * libidu/walker.c (largest_member_file): * maint.mk (extract_char, today): * src/fid.c (long_options): * src/fnid.c (cw_dlink): * src/lid.c (cw_dlink): * src/xtokid.c (cw_dlink):
* make more functions staticJim Meyering2008-05-176-82/+98
|
* Remove unnecessary test before "free".Jim Meyering2008-01-301-2/+1
| | | | | * libidu/walker.c (get_current_dir_link): Remove "if (xcwd)" just before "free (xcwd);".
* Remove trailing blanks.Jim Meyering2008-01-301-15/+15
| | | | | | | | | | | | * README-alpha: * TODO: * doc/idutils.texi: * libidu/scanners.c (set_uchar_ctype, ARGS, get_token_lisp): * src/Makefile.am: * src/fid.c (main): * src/lid.c (report_edit): * Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank, thus enabling that check.
* Remove useless multiply-by-1. Avoid sizeof TYPE: use equivalent sizeof *VAR.Jim Meyering2008-01-302-5/+5
| | | | | | * libidu/dynvec.c (make_dynvec): * libidu/scanners.c (parse_language_map_file, parse_args_c) (parse_args_asm, parse_args_text):
* Allocate safely.Jim Meyering2008-01-303-9/+10
| | | | | | | | * libidu/dynvec.c (make_dynvec, dynvec_freeze, dynvec_append): Use xnmalloc, not xmalloc (n * sizeof T). Use xnrealloc, not xrealloc (p, n * sizeof T). * libidu/walker.c (append_strings_to_vector, vectorize_string): Likewise. * libidu/scanners.c (tokenize_args_string): Likewise.
* Use xstrdup, not strdup.Jim Meyering2008-01-304-10/+11
| | | | | | | | | * src/lid.c (get_editor_argv): Use xstrdup, not strdup. * libidu/walker.c (get_current_dir_link): Likewise. * libidu/idfile.c: Include "xalloc.h". (locate_id_file_name): Handle failed strdup. * libidu/scanners.c (parse_args_text, parse_args_perl): Likewise. (parse_args_c, parse_args_asm): Likewise.
* fid: avoid buffer overrun.Jim Meyering2008-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | * libidu/idread.c (deserialize_file_links): Fix typo (or think-o). Here's what valgrind reported: Invalid write of size 4 at 0x804A15A: deserialize_file_links (idread.c:132) by 0x8049DEE: maybe_read_id_file (idread.c:74) by 0x8049C64: read_id_file (idread.c:46) by 0x80492FB: main (fid.c:170) Address 0x41EB944 is 628 bytes inside a block of size 629 alloc'd at 0x4022765: malloc (vg_replace_malloc.c:149) by 0x80516BC: xnmalloc_inline (xmalloc.c:49) by 0x80516EE: xmalloc (xmalloc.c:65) by 0x8049E2F: deserialize_file_links (idread.c:87) by 0x8049DEE: maybe_read_id_file (idread.c:74) by 0x8049C64: read_id_file (idread.c:46) by 0x80492FB: main (fid.c:170) Signed-off-by: Jim Meyering <meyering@redhat.com>
* Convert to coreutils-flavored gnulib.Jim Meyering2008-01-141-1/+0
| | | | Signed-off-by: Jim Meyering <meyering@redhat.com>
* Mark diagnostics for translation.Jim Meyering2008-01-141-2/+2
| | | | | | | | * src/mkid.c (main): Mark with _(...). * libidu/walker.c (exclude_languages, include_languages): Likewise. * src/lid.c (report_grep): Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
* Don't cast x*alloc return value.Jim Meyering2008-01-141-3/+3
| | | | | | | * libidu/hash.c (hash_rehash): Remove cast. (hash_init): Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
* Don't include <strsep.h>. Now it's guaranteed to be in <string.h>.Jim Meyering2008-01-043-6/+3
| | | | | | | | * libidu/walker.c: Don't include <strsep.h>. * libidu/idfile.c: Likewise. * libidu/scanners.c: Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
* License upgrade to "GPL-3 or later"Pedro J. Ruiz Lopez2007-08-1715-61/+52
|
* Temporary fix simply to avoid the infloop.Jim Meyering2007-01-191-2/+2
| | | | | | | | | | * libidu/scanners.c (get_token_lisp): Disable the code that treats '[]' as part of a kawa identifier. It could call ungetc two or three times in a row. One is the maximum. * testsuite/infloop-kawa-el: New file. Test for the above. * testsuite/Makefile.am (TESTS): Add infloop-kawa-el. (TESTS_ENVIRONMENT): Prepend build directory to PATH so that invoking e.g., "mkid" runs the just-built version of the tool.
* * provide rough support for lisp character constantsClaudio Fontana2006-11-251-1/+13
|
* * fix lisp string parsingClaudio Fontana2006-10-191-2/+2
|
* * add missing checks for terminal-related include filesClaudio Fontana2006-07-221-1/+1
|
* * provide replacement for lstat in a convoluted way,Claudio Fontana2006-07-223-3/+11
| | | | to workaround AC_REPLACE_FUNC / gnulib shortcomings
* * remove generated files from CVSClaudio Fontana2006-07-211-519/+0
| | | | | * apply EDITOR env variable patch * updated ChangeLog
* * minor fix for typoClaudio Fontana2006-06-261-1/+1
|
* * applied savannah patch #5165, fix for when HAVE_LINK is 0.Claudio Fontana2006-06-261-1/+7
|
* * applied savannah patch to fix perl stringsClaudio Fontana2006-06-261-5/+13
| | | | and comments #2775
* * integrated java+lisp support patch (EXPERIMENTAL)Claudio Fontana2006-02-152-11/+289
|
* * include gnulib changesClaudio Fontana2006-02-012-0/+2
|
* * s/id-utils/idutils/g;Claudio Fontana2006-01-062-2/+4
| | | | * other small changes
* * started to address portability problems in the id-utils-4.0 releaseClaudio Fontana2005-12-279-19/+29
|
* * added inttostr module from gnulib, used in src/mkid.c to print anClaudio Fontana2005-12-112-10/+1
| | | | off_t portably using offtostr()
* * fixed small issues and integrated perl patch.Claudio Fontana2005-12-113-4/+316
| | | | Added some missing files in po/ and updated intl/
* * applied (with changes) savannah patch 2702.Claudio Fontana2005-11-011-3/+15
| | | | Fix language options handling bugs, and removed redundant C options help.
* *** empty log message ***Claudio Fontana2005-11-012-3/+9
|
* *** empty log message ***Claudio Fontana2005-11-0116-524/+689
|
* .Jim Meyering2000-06-061-86/+90
|
* Declare strsep if necessary.Jim Meyering2000-06-063-3/+24
|
* update generated config filesGreg McGary2000-04-271-1/+0
|
* * lib/strsep.c: Add file.Greg McGary1999-04-123-14/+21
| | | | | | | | | * lib/strtok.c: Remove file. * configure.in: Check for strsep instead of strtok. * libidu/idfile.c (locate_id_file_name): Use strsep instead of strtok. * libidu/scanners.c (language_save_arg, language_save_arg, tokenize_args_string): Ditto. * libidu/walker.c (append_strings_to_vector, vectorize_string): Ditto.
* .Greg McGary1999-04-111-0/+1
|
* * walker.c (classify_link): Only return 0 for zero-length files.Greg McGary1999-04-111-3/+3
| | | | | | Keep directories, no matter what their size. DOS always returns zero size for directories. [From tbisp@uswest.net]
* * libidu/idread.c (maybe_read_id_file): Add `b' for binaryGreg McGary1999-04-091-2/+2
| | | | | to fopen mode string. [From tbisp@uswest.net] * src/lid.c (report_grep): Change name of gid_FILE to source_FILE.
* * src/lid.c (limits.h): Include earlier to avoid RE_DUP_MAXGreg McGary1999-04-081-14/+15
| | | | | | | | | | conflict. [From Erick.Branderhorst@asml.nl] (search_flinkv): Bash terminating newline. [From marc@snafu.org] * lisp/elisp-comp: Import more recent version from automake. * libidu/scanners.c (SCAN_CPP_DIRECTIVE): Tolerate leading whitespace before first '#' [From rodneybrown@pmsc.com] (get_token_asm, get_token_c): Move some common leading context into SCAN_CPP_DIRECTIVE.
* Add __P to declGreg McGary1999-04-061-1/+1
|
* * libidu/idfile.h (largest_member_file): Add variable decl.Greg McGary1999-04-064-30/+41
| | | | | | | | | | | | | | | | (MAX_LARGEST_MEMBER_FILE): Add constant. * libidu/scanners.h (scanner_buffer): Add variable decl. * libidu/scanners.c (scanner_buffer): Rename from id_0. * libidu/walker.c (largest_member_file): Add veriable defn. (walk_flink): Maintain largest_member_file. Call print_member_file. (maybe_get_member_file): Don't call print_member_file. (classify_link): Return 0 if file size is zero. * src/mkid.c (scan_files): Report size of largest file. Cap scanner_buffer size at MAX_LARGEST_MEMBER_FILE. Allocate scanner_buffer. * src/xtokid.c (scan_files): Cap scanner_buffer size at MAX_LARGEST_MEMBER_FILE. Allocate scanner_buffer.
* Update copyright notices for 1999Greg McGary1999-04-045-5/+5
|
* * Version 3.2c released.Greg McGary1999-04-043-98/+93
| | | | | | | | | | | | | * libidu/id-file.h (walker_verbose_flag): Add extern variable decl. * libidu/scanners.c (SCAN_CPP_DIRECTIVE): Add macro. (get_token_c, get_token_asm): Call SCAN_CPP_DIRECTIVE. * libidu/walker.c (walker_verbose_flag): Add variable defn. (print_member_file): Add function. (maybe_get_member_file): Call print_member_file in verbose mode. * src/mkid.c: Add coments. (ceil_log_2): Add function. (main): Handle 'V' option for extra verbosity. (scan_files): Use MAX (1M, n*lg(n)*64) to estimate initial size of token hash table.
* .r3_2bGreg McGary1999-03-291-1/+1
|
* * libidu/idfile.h (struct member_file) [mf_index]: ChangeGreg McGary1999-03-294-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type to long. * libidu/scanners.h (MAX_LEVELS): Remove constant. (struct token) [tok_hits, tok_name]: Remove members. [tok_hits_name]: Add member. (TOKEN_HITS, TOKEN_NAME, OFFSETOF_TOKEN_NAME): Add macros. * libidu/scanners.c (log_8_member_files): Add variable definition. (get_token_c, get_token_asm, get_token_text): Use OFFSETOF_TOKEN_NAME. * libidu/walker.c (mark_member_file_links) [new_index]: Change variable type to long. * src/idx.c (scan_member_file): Use TOKEN_NAME. * src/mkid.c (ceil_log_8) Add function. (current_hits_signature): Change variable type to (char *). (main) [log_8_member_files]: Initialize new variable. [current_hits_signature] Allocate storage. (scan_member_file): Print member->mf_index as long. (scan_member_file_1, write_id_file, token_hash_1, token_hash_2, token_hash_cmp, token_qsort_cmp, summarize, write_hits): use TOKEN_NAME & TOKEN_HITS. (init_hits_signature, write_hits): Replace MAX_LEVELS with log_8_member_files. * src/xtokid.c (scan_member_file): Use TOKEN_NAME. * libidu/idfile.h (vectorize_string) [delimiter_class]: Declare as pointer to const. * libidu/walker.c (append_strings_to_vector, vectorize_string) [delimiter_class]: Declare as pointer to const. (white_space): Declare as array of const.
* .r3_2aGreg McGary1999-03-281-34/+21
|