| 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.
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
|
| |
* src/lid.c (radix_flag): Initialize to 0, not radix_all.
(main): Map 0 to the default, radix_all.
Tiny change.
|
|
|
|
|
| |
* src/lid.c (parse_frequency_arg): lid -F 2.. would mistakenly
act like "lid -F 2" and "lid -F ..2" would act like "lid F 1"
|
|
|
|
| |
* src/lid.c: Remove empty #if...#endif blocks.
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
|
|
| |
* 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):
|
|
|
|
|
|
|
|
| |
* src/fid.c (help_me): Declare with noreturn attribute.
* src/fnid.c (help_me): Likewise.
* src/lid.c (help_me): Likewise.
* src/mkid.c (help_me): Likewise.
* src/xtokid.c (help_me): Likewise.
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/fid.c (usage): Declare with __noreturn__ attribute.
* src/fnid.c (usage): Likewise.
* src/lid.c (usage): Likewise.
* src/mkid.c (usage): Likewise.
* src/xtokid.c: (usage): Likewise.
* src/mkid.c (sum_files): Remove unused macro.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add progname.
* src/mkid.c: Include "progname.h".
(program_name): Remove declaration.
(main): Call set_program_name rather than setting program_name.
* src/fid.c: Likewise.
* src/fnid.c: Likewise.
* src/lid.c: Likewise.
* src/xtokid.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/lid.c: Include "lid.h".
(main): Set defaults based on new global, lid_mode.
* src/Makefile.am (bin_PROGRAMS): Add aid, eid, gid.
(dist_bin_SCRIPTS): Remove them from this list.
(noinst_HEADERS, aid_SOURCES, eid_SOURCES): Define.
(gid_SOURCES, lid_SOURCES): Define.
* src/aid, src/eid, src/gid: Remove scripts.
* src/lid-aid.c, src/lid-eid.c, src/lid-gid.c, src/lid-lid.c:
* src/lid.h: New files.
* man/Makefile.am (aid.1, eid.1, gid.1): Adjust dependencies.
* .gitignore: Add src/aid, src/eid, src/gid.
|
|
|
|
|
|
|
|
|
|
| |
* src/fid.c: Include "closeout.h".
(main): Use it via atexit.
* src/fnid.c (main): Likewise.
* src/lid.c (main): Likewise.
* src/mkid.c (main): Likewise.
* src/xtokid.c (main): Likewise.
* NEWS: Mention the bug fixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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):
|
|
|
|
|
| |
Remove the few that were thus exposed as being unused.
Remove some unused prototypes.
|
|
|
|
|
| |
* src/lid.c (linetty): Remove unused function.
(file_name_wildcard): Likewise.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
| |
help2man requires this.
* src/lid.c: Add another space before the description.
* src/mkid.c: Likewise.
* src/xtokid.c: Likewise.
Signed-off-by: Jim Meyering <meyering@redhat.com>
|
| |
|
|
|
|
| |
to workaround AC_REPLACE_FUNC / gnulib shortcomings
|
|
|
|
|
| |
* apply EDITOR env variable patch
* updated ChangeLog
|
|
|
|
| |
* src/lid.c: fix bug in pattern recognition in is_number()
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
maybe_add_word_delimiters--action is now unconditional.
(query_literal_word): Call query_literal_substring if ignoring case.
(query_literal_prefix): Call query_regexp if ignoring case.
(query_regexp): Test delimiter_style before calling
add_regexp_word_delimiters.
(query_literal_substring): Add local var arg_length.
Handle word matches which can happen when ignoring case.
Add local var match.
|
|
|
|
|
| |
to fopen mode string. [From tbisp@uswest.net]
* src/lid.c (report_grep): Change name of gid_FILE to source_FILE.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
* configure.in (AM_WITH_REGEX): Remove.
* src/lid.c (rx.h): Remove #include.
|
|
|
|
| |
fopen fails.
|
|
|
|
|
|
|
|
| |
libidu/walker.c (get_lang_args): Ditto.
src/fnid.c (main): Ditto.
src/lid.c (report_grep, search_flinkv): Ditto.
src/mkid.c (scan_member_file): Consolidate two ALLOCA buffers
at inner scopes to a single buffer at an outer scope.
|
| |
|
| |
|
| |
|
|
|