summaryrefslogtreecommitdiffstats
path: root/libidu/idfile.h
Commit message (Collapse)AuthorAgeFilesLines
* maint: update copyright yearsJim Meyering2014-02-131-2/+1
|
* lid: avoid reading beyond end of buffer for a long nameJim Meyering2012-10-231-0/+15
| | | | | | | | | | | * libidu/idfile.h (stzncpy): Define, from coreutils. * src/lid.c (query_ambiguous_prefix): Avoid buffer overrun. Using strncpy to copy a too-long name would result in a "name" that is not NUL-terminated, yet that name would be treated as a NUL-terminated string immediately afterwards, via report_func, which attempts to print it. * libidu/fnprint.c (root_name): Use stzncpy in place of strncpy. * NEWS (Bug fixes): Mention the bug fix.
* build: add const and pure attributes, per gcc recommendationJim Meyering2012-01-311-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | * src/mkid.c (ceil_log_8, ceil_log_2): Add "const" attribute. (token_hash_1, token_hash_2): Add "pure" attribute. (token_hash_cmp, token_qsort_cmp): Likewise. (count_vec_size, count_buf_size): Likewise. * libidu/idu-hash.c (round_up_2): Add "const" attribute. * libidu/scanners.h (get_language): Add "pure" attribute. * libidu/idfile.h (token_flags): Likewise. (token_count): Likewise. (member_file_qsort_compare): Likewise. (tree8_count_levels): Add "const" attribute. * libidu/walker.c (symlink_ancestry): Add "pure" attribute. (links_depth): Likewise. (file_link_hash_1): Likewise. (vector_length): Likewise. (file_link_hash_compare): Likewise. (string_in_vector): Likewise. * src/lid.c (vector_cardinality, get_radix, dtoi, otoi): Likewise. (is_regexp): Likewise. (vector_length): Remove forward decl and move function definition to precede first use.
* maint: avoid new syntax-check failure due to #if HAVE_SYS_TYPES_HJim Meyering2012-01-011-3/+1
| | | | | | * libidu/idfile.h: Include <sys/types.h> unconditionally. I.e., drop the now-redundant #if HAVE_SYS_TYPES_H guard. gnulib guarantees the presence of that header.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: update copyright year ranges to include 2011Jim Meyering2011-03-201-1/+1
| | | | Run "make update-copyright".
* maint: update all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+2
| | | | | | Use this command: git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \ env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
* maint: update copyright year lists to include 2009Jim Meyering2009-08-151-1/+1
|
* rename hash.? to idu-hash.? to avoid conflict with gnulib's hash.hJim Meyering2009-08-151-2/+2
| | | | | | | | | | | | | Now that gnulib's exclude module uses gnulib's hash module, which includes a hash.h file, idutils' use of a hash.h file conflicted. Rename the one here in idutils: * libidu/idu-hash.c: Rename from hash.c. * libidu/idu-hash.h: Rename from hash.h. * libidu/idfile.h: Reflect renaming. * libidu/idread.c: Likewise. * libidu/idwrite.c: Likewise. * src/mkid.c: Likewise. * libidu/Makefile.am: Likewise.
* tighten scope in libidu/, tooJim Meyering2008-05-171-6/+5
| | | | | | | | | | | | | | | | | | 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):
* License upgrade to "GPL-3 or later"Pedro J. Ruiz Lopez2007-08-171-4/+3
|
* *** empty log message ***Claudio Fontana2005-11-011-50/+50
|
* * libidu/idfile.h (largest_member_file): Add variable decl.Greg McGary1999-04-061-0/+3
| | | | | | | | | | | | | | | | (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-041-1/+1
|
* * Version 3.2c released.Greg McGary1999-04-041-0/+2
| | | | | | | | | | | | | * 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.
* * libidu/idfile.h (struct member_file) [mf_index]: ChangeGreg McGary1999-03-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* imported from id-utils-3.2r3_2Greg McGary1997-04-181-0/+1
|
* Initial revisionGreg McGary1997-04-181-0/+223