| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
|
| |
* libidu/scanners.c: As above.
* libidu/walker.c: Likewise.
* src/mkid.c: Likewise.
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
| |
* libidu/walker.c: fixed condition.
|
|
|
|
|
| |
* libidu/id-lang.map: Teach mkid about the .xz suffix.
Tell mkid to use the "xz" program on .lzma files.
|
|
|
|
|
| |
* libidu/walker.c [! HAVE_LSTAT] (lstat): Remove definition.
Gnulib already handles that.
|
|
|
|
|
| |
* libidu/iduglobal.h (FNM_FILE_NAME): Remove definition.
Now, it's provided by gnulib.
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add sys_ioctl
* src/lid.c: Include <sys/ioctl.h> unconditionally.
* libidu/xnls.h: Don't depend on HAVE_LOCALE_H.
<locale.h> is always available.
|
| |
|
|
|
|
|
|
| |
Use this command:
git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \
env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use EXIT_FAILURE and EXIT_SUCCESS, not 1 and 0.
Apply these commands:
perl -pi -e 's/\berror \(1,/error (EXIT_FAILURE,/' \
$(git grep -l '\<error (1,')
perl -pi -e 's/\bexit \(1\)/exit (EXIT_FAILURE)/' \
$(git grep -l '\<exit (1)')
perl -pi -e 's/\bexit \(0\)/exit (EXIT_SUCCESS)/' \
$(git grep -l '\<exit (0)')
* libidu/idread.c (read_id_file, maybe_read_id_file, io_read):
* libidu/idu-hash.c (hash_init):
* libidu/idwrite.c (io_write):
* libidu/scanners.c (parse_language_map, parse_language_map_file):
(read_language_map_file):
* libidu/walker.c (include_languages, exclude_languages):
(get_current_dir_link):
* src/fid.c (usage, help_me, main):
* src/fnid.c (usage, help_me, main):
* src/lid.c (usage, help_me, main, report_grep, report_edit):
(query_regexp):
* src/mkid.c (main, assert_writeable, write_id_file):
* src/xtokid.c (help_me):
|
|
|
|
| |
* libidu/scanners.c: ...tools like llvm understand flow control better.
|
|
|
|
| |
* libidu/scanners.c (language_save_arg): Compare pointer to NULL, not 0.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* libidu/scanners.c (language_save_arg): Remove decl of unused
static local, horizontal_space.
|
|
|
|
|
|
|
|
|
| |
* libidu/scanners.c: languages_0[] is not const anymore, since this
would make impossible to set lang->lg_argv
* libidu/scanners.c: language_save_arg now manages language options
with zero or one argument.
* doc/idutils.texi: update to reflect the behavior of mkid "-l" option.
* testsuite/mkid-langopt: new test program.
|
|
|
|
|
|
|
|
|
|
|
|
| |
rather than by reading the entire input into memory and *then*
processing each file name.
* src/mkid.c: Include "argv-iter.h", not "readtokens0.h".
(main): Rewrite to use argv-iter.
* src/xtokid.c: Likewise.
Include <assert.h>.
* bootstrap.conf (gnulib_modules): Add argv-iter. Remove readtokens0.
* libidu/iduglobal.h (STREQ): Define.
(bad_cast): Define.
|
|
|
|
| |
* libidu/scanners.c: set_default_language function implemented.
|
|
|
|
|
|
| |
* libidu/hash.c (hash_print_stats, hash_dump): Add const.
* libidu/hash.h: Likewise.
* src/mkid.c (scan_files): Likewise.
|
|
|
|
|
| |
* libidu/scanners.h (log_8_member_files): Change type from int to size_t.
* libidu/scanners.c: Likewise.
|
|
|
|
|
|
|
| |
* libidu/idwrite.c: include "ignore-value.h".
(io_write): Ignore fwrite return value.
* libidu/idread.c: Likewise for fread.
* bootstrap.conf (gnulib_modules): Add ignore-value.
|
|
|
|
| |
* libidu/scanners.c (ISSPACE, WS): Remove unused macros.
|
|
|
|
| |
* libidu/idfile.c (sizeof_idhead): Avoid old-style function definition.
|
|
|
|
|
| |
* libidu/idread.c (TOK_COUNT_ADDR): Remove unused macro.
(TOK_HITS_ADDR): Likewise.
|
|
|
|
|
|
|
| |
* src/Makefile.am (AM_CFLAGS): Define to $(WARN_CFLAGS) $(WERROR_CFLAGS).
* libidu/Makefile.am (AM_CPPFLAGS): Remove bogus -I$(top_builddir)/intl
(AM_CFLAGS): Define to $(WARN_CFLAGS) $(WERROR_CFLAGS).
* src/Makefile.am (AM_CPPFLAGS): Remove bogus -I.../intl
|
|
|
|
| |
* libidu/id-lang.map: Add `.org' extension, for Emacs Org-Mode files.
|
|
|
|
|
| |
* libidu/id-lang.map: Recognize .rb, .in.h, .PL, configure.in,
and GNUmakefile.
|
|
|
|
| |
* libidu/walker.c (get_current_dir_link): Don't leak cwd_0.
|
|
|
|
|
|
|
| |
* libidu/idfile.c: Include <sys/stat.h>, not "lstat.h".
* libidu/scanners.c: Likewise.
* libidu/walker.c: Likewise.
* src/mkid.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* libidu/id-lang.map: Add .mk -> make, .ac -> m4.
Handle .bz2 and .lzma, too.
* NEWS: Mention this. Add a few more news items.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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):
|
| |
|
|
|
|
|
| |
* libidu/walker.c (get_current_dir_link): Remove "if (xcwd)"
just before "free (xcwd);".
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* libidu/dynvec.c (make_dynvec):
* libidu/scanners.c (parse_language_map_file, parse_args_c)
(parse_args_asm, parse_args_text):
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
| |
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
* libidu/hash.c (hash_rehash): Remove cast.
(hash_init): Likewise.
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
|
|
|
|
|
|
|
| |
* libidu/walker.c: Don't include <strsep.h>.
* libidu/idfile.c: Likewise.
* libidu/scanners.c: Likewise.
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
| |
|