platform/upstream/coreutils.git
20 years ago(main): Check for incompatible options. -R --dereference
Jim Meyering [Tue, 8 Jun 2004 13:40:00 +0000 (13:40 +0000)]
(main): Check for incompatible options.  -R --dereference
requires either -H or -L, and -R -h requires -P.  If -H, specify
FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster.  Make this
file as much like chown.c as possible.

20 years ago(main): Check for incompatible options. -R --dereference
Jim Meyering [Tue, 8 Jun 2004 13:37:40 +0000 (13:37 +0000)]
(main): Check for incompatible options.  -R --dereference
requires either -H or -L, and -R -h requires -P.  If -H, specify
FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster.  Make this
file as much like chgrp.c as possible.

20 years ago*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 13:31:49 +0000 (13:31 +0000)]
*** empty log message ***

20 years ago(fts_stat, fts_alloc): Always allocate and use a struct
Jim Meyering [Tue, 8 Jun 2004 13:31:43 +0000 (13:31 +0000)]
(fts_stat, fts_alloc): Always allocate and use a struct
stat, even if the user isn't interested in the results.
This prevents a core dump in cycle_check when FTS_NOSTAT is set.

20 years ago(ENOTSUP): Remove.
Jim Meyering [Tue, 8 Jun 2004 13:24:09 +0000 (13:24 +0000)]
(ENOTSUP): Remove.

20 years agofix typo
Jim Meyering [Tue, 8 Jun 2004 13:23:42 +0000 (13:23 +0000)]
fix typo

20 years ago*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 13:23:17 +0000 (13:23 +0000)]
*** empty log message ***

20 years ago(EOPNOTSUPP): Define if not defined.
Jim Meyering [Tue, 8 Jun 2004 12:02:00 +0000 (12:02 +0000)]
(EOPNOTSUPP): Define if not defined.
(ENOSYS): Remove.

20 years ago(lchown): Return EOPNOTSUPP if not supported; this
Jim Meyering [Tue, 8 Jun 2004 12:01:38 +0000 (12:01 +0000)]
(lchown): Return EOPNOTSUPP if not supported; this
is what POSIX-2004 specifies.

20 years ago*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 07:13:18 +0000 (07:13 +0000)]
*** empty log message ***

20 years ago(main): Fix typo introduced on 2003-05-10 that
Jim Meyering [Tue, 8 Jun 2004 07:13:10 +0000 (07:13 +0000)]
(main): Fix typo introduced on 2003-05-10 that
prevented a diagnostic of any operands.

20 years ago*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 06:56:08 +0000 (06:56 +0000)]
*** empty log message ***

20 years ago.
Jim Meyering [Tue, 8 Jun 2004 06:54:04 +0000 (06:54 +0000)]
.

20 years ago(direct_mode): Turn it on/off with directio, too.
Jim Meyering [Tue, 8 Jun 2004 06:47:43 +0000 (06:47 +0000)]
(direct_mode): Turn it on/off with directio, too.

20 years ago*** empty log message ***
Jim Meyering [Mon, 7 Jun 2004 15:27:47 +0000 (15:27 +0000)]
*** empty log message ***

20 years agoEnable direct-mode I/O (bypassing the buffer cache), if possible.
Jim Meyering [Mon, 7 Jun 2004 15:27:42 +0000 (15:27 +0000)]
Enable direct-mode I/O (bypassing the buffer cache), if possible.
Prompted by a suggestion from Kalle Olavi Niemitalo
in http://bugs.debian.org/207035.

(direct_mode): New function.
(do_wipefd): Turn on direct-mode I/O.
(dopass): If a file's first write fails with EINVAL,
turn off direct-mode I/O and retry the write.

20 years ago*** empty log message ***
Jim Meyering [Mon, 7 Jun 2004 15:26:52 +0000 (15:26 +0000)]
*** empty log message ***

20 years ago(gl_MACROS): Check for the directio function.
Jim Meyering [Mon, 7 Jun 2004 15:26:49 +0000 (15:26 +0000)]
(gl_MACROS): Check for the directio function.

20 years ago*** empty log message ***
Jim Meyering [Mon, 7 Jun 2004 08:21:10 +0000 (08:21 +0000)]
*** empty log message ***

20 years agoRemove menu references to just-removed subsection.
Jim Meyering [Mon, 7 Jun 2004 08:21:07 +0000 (08:21 +0000)]
Remove menu references to just-removed subsection.

20 years ago*** empty log message ***
Jim Meyering [Sun, 6 Jun 2004 19:31:46 +0000 (19:31 +0000)]
*** empty log message ***

20 years ago(tr invocation): Remove the section describing
Jim Meyering [Sun, 6 Jun 2004 19:31:43 +0000 (19:31 +0000)]
(tr invocation): Remove the section describing
how POSIXLY_CORRECT changes tr's behavior.

20 years agofix typo in comment
Jim Meyering [Sun, 6 Jun 2004 19:18:49 +0000 (19:18 +0000)]
fix typo in comment

20 years ago*** empty log message ***
Jim Meyering [Sun, 6 Jun 2004 19:03:05 +0000 (19:03 +0000)]
*** empty log message ***

20 years agoUpdate from gnulib.
Jim Meyering [Sun, 6 Jun 2004 19:03:01 +0000 (19:03 +0000)]
Update from gnulib.

20 years ago*** empty log message ***
Jim Meyering [Sun, 6 Jun 2004 14:20:20 +0000 (14:20 +0000)]
*** empty log message ***

20 years ago(main): "tr -d a b" is now a fatal error even if POSIXLY_CORRECT is set.
Jim Meyering [Sun, 6 Jun 2004 14:20:16 +0000 (14:20 +0000)]
(main): "tr -d a b" is now a fatal error even if POSIXLY_CORRECT is set.
The POSIX SYNOPSIS does not allow this option combination.

20 years ago*** empty log message ***
Jim Meyering [Fri, 4 Jun 2004 17:44:24 +0000 (17:44 +0000)]
*** empty log message ***

20 years ago(dopass): Don't subtract 1 from the offset after
Jim Meyering [Fri, 4 Jun 2004 17:43:55 +0000 (17:43 +0000)]
(dopass): Don't subtract 1 from the offset after
a write error.  Problem reported by Jon Peatfield in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html

20 years ago*** empty log message ***
Jim Meyering [Thu, 3 Jun 2004 16:03:44 +0000 (16:03 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Thu, 3 Jun 2004 16:03:39 +0000 (16:03 +0000)]
*** empty log message ***

20 years agoFix bug reported by Buciuman Adrian in
Jim Meyering [Thu, 3 Jun 2004 16:03:32 +0000 (16:03 +0000)]
Fix bug reported by Buciuman Adrian in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00105.html>
where 'dd' created a file that was too large.  The bug was that dd
assumed that the input file offset does not advance after a failed
read; but POSIX says that the input file offset is undefined after
a failed read.

(MAX_BLOCKSIZE): New macro.
(input_seekable, input_seek_errno, input_offset,
input_offset_overflow): New vars.
(scanargs): Reject block sizes greater than MAX_BLOCKSIZE.
(advance_input_offset): New function.
(skip_via_lseek): Set errno to zero when reporting our failure,
so that we don't report based on garbage errno.
(skip): If fdesc is standard input, advance the input offset.
Do not quit if reading, and if noerror was specified;
POSIX seems to require this.
If read fails on output file, report the earlier lseek failure
instead; this fixes a FIXME in dd_copy.
(advance_input_after_read_error): New function.
(dd_copy): Use it, instead of assuming that failed reads
do not advance the file pointer.  Advance input offset
after nonfailed reads.  Advance only a partial block if
the previous read (before the failed read) succeeded, and
do not generate an output block of zeros in this case.
(main): Determine initial input offset, seekability of input,
and error if it wasn't seekable.

20 years ago*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:41:42 +0000 (21:41 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:39:49 +0000 (21:39 +0000)]
*** empty log message ***

20 years agorm (without -f) could hang unnecessarily when attempting to
Jim Meyering [Wed, 2 Jun 2004 21:39:45 +0000 (21:39 +0000)]
rm (without -f) could hang unnecessarily when attempting to
remove a symlink to a file on an off-line NFS-mounted partition.
Reported by David Howells in https://bugzilla.redhat.com/124699.

(write_protected_non_symlink): New function.
Don't invoke euidaccess on symlinks.
(prompt): Use write_protected_non_symlink rather than using
euidaccess directly, being careful not to call lstat twice for a file.

20 years ago*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:23:42 +0000 (21:23 +0000)]
*** empty log message ***

20 years ago(cut invocation): Clarify what --output-delimiter=STR
Jim Meyering [Wed, 2 Jun 2004 21:23:39 +0000 (21:23 +0000)]
(cut invocation): Clarify what --output-delimiter=STR
does with byte/character ranges.

20 years ago.
Jim Meyering [Wed, 2 Jun 2004 21:21:05 +0000 (21:21 +0000)]
.

20 years ago*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:20:45 +0000 (21:20 +0000)]
*** empty log message ***

20 years agoFix a bug in how the --output-delimiter=D option works with
Jim Meyering [Wed, 2 Jun 2004 21:20:41 +0000 (21:20 +0000)]
Fix a bug in how the --output-delimiter=D option works with
abutting byte or character ranges.  Reported by David Krider in
http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00132.html

(print_kth): Remove special case for open-ended range.
(set_fields): Record the range start index for an interval even
when it abuts another interval on its low side.
Also record the range start index of the longest right-open-interval.

20 years agoAdd tests of --output-delimiter=S with abutting and overlapping byte ranges.
Jim Meyering [Wed, 2 Jun 2004 21:20:23 +0000 (21:20 +0000)]
Add tests of --output-delimiter=S with abutting and overlapping byte ranges.

20 years ago.
Jim Meyering [Wed, 2 Jun 2004 08:54:32 +0000 (08:54 +0000)]
.

20 years agoNew tests bs-055, bs-at-end, repeat-Compl.
Jim Meyering [Wed, 2 Jun 2004 08:50:42 +0000 (08:50 +0000)]
New tests bs-055, bs-at-end, repeat-Compl.
Fix comment for range-a-a.

20 years ago*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 08:50:30 +0000 (08:50 +0000)]
*** empty log message ***

20 years ago(posix_pedantic): Remove; no longer needed since
Jim Meyering [Wed, 2 Jun 2004 08:50:24 +0000 (08:50 +0000)]
(posix_pedantic): Remove; no longer needed since
we need to test this in just one place now.
(usage): Mention -C.
(unquote): Note that \055, \n, etc are escaped.
Do not worry about POSIXLY_CORRECT when warning about ambiguous
escape sequences.
\ at end of string stands for itself.
Do not diagnose invalid backslash escapes: POSIX says the behavior
is unspecified in this case, so we don't need to diagnose it.
(main): Add support for -C (currently an alias for -c).
Do not diagnose 'tr [:upper:] [:upper:], as POSIX does not require
a diagnostic here.

20 years ago*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 08:35:27 +0000 (08:35 +0000)]
*** empty log message ***

20 years ago(tr invocation): Mention -C.
Jim Meyering [Wed, 2 Jun 2004 08:35:02 +0000 (08:35 +0000)]
(tr invocation): Mention -C.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 17:12:44 +0000 (17:12 +0000)]
*** empty log message ***

20 years agoupdate from gnulib
Jim Meyering [Tue, 1 Jun 2004 15:27:10 +0000 (15:27 +0000)]
update from gnulib

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 15:24:15 +0000 (15:24 +0000)]
*** empty log message ***

20 years agoUpdate from gnulib.
Jim Meyering [Tue, 1 Jun 2004 15:24:11 +0000 (15:24 +0000)]
Update from gnulib.

20 years ago.
Jim Meyering [Tue, 1 Jun 2004 14:28:25 +0000 (14:28 +0000)]
.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 14:18:08 +0000 (14:18 +0000)]
*** empty log message ***

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:37:04 +0000 (13:37 +0000)]
*** empty log message ***

20 years ago(main): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:37:01 +0000 (13:37 +0000)]
(main): Update use of xreadlink.

20 years ago(print_stat): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:36:40 +0000 (13:36 +0000)]
(print_stat): Update use of xreadlink.

20 years ago(get_link_name): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:36:20 +0000 (13:36 +0000)]
(get_link_name): Update use of xreadlink.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:29:42 +0000 (13:29 +0000)]
*** empty log message ***

20 years ago(copy_internal): Don't use alloca, as it can mess up
Jim Meyering [Tue, 1 Jun 2004 13:29:36 +0000 (13:29 +0000)]
(copy_internal): Don't use alloca, as it can mess up
royally if the link length is long (e.g., GNU/Hurd).  Use
xreadlink instead, it's safer.  Don't bother to read the link if
it's the wrong size.  Add a FIXME because this area is a bit murky
and undocumented.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:24:23 +0000 (13:24 +0000)]
*** empty log message ***

20 years ago(canonicalize_file_name): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:24:12 +0000 (13:24 +0000)]
(canonicalize_file_name): Update use of xreadlink.

20 years agoUpdate prototype to reflect new signature.
Jim Meyering [Tue, 1 Jun 2004 13:22:25 +0000 (13:22 +0000)]
Update prototype to reflect new signature.
Include <stddef.h>, for size_t.

20 years agoInclude xreadlink.h first, to catch .h file dependency problems.
Jim Meyering [Tue, 1 Jun 2004 13:20:50 +0000 (13:20 +0000)]
Include xreadlink.h first, to catch .h file dependency problems.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:17:13 +0000 (13:17 +0000)]
*** empty log message ***

20 years ago(binary_operator, and, or, main):
Jim Meyering [Tue, 1 Jun 2004 13:17:08 +0000 (13:17 +0000)]
(binary_operator, and, or, main):
Prefer the notation `STREQ (a, b)' over `!strcmp (a, b)'
and `STREQ (a, b)' over `strcmp (a, b) == 0'.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:09:20 +0000 (13:09 +0000)]
*** empty log message ***

20 years ago(main): Prefer the notation `STREQ (a, b)' over `!strcmp (a, b)'.
Jim Meyering [Tue, 1 Jun 2004 13:07:01 +0000 (13:07 +0000)]
(main): Prefer the notation `STREQ (a, b)' over `!strcmp (a, b)'.

20 years ago(swallow_file_in_memory, main):
Jim Meyering [Tue, 1 Jun 2004 13:05:27 +0000 (13:05 +0000)]
(swallow_file_in_memory, main):
Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.

20 years ago(correct_password, restricted_shell, main):
Jim Meyering [Tue, 1 Jun 2004 13:04:02 +0000 (13:04 +0000)]
(correct_password, restricted_shell, main):
Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.

20 years ago(main): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.
Jim Meyering [Tue, 1 Jun 2004 13:00:28 +0000 (13:00 +0000)]
(main): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.

20 years ago(batch_convert): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.
Jim Meyering [Tue, 1 Jun 2004 12:52:31 +0000 (12:52 +0000)]
(batch_convert): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.

20 years ago(nextarg): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.
Jim Meyering [Tue, 1 Jun 2004 12:52:14 +0000 (12:52 +0000)]
(nextarg): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.

20 years ago(main, sort_buffer_size): Use STREQ (a, b) rather than `strcmp (a, b) == 0'
Jim Meyering [Tue, 1 Jun 2004 12:50:09 +0000 (12:50 +0000)]
(main, sort_buffer_size): Use STREQ (a, b) rather than `strcmp (a, b) == 0'

20 years agoecho compatibility cleanup.
Jim Meyering [Tue, 1 Jun 2004 12:47:45 +0000 (12:47 +0000)]
echo compatibility cleanup.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 12:47:37 +0000 (12:47 +0000)]
*** empty log message ***

20 years agoAdd some index references for POSIXLY_CORRECT.
Jim Meyering [Tue, 1 Jun 2004 12:46:22 +0000 (12:46 +0000)]
Add some index references for POSIXLY_CORRECT.
(echo invocation): Document today's changes.

20 years ago(V9_ECHO): Remove; always enabled.
Jim Meyering [Tue, 1 Jun 2004 12:43:41 +0000 (12:43 +0000)]
(V9_ECHO): Remove; always enabled.
(DEFAULT_ECHO_TO_XPG): Renamed from V9_DEFAULT, so that
we use the same naming convention as bash.  Now an enum,
not a macro.
(usage): Reword to mention -e/-E more accurately.
Mention \0NNN (the POSIX syntax) rather than \NNN (nonstandard).
(hextobin): New function.
(main): Use bool rather than int for local vars when appropriate.
Do not allow options if POSIXLY_CORRECT, unless we are using
BSD semantics and the first argument is "-n".
Don't pass unnecessary extra arg to parse_long_options.
do_v9 now defaults to DEFAULT_ECHO_TO_XPG, not to allow_options.
Do not look for options if !allow_options.
Use size_t rather than int when appropriate.
Open-code option test rather than using strrchr.
Use faster test for "-".
Avoid redundant argc test.
Add support for \x, for Bash compatibility.
Use e.g. '\a' rather than '\007', for portability to EBCDIC hosts.
When '\c' is encountered, stop printing immediately, as POSIX
requires.
Add support for \xhh syntax.
Add support for \0ooo syntax; POSIX requires this.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 08:51:27 +0000 (08:51 +0000)]
*** empty log message ***

20 years agoUpdate from gnulib.
Jim Meyering [Tue, 1 Jun 2004 08:51:23 +0000 (08:51 +0000)]
Update from gnulib.

20 years ago*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 07:49:59 +0000 (07:49 +0000)]
*** empty log message ***

20 years ago.
Jim Meyering [Tue, 1 Jun 2004 07:49:47 +0000 (07:49 +0000)]
.

20 years ago*** empty log message ***
Jim Meyering [Mon, 31 May 2004 18:29:48 +0000 (18:29 +0000)]
*** empty log message ***

20 years ago.
Jim Meyering [Mon, 31 May 2004 12:20:01 +0000 (12:20 +0000)]
.

20 years ago.
Jim Meyering [Mon, 31 May 2004 12:18:55 +0000 (12:18 +0000)]
.

20 years agoregenerate
Jim Meyering [Mon, 31 May 2004 12:18:24 +0000 (12:18 +0000)]
regenerate

20 years ago2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
Jim Meyering [Mon, 31 May 2004 12:17:49 +0000 (12:17 +0000)]
2004-05-29  Paul Eggert  <eggert@cs.ucla.edu>

tr cleanup, mostly having to do with integer type ranges.
Remove all casts.

* tests/tr/Test.pm: Add a few tests for the below.  Alas, most of
the test cases wouldn't be portable, or would take too much CPU
time, or both.

20 years ago(TESTS_ENVIRONMENT): Define PATH to include
Jim Meyering [Mon, 31 May 2004 12:16:47 +0000 (12:16 +0000)]
(TESTS_ENVIRONMENT): Define PATH to include
the build src/ directory -- at the front.
($(srcdir)/$x-tests): Depend on Makefile.am.
Use $x as the program name, except when it would be `test' (test is
the sole program tested via mk-script that is also a shell built-in).
In that case, use the old ../../src/$x.

20 years ago.
Jim Meyering [Mon, 31 May 2004 12:11:49 +0000 (12:11 +0000)]
.

20 years ago.
Jim Meyering [Mon, 31 May 2004 11:41:36 +0000 (11:41 +0000)]
.

20 years ago*** empty log message ***
Jim Meyering [Mon, 31 May 2004 11:41:13 +0000 (11:41 +0000)]
*** empty log message ***

20 years ago(TESTS_ENVIRONMENT): Set PATH.
Jim Meyering [Mon, 31 May 2004 11:41:06 +0000 (11:41 +0000)]
(TESTS_ENVIRONMENT): Set PATH.

20 years ago*** empty log message ***
Jim Meyering [Mon, 31 May 2004 11:30:30 +0000 (11:30 +0000)]
*** empty log message ***

20 years ago(set_initialize): Remove unnecessary initialization of the `in_set'
Jim Meyering [Mon, 31 May 2004 11:30:27 +0000 (11:30 +0000)]
(set_initialize): Remove unnecessary initialization of the `in_set'
buffer; that initialization triggered the same compiler bug as above.

20 years agotr cleanup, mostly having to do with integer type ranges.
Jim Meyering [Mon, 31 May 2004 10:06:23 +0000 (10:06 +0000)]
tr cleanup, mostly having to do with integer type ranges.
Remove all casts.

Here are examples of the failures:

   $ echo a | tr a '[x*][y*2147483646][y*2147483646][y*4]'
   x
   $ echo abcd | tr abc '[b*\9]'
   bbbd
   $ echo abcd | tr abc '[b*0]'
   tr: invalid repeat count `0' in [c*n] construct
   $ echo abcd | tr -c '[a*65536]\n' '[b*]'
   tr: ../../coreutils-5.2.1/src/tr.c:1942: main: Assertion `get_next (s2, ((void *)0)) == -1 || truncate_set1' failed.
   Aborted

(N_CHARS, N_CHAR_CLASSES): Now an enum, not a macro.
This is safe since the code already assumes N_CHARS fits in int.
(Filter): Remove: we want to prototype everything.
(ORD, CHR): Remove.  All uses removed.  Some replaced with:
(uchar): New function.  All places where a char must be converted
to an unsigned char are now done this way, not by ad-hoc methods.
(count): New type.  Use it whenever counts or states are needed.
(BEGIN_STATE): Increase from INT_MAX - 1 (which was bogus, anyway,
since we used it in an unsigned int context) to UINTMAX_MAX - 1.
(REPEAT_COUNT_MAXIMUM): New macro.  Use it in place of BEGIN_STATE
whenever appropriate.
(NOT_A_CHAR): Remove global macro; now a local enum.
(UL_LOWER, UL_UPPER, UL_NONE): No longer specify values, since
the rest of the code no longer depends on them.
(class_ok): Remove; all uses changed to use inline comparisons.
(RE_NO_TYPE): Remove; wasn't used or needed.
(struct List_element): normal_char and equiv_code are now unsigned
char, not int.
first_char, last_char, and the_repeated_char are now unsigned char,
not unsigned int.  repeat_count is now count, not size_t.
All uses changed.
(struct Spec_list): state is now count, not unsigned int.
lengthis now count, not size_t.
n_indefinite_repeats is now size_t, not int.
has_equiv_class, has_char_class, and has_restricted_char_class
are now bool, not int.  All uses changed.
(struct E_string): s is now char *, not unsigned char *.
escaped is now bool *, not int *.  All uses changed.
(ES_MATCH): Remove macro, replacing with:
(es_match): New inline function.  All uses changed.
(squeeze_repeats, complement, posix_pedantic, truncate_set1,
translating): Now bool, not int.
(io_buf): Now char array, not unsigned char.
(SET_TYPE): Remove.  All uses replaced with bool.
(is_equiv_class_member, unquote, append_range, append_char_class,
append_equiv_class, find_closing_delim, star_digits_closebracket,
build_spec_list, parse_str, homogeneous_spec_list):
Now returns bool, not int.  All uses changed.
(is_equiv_class_member): Now inline.
(is_equiv_class_member, is_char_class_member, make_printable_str,
append_normal_char, append_range, append_repeated_char,
get_s2_spec_stats):
Args are now of proper integer type.
(unquote, look_up_char_class, make_printable_str,
append_equiv_class, build_spec_list, squeeze_filter):
Avoid unsigned char *p; gently convert *p to unsigned char instead.
(unquote, get_spec_stats): Do not jump past declarations and then
use them; C doesn't allow this in portable programs.
(make_printable_str): Check for overflow in size calculations.
(xmemdup): Remove.  All uses rewritten.
(find_bracketed_repeat): Args are now of proper pointer-to-integer
type.  Do not reject [c*0].  Use xstrtoumax, not xstrtoul.
(find_bracketed_repeat, star_digits_closebracket): Check that the
digits are not escaped.
(build_spec_list): Don't bother to copy opnd_str; not needed.
(build_spec_list, get_next): Simplify internal logic a bit.
(card_of_complement): Fix bug due to char overflow.
(get_spec_stats): Don't assume len fits into int.
Check for integer overflow.  Use abort() rather than assert(0).
(string2_extend): Fix subscript error: is_char_class_member (..., 255)
was being invoked.
(squeeze_filter): READER is never null now; simplify code.
READER arg now has a simpler type.  Remove unnecessary casts.
(squeeze_filter, main): Calls to fwrite improperly checked result
against zero, rather than against requested size.
(plain_read): New function.
(read_and_delete, read_and_xlate):
Remove unused filter arg, and don't worry about hit_eof.
Simplify by using plain_read.
(set_initialize): Args are bool and bool *, not int and SET_TYPE *.
(main): Always pass a non-null procedure to squeeze_filter.
Rewrite so that class_ok isn't needed.

20 years ago*** empty log message ***
Jim Meyering [Sun, 30 May 2004 20:09:35 +0000 (20:09 +0000)]
*** empty log message ***

20 years agoWork around HPUX /bin/cc compiler bug.
Jim Meyering [Sun, 30 May 2004 20:09:24 +0000 (20:09 +0000)]
Work around HPUX /bin/cc compiler bug.

(card_of_complement): Use cleaner `sizeof in_set'
rather than `N_CHARS * sizeof(in_set[0])'.  Using HPUX's /bin/cc
(aC++/ANSI C B3910B A.05.55 [Dec 04 2003]) on an ia64-hp-hpux11.22
system, those two expressions are not the same (256 vs. 1024).
The effect of this problem was that `tr -c x y' would fail:
tr: when not truncating set1, string2 must be non-empty

20 years ago*** empty log message ***
Jim Meyering [Sun, 30 May 2004 08:43:42 +0000 (08:43 +0000)]
*** empty log message ***

20 years ago(dosync): Ignore EBADF errors, as IRIX 6.5
Jim Meyering [Sun, 30 May 2004 08:43:35 +0000 (08:43 +0000)]
(dosync): Ignore EBADF errors, as IRIX 6.5
fdatasync reports EBADF when syncing (unwritable) directories.
Problem reported by Albert Chin-A-Young in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00165.html

20 years ago.
Jim Meyering [Sat, 29 May 2004 22:23:31 +0000 (22:23 +0000)]
.

20 years ago*** empty log message ***
Jim Meyering [Sat, 29 May 2004 22:12:32 +0000 (22:12 +0000)]
*** empty log message ***