2020-04-03 Jim Meyering build: reenable compiler warning options * configure.ac (WERROR_CFLAGS): Reenable many warning options that need no longer be suppressed. build: avoid false positive warning * configure.ac: Disable -Wduplicated-branches warning. It would report this: lid.c:535:15: error: this condition has identical branches 535 | else if (delimiter_style == ds_word) maint: make update-copyright build: update away from deprecated gnulib modules * bootstrap.conf (gnulib_modules): Update from deprecated modules (calloc, malloc, realloc) to "-gnu"- suffixed names. build: update gnulib to latest * gnulib: Update submodule. * configure.ac: AC_PREREQ([2.63]). Now required by gnulib. * testsuite/init.sh: Update from gnulib. * bootstrap: Likewise. 2018-01-06 Jim Meyering maint: update gnulib and copyright dates for 2018 * gnulib: Update to latest. * all files: Run "make update-copyright". * bootstrap: Update from gnulib. 2017-12-18 Curt McDowell compare full 8-byte inodes in one more place * libidu/walker.c (dev_ino_hash_compare): Rewrite to compare both device and full inode. 2017-11-23 Jim Meyering fix handling of 64-bit ino_t The dev/inode hashing code used only four bytes of each inode number, and thus could malfunction: mkid: warning: `f1' and `f1' are the same file, but yield different scans! * libidu/walker.c (dev_ino_hash_1, dev_ino_hash_2): Adjust to use all bytes of device and inode numbers. * NEWS (Bugs): Mention it. Reported by Curt McDowell in https://bugs.gnu.org/29092 2017-11-07 Jim Meyering lid: fix invalid fallthrough after failed exec gcc's -Wimplicit-fallthrough detected a bug: lid would fall through it's "case 0" after a failed execvp. * src/lid.c: Include "die.h". Use "die (EXIT_FAILURE,...", not "error (0,..." build: add die.h from coreutils * src/die.h: New file. From coreutils. * src/Makefile.am (noinst_HEADERS): Add it. build: address -Wimplicit-fallthrough= warnings * src/mkid.c (FALLTHROUGH): Define. (main): Mark two case statements as such. build: fix type-vs-format-string mismatches * libidu/idread.c (io_read): As above. * libidu/idu-hash.c (hash_init, hash_print_stats): Likewise. * libidu/idwrite.c (io_write): Likewise. * libidu/scanners.c (ARGS): Likewise. * libidu/walker.c (print_member_file, langs_excluded): Likewise. * src/lid.c (main): Likewise. * src/mkid.c (scan_files, report_statistics, summarize): Likewise. 2017-01-20 Jim Meyering maint: update copyright dates gnulib: update to latest; and update bootstrap and init.sh 2014-02-13 Jim Meyering gnulib: update to latest maint: update copyright years 2014-02-13 Tom Tromey doc: change the manual to build with texinfo 5.1 * doc/idutils.texi (Top): Rearrange menu. (Quick start): Use @itemize and @item. (Common options): Rearrange menu. (Walker options): Use @item, not @itemx. (Past and Future): Use @itemize and @item. 2013-08-11 Jim Meyering doc: remove idutils.texi front- and back-cover text requirements * doc/idutils.texi: Do not require front- or back-cover text, thus making this section the same as gzip's, so this may be included in Debian's "free" (rather than non-free) archive. 2012-10-23 Jim Meyering build: update gnulib, bootstrap and init.sh 2012-10-23 Eric Blake build: default to --enable-gcc-warnings in a git tree Anyone building from cloned sources can be assumed to have a new enough environment, such that enabling gcc warnings by default will be useful. Tarballs still default to no warnings, and the default can still be overridden with --disable-gcc-warnings. * configure.ac (gl_gcc_warnings): Set default based on environment. 2012-10-23 Jim Meyering lid: avoid reading beyond end of buffer for a long name * 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. 2012-05-11 Jim Meyering maint: arrange for "make distcheck" to run the syntax-check rules * Makefile.am (ALL_RECURSIVE_TARGETS): Define. (distcheck-hook): Depend on syntax-check. maint: avoid new syntax-check failures * cfg.mk (old_NEWS_hash): Update to reflect typo fix in old NEWS. * doc/idutils.texi: Add "." before @xref. build: update gnulib submodule to latest 2012-04-18 Jim Meyering maint: fix comment/doc typos Found using https://github.com/lyda/misspell-check * ChangeLog-2007: As above. * NEWS: Likewise. * src/mkid.c: Likewise. 2012-02-04 Jim Meyering maint: reenable gnulib's get-rusage-as-tests * bootstrap.conf (avoided_gnulib_modules): Don't exclude get-rusage-as-tests. That test has now been fixed. * gnulib: Update to latest, for fixed get-rusage-as-tests. 2012-02-03 Jim Meyering maint: adjust the URL that will appear in the generated announcement * cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE) for the first link listed in the generated announcement. announce-gen now provides the faster mirror link automatically. maint: post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 4.6 * NEWS: Record release date. 2012-01-31 Jim Meyering maint: use gnulib's readme-release module * bootstrap.conf (gnulib_modules): Add readme-release. (bootstrap_epilogue): Substitute. * README-release: Remove file. * .gitignore: Update. tests: adapt framework for upcoming automake-1.12 * testsuite/check.mk (LOG_COMPILER): Define. (TESTS_ENVIRONMENT): Adapt to work with the upcoming automake-1.12; use "; 9>&2" at end. Move shell-or-perl to ... * testsuite/shell-or-perl: ... new helper script from coreutils. * testsuite/CuSkip.pm: New file, from coreutils. * testsuite/Makefile.am (EXTRA_DIST): Add CuSkip.pm and shell-or-perl. maint: make copyright statements more consistent; update gnulib * cfg.mk (update-copyright-env): Add UPDATE_COPYRIGHT_FORCE=1 to rejoin some split lines, and UPDATE_COPYRIGHT_USE_INTERVALS=2 to make update-copyright use only one year range. * gnulib: Update. * testsuite/files0-from: Adapt to gnulib's change from `q' to 'q'. build: update bootstrap from gnulib, and adapt * bootstrap: Update from gnulib. * testsuite/init.sh: Update from gnulib. * bootstrap.conf (bootstrap_epilogue): Remove now-unnecessary, snippet that edited gnulib-tests/gnulib.mk. (gnulib_tool_option_extras): Add both --symlink and --makefile-name=gnulib.mk. Remove use of $bt. * lib/Makefile.am: Initialize numerous automake variables so that generated code in gnulib.mk may use += to append to them. build: work around new warning/suggestion to use "pure" * src/mkid.c (check_hits): Change semantics to avoid the warning that this assert-containing function could be declared with the "pure" attribute. Instead, return 0/1, declare "pure" and let the caller perform the assertion. Rename from assert_hits. Add a comment. 2012-01-31 Jim Meyering build: add const and pure attributes, per gcc recommendation * 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. 2012-01-31 Jim Meyering build: turn off two of gcc's warning options * configure.ac: Disable -Winline, at least temporarily due to number of warnings, and low priority, and disable -Wformat-nonliteral, due to inherent false positives. build: fix man-page-building and cross-check rules * man/Makefile.am (defid.1): New dependency. (programs): Use both $(PROGRAMS) and $(SCRIPTS). (check-x-vs-1): Use tr, not fmt, for portability. Use AM_V_GEN. (programs): Likewise. (check-programs-vs-x): Use AM_V_GEN. Remove coreutils-specific code. (t, mapped_name): Remove definitions of unused variables. (.x.1): Remove obsolete comment. Use AM_V_GEN, not echo. 2012-01-28 Jim Meyering tests: disable gnulib's get-rusage-as test * bootstrap.conf (avoided_gnulib_modules): Disable the get-rusage-as test: it's failing. 2012-01-01 Jim Meyering maint: avoid new syntax-check failure due to #if HAVE_SYS_TYPES_H * libidu/idfile.h: Include 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 ranges Run "make update-copyright". 2011-11-29 Jim Meyering tests: use "compare exp out", not "compare out exp" Likewise, when an empty file is expected, use "compare /dev/null out", not "compare out /dev/null". I.e., specify the expected/desired contents via the first file name. Prompted by a suggestion from Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154 Run these commands: git grep -l -E 'compare [^ ]+ exp' \ |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/' git grep -l -E 'compare [^ ]+ /dev/null' \ |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,' [here, there were none of the latter] 2011-11-17 Jim Meyering build: update gnulib submodule to latest build: exempt defid from a built-in automake check defid *does* support --help and --version, but only when gid is already in your shell's search path. That is not the case for the first pre-install build. * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Define. maint: stop using gnulib's obsolete "exit" module * bootstrap.conf (gnulib_modules): Remove module. It no longer exists. build: update bootstrap from gnulib * bootstrap: Update. build: stop distributing gzip'd releases; xz is enough * configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip. 2011-08-03 Jim Meyering tests: update init.sh from gnulib * testsuite/init.sh: Update from gnulib. 2011-08-02 Jim Meyering tests: add a test for the lid radix-handling bug * testsuite/lid-radix: New file. * testsuite/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. 2011-08-02 Shigio YAMAGUCHI lid: fix a bug that made it so -o, -x, -d did not work * src/lid.c (radix_flag): Initialize to 0, not radix_all. (main): Map 0 to the default, radix_all. Tiny change. 2011-08-02 Jim Meyering build: update gnulib submodule to latest * cfg.mk (local-checks-to-skip): Add sc_prohibit_path_max_allocation to the list of skipped syntax-check rules. This is temporary. 2011-05-25 Jim Meyering maint: update gnulib to latest with accompanying tight-scope tweak * cfg.mk: Include $(srcdir)/dist-check.mk using "-include", to accommodate the new sc_tight_scope rule. * gnulib: Update to latest. 2011-05-24 Jim Meyering tests: add tests for the lid -F ..N bug * testsuite/lid-range: New file with tests based on a report by Shigio YAMAGUCHI in http://thread.gmane.org/gmane.comp.gnu.idutils.bugs/137 * testsuite/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention the bug fix. 2011-05-24 Shigio YAMAGUCHI lid -F RANGE: fix a bug in handling open-ended ranges * 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" 2011-05-23 Jim Meyering maint: adapt to use gnulib's tight-scope rule; update gnulib to latest * cfg.mk (_gl_TS_headers): Define. (_gl_TS_obj_files): Likewise. * src/Makefile.am (sc_tight_scope): Remove rule. * gnulib: Update to latest. 2011-03-20 Jim Meyering maint: stop using .x-sc_* files to list syntax-check exemptions Instead, use the new mechanism with which you merely use a variable (derived from the rule name) defined in cfg.mk to an ERE matching the exempted file names. * gnulib: Update to latest, to get maint.mk that implements this. * .x-sc_cast_of_argument_to_free: Remove file. * .x-sc_program_name: Likewise. * .x-sc_prohibit_always_true_header_tests: Likewise. * .x-sc_require_config_h: Likewise. * .x-sc_require_config_h_first: Likewise. * Makefile.am (EXTRA_DIST): Remove them from here, too. * cfg.mk: Define variables to exempt the same files. maint: remove unused inclusion of * libidu/scanners.c: As above. * libidu/walker.c: Likewise. * src/mkid.c: Likewise. tests: avoid new compilation failure of a gnulib test program * bootstrap.conf (avoided_gnulib_modules): Do not use --avoid=lock. That would lead to compilation failure of the localenames.c test. maint: avoid new false-positive syntax-check test failures * .x-sc_program_name: Exempt main programs in testsuite/. * .x-sc_prohibit_always_true_header_tests: New file, to exempt src/lid.c from test for uses of cpp conditional, HAVE_TERMIOS_H. It looks like lid.c's uses (of struct termios) cannot be guaranteed to work with gnulib's replacement. maint: remove two empty #if...#endif blocks * src/lid.c: Remove empty #if...#endif blocks. maint: avoid syntax-check failure due to new sc_bindtextdomain rule * cfg.mk (local-checks-to-skip): Add sc_bindtextdomain. Remove references to rules that are no longer in maint.mk. maint: update copyright year ranges to include 2011 Run "make update-copyright". 2011-01-03 Jim Meyering build: update gnulib submodule to latest 2010-11-11 Pedro J. Ruiz Lopez mkid, xtokid: fixed conflict checking between include/exclude lang options. * libidu/walker.c: fixed condition. 2010-10-09 Jim Meyering maint: describe policy on copyright year number ranges * README: Mention coreutils' long-standing policy on use of M-N ranges in copyright year lists. Requested by Richard Stallman. 2010-09-04 Jim Meyering build: update gnulib submodule to latest build: use gettext-h, not gettext * bootstrap.conf (gnulib_modules): Use gettext-h, not gettext. The latter is overkill for a package that uses AM_GNU_GETTEXT([external]... 2010-06-20 Jim Meyering doc: update README * README: Update to reflect that the package is now named "idutils". Add a little to the history. Remove mention of cscope plans. Richard Lloyd reported that README was out of date. 2010-06-19 Jim Meyering maint: mention the GPLv3 update in NEWS * NEWS (4.3.92): Note when we switched to GPLv3. * cfg.mk (old_NEWS_hash): Update to reflect addition to old NEWS. Suggested by Karl Berry. 2010-06-18 Jim Meyering tests: avoid "make check" failure with Solaris 10's "fmt" * man/Makefile.am (check-x-vs-1): Use "fmt -w 1", not "fmt -w1", since the latter fails on Solaris 10 with "fmt: bad width: 0". Reported by Claudio Fontana. 2010-06-17 Jim Meyering maint: update release procedure * README-release: Update. mkid: handle the .xz suffix * libidu/id-lang.map: Teach mkid about the .xz suffix. Tell mkid to use the "xz" program on .lzma files. post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 4.5 * NEWS: Record release date. maint: use gnulib's do-release-commit-and-tag module * bootstrap.conf (gnulib_modules): Add do-release-commit-and-tag. 2010-06-16 Jim Meyering tests: fix "make distcheck" failure * testsuite/help-version (mkid_setup): Tell mkid not to access the not-yet-installed id-lang.map file. (xtokid_setup): Likewise. tests: clean up "consistency" and limit the number of files it uses * testsuite/consistency: Use abs_top_srcdir. Perform tests only on files under src, so it doesn't take so long. Stop using "eval" and an explicit $bindir. Don't re-invoke "make". Not needed, now that $abs_top_srcdir is exported from Makefile (via check.mk) to this script. * testsuite/Makefile.am (consistency-real): Remove rule, now that we no longer use it. build: remove now-unnecessary replacement lstat definition * libidu/walker.c [! HAVE_LSTAT] (lstat): Remove definition. Gnulib already handles that. maint: update bootstrap and init.sh from gnulib * bootstrap: Update from gnulib. * testsuite/init.sh: Likewise. build: update gnulib submodule to latest build: require gettext-0.18 * configure.ac: Require it here... * bootstrap.conf (buildreq): ...and here. 2010-05-09 Jim Meyering tests: adjust help-version * testsuite/help-version: Use one-line invocation of init.sh. build: avoid new syntax-check failure * libidu/iduglobal.h (FNM_FILE_NAME): Remove definition. Now, it's provided by gnulib. build: update from gnulib * bootstrap: Update from gnulib. * testsuite/init.sh: Update from gnulib. * gnulib: Update to latest. doc: add "gid" to the menus and direntry list * doc/idutils.texi (gid invocation): Add a section on "gid". doc: add @dircategory to Info documentation The Texinfo documentation says that Info files should use @dircategory, and suggests consulting the Free Software Directory to select a category name. The directory places under ""Text creation and manipulation". * doc/idutils.texi: Add "@dircategory Text creation and manipulation". Inspired by a nearly identical patch by Colin Watson for Parted. mkid: use ftello (not ftell) and fail if an offset is 2^32 or larger This is necessary because the internal layout requires that an offset be representable as a 4-byte quantity. * src/mkid.c (write_id_file): Use ftello, not ftell. The latter would fail on files larger than 4GiB. Now, we still fail for such files, but use ftello instead -- and give a diagnostic. 2010-05-01 Jim Meyering build: update gnulib submodule to latest tests: add help-version, from grep * testsuite/help-version: New file. * testsuite/init.sh: New file, from gnulib. * testsuite/Makefile.am (EXTRA_DIST): Add init.sh. (TESTS): Add help-version. * cfg.mk (_hv_file): Define. * testsuite/check.mk (TESTS_ENVIRONMENT): Define VERSION, for help-version's cross check. (built_programs): Adjust to work, and to accommodate $(EXEEXT). maint: accommodate new syntax-check rules * bootstrap.conf (gnulib_modules): Add sys_ioctl * src/lid.c: Include unconditionally. * libidu/xnls.h: Don't depend on HAVE_LOCALE_H. is always available. maint: accommodate new empty-line-EOF syntax-check rule * lisp/Makefile.am (dist_lisp_LISP): Remove empty line at EOF doc: update to version 1.3 of the FDL * doc/idutils.texi: Update to FDL 1.3. * NEWS: Likewise. * cfg.mk (old_NEWS_hash): Update to accommodate this change. 2010-04-21 Jim Meyering build: update gnulib submodule to latest 2010-01-03 Jim Meyering maint: record update-copyright options for this package * cfg.mk: Next time, just run "make update-copyright". 2010-01-01 Jim Meyering build: update gnulib submodule to latest maint: remove all .cvsignore files maint: update all FSF copyright year lists to include 2010 Use this command: git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \ env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright 2009-12-31 Jim Meyering maint: sync dist-check.mk from coreutils * dist-check.mk: Update. maint: newer gnulib; don't hard-code my GPG key ID * cfg.mk (gpg_key_ID): Remove definition, now that maint.mk automates it. * gnulib: Update to latest. 2009-12-01 Jim Meyering build: correct relative name of .version file * man/Makefile.am (common_dep): Use ../.version, not $(top_srcdir)/.version. Reported by Markus Armbruster. 2009-11-20 Jim Meyering maint: cfg.mk: remove factored-out ftp host/dir definitions * cfg.mk (gnu_ftp_host-alpha, gnu_ftp_host-beta gnu_ftp_host-stable): (gnu_rel_host, url_dir_list): Remove definitions. The defaults, now provided by maint.mk, are the same. * gnulib: Update for latest, including those maint.mk additions. 2009-11-13 Jim Meyering build: require gettext-0.17 * configure.ac: Require gettext-0.17; it was released two years ago. build: correct gettext configure-time support * configure.ac: Use AM_GNU_GETTEXT([external], [need-ngettext]), rather than AM_GNU_GETTEXT([external], [need-formatstring-macros]). Reported by Martin Jacobs in http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3181 2009-11-07 Jim Meyering build: update gnulib submodule to latest 2009-10-31 Jim Meyering admin: distribute gnu-web-doc-update * bootstrap.conf (gnulib_modules): Add gnu-web-doc-update. admin: document release procedure (copied from gzip's) * README-release: New file. 2009-10-30 Jim Meyering post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 4.4 * NEWS: Record release date. build: accommodate new syntax-check test 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 '\ build: update gnulib submodule to latest 2009-10-18 Jim Meyering build: update bootstrap from coreutils * bootstrap: Update from coreutils. * bootstrap.conf: Likewise. build: update gnulib submodule to latest 2009-09-30 Jim Meyering maint: use proper distribution upload url * cfg.mk (url_dir_list): Use $(PACKAGE), not coreutils. build: avoid warning exposed by gcc-4.4.1 * 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. build: use more gnulib modules for better POSIX compliance * bootstrap.conf (gnulib_modules): Add modules exposed via make CFLAGS=-DGNULIB_POSIXCHECK 2>&1 \ |perl -lne '/.* use gnulib module (\S+).*/ and print $1' \ |sort |uniq -c|sort -nr calloc, fflush, fopen, freopen, fprintf-posix, printf-posix, sprintf-posix 2009-08-31 Jim Meyering maint: update gnulib submodule to latest maint: declare usage with "noreturn" attribute, so... * libidu/scanners.c: ...tools like llvm understand flow control better. maint: use better syntax: NULL, not 0, in pointer comparison * libidu/scanners.c (language_save_arg): Compare pointer to NULL, not 0. maint: mkid, xtokid: remove unnecessary initialization * src/xtokid.c (main): Don't set "skip_file" unnecessarily. * src/mkid.c (main): Likewise. build: don't use -Werror in lib/ * lib/Makefile.am (AM_CFLAGS): Don't use $(WERROR_CFLAGS). 2009-08-16 Jim Meyering build: enable warning options also in lib/ * lib/Makefile.am (AM_CFLAGS): Fix typo: s/WARNING_CFLAGS/WARN_CFLAGS/ 2009-08-15 Jim Meyering maint: configure update-copyright to use intervals * cfg.mk (update-copyright-env): Define. maint: update copyright year lists to include 2009 maint: make @copyright line recognizable to update-copyright * doc/idutils.texi: Remove "(C)" from copyright line. build: avoid "make distcheck" failure and distracting diagnostics * testsuite/check.mk (built_programs): Rewrite so that it works. (TESTS_ENVIRONMENT): Use $$f, not $$tst. The latter included a $(srcdir)/ prefix that was fatal in the non-srcdir build case. rename hash.? to idu-hash.? to avoid conflict with gnulib's hash.h 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. build: use gnulib's update-copyright module * bootstrap.conf (gnulib_modules): Add update-copyright. build: use gnulib's getopt-gnu module (getopt is now deprecated) * bootstrap.conf (gnulib_modules): Gnulib's getopt module is now deprecated; use the new, preferred name, getopt-gnu. build: update from gnulib * gnulib: Update submodule to latest. build: avoid a legitimate warning exposed by newer gcc * libidu/scanners.c (language_save_arg): Remove decl of unused static local, horizontal_space. tests: run the latest test * testsuite/Makefile.am (EXTRA_DIST): Add mkid-langopt. * NEWS: Tweak wording. * testsuite/mkid-langopt: Add a comment. 2009-08-13 Pedro J. Ruiz Lopez mkid: avoid segfault with "-l OPT" * 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. 2009-07-04 Jim Meyering maint: ignore *.1 man pages * .gitignore: Ignore man/*.1. build: require/use newer automake * configure.ac: require automake-1.11. Enable color-tests and parallel-tests options. tests: remove now-unnecessary build-aux/check.mk * build-aux/check.mk: Remove file. * testsuite/check.mk: Don't include build-aux/check.mk. tests: avoid a false-positive failure * testsuite/consistency: Manually remove single_file_token_bug.c from the list of files to be compared, since it would provoke a false positive. tests: update CuTmpdir.pm from coreutils * testsuite/CuTmpdir.pm: Update from coreutils. mkid, xtokid: read and process --files0-from= input a name at a time, 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 . * bootstrap.conf (gnulib_modules): Add argv-iter. Remove readtokens0. * libidu/iduglobal.h (STREQ): Define. (bad_cast): Define. remove wc-related code that doesn't apply here * src/mkid.c: Don't handle a file name of "-" specially. * src/xtokid.c: Likewise. * testsuite/files0-from: Don't test for it. tests: add testing framework, and tests for the new option * NEWS (New features): Mention the new option. * src/mkid.c (main): Adjust a diagnostic. * src/xtokid.c (main): Adjust a diagnostic. * bootstrap.conf (gnulib_modules): Add perl and posix_shell * build-aux/check.mk: New file, from coreutils. * testsuite/Coreutils.pm: Likewise. * testsuite/CuTmpdir.pm: Likewise. * testsuite/check.mk: Likewise. * testsuite/envvar-check: Likewise. * testsuite/files0-from: New test, based on one from coreutils. * testsuite/Makefile.am (TESTS): Add files0-from. (TESTS_ENVIRONMENT): Remove definition. Now it's in check.mk. (EXTRA_DIST): Add Coreutils.pm CuTmpdir.pm envvar-check and check.mk. Include $(srcdir)/check.mk. 2009-07-04 Pedro J. Ruiz Lopez mkid, xtokid: accept a new option --files0-from=FILE * bootstrap.conf (gnulib_modules): Add quote and readtokens0. * doc/idutils.texi: Document the option. * src/mkid.c (usage, FILES0_FROM_OPTION, long_options, help_me) (main): Implement. * src/xtokid.c (usage, FILES0_FROM_OPTION, long_options, help_me) (main): Likewise. 2009-07-04 Jim Meyering gnulib: update to latest, to get argv-iter 2009-06-30 Jim Meyering build: update from coreutils * README-hacking: Update from coreutils. * bootstrap.conf: Likewise. * bootstrap: Likewise. * dist-check.mk: Likewise. 2009-06-16 Pedro J. Ruiz Lopez Fixed bug #22154: --default-lang does nothing * libidu/scanners.c: set_default_language function implemented. 2009-06-07 Jim Meyering maint: add const attribute to a few declarations * libidu/hash.c (hash_print_stats, hash_dump): Add const. * libidu/hash.h: Likewise. * src/mkid.c (scan_files): Likewise. build: avoid warning from newer gcc * configure.ac: Turn off -Wunsafe-loop-optimizations. build: update from gnulib * gnulib: Update submodule to latest. 2009-05-18 Ludovic Courtès elisp: use `read-shell-command' in `gid' * lisp/idutils.el (gid): Use `read-shell-command' instead of `read-string', to allow for completion. 2009-05-17 Jim Meyering maint: cfg.mk: remove now-unnecessary gnulib_dir definition * cfg.mk (gnulib_dir): Remove definition, now that gnulib's maint.mk provides the default we want. build: update from gnulib, for rename.m4 fix, improved tests, etc. * gnulib: Update submodule to latest. build: adjust warnings * configure.ac: Enable a few warning options that didn't need to be disabled; disable -Wlong-long (for latest gcc snapshot). maint: remove unused file * m4/extra_dist.sh: Remove now-unused file. 2009-04-30 Jim Meyering clean-up: use proper types * src/fid.c (get_file_index): Use size_t for lengths, not int. avoid a legitimate -Wstrict-overflow warning * libidu/scanners.h (log_8_member_files): Change type from int to size_t. * libidu/scanners.c: Likewise. build: suppress more warnings * 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. build: suppress warnings about ignored return value from fread/fwrite * 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. build: remove unused macros * libidu/scanners.c (ISSPACE, WS): Remove unused macros. build: avoid a warning * libidu/idfile.c (sizeof_idhead): Avoid old-style function definition. build: remove unused macros * libidu/idread.c (TOK_COUNT_ADDR): Remove unused macro. (TOK_HITS_ADDR): Likewise. build: enable new compiler warning options * 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 2009-04-29 Jim Meyering build: address automake warning * lib/Makefile.am (AM_CFLAGS): Increment, rather than assigning, so as not to override settings from just-included gnulib.mk. build: accommodate maint.mk, now that it's pulled from gnulib * dist-check.mk: New file, from coreutils. Was part of maint.mk. * cfg.mk (old_NEWS_hash): Include $(srcdir)/dist-check.mk. Remove trailing " -", to align with new check in maint.mk. * Makefile.am (EXTRA_DIST): Add dist-check.mk. maint: enable many gcc warnings * bootstrap.conf (gnulib_modules): Add warnings and manywarnings. * configure.ac: Use gl_MANYWARN_ALL_GCC, and exclude options I don't want or that provoke too many warnings. (WARN_CFLAGS, WERROR_CFLAGS): Define. (lint, GNULIB_PORTCHECK): Define. (_FORTIFY_SOURCE): Define to 2. * .cvsignore: Remove now-unused file. build: use maint.mk from gnulib * maint.mk: Remove file. Now it's generated. * .gitignore: Ignore it. * bootstrap.conf (gnulib_modules): Add maintainer-makefile. Remove obsolete modules. maint: use a git submodule for gnulib * .gitmodules: New file, to track gnulib. * gnulib: New file, created by running this: git submodule add git://git.sv.gnu.org/gnulib.git gnulib * configure.ac (AM_INIT_AUTOMAKE): Require automake-1.10b or newer. 2009-04-27 Jim Meyering build: make automake's silent-rules option the default * configure.ac (AM_SILENT_RULES): Use this, with it's "yes" argument. Those who want verbose build output may configure with --disable-silent-rules or use "make V=1". 2009-03-21 Jim Meyering * maint.mk: sync from coreutils 2009-03-18 Jim Meyering maint.mk: update from coreutils * maint.mk: Sync. * cfg.mk (manual_title): Define. 2009-03-02 Jim Meyering * cfg.mk (old_NEWS_hash): Update. maint.mk: update from coreutils * maint.mk: Modernize (sc_tight_scope): Move this rule to... * idutils/cfg.mk (sc_tight_scope): ...here. * .x-sc_require_config_h_first: New file. * doc/idutils.texi: Update copyright year. * configure.ac: Use dist-xz rather than dist-lzma. 2009-03-02 Ludovic Courtès recognize `.org' files as text * libidu/id-lang.map: Add `.org' extension, for Emacs Org-Mode files. 2008-11-30 Jim Meyering * src/lid.c: Remove duplicate inclusion of . * src/fnid.c: Remove duplicate inclusion of . 2008-10-26 Jim Meyering recognize a few more file types * libidu/id-lang.map: Recognize .rb, .in.h, .PL, configure.in, and GNUmakefile. avoid a start-up leak * libidu/walker.c (get_current_dir_link): Don't leak cwd_0. 2008-10-22 Pedro J. Ruiz Lopez accommodate gnulib header removals * libidu/idfile.c: Include , not "lstat.h". * libidu/scanners.c: Likewise. * libidu/walker.c: Likewise. * src/mkid.c: Likewise. 2008-10-18 Jim Meyering post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. * NEWS: Record release date; add copyright at bottom. sync from coreutils * maint.mk: Sync from coreutils. * bootstrap: Likewise. * README-hacking: Likewise. * bootstrap.conf: Standardize copyright comments. (gnulib_modules): Add announce-gen and strcasestr. add idutils.spec.in * idutils.spec.in: New file, mostly from from Markus Armbruster. * Makefile.am (idutils.spec): New rule. (EXTRA_DIST): Add idutils.spec.in and idutils.spec. * .gitignore: Add idutils.spec. 2008-09-13 Jim Meyering set coding system to utf8 in THANKS * THANKS: and adjust François' name accordingly. 2008-09-12 Jim Meyering * lisp/idutils.el: Update suggested autoload syntax in comment. use dist_man1_MANS rather than dist_man_MANS: efficiency * man/Makefile.am: Use dist_man1_MANS rather than dist_man_MANS. Recommended in automake documentation, for more efficient install. 2008-08-30 Jim Meyering tests: adjust failure diagnostic to match reality * testsuite/consistency: Correct suffix, s/xtokid/xti/ in diagnostics. Also fix a double temp-file naming bug: s/fid/lid/g. * bootstrap: Update from coreutils. 2008-06-24 Jim Meyering avoid warnings, adjust for const-correctness * 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 declarations * 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. * maint.mk: sync from coreutils 2008-06-14 Jim Meyering sync maint.mk from coreutils, and adjust to conform * 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. 2008-06-04 Jim Meyering exempt the four new src/lid-?id.c files from config.h test * .x-sc_require_config_h: Add the regexp. use gnulib's progname module * 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. * maint.mk: sync from coreutils 2008-05-30 Jim Meyering * bootstrap.conf (gnulib_modules): Add autobuild. 2008-05-27 Jim Meyering * maint.mk: Merge from coreutils. build aid, eid, and gid as binaries (were scripts) * 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. enforce --help and --version compliance * configure.ac (AM_INIT_AUTOMAKE): Add std-options. perform gnulib tests first * Makefile.am (SUBDIRS): Make gnulib-tests precede testsuite. 2008-05-22 Jim Meyering don't ignore pre-fclose ID-file write error * src/mkid.c (write_id_file): Test ferror, too. 2008-05-20 Jim Meyering detect write error on stdout * 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. 2008-05-19 Jim Meyering recognize more suffixes: .mk, .ac, .bz2, .lzma. * libidu/id-lang.map: Add .mk -> make, .ac -> m4. Handle .bz2 and .lzma, too. * NEWS: Mention this. Add a few more news items. 2008-05-17 Jim Meyering tighten scope in libidu/, too 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): * src/Makefile.am (sc_tight_scope): Improve. make more functions static declare many global variable to be "static" Remove the few that were thus exposed as being unused. Remove some unused prototypes. tests: make scope check work when $(noinst_HEADERS) is empty * src/Makefile.am (sc_tight_scope): Add /dev/null as an argument to the sed-based variable filter, in case $(noinst_HEADERS) is empty. Remove unused functions. * src/lid.c (linetty): Remove unused function. (file_name_wildcard): Likewise. * src/lid.c (strcasestr): Remove function. make functions static tests: enable scoping check * cfg.mk (local-checks-to-skip): Don't skip sc_tight_scope anymore. * src/Makefile.am (sc_tight_scope): New rule. From coreutils. * bootstrap: Sync from coreutils. Generate man pages, update from coreutils. * configure.ac (AC_CONFIG_FILES): Add man/Makefile. Check for help2man. * man/Makefile.am: New file. * .gitignore: Add .version and .tarball-version. * Makefile.am (SUBDIRS): Add man. * cfg.mk: Update from coreutils. * maint.mk: Likewise. * man/aid.x: New file. * man/defid.x: Likewise. * man/eid.x: Likewise. * man/fid.x: Likewise. * man/fnid.x: Likewise. * man/gid.x: Likewise. * man/lid.x: Likewise. * man/mkid.x: Likewise. * man/xtokid.x: Likewise. 2008-05-10 Jim Meyering * src/defid: Handle --help and --version. * configure.ac (AM_INIT_AUTOMAKE): Add dist-lzma. Use new gnulib gnumakefile module. * bootstrap.conf (gnulib_modules): Pull in new module. * GNUmakefile: Remove from version control. * .gitignore: Update. * configure.ac (AC_CONFIG_LINKS): Delete; rely on gnulib to do this now. * Makefile.am (EXTRA_DIST): Remove GNUmakefile. 2008-03-21 Jim Meyering Sync GNUmakefile with gnulib. * GNUmakefile (Makefile.cfg): Rename... (cfg.mk): ...to this, and make optional. (GNUmakefile.cfg): Delete, redundant with cfg.mk. (Makefile.maint): Rename... (maint.mk): ...to this. (all) [!_have-Makefile]: Rename... (abort-due-to-no-makefile): ...to this, and invoke via .DEFAULT_GOAL to pick up all targets. * Makefile.cfg: Rename... * cfg.mk: ...to this. * Makefile.maint: Rename... * maint.mk ...to this. (ME): Reflect rename. (makefile-check, m4-check, author_mark_check, msg): Use $(ME) rather than hard-coded name. 2008-03-18 Jim Meyering * bootstrap.conf (gnulib_modules): Add useless-if-before-free. Update from coreutils. * GNUmakefile: Likewise. * Makefile.maint: Likewise. * configure.ac: Likewise. 2008-03-02 Jim Meyering Update .tarball-version-related rules from coreutils. * GNUmakefile: Support VPATH "make dist". Namespace clean-up. Remove .version-creating rules. * configure.ac (AC_INIT): Use .tarball-version, not .version * bootstrap: Update from coreutils. * bootstrap.conf (obsolete_gnulib_modules): Remove free. * Makefile.am: Emit .tarball-version into tarball. 2008-02-27 Jim Meyering * testsuite/Makefile.am (TESTS_ENVIRONMENT): Remove abs_top_builddir setting. Not needed. 2008-02-14 Bob Proulx Fix testsuite PATH for VPATH builds. * testsuite/Makefile.am (PATH): Prepend $(abs_top_builddir). Add version report for aid program test dependency. * testsuite/infloop-kawa-el [VERBOSE]: Print aid version. 2008-02-14 Jim Meyering aid, eid, gid: Make these scripts executable in srcdir. This fixes a test failure that would occur when "aid" is not already installed anywhere in your search PATH. * src/aid: chmod a+x. * src/eid: Likewise. * src/gid: Likewise. Reported by Bob Proulx. 2008-02-09 Jim Meyering * lisp/idutils.el (gid): Use read-string, not deprecated read-input. Remove version comment from idutils.el. * lisp/idutils.el: Remove version string comment. * Makefile.am (distcheck-hook): Remove rule. * Makefile.am (dist-hook): Write ChangeLog only if .git/ exists. Modify bootstrap.conf, not bootstrap (for ChangeLog-generation). * bootstrap.conf: touch ChangeLog here, ... * bootstrap: ...not here. Generate ChangeLog at "make dist" time. * Makefile.am (dist-hook): New rule. * bootstrap.conf (gnulib_modules): Add gitlog-to-changelog. Pull vc-list-files from gnulib. * bootstrap.conf (gnulib_modules): Add vc-list-files. * build-aux/vc-list-files: Remove from version-control. Makefile.maint: Update from coreutils. 2008-01-30 Jim Meyering Remove unnecessary test before "free". * libidu/walker.c (get_current_dir_link): Remove "if (xcwd)" just before "free (xcwd);". Remove more files that are now in build-aux/. * config.rpath: Remove file. * mkinstalldirs: Remove file. Avoid printf-format-vs-arg type mismatch warnings. * src/mkid.c (report_statistics): Cast ptrdiff_t to unsigned long long. Remove trailing blanks. * 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. * libidu/dynvec.c (make_dynvec): * libidu/scanners.c (parse_language_map_file, parse_args_c) (parse_args_asm, parse_args_text): Allocate safely. * 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. * 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. 2008-01-14 Jim Meyering fid: avoid buffer overrun. * 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) 2008-01-14 Jim Meyering Replace uses of xrealloc with uses of safer variants. * src/mkid.c (write_id_file): Avoid risk of overflow. (make_sibling_summary, add_token_to_summary): Likewise. src/mkid.c: Remove now-unused declaration of dirname. lisp/idutils.el: Restore "Version: ..." comment. Ensure that a ChangeLog file exists before running automake. Add ChangeLog to .gitignore. Convert to coreutils-flavored gnulib. ChangeLog-2007: Rename from ChangeLog. distribute.sh: Remove now-unused file. * distribute.sh: Remove file. Now, use "make alpha", "make stable", etc. and follow resulting instructions that tell how to invoke build-aux/gnupload. Update copyright year. Avoid a test failure. * testsuite/infloop-kawa-el: Invoke mkid with -m, since id-lang.map may not be installed yet. * testsuite/Makefile.am (TESTS_ENVIRONMENT): Set abs_top_srcdir. Mark diagnostics for translation. * src/mkid.c (main): Mark with _(...). * libidu/walker.c (exclude_languages, include_languages): Likewise. * src/lid.c (report_grep): Likewise. Put at least two spaces between an option and its description. help2man requires this. * src/lid.c: Add another space before the description. * src/mkid.c: Likewise. * src/xtokid.c: Likewise. Adjust indentation in ChangeLog to use only TABs. Avoid SPACE-TAB. * testsuite/consistency: Use TAB-SPACE, instead. * src/defid: Likewise. Don't cast x*alloc return value. * libidu/hash.c (hash_rehash): Remove cast. (hash_init): Likewise. 2008-01-04 Jim Meyering Don't include . Now it's guaranteed to be in . * libidu/walker.c: Don't include . * libidu/idfile.c: Likewise. * libidu/scanners.c: Likewise. Remove files now pulled from gnulib. Also remove all intl/ files.