platform/upstream/coreutils.git
21 years ago*** empty log message ***
Jim Meyering [Wed, 23 Jul 2003 05:48:02 +0000 (05:48 +0000)]
*** empty log message ***

21 years ago(wc): Fix typo in computation of file from file_x,
Jim Meyering [Wed, 23 Jul 2003 05:47:57 +0000 (05:47 +0000)]
(wc): Fix typo in computation of file from file_x,
which caused the former to be used uninitialized if file_x was
nonzero.

21 years ago*** empty log message ***
Jim Meyering [Wed, 23 Jul 2003 05:38:41 +0000 (05:38 +0000)]
*** empty log message ***

21 years ago(XCALLOC, XREALLOC, CCLONE): Fix under- and over-parenthesization in macros.
Jim Meyering [Wed, 23 Jul 2003 05:38:36 +0000 (05:38 +0000)]
(XCALLOC, XREALLOC, CCLONE): Fix under- and over-parenthesization in macros.

21 years agotweak comment
Jim Meyering [Tue, 22 Jul 2003 21:56:23 +0000 (21:56 +0000)]
tweak comment

21 years ago*** empty log message ***
Jim Meyering [Tue, 22 Jul 2003 21:53:44 +0000 (21:53 +0000)]
*** empty log message ***

21 years ago(set_fields): Use xcalloc in place of xmalloc+memset.
Jim Meyering [Tue, 22 Jul 2003 21:53:39 +0000 (21:53 +0000)]
(set_fields): Use xcalloc in place of xmalloc+memset.

21 years ago*** empty log message ***
Jim Meyering [Tue, 22 Jul 2003 16:32:38 +0000 (16:32 +0000)]
*** empty log message ***

21 years ago(.x.1): Substitute 's,$t/$*,$*,' on output of
Jim Meyering [Tue, 22 Jul 2003 16:32:33 +0000 (16:32 +0000)]
(.x.1): Substitute 's,$t/$*,$*,' on output of
help2man, to avoid having `rm.td/rm' appear in rm.1.  Reported by
Thomas Luzat.  See http://bugs.debian.org/202413 for details.

21 years ago*** empty log message ***
Jim Meyering [Tue, 22 Jul 2003 16:31:16 +0000 (16:31 +0000)]
*** empty log message ***

21 years agodon't include stdboo.h. it's already included via system.h
Jim Meyering [Tue, 22 Jul 2003 14:18:58 +0000 (14:18 +0000)]
don't include stdboo.h.  it's already included via system.h

21 years ago.
Jim Meyering [Tue, 22 Jul 2003 14:16:50 +0000 (14:16 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Tue, 22 Jul 2003 14:15:40 +0000 (14:15 +0000)]
*** empty log message ***

21 years ago(main) [lint]: Initialize spec_list_string to avoid warning.
Jim Meyering [Tue, 22 Jul 2003 14:15:31 +0000 (14:15 +0000)]
(main) [lint]: Initialize spec_list_string to avoid warning.

21 years agoDon't include <unistd.h>. system.h already does that.
Jim Meyering [Tue, 22 Jul 2003 14:13:37 +0000 (14:13 +0000)]
Don't include <unistd.h>.  system.h already does that.

21 years ago*** empty log message ***
Jim Meyering [Tue, 22 Jul 2003 13:00:48 +0000 (13:00 +0000)]
*** empty log message ***

21 years ago(set_fields): Mark all selected indices before trying to
Jim Meyering [Tue, 22 Jul 2003 13:00:45 +0000 (13:00 +0000)]
(set_fields): Mark all selected indices before trying to
determine range endpoints.

21 years agoNew test for the above fix.
Jim Meyering [Tue, 22 Jul 2003 12:44:22 +0000 (12:44 +0000)]
New test for the above fix.

21 years ago*** empty log message ***
Jim Meyering [Tue, 22 Jul 2003 11:56:37 +0000 (11:56 +0000)]
*** empty log message ***

21 years agoBegin to address this comment: What if someone wants to
Jim Meyering [Tue, 22 Jul 2003 11:56:24 +0000 (11:56 +0000)]
Begin to address this comment: What if someone wants to
extract the 1,000,000-th field of some huge input file?
The first step is to rearrange things so that the values
in the printable_field array are all 0/1 rather than 0/1/2.

(RANGE_START_SENTINEL): Remove.
Store range-start indices in a hash table, rather than
overloading the `printable_field' array.
(range_start_ht): New global.
(hash_int, hash_compare_ints, is_range_start_index): New functions.
(print_kth): Use is_range_start_index; don't test printable_field.
(set_fields): Detect overflow.
(set_fields): Insert each range-start index into range_start_ht.
(main): Call set_fields only once, and only after
output_delimiter_specified and (if required) range_start_ht have
been defined.

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 21:13:08 +0000 (21:13 +0000)]
*** empty log message ***

21 years ago(get_input_fstatus): Fix typo: `stat' was being
Jim Meyering [Sun, 20 Jul 2003 21:13:04 +0000 (21:13 +0000)]
(get_input_fstatus): Fix typo: `stat' was being
invoked with a null pointer when there were no file arguments.

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 16:04:04 +0000 (16:04 +0000)]
*** empty log message ***

21 years ago(sc_changelog): Add another nit-picky check.
Jim Meyering [Sun, 20 Jul 2003 16:03:58 +0000 (16:03 +0000)]
(sc_changelog): Add another nit-picky check.

21 years ago.
Jim Meyering [Sun, 20 Jul 2003 16:02:28 +0000 (16:02 +0000)]
.

21 years ago.
Jim Meyering [Sun, 20 Jul 2003 15:57:27 +0000 (15:57 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 15:51:06 +0000 (15:51 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 15:45:58 +0000 (15:45 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 15:45:32 +0000 (15:45 +0000)]
*** empty log message ***

21 years ago(write_counts): Add a comment.
Jim Meyering [Sun, 20 Jul 2003 15:45:29 +0000 (15:45 +0000)]
(write_counts): Add a comment.
(wc): Rename `file' parameter.
Set new local, `file', to be the file name, or (when it's NULL)
_("standard output") so that all uses of `file' use the proper value.
Use STREQ, not strcmp.

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 15:25:02 +0000 (15:25 +0000)]
*** empty log message ***

21 years agoAdjust to the new output widths.
Jim Meyering [Sun, 20 Jul 2003 15:24:52 +0000 (15:24 +0000)]
Adjust to the new output widths.

21 years agowc count field widths now are heuristically adjusted depending
Jim Meyering [Sun, 20 Jul 2003 15:24:21 +0000 (15:24 +0000)]
wc count field widths now are heuristically adjusted depending
on the input size, if known.  If only one count is printed, it
is guaranteed to be printed without leading spaces.

Previously, wc did not align the count fields if
POSIXLY_CORRECT was set, but POSIX did not actually require
this undesirable behavior, so it has been removed.

* doc/coreutils.texi (wc invocation): Likewise.

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 15:22:42 +0000 (15:22 +0000)]
*** empty log message ***

21 years ago(number_width): New var.
Jim Meyering [Sun, 20 Jul 2003 15:22:25 +0000 (15:22 +0000)]
(number_width): New var.
(posixly_correct): Remove.
(struct fstatus): New struct.
(write_counts): Output fields of width number_width.
Do not worry about POSIXLY_CORRECT.
Use null file, not empty-string file, to denote stdin,
since "" is a valid file name on some hosts.
(wc, wc_file): New arg fstatus.  Use it to avoid invoking fstat
if possible.
(wc):  Avoid problems if end_pos - current_pos overflows.
Do not print odd message if stdin has a read error.
(get_input_fstatus, compute_number_width): New functions.
(main): Use them to implement the new behavior.
Ignore POSIXLY_CORRECT.

21 years agoconvert each 8-space prefix to a TAB
Jim Meyering [Sun, 20 Jul 2003 11:19:12 +0000 (11:19 +0000)]
convert each 8-space prefix to a TAB

21 years agoconvert each 8-space prefix to a TAB
Jim Meyering [Sun, 20 Jul 2003 11:18:12 +0000 (11:18 +0000)]
convert each 8-space prefix to a TAB

21 years agoconvert each 8-space prefix to a TAB
Jim Meyering [Sun, 20 Jul 2003 11:17:51 +0000 (11:17 +0000)]
convert each 8-space prefix to a TAB

21 years agoconvert each 8-space prefix to a TAB
Jim Meyering [Sun, 20 Jul 2003 11:17:26 +0000 (11:17 +0000)]
convert each 8-space prefix to a TAB

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 06:30:06 +0000 (06:30 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 05:38:28 +0000 (05:38 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Sun, 20 Jul 2003 05:36:10 +0000 (05:36 +0000)]
*** empty log message ***

21 years agofrom gnulib
Jim Meyering [Sun, 20 Jul 2003 05:35:54 +0000 (05:35 +0000)]
from gnulib

21 years ago(jm_MACROS): Invoke gl_MEMCOLL.
Jim Meyering [Sun, 20 Jul 2003 05:35:38 +0000 (05:35 +0000)]
(jm_MACROS): Invoke gl_MEMCOLL.

21 years ago*** empty log message ***
Jim Meyering [Sat, 19 Jul 2003 17:30:49 +0000 (17:30 +0000)]
*** empty log message ***

21 years agoRestore definition of $verbose.
Jim Meyering [Sat, 19 Jul 2003 12:00:38 +0000 (12:00 +0000)]
Restore definition of $verbose.

21 years agoDon't create temporary directory -- we don't use it.
Jim Meyering [Sat, 19 Jul 2003 11:59:12 +0000 (11:59 +0000)]
Don't create temporary directory -- we don't use it.

21 years ago*** empty log message ***
Jim Meyering [Sat, 19 Jul 2003 11:59:02 +0000 (11:59 +0000)]
*** empty log message ***

21 years agoremove now-redundant VERSION check
Jim Meyering [Sat, 19 Jul 2003 11:54:39 +0000 (11:54 +0000)]
remove now-redundant VERSION check

21 years ago*** empty log message ***
Jim Meyering [Sat, 19 Jul 2003 11:47:22 +0000 (11:47 +0000)]
*** empty log message ***

21 years agoDon't open-code test for UID != 0.
Jim Meyering [Sat, 19 Jul 2003 11:47:17 +0000 (11:47 +0000)]
Don't open-code test for UID != 0.
Use priv-check's require-non-root instead.
Update to use newer framework.

21 years ago*** empty log message ***
Jim Meyering [Sat, 19 Jul 2003 11:39:27 +0000 (11:39 +0000)]
*** empty log message ***

21 years ago(expected_failure_status_expr): Record that
Jim Meyering [Sat, 19 Jul 2003 11:39:22 +0000 (11:39 +0000)]
(expected_failure_status_expr): Record that
expr exits with status of 3 for e.g., a write error.

21 years ago*** empty log message ***
Jim Meyering [Sat, 19 Jul 2003 11:19:16 +0000 (11:19 +0000)]
*** empty log message ***

21 years agoUse `id -u' to see if we're running as root,
Jim Meyering [Sat, 19 Jul 2003 11:19:12 +0000 (11:19 +0000)]
Use `id -u' to see if we're running as root,
rather than trying go write to an write-protected file.
When running as root, ensure $NON_ROOT_USERNAME is valid.
When running as root with `require-non-root', ensure that `.'
is writable by $NON_ROOT_USERNAME, then reinvoke $0 set-user-ID
to $NON_ROOT_USERNAME.  If `.' is not writable, then skip the test.

21 years ago*** empty log message ***
Jim Meyering [Sat, 19 Jul 2003 08:17:16 +0000 (08:17 +0000)]
*** empty log message ***

21 years agoInclude "exitfail.h".
Jim Meyering [Sat, 19 Jul 2003 08:17:06 +0000 (08:17 +0000)]
Include "exitfail.h".
(main): Set exit_failure rather than calling close_stdout_set_status.

21 years agoInclude "exitfail.h".
Jim Meyering [Sat, 19 Jul 2003 08:16:38 +0000 (08:16 +0000)]
Include "exitfail.h".
(main): Set exit_failure rather than calling close_stdout_set_status.

21 years ago*** empty log message ***
Jim Meyering [Sat, 19 Jul 2003 08:09:01 +0000 (08:09 +0000)]
*** empty log message ***

21 years agoLikewise. Include "closeout.h" right after config.h,
Jim Meyering [Sat, 19 Jul 2003 08:08:56 +0000 (08:08 +0000)]
Likewise.  Include "closeout.h" right after config.h,
to test that it can stand by itself.  Include "exitfail.h".
Clients should set exit_failure instead.
(EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.

21 years ago(close_stdout_set_status, close_stdout_status): Remove.
Jim Meyering [Sat, 19 Jul 2003 08:05:44 +0000 (08:05 +0000)]
(close_stdout_set_status, close_stdout_status): Remove.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 18:08:08 +0000 (18:08 +0000)]
*** empty log message ***

21 years ago(memcoll) [!HAVE_STRCOLL]: Clear errno.
Jim Meyering [Fri, 18 Jul 2003 18:07:48 +0000 (18:07 +0000)]
(memcoll) [!HAVE_STRCOLL]: Clear errno.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 09:58:59 +0000 (09:58 +0000)]
*** empty log message ***

21 years agoUpdate to use newer framework.
Jim Meyering [Fri, 18 Jul 2003 09:48:16 +0000 (09:48 +0000)]
Update to use newer framework.

21 years agoUse $srcdir/../priv-check, create a temporary
Jim Meyering [Fri, 18 Jul 2003 09:12:23 +0000 (09:12 +0000)]
Use $srcdir/../priv-check, create a temporary
directory, and remove Perl-coded `you may not run as root' test.

21 years agoUse $srcdir/../priv-check, rather than
Jim Meyering [Fri, 18 Jul 2003 09:05:49 +0000 (09:05 +0000)]
Use $srcdir/../priv-check, rather than
hard-coding something not quite equivalent.  Reported by Paul Jarc.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 08:53:32 +0000 (08:53 +0000)]
*** empty log message ***

21 years ago(main): Use close_stdout via atexit.
Jim Meyering [Fri, 18 Jul 2003 08:53:05 +0000 (08:53 +0000)]
(main): Use close_stdout via atexit.
Now `sort --version' and `sort --help' fail, as they should
when their output is redirected to /dev/full.

21 years ago(usage): Don't call close_stdout here.
Jim Meyering [Fri, 18 Jul 2003 08:38:43 +0000 (08:38 +0000)]
(usage): Don't call close_stdout here.
(main): Use close_stdout via atexit.
Now `su --version > /dev/full' fails, as it should.
Somehow, the change of 2000-05-07 that purports to fix this
was not checked in.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 08:38:29 +0000 (08:38 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 08:12:00 +0000 (08:12 +0000)]
*** empty log message ***

21 years ago(--help/--version vs. /dev/full): Special-case
Jim Meyering [Fri, 18 Jul 2003 08:11:55 +0000 (08:11 +0000)]
(--help/--version vs. /dev/full): Special-case
`[' to protect it from expected_failure_status-`eval'.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 08:01:36 +0000 (08:01 +0000)]
*** empty log message ***

21 years ago(101, 102): Update tests of -c accordingly.
Jim Meyering [Fri, 18 Jul 2003 08:01:26 +0000 (08:01 +0000)]
(101, 102): Update tests of -c accordingly.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 07:50:45 +0000 (07:50 +0000)]
*** empty log message ***

21 years ago(expr invocation): Exit status is 2 if the
Jim Meyering [Fri, 18 Jul 2003 07:50:39 +0000 (07:50 +0000)]
(expr invocation): Exit status is 2 if the
expression is syntactically invalid, 3 if there is some other error.
This change is for conformance to POSIX.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 07:49:36 +0000 (07:49 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 07:48:37 +0000 (07:48 +0000)]
*** empty log message ***

21 years ago(writeline): Use a SPACE, not a TAB between the
Jim Meyering [Fri, 18 Jul 2003 07:47:05 +0000 (07:47 +0000)]
(writeline): Use a SPACE, not a TAB between the
count and the corresponding line, as required by POSIX.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 07:46:27 +0000 (07:46 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 07:29:45 +0000 (07:29 +0000)]
*** empty log message ***

21 years agoAdd tests when exit status is 2.
Jim Meyering [Fri, 18 Jul 2003 07:29:01 +0000 (07:29 +0000)]
Add tests when exit status is 2.

21 years agoInvalid value exits with status 3, not 2.
Jim Meyering [Fri, 18 Jul 2003 07:25:39 +0000 (07:25 +0000)]
Invalid value exits with status 3, not 2.

21 years agoInclude "exitfail.h".
Jim Meyering [Fri, 18 Jul 2003 07:23:38 +0000 (07:23 +0000)]
Include "exitfail.h".
(main): Set exit_failure, not xalloc_exit_failure and xmemcoll_exit_failure.

21 years agoInclude "exitfail.h", "quotearg.h".
Jim Meyering [Fri, 18 Jul 2003 07:22:38 +0000 (07:22 +0000)]
Include "exitfail.h", "quotearg.h".
(EXPR_INVALID, EXPR_ERROR): New constants.
(nomoreargs, null, toarith, nextarg): Return bool, not int.
(syntax_error): New function, exiting with status 2.  Use it
insteading of printing "syntax error" ourselves.
(main): Initialize exit_failure to EXPR_ERROR.
Exit with EXPR_INVALID on syntax error (too few arguments).
(nextarg): Use strcmp, not strcoll; strcoll might return
an undesirable 0, or might fail.
(docolon, eval4, eval3): Exit with status 3 on invalid argument type
or other such error.
(eval2): Report an error if strcoll fails in a string comparison.

21 years ago(NOHUP_FOUND_BUT_CANNOT_INVOKE, NOHUP_FAILURE):
Jim Meyering [Fri, 18 Jul 2003 07:18:54 +0000 (07:18 +0000)]
(NOHUP_FOUND_BUT_CANNOT_INVOKE, NOHUP_FAILURE):
Use an anonymous `enum', rather than #define.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 07:12:27 +0000 (07:12 +0000)]
*** empty log message ***

21 years agoMerge with gnulib. Use a single exit_failure variable rather
Jim Meyering [Fri, 18 Jul 2003 07:12:20 +0000 (07:12 +0000)]
Merge ... gnulib.  Use a single exit_failure variable rather
than a separate one for each module.

21 years agoMerge with gnulib. Use a single exit_failure variable rather
Jim Meyering [Fri, 18 Jul 2003 07:11:50 +0000 (07:11 +0000)]
Merge ... gnulib.  Use a single exit_failure variable rather
than a separate one for each module.

21 years agoMerge with gnulib. Use a single exit_failure variable rather
Jim Meyering [Fri, 18 Jul 2003 07:10:53 +0000 (07:10 +0000)]
Merge ... gnulib.  Use a single exit_failure variable rather
than a separate one for each module.

21 years agoMerge with gnulib. Use a single exit_failure variable rather
Jim Meyering [Fri, 18 Jul 2003 07:02:34 +0000 (07:02 +0000)]
Merge ... gnulib.  Use a single exit_failure variable rather
than a separate one for each module.

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 06:59:33 +0000 (06:59 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Fri, 18 Jul 2003 06:50:03 +0000 (06:50 +0000)]
*** empty log message ***

21 years ago.
Jim Meyering [Fri, 18 Jul 2003 06:34:14 +0000 (06:34 +0000)]
.

21 years ago.
Jim Meyering [Thu, 17 Jul 2003 22:27:44 +0000 (22:27 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Wed, 16 Jul 2003 20:51:08 +0000 (20:51 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Wed, 16 Jul 2003 20:50:30 +0000 (20:50 +0000)]
*** empty log message ***

21 years agoUse 5.0.90, rather than 5.0.2, per GNU maintainer
Jim Meyering [Wed, 16 Jul 2003 20:50:21 +0000 (20:50 +0000)]
Use 5.0.90, rather than 5.0.2, per GNU maintainer
guidelines.  The next non-beta release will be 5.1.

21 years ago*** empty log message ***
Jim Meyering [Wed, 16 Jul 2003 20:07:47 +0000 (20:07 +0000)]
*** empty log message ***