summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-09-10tests: use "Exit $fail", not (exit $fail); exit $failJim Meyering
* tests/test-lib.sh (Exit): New function by Ralf Wildenhues in automake http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=20594c08f63 * tests/**: Convert all uses: This restrictive change converted the vast majority: git grep -l '^(exit \$fail); exit \$fail$' \ | xargs perl -pi -e 's/'^\(exit \$fail\); exit \$fail$/Exit \$fail/' And this did the rest, plus a few undesirable ones, so I manually backed out the changes to ChangeLog-* and build-aux/check.mk: git grep -l -E '\(exit [^)]+\); exit ' \ | xargs perl -pi -e 's/\(exit (.+?)\); exit \1/Exit $1/'
2008-09-08tests: move input-tty into a test-lib.sh functionJim Meyering
* tests/test-lib.sh (require_controlling_input_terminal_): New function, from * tests/input-tty: ...here. Remove file. * tests/Makefile.am (EXTRA_DIST): Remove input-tty. * tests/mv/i-3: Use the function, not the file. * tests/misc/stty: Likewise. * tests/misc/stty-row-col: Likewise. * tests/misc/stty-invalid: Likewise.
2008-09-07tests: work around Solaris 11 bugJim Meyering
* tests/misc/printf-surprise: Accept bogus prefix on stderr output.
2008-09-07tests: don't let rounding-to-1KB blocks provoke a failureJim Meyering
* tests/df/total-awk: Use df's --block-size=512 option.
2008-09-07tests: don't fail due to built-in sleep from Solaris 11's /bin/shJim Meyering
* tests/misc/help-version (id_args): Invoke via env to ensure we run the just-built version of sleep.
2008-09-06install: new option: --strip-program,Kamil Dudka
...to specify the program used to strip binaries * src/install.c (main): Handle new option --strip-program. (strip): Use strip program from global variable strip_program. (usage): Mention new option --strip-program in --help. * tests/tests/strip-program: Test case for new option --strip-program. * tests/Makefile.am: Add new test case to test set. * doc/coreutils.texi: Mention new option --strip-program. * NEWS: Mention the change. * TODO: Remove completed task.
2008-09-03df: new option: --total to print grand totalsKamil Dudka
* src/df.c (add_uint_with_neg_flag): New function to add two integral values with separate negation flag. (show_dev): New parameter force_fsu to display numbers directly. Collect summary statistics on each printed device. (usage): Mention new option --total in --help. (main): Initialize summary on program start. Handle new option --total. * tests/df/total: Dummy test case for new --total option. * tests/df/total-awk: Better test case for new --total option (requires awk). * doc/coreutils.texi: Mention new parameter --total. * NEWS: Mention the change. * TODO: Removed completed task.
2008-09-03TODO: add an item for a chmod optimizationJim Meyering
2008-08-31env, groups: remove duplicate inclusion of <getopt.h>Jerry Snitselaar
* src/env.c: Remove redundant #include. * src/groups.c: Likewise. Tiny change.
2008-08-26generate version.c and version.hJim Meyering
* src/Makefile.am (version.c, version.h): New rules. Generate. (nodist_libver_a_SOURCES): Define * .gitignore: Add src/version.c and src/version.h. (DISTCLEANFILES): Add version.c and version.h.
2008-08-26use new global, "Version", rather than macro, VERSIONJim Meyering
With this change, a version-string update no longer forces recompilation of 100+ src/*.o files. * src/version.c (Version): New global. New file. * src/version.h: Declare it. * src/Makefile.am: Put it in a library that everyone links to. (noinst_LIBRARIES, libver_a_SOURCES): Define. (LDADD): Add libver.a. (sc_tight_scope): Use perl (was sed), and a more relaxed regexp to build the global-variable-name-recognizing regexp list. * src/system.h: Include "version.h". (case_GETOPT_VERSION_CHAR): Use Version rather than VERSION. * src/basename.c (main): Use Version rather than VERSION. * src/chroot.c (main): Likewise. * src/cksum.c (main): Likewise. * src/dd.c (main): Likewise. * src/dirname.c (main): Likewise. * src/echo.c (main): Likewise. * src/hostid.c (main): Likewise. * src/hostname.c (main): Likewise. * src/link.c (main): Likewise. * src/logname.c (main): Likewise. * src/nice.c (main): Likewise. * src/nohup.c (main): Likewise. * src/printenv.c (main): Likewise. * src/printf.c (main): Likewise. * src/pwd.c (main): Likewise. * src/setuidgid.c (main): Likewise. * src/sleep.c (main): Likewise. * src/sync.c (main): Likewise. * src/test.c (main): Likewise. * src/timeout.c (main): Likewise. * src/true.c (main): Likewise. * src/tsort.c (main): Likewise. * src/unlink.c (main): Likewise. * src/uptime.c (main): Likewise. * src/users.c (main): Likewise. * src/whoami.c (main): Likewise. * src/yes.c (main): Likewise.
2008-08-26bootstrap: preserve permissions of more copied filesJim Meyering
* bootstrap (cp_mark_as_generated): Preserve perms of copied files. Remove a kludge, now that this is fixed.
2008-08-23doc: clarify wc -L documentationBruno Haible
* doc/coreutils.texi (wc invocation): Explain what the -L option measures.
2008-08-20ls: adjust to gnulib changeEric Blake
* src/ls.c (includes): "strverscmp.h" no longer exists.
2008-08-19.gitignore: ignore more filesEric Blake
* .gitignore: Ignore directories created by gnulib. Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-19.gitattributes: generalizeEric Blake
* .gitattributes: Relax the glob pattern, so it matches *.texinfo, too. Suggest a POSIX BRE, rather than one that uses the GNU extension, \\+.
2008-08-18sort: improve usage wordingEric Blake
* src/sort.c (usage): Mention that -k defaults to end of line if POS2 omitted. * THANKS: Update. Reported by Tim Ryan. Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-15adjustJim Meyering
2008-08-15sort: new option, --sort=version, for version number orderingBruce Korb
* src/sort.c [struct keyfield] (version): New member. (usage): Describe --version-sort. (sort_options): Add 'V'. (long_options): Add "version-sort". (CHECK_TABLE, _ct_, SORT_TABLE, _st_): Define new macros. (check_args, sort_args, sort_types): Use these new macros in declarations. (ARGMATCH_VERIFY): Remove use. No longer needed. (compare_version): New function. (key_compare): Add a case. (check_ordering_compatibility): Handle new type. (main): Likewise. Reformat two expressions for readability. * tests/misc/sort-version: new test file * tests/Makefile.am: add it to the list * doc/coreutils.texi (sort invocation): Document it. * NEWS: Mention the new feature.
2008-08-14set envvars via "env" to avoid spurious set -x output from bad shellsJim Meyering
* tests/dd/misc: Set LC_ALL=C via env. * tests/cp/thru-dangling: Set POSIXLY_CORRECT via env. This is necessary at least on AIX 5.3. Reported by Jeph Cowan and Ralf Wildenhues. Details here: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14235/focus=14257
2008-08-14"expr --bignum 1" now fails when expr is built without libgmpJim Meyering
* src/expr.c (main): When --bignum is requested, yet expr was built without libgmp, exit nonzero (3) in addition to giving a diagnostic.
2008-08-14mktemp, sort, tac: don't use undefined after mkstemp failureJim Meyering
When mkstemp fails, the template buffer may have undefined contents, so we must not print it. * src/sort.c (create_temp_file): Use temp_dir, not "file" when diagnosing failed mkstemp, because "file" may be undefined. * tests/misc/sort-merge: Adjust for new expected output. Jeph Cowan and Ralf Wildenhues reported the test failure: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14235/focus=14257 * src/tac.c (copy_to_temp): Don't use template buffer after failed mkstemp call, since its contents may be undefined. * tests/misc/tac (pipe-bad-tmpdir): New test for the above. * src/mktemp.c (main): Save a copy of the template string, solely for use in case mkstemp fails. * tests/misc/mktemp (pipe-bad-tmpdir): New test for the above.
2008-08-12kill: micro grammar nit in description of SIGNALBenno Schulenberg
2008-08-12groups: let synopsis show that the command allows multiple usernamesBenno Schulenberg
Also make the docstring say so.
2008-08-12id: remove superfluous condition test; it is caught at -Z aboveBenno Schulenberg
2008-08-12id: gettextize a few missed tiny stringsBenno Schulenberg
2008-08-12fmt: remove the 'no file' sentence; the standard phrase is given belowBenno Schulenberg
Replace the sentence with a more useful explanation of -DIGITS.
2008-08-11echo: correct description of \cBenno Schulenberg
* src/echo.c (usage): Correct description of \c. * coreutils.texi (echo invocation): Likewise. * src/echo.c: Remove --help-duplicating comment.
2008-08-11doc: the quote operator for expr is '+', not 'quote'Benno Schulenberg
2008-08-11factor: remove duplicate docstring; use the more detailed oneBenno Schulenberg
2008-08-11echo: gettextize the alternative option description tooBenno Schulenberg
2008-08-11dd: clarify meaning of multiplication factors; put xM in orderBenno Schulenberg
2008-08-11doc: remove stray word from date's field width descriptionBenno Schulenberg
2008-08-11date: remove confusing and unneeded sentence from --helpBenno Schulenberg
It makes it unclear what 'sequences' refers to, and the -u option already says enough.
2008-08-11printenv: say what it does when variables are specifiedBenno Schulenberg
2008-08-11doc: put the exitstatus paragraph in a better placeBenno Schulenberg
* doc/coreutils.texi (tsort invocation): move two lines
2008-08-11cp: move a newline to make second message identical to othersBenno Schulenberg
2008-08-11who: Gettextize two forgotten stringsBenno Schulenberg
2008-08-10sort: remove unnecessary declaration of strtodJim Meyering
* src/sort.c (STDC_HEADERS): Remove declaration of strtod.
2008-08-10sort: avoid erroneous castJim Meyering
* src/sort.c (OPEN_MAX): Define if not already defined. (MAX_NMERGE): Remove definition. (specify_nmerge): Don't cast MAX_NMERGE (of type size_t) to unsigned int. Instead, use OPEN_MAX as the fall-back value.
2008-08-10sort: don't print uninitialized in diagnosticJim Meyering
* src/sort.c (specify_nmerge): Do use uinttostr value. Provoke with e.g., sort -m --batch-size=18446744073709551617 Omit quotes around known-numeric value in diagnostic. * tests/misc/sort-merge [nmerge-big]: Tighten ERR_SUBST regexp to require a numeric value in that diagnostic, so this particular failure cannot reappear.
2008-08-09* .gitattributes: Better diff output for texinfo sources.Jim Meyering
2008-08-09dd.c: reduce duplication in new O_FULLBLOCK-defining codeJim Meyering
* src/dd.c (MULTIPLE_BITS_SET): New macro, extracted from... (multiple_bits_set): ...this function. Use a single-line, and far simpler expression (no need to list all O_* symbols again) to validate the derived O_FULLBLOCK value.
2008-08-09* coreutils.texi (factor invocation, expr invocation): Adjust wording.Jim Meyering
2008-08-09expr: avoid compiler warningsJim Meyering
* src/expr.c (die): New "noreturn" function to wrap one-arg use of error (string_too_long): Use die rather than error. (toint): Remove definition of now-unused function. (eval6): Remove a little duplication. Use die rather than error. (dodivide): Remove declaration of now-unused variable.
2008-08-09* tests/misc/expr: Add tests of the new GMP-based code.Jim Meyering
2008-08-06expr: support arbitrary-precision arithmeticJames Youngman
* src/Makefile.am (expr_LDADD): Link expr against GNU MP. * doc/coreutils.texi (expr invocation): Describe --bignum, --no-bignum. Explain the new arbitrary-precision functionality. * NEWS: Indicate that arbitrary-precision arithmetic is now supported in expr. * src/expr.c (enum valtype): Added mp_integer, signifying a GNU MP number. (usage): Document the new options --bignum and --no-bignum which force and prohibit the use of arbitrary-precision arithmetic, respectively. (long_options): data structure for getopt_long, which we need to use to parse the options mentioned above. (main): parse these options with getopt_long instead of parse_long_options. (valinfo): Downgrade the numeric member of the union from intmax_t to signed long, since MP lacks functions for promoting an intmax_t to an arbitrary-precision quantity. (enum arithmetic_mode): Represents the current choice between --bignum, --no-bignum and the default (automatically switch from one to the other if needed). (integer_overflow): issue a more explicit error message indicating that MP is not available. (string_too_long): new function, emits a fatal error message for the case where an argument to the 'index' expression is too long for a string offset to be represented. (int_value): With --bignum, create the value as mp_integer rather than plain integer. (substr_value): factored out of eval6; implements "substr". (freev): also destroy mp_integer values. Check that no mp_integer values exist if --no-bignum was specified. (printv, null, tostring): support mp_integer. (toint): new funtion for converting from string or mp_integer to integer. (getsize): extracts a size_t value from a VALUE object; used to implement substr. (promote): promotes a value from integer to mp_integer. (domult, dodivide): functions for multiplication and division, factored out of eval4. (doadd): addition/subraction function, factpred out of eval3. (eval3): support mp_integer types; call doadd. (eval4): support mp_integer types; call domult, dodivide. (eval6): support mp_integer offsets and lengths for "substr" and "index". * TODO: Mention that expr supports arbitrary-precision arithmetic, and suggest that this might also be a good idea for seq. * AUTHORS (expr): Add James Youngman.
2008-08-06doc: mv,cp: undocument the --reply optionJames Youngman
* doc/coreutils.texi (mv invocation): Remove documentation for mv --reply. (cp invocation): Likewise. * NEWS: mention this.
2008-08-06document the supported baud rates beyond 38400James Youngman
* doc/coreutils.texi (Special): Document the supported baud rates beyond 38400.
2008-08-05ls: ignore spurious getfilecon failure due to lack of SELinux supportJohn David Anglin
* src/ls.c (gobble_file): Upon failed getfilecon, treat an errno value of EOPNOTSUPP just like ENOTSUP. See <http://bugs.debian.org/488549>.