1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 18:19:00 +02:00
Commit Graph

19284 Commits

Author SHA1 Message Date
Paul Eggert 248313ef6a (C_STRTOD): Set LC_ALL to "C", not just LC_NUMERIC, to avoid the
unlikely possibility of mixed locales screwing things up.
2004-09-08 17:00:24 +00:00
Paul Eggert 0e0adc6325 Fix "touch -- MMDDhhmm file" bug. 2004-09-07 06:23:39 +00:00
Paul Eggert 8ac79b7076 Test for "touch -- MMDDmm file" bug. Also, set
_POSIX2_VERSION=199209 and POSIXLY_CORRECT=1 so that it's
a better test for obsolescent features.
2004-09-07 06:23:09 +00:00
Paul Eggert b8f278429d Document "touch" POSIX-conformance fix. 2004-09-07 06:22:13 +00:00
Paul Eggert f786a91cd3 (main): Fix POSIX-conformance bug: "touch --
MMDDhhmm file" must be treated like "touch MMDDhhmm file" when
conforming to pre-2001 POSIX.
2004-09-07 06:21:46 +00:00
Paul Eggert d1d35fc729 Emulate Solaris 8 "sort -y" better. 2004-09-07 05:09:48 +00:00
Paul Eggert 0cd2d8a70e (main): Emulate Solaris 8 and 9 "sort -y", so that
"sort -y abc" is like "sort abc" whereas "sort -y 100" is like
plain "sort".
2004-09-07 05:09:24 +00:00
Paul Eggert 47b9873ada Add NEWS item for "od" changes. 2004-09-06 07:49:21 +00:00
Paul Eggert d225526e38 Several "od" changes for POSIX and FreeBSD compatibility. 2004-09-06 07:49:06 +00:00
Paul Eggert 50df4a8518 Several od changes for POSIX and FreeBSD compatibility. 2004-09-06 07:47:21 +00:00
Paul Eggert 772b168eb3 (od invocation): Several changes for POSIX
and FreeBSD compatibility.  Add support for XSI syntax
(POSIX 1003.1-2004).  Rename -s[N] to -S N.  Remove documentation
for -h.  -i is now -t dI (not d2) and -l is now -t dL (not d4).
2004-09-06 07:47:04 +00:00
Paul Eggert 286260ca55 Several changes for POSIX and FreeBSD compatibility.
(COMMON_SHORT_OPTIONS): Add -B, -D, -e, -F, -H, -I, -L, -O, -s, -X.
(long_options, main): --strings is now -S, not -s.
(usage): Reflect the usage changes.
(parse_old_offset): Do not issue a diagnostic on failure;
callers now do this as necessary.
(main): Support POSIX syntax.  Remove unused case 0 from getopt_long.
Add support for new short options (many undocumented) for
compatibility with FreeBSD.  Remove FIXME for -s; it's now
POSIX-compatible.  Default format is now oS, not o2.
2004-09-06 07:46:43 +00:00
Paul Eggert b05c150fed Improve quoting doc. 2004-09-06 01:03:29 +00:00
Paul Eggert ac161f59f7 (String tests): Improve quality of warning about
quoting strings for the shell.
2004-09-06 01:03:20 +00:00
Paul Eggert 3427d5c60c Sort options in usage message. 2004-09-06 01:00:03 +00:00
Paul Eggert ee86084bea Stty option-parsing fixes. 2004-09-05 07:28:11 +00:00
Paul Eggert 893a0d6f31 (recover_mode): Arg is now char const *, not char *.
(main): Use STDIN_FILENO, not 0.
Simplify option-parsing code a tad.
2004-09-05 07:27:51 +00:00
Paul Eggert a806fcf640 Check for the fixed stty option-parsing bugs. 2004-09-05 07:22:21 +00:00
Paul Eggert 9be806694a (valid_options): Remove.
(main): Fix some bugs in handling invalid option-combinations
like "stty -F".
2004-09-05 07:21:42 +00:00
Paul Eggert c43708fda4 Regenerate. 2004-09-05 07:11:47 +00:00
Paul Eggert c69c5ad84c Minor stat.c patches from Pozsar Balazs for GNU/Linux. 2004-09-03 21:59:03 +00:00
Paul Eggert 7ee151d229 (HAVE_STRUCT_STATXFS_F_TYPE): Fix typo that prevented
it from ever being nonzero.  Reported by Pozsar Balazs in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00189.html
(human_fstype): Add ramfs, squashfs, sysfs.
Reported by Pozsar Balazs in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00188.html
(human_fstype): Return char const *, not char *.
Simplify internals a bit, and avoid casts.
2004-09-03 21:58:36 +00:00
Paul Eggert 93bdd0d094 dd minor cleanup for conversions 2004-09-03 08:11:52 +00:00
Paul Eggert 54f4b3ce74 (usage): "alternated EBCDIC" -> "alternate EBCDIC".
(bit_count): Remove.  All uses changed to....
(multiple_bits_set): New function.
(scanargs): Use it, and check separately for each set of
incompatible options, to improve diagnostics.
(MX): Remove.
(apply_translations): Move checks for incompatible options
to scanargs, so that they're done consistently.
2004-09-03 08:11:34 +00:00
Paul Eggert 0501474249 dd conversion option cleanup. 2004-09-03 08:01:21 +00:00
Paul Eggert 6c75cc51ea (dd invocation): Specify which conversion options
are mutually exclusive.  Give a bit more detail about ascii,
ebcdic, and ibm conversions.
2004-09-03 08:00:48 +00:00
Paul Eggert 299fd05251 Output correct errno-related diagnostic on "paste" I/O errors.
Improve diet libc port.
2004-09-03 01:35:50 +00:00
Paul Eggert 53af9da394 Output correct errno-related diagnostic on "paste" I/O errors.
(write_error, xputchar): New functions.
(paste_parallel): Use correct errno value after input error.
(paste_parallel, paste_serial): Report errno value after output error.
2004-09-03 01:35:33 +00:00
Paul Eggert d33243b5ac (paste_parallel): Improve replacement for ENDLIST and CLOSED. 2004-09-03 01:23:15 +00:00
Paul Eggert 5e2e647328 Port to diet libc. 2004-09-02 23:59:52 +00:00
Paul Eggert 905aee9238 (FTSENT): Use "unsigned short int" rather than the unportable "u_short". 2004-09-02 23:57:30 +00:00
Paul Eggert 1c5ed711bb (fts_stat, fts_open, fts_read): Use "unsigned short int"
rather than the unportable "u_short", and similarly for u_int.
2004-09-02 23:56:59 +00:00
Paul Eggert 0dd27bdf17 (dummy_closed, CLOSED, dummy_endlist, ENDLIST): Remove;
it's not portable C to assume FILE is a complete type.
(paste_parallel): Use null instead of ENDLIST, and an explicit
boolean instead of CLOSED.
2004-09-02 23:56:42 +00:00
Paul Eggert 4798caf852 Fix infloop-3 to match POSIX.
Add blanks-1 through blanks-13.
2004-08-24 07:39:17 +00:00
Paul Eggert 969ed5b8f3 (add_tab_stop): Renamed from add_tabstop. All uses changed.
(parse_tab_stop): Renamed from parse_tabstop.  All uses changed.
(validate_tab_stop): Renamed from validate_tabstop.  All uses changed.
(next_file, main): Check fclose against 0, not EOF.
(unexpand): Remove unnecessary casts.
Add another loop nesting level, for lines, so that per-line variables
are initialized cleanly.
Revamp tab checking.  Check for write error immediately, rather
than just once at the end of the program.
(TAB_STOP_SENTINEL): Remove.
(tab_size): Now size_t, not uintmax_t, since we need to store
the sequences of blanks.
(max_column_width): New var.
(usage): Say "blank" where POSIX requires this.
(add_tab_stop): Calculate maximum column width.
(unexpand): Store the pending blanks, instead of merely counting them.
Follow POSIX's rules about -a requiring two blanks before a tab stop.
Get rid of internal label and goto.
2004-08-24 07:38:49 +00:00
Paul Eggert 0d568f7678 Revamp to resemble the new unexpand.c better.
(usage): -i does not convert tabs after non-tabs.
(add_tab_stop): Renamed from add_tabstop.  All uses changed.
(parse_tab_stop): Renamed from parse_tabstop.  All uses changed.
(validate_tab_stop): Renamed from validate_tabstop.  All uses changed.
(next_file, main): Check fclose against 0, not EOF.
(expand): Remove unnecessary casts.
Add another loop nesting level, for lines, so that per-line variables
are initialized cleanly.
Revamp tab checking.  Check for write error immediately, rather
than just once at the end of the program.
2004-08-24 07:38:04 +00:00
Paul Eggert bb59926563 Standardize on "tab stop" (the POSIX usage)
rather than "tabstop".
(unexpand invocation): Use "blank" rather than "space" when
POSIX requires "blank".  Define "blank".  Initial blanks are
converted even if there's just one.  For -a, convert two or
more blanks only if they occur just before a tab stop.
2004-08-24 07:37:28 +00:00
Paul Eggert 59cf3747e3 POSIX-conformance fixes for "expand" and "unexpand". 2004-08-24 07:36:36 +00:00
Paul Eggert 30e41c2ddc Sync from gnulib. 2004-08-20 02:29:42 +00:00
Paul Eggert 5dd2658cb2 Regenerate. 2004-08-20 02:12:59 +00:00
Paul Eggert 529a7c21fd Sync getopt from gnulib. 2004-08-20 02:10:15 +00:00
Paul Eggert 463f2060b7 Add getopt_.h, getopt_int.h. 2004-08-20 02:09:41 +00:00
Paul Eggert 9308e71ada Add support for "chown : file" and the like.
Also, fix a regression and some memory leaks.
2004-08-19 20:07:20 +00:00
Paul Eggert 8d3555ff43 Regenerate. 2004-08-19 20:06:22 +00:00
Paul Eggert 6f9f676ca7 (chown invocation): Fix synopsis:
group must always be preceded by separator.
"chown : file" and "chown '' file" don't change the owner or group.
Update the explanation of what happens to the set-user-ID or
set-group-ID bits, e.g., they sometimes are not cleared if they
denote mandatory locking.  Change "find"-oriented examples to use
chown -h.
2004-08-19 20:05:52 +00:00
Paul Eggert 5e93200bbc Don't use <alloca.h>, so that we don't use alloca on
strings on unbounded length.  alloca's performance benefits aren't
that important here.
(V_STRDUP): Remove.
(parse_with_separator): New function, with most of the internals
of the old parse_user_spec.  Allow user to omit both user and group,
for compatibility with FreeBSD.
Clone only the user name, not the entire spec.
Do not set *uid, *gid unless entirely successful.
Avoid memory leak in some failing cases.
Fix regression for USER.GROUP reported by Dmitry V. Levin in
<http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
(parse_user_spec): Rewrite to use parse_with_separator.
2004-08-19 20:04:42 +00:00
Paul Eggert 7c308093f3 New file, partly taken from
Dmitry V. Levin's suggestion in
<http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
2004-08-19 20:04:21 +00:00
Paul Eggert d3771df301 (TESTS): Add separator. 2004-08-19 20:04:02 +00:00
Paul Eggert a078203b6d Test "chgrp '' file". 2004-08-19 20:03:48 +00:00
Paul Eggert 958ae74efa (usage): "chown '' file" is now allowed.
(main): Do not set user name to the empty string if the group
name is null.
2004-08-19 20:03:26 +00:00