summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mkid, xtokid: read and process --files0-from= input a name at a time,Jim Meyering2009-07-042-95/+150
| | | | | | | | | | | | 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.
* remove wc-related code that doesn't apply hereJim Meyering2009-07-042-22/+0
| | | | | | * 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 optionJim Meyering2009-07-042-2/+2
| | | | | | | | | | | | | | | | | * 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.
* mkid, xtokid: accept a new option --files0-from=FILEPedro J. Ruiz Lopez2009-07-042-38/+216
| | | | | | | | | * 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.
* maint: add const attribute to a few declarationsJim Meyering2009-06-071-3/+3
| | | | | | * libidu/hash.c (hash_print_stats, hash_dump): Add const. * libidu/hash.h: Likewise. * src/mkid.c (scan_files): Likewise.
* clean-up: use proper typesJim Meyering2009-04-301-3/+4
| | | | * src/fid.c (get_file_index): Use size_t for lengths, not int.
* build: suppress more warningsJim Meyering2009-04-305-10/+9
| | | | | | | | | * 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: enable new compiler warning optionsJim Meyering2009-04-301-2/+3
| | | | | | | * 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
* * src/lid.c: Remove duplicate inclusion of <termios.h>.Jim Meyering2008-11-301-1/+0
|
* * src/fnid.c: Remove duplicate inclusion of <errno.h>.Jim Meyering2008-11-301-1/+0
|
* accommodate gnulib header removalsPedro J. Ruiz Lopez2008-10-221-1/+1
| | | | | | | * libidu/idfile.c: Include <sys/stat.h>, not "lstat.h". * libidu/scanners.c: Likewise. * libidu/walker.c: Likewise. * src/mkid.c: Likewise.
* avoid warnings, adjust for const-correctnessJim Meyering2008-06-245-13/+20
| | | | | | | | | | | | | | * 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-245-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-143-3/+3
| | | | | | | | * 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.
* use gnulib's progname moduleJim Meyering2008-06-045-17/+10
| | | | | | | | | | | * 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.
* build aid, eid, and gid as binaries (were scripts)Jim Meyering2008-05-2810-11/+48
| | | | | | | | | | | | | | * 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.
* don't ignore pre-fclose ID-file write errorJim Meyering2008-05-221-1/+1
| | | | * src/mkid.c (write_id_file): Test ferror, too.
* detect write error on stdoutJim Meyering2008-05-205-1/+15
| | | | | | | | | | * 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.
* tighten scope in libidu/, tooJim Meyering2008-05-174-4/+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):
* * src/Makefile.am (sc_tight_scope): Improve.Jim Meyering2008-05-171-4/+4
|
* make more functions staticJim Meyering2008-05-171-2/+2
|
* declare many global variable to be "static"Jim Meyering2008-05-175-69/+65
| | | | | Remove the few that were thus exposed as being unused. Remove some unused prototypes.
* tests: make scope check work when $(noinst_HEADERS) is emptyJim Meyering2008-05-171-1/+1
| | | | | * 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.Jim Meyering2008-05-171-85/+0
| | | | | * src/lid.c (linetty): Remove unused function. (file_name_wildcard): Likewise.
* * src/lid.c (strcasestr): Remove function.Jim Meyering2008-05-171-18/+0
|
* make functions staticJim Meyering2008-05-175-147/+154
|
* tests: enable scoping checkJim Meyering2008-05-171-0/+27
| | | | | * cfg.mk (local-checks-to-skip): Don't skip sc_tight_scope anymore. * src/Makefile.am (sc_tight_scope): New rule. From coreutils.
* * src/defid: Handle --help and --version.Jim Meyering2008-05-101-0/+5
|
* aid, eid, gid: Make these scripts executable in srcdir.Jim Meyering2008-02-143-0/+0
| | | | | | | | | 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.
* Avoid printf-format-vs-arg type mismatch warnings.Jim Meyering2008-01-301-3/+5
| | | | * src/mkid.c (report_statistics): Cast ptrdiff_t to unsigned long long.
* Remove trailing blanks.Jim Meyering2008-01-303-4/+4
| | | | | | | | | | | | * 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.
* Use xstrdup, not strdup.Jim Meyering2008-01-301-1/+1
| | | | | | | | | * 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.
* Replace uses of xrealloc with uses of safer variants.Jim Meyering2008-01-141-7/+11
| | | | | | | * src/mkid.c (write_id_file): Avoid risk of overflow. (make_sibling_summary, add_token_to_summary): Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
* src/mkid.c: Remove now-unused declaration of dirname.Jim Meyering2008-01-141-2/+0
| | | | Signed-off-by: Jim Meyering <meyering@redhat.com>
* Mark diagnostics for translation.Jim Meyering2008-01-142-3/+4
| | | | | | | | * 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>
* Put at least two spaces between an option and its description.Jim Meyering2008-01-143-6/+7
| | | | | | | | | 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>
* Avoid SPACE-TAB.Jim Meyering2008-01-141-1/+1
| | | | | | | * testsuite/consistency: Use TAB-SPACE, instead. * src/defid: Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
* License upgrade to "GPL-3 or later"Pedro J. Ruiz Lopez2007-08-175-18/+18
|
* * add missing checks for terminal-related include filesClaudio Fontana2006-07-221-1/+1
|
* * provide replacement for lstat in a convoluted way,Claudio Fontana2006-07-222-2/+2
| | | | to workaround AC_REPLACE_FUNC / gnulib shortcomings
* * fix sbrk portability issueClaudio Fontana2006-07-221-6/+15
|
* * remove generated files from CVSClaudio Fontana2006-07-212-581/+62
| | | | | * apply EDITOR env variable patch * updated ChangeLog
* *** empty log message ***Claudio Fontana2006-07-052-3/+3
|
* * add bug report string to the help outputClaudio Fontana2006-03-055-3/+11
| | | | * src/lid.c: fix bug in pattern recognition in is_number()
* * include gnulib changesClaudio Fontana2006-02-012-2/+4
|
* * portability fixesClaudio Fontana2006-01-111-1/+1
|
* * small fixesClaudio Fontana2006-01-111-8/+7
|
* * fix bad offtostr usage (now uses return value)Claudio Fontana2006-01-081-2/+2
|
* * s/id-utils/idutils/g;Claudio Fontana2006-01-062-3/+2
| | | | * other small changes
* * solve mutual dependencies problem linking programs in src/Claudio Fontana2005-12-272-12/+12
|