platform/upstream/coreutils.git
22 years agoWhen --read-bytes=N (-N N) is used, disable input buffering in
Jim Meyering [Wed, 19 Sep 2001 10:19:19 +0000 (10:19 +0000)]
When --read-bytes=N (-N N) is used, disable input buffering in
the standard I/O library.  Otherwise, od would read more input
than requested.  This could have caused problems when reading
from pipes, character devices, and open file descriptors inherited
from a parent process.

* src/od.c (open_next_file): New function, factored out of...
(skip): Adapt to use open_next_file.
(read_char): Likewise.
(read_block): Likewise.
(main): Likewise.
(dump): Fix an off-by-one error that could have made od fail to
report a read error when reading from a named file (not stdin).
(check_and_close): Account for the fact that in_stream may now be NULL.
(usage): Correct descriptions of -j and -N options.
Patch by Ian Bruce.

22 years agoUse AC_DEFINE rather than AC_DEFINE_UNQUOTED, whenever the right hand side need not...
Jim Meyering [Mon, 17 Sep 2001 21:44:03 +0000 (21:44 +0000)]
Use AC_DEFINE rather than AC_DEFINE_UNQUOTED, whenever the right hand side need not be expanded by the shell.

22 years ago.
Jim Meyering [Mon, 17 Sep 2001 21:43:41 +0000 (21:43 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Mon, 17 Sep 2001 19:32:52 +0000 (19:32 +0000)]
*** empty log message ***

22 years ago(jm_FUNC_FNMATCH): Remove test for GNU C
Jim Meyering [Mon, 17 Sep 2001 19:32:45 +0000 (19:32 +0000)]
(jm_FUNC_FNMATCH): Remove test for GNU C
library.  It's not correct, as some older glibcs are buggy.
fnmatch wasn't fixed until glibc 2.2.

Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
special shell magic here.

22 years ago*** empty log message ***
Jim Meyering [Mon, 17 Sep 2001 10:24:27 +0000 (10:24 +0000)]
*** empty log message ***

22 years ago(HAVE_LONG_LONG): Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
Jim Meyering [Mon, 17 Sep 2001 10:24:20 +0000 (10:24 +0000)]
(HAVE_LONG_LONG): Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
(strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
to work around bug in IBM C compiler.

22 years ago*** empty log message ***
Jim Meyering [Mon, 17 Sep 2001 10:21:08 +0000 (10:21 +0000)]
*** empty log message ***

22 years ago(usage): Fix typo in -g usage.
Jim Meyering [Mon, 17 Sep 2001 10:20:50 +0000 (10:20 +0000)]
(usage): Fix typo in -g usage.
-H now means --dereference-command-line.

22 years ago*** empty log message ***
Jim Meyering [Mon, 17 Sep 2001 10:11:42 +0000 (10:11 +0000)]
*** empty log message ***

22 years ago(main): Change the `ignoring excess arguments' diagnostic
Jim Meyering [Mon, 17 Sep 2001 10:11:27 +0000 (10:11 +0000)]
(main): Change the `ignoring excess arguments' diagnostic
to list the first one we're ignoring.  Suggestion from Karl Berry.

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 20:14:25 +0000 (20:14 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 20:11:36 +0000 (20:11 +0000)]
*** empty log message ***

22 years ago(usage): Prefix each line with a space, so that
Jim Meyering [Sun, 16 Sep 2001 20:10:06 +0000 (20:10 +0000)]
(usage): Prefix each line with a space, so that
help2man produces a better stty.1 man page.

22 years ago(usage): Describe -h option.
Jim Meyering [Sun, 16 Sep 2001 19:58:00 +0000 (19:58 +0000)]
(usage): Describe -h option.
From Michael Stone.  http://bugs.debian.org/99272

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 19:55:07 +0000 (19:55 +0000)]
*** empty log message ***

22 years agoAdd note to help people understand that this documentation
Jim Meyering [Sun, 16 Sep 2001 19:54:53 +0000 (19:54 +0000)]
Add note to help people understand that this documentation
may not refer to the (shell built-in) command they're running.

22 years agoAdd note to help people understand this documentation
Jim Meyering [Sun, 16 Sep 2001 19:54:29 +0000 (19:54 +0000)]
Add note to help people understand this documentation
may not refer to the (shell built-in) command they're running.

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 19:49:47 +0000 (19:49 +0000)]
*** empty log message ***

22 years agotweak line in help output
Jim Meyering [Sun, 16 Sep 2001 16:07:07 +0000 (16:07 +0000)]
tweak line in help output

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 15:52:41 +0000 (15:52 +0000)]
*** empty log message ***

22 years ago(mv invocation): Describe new option: --reply={yes,no,query}. Fix a few typos.
Jim Meyering [Sun, 16 Sep 2001 15:52:04 +0000 (15:52 +0000)]
(mv invocation): Describe new option: --reply={yes,no,query}.  Fix a few typos.

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 15:30:48 +0000 (15:30 +0000)]
*** empty log message ***

22 years ago.
Jim Meyering [Sun, 16 Sep 2001 12:43:54 +0000 (12:43 +0000)]
.

22 years ago.
Jim Meyering [Sun, 16 Sep 2001 12:43:33 +0000 (12:43 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 12:42:14 +0000 (12:42 +0000)]
*** empty log message ***

22 years ago.
Jim Meyering [Sun, 16 Sep 2001 12:32:26 +0000 (12:32 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 12:32:12 +0000 (12:32 +0000)]
*** empty log message ***

22 years ago(UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
Jim Meyering [Sun, 16 Sep 2001 12:32:07 +0000 (12:32 +0000)]
(UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.

22 years ago(UTILS_FUNC_MKDIR_TRAILING_SLASH): Require it.
Jim Meyering [Sun, 16 Sep 2001 12:31:55 +0000 (12:31 +0000)]
(UTILS_FUNC_MKDIR_TRAILING_SLASH): Require it.

22 years ago.
Jim Meyering [Sun, 16 Sep 2001 09:30:07 +0000 (09:30 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 09:28:42 +0000 (09:28 +0000)]
*** empty log message ***

22 years ago(digest_check): On systems for which setmode actually
Jim Meyering [Sun, 16 Sep 2001 09:28:34 +0000 (09:28 +0000)]
(digest_check): On systems for which setmode actually
does something, arrange to read the file containing checksum strings
in text mode.  Based on a patch from Chris Faylor.

22 years ago(SET_MODE): Define.
Jim Meyering [Sun, 16 Sep 2001 09:27:58 +0000 (09:27 +0000)]
(SET_MODE): Define.

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 09:26:10 +0000 (09:26 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 09:23:42 +0000 (09:23 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Sun, 16 Sep 2001 07:02:38 +0000 (07:02 +0000)]
*** empty log message ***

22 years ago(uniq invocation): The input need not
Jim Meyering [Sun, 16 Sep 2001 07:02:26 +0000 (07:02 +0000)]
(uniq invocation): The input need not
be sorted.  Try to clarify -d versus -D versus -u.

22 years ago.
Jim Meyering [Sat, 15 Sep 2001 22:51:06 +0000 (22:51 +0000)]
.

22 years ago.
Jim Meyering [Sat, 15 Sep 2001 22:50:05 +0000 (22:50 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Sat, 15 Sep 2001 21:34:50 +0000 (21:34 +0000)]
*** empty log message ***

22 years agoCheck for help2man.
Jim Meyering [Sat, 15 Sep 2001 21:34:44 +0000 (21:34 +0000)]
Check for help2man.

22 years ago*** empty log message ***
Jim Meyering [Sat, 15 Sep 2001 21:31:09 +0000 (21:31 +0000)]
*** empty log message ***

22 years agorenamed from ginstall.x
Jim Meyering [Sat, 15 Sep 2001 18:46:23 +0000 (18:46 +0000)]
renamed from ginstall.x

22 years ago(TESTS): Add fail-diag.
Jim Meyering [Sat, 15 Sep 2001 17:08:27 +0000 (17:08 +0000)]
(TESTS): Add fail-diag.

22 years ago*** empty log message ***
Jim Meyering [Sat, 15 Sep 2001 17:07:54 +0000 (17:07 +0000)]
*** empty log message ***

22 years ago(EISDIR): Define to 0, if not already defined.
Jim Meyering [Sat, 15 Sep 2001 17:07:24 +0000 (17:07 +0000)]
(EISDIR): Define to 0, if not already defined.
(touch): Give a better diagnostic for e.g., `touch /' by non-root.
Based on a patch from Michael Stone.
Reported by Jeff Sheinberg as Debian bug #101677.

22 years ago.
Jim Meyering [Sat, 15 Sep 2001 12:53:11 +0000 (12:53 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Sat, 15 Sep 2001 12:52:55 +0000 (12:52 +0000)]
*** empty log message ***

22 years ago(UNWRITABLE): Define (factored out of copy_internal).
Jim Meyering [Sat, 15 Sep 2001 12:46:05 +0000 (12:46 +0000)]
(UNWRITABLE): Define (factored out of copy_internal).
(copy_internal): Use UNWRITABLE.

22 years ago(copy_internal) [move_mode]: Support the new
Jim Meyering [Sat, 15 Sep 2001 12:34:17 +0000 (12:34 +0000)]
(copy_internal) [move_mode]: Support the new
--reply=... option.

22 years agoAccept new option: --reply={yes,no,query}
Jim Meyering [Sat, 15 Sep 2001 11:38:36 +0000 (11:38 +0000)]
Accept new option: --reply={yes,no,query}

Include argmatch.h.
(enum) [REPLY_OPTION]: Define.
(usage): Describe new option.
Split long usage string into smaller pieces.
(main): Handle new option.

22 years ago(main): Reflect renaming: s/I_ON/I_ASK_USER/.
Jim Meyering [Sat, 15 Sep 2001 11:21:23 +0000 (11:21 +0000)]
(main): Reflect renaming: s/I_ON/I_ASK_USER/.

22 years ago(enum Interactive): Remove members, I_OFF and I_ON.
Jim Meyering [Sat, 15 Sep 2001 11:20:47 +0000 (11:20 +0000)]
(enum Interactive): Remove members, I_OFF and I_ON.
Instead, add I_ALWAYS_YES, I_ALWAYS_NO, and I_ASK_USER.

22 years ago*** empty log message ***
Jim Meyering [Sat, 15 Sep 2001 11:18:51 +0000 (11:18 +0000)]
*** empty log message ***

22 years agoClean up: use priv-check rather than open-coding it.
Jim Meyering [Sat, 15 Sep 2001 11:18:40 +0000 (11:18 +0000)]
Clean up: use priv-check rather than open-coding it.

22 years ago*** empty log message ***
Jim Meyering [Sat, 15 Sep 2001 11:16:12 +0000 (11:16 +0000)]
*** empty log message ***

22 years ago(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Jim Meyering [Sat, 15 Sep 2001 11:15:56 +0000 (11:15 +0000)]
(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Don't include "dirname.h" when no longer needed.

22 years ago(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Jim Meyering [Sat, 15 Sep 2001 11:14:49 +0000 (11:14 +0000)]
(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Don't include "dirname.h" when no longer needed.

22 years ago(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Jim Meyering [Sat, 15 Sep 2001 11:14:09 +0000 (11:14 +0000)]
(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Don't include "dirname.h" when no longer needed.

22 years ago(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Jim Meyering [Sat, 15 Sep 2001 10:32:36 +0000 (10:32 +0000)]
(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Don't include "dirname.h" when no longer needed.

22 years ago(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Jim Meyering [Sat, 15 Sep 2001 10:32:05 +0000 (10:32 +0000)]
(main): Don't strip trailing slashes; POSIX doesn't allow it here.
Don't include "dirname.h" when no longer needed.

22 years ago*** empty log message ***
Jim Meyering [Wed, 12 Sep 2001 09:07:40 +0000 (09:07 +0000)]
*** empty log message ***

22 years agoThe command `echo a|./fmt -2147483647' would cause fmt to segfault.
Jim Meyering [Wed, 12 Sep 2001 09:07:35 +0000 (09:07 +0000)]
The command `echo a|./fmt -2147483647' would cause fmt to segfault.
(fmt_paragraph): Test for sentinal directly, rather than
doing arithmetic with it's potentially large (INT_MAX) length.

22 years ago*** empty log message ***
Jim Meyering [Wed, 12 Sep 2001 09:05:27 +0000 (09:05 +0000)]
*** empty log message ***

22 years agoAdd wide-1 and wide-2.
Jim Meyering [Wed, 12 Sep 2001 09:04:52 +0000 (09:04 +0000)]
Add wide-1 and wide-2.

22 years ago*** empty log message ***
Jim Meyering [Wed, 12 Sep 2001 07:45:27 +0000 (07:45 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Wed, 12 Sep 2001 07:37:50 +0000 (07:37 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Wed, 12 Sep 2001 07:31:25 +0000 (07:31 +0000)]
*** empty log message ***

22 years ago(tail invocation): Document new option: -F.
Jim Meyering [Wed, 12 Sep 2001 07:31:19 +0000 (07:31 +0000)]
(tail invocation): Document new option: -F.
From Herbert Xu.

22 years ago*** empty log message ***
Jim Meyering [Wed, 12 Sep 2001 07:30:29 +0000 (07:30 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Wed, 12 Sep 2001 07:28:06 +0000 (07:28 +0000)]
*** empty log message ***

22 years agotail: accept new option: -F, equivalent to `--follow=name --retry',
Jim Meyering [Wed, 12 Sep 2001 07:27:29 +0000 (07:27 +0000)]
tail: accept new option: -F, equivalent to `--follow=name --retry',
for compatibility with FreeBSD and NetBSD versions of tail.

(usage): Describe new option.
(parse_options): Accept it.

22 years agoThe command `echo foo| fmt -w 100000' would cause fmt to segfault.
Jim Meyering [Wed, 12 Sep 2001 06:41:01 +0000 (06:41 +0000)]
The command `echo foo| fmt -w 100000' would cause fmt to segfault.

[struct Word]: Declare members length, space, and
line_length to be of type `int', not short.
(MAXCOST): Define using TYPE_MAXIMUM.

22 years ago.
Jim Meyering [Tue, 11 Sep 2001 20:12:26 +0000 (20:12 +0000)]
.

22 years ago.
Jim Meyering [Tue, 11 Sep 2001 20:11:47 +0000 (20:11 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Tue, 11 Sep 2001 20:11:37 +0000 (20:11 +0000)]
*** empty log message ***

22 years agoRequire UTILS_HOST_OS.
Jim Meyering [Tue, 11 Sep 2001 20:11:30 +0000 (20:11 +0000)]
Require UTILS_HOST_OS.

22 years ago*** empty log message ***
Jim Meyering [Tue, 11 Sep 2001 20:11:04 +0000 (20:11 +0000)]
*** empty log message ***

22 years ago(UTILS_HOST_OS): New file/macro.
Jim Meyering [Tue, 11 Sep 2001 20:10:44 +0000 (20:10 +0000)]
(UTILS_HOST_OS): New file/macro.
The body, by Paul Eggert, was moved here from configure.in.

22 years ago*** empty log message ***
Jim Meyering [Sun, 9 Sep 2001 18:40:45 +0000 (18:40 +0000)]
*** empty log message ***

22 years ago(binary_operator): Correct typo in diagnostic.
Jim Meyering [Sun, 9 Sep 2001 18:40:24 +0000 (18:40 +0000)]
(binary_operator): Correct typo in diagnostic.
From Jochen Hein.

22 years ago*** empty log message ***
Jim Meyering [Sat, 8 Sep 2001 13:23:31 +0000 (13:23 +0000)]
*** empty log message ***

22 years ago(TESTS): Add i-4.
Jim Meyering [Sat, 8 Sep 2001 13:23:22 +0000 (13:23 +0000)]
(TESTS): Add i-4.

22 years ago*** empty log message ***
Jim Meyering [Sat, 8 Sep 2001 13:22:58 +0000 (13:22 +0000)]
*** empty log message ***

22 years ago(copy_internal): Add braces around now-multi-stmt
Jim Meyering [Sat, 8 Sep 2001 13:22:41 +0000 (13:22 +0000)]
(copy_internal): Add braces around now-multi-stmt
if-block.  This fixes a bug introduced by my 2001-08-06 change.

22 years ago*** empty log message ***
Jim Meyering [Fri, 7 Sep 2001 09:47:46 +0000 (09:47 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Fri, 7 Sep 2001 09:47:10 +0000 (09:47 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Fri, 7 Sep 2001 09:46:49 +0000 (09:46 +0000)]
*** empty log message ***

22 years agoNew 'uname' options -i or --hardware-platform,
Jim Meyering [Fri, 7 Sep 2001 09:44:07 +0000 (09:44 +0000)]
New 'uname' options -i or --hardware-platform,
and -o or --operating-system.
'uname -a' now outputs -i and -o information at the end.
New uname option --kernel-version is an alias for -v.
Uname option --release has been renamed to --kernel-release,
and --sysname has been renamed to --kernel-name;
the old options will work for a while, but are no longer documented.

22 years agoCorrect copyright notice as per latest coding standards.
Jim Meyering [Fri, 7 Sep 2001 09:43:03 +0000 (09:43 +0000)]
Correct copyright notice as per latest coding standards.
Remove list of options in comment, which wasn't
worth maintaining separately from usage().

(print_element): Move definition up, avoiding the need for
declaration and allowing inlining on some platforms.
Keep track of whether something has been printed; this is more
natural than modifying `toprint'.

(PRINT_KERNEL_NAME): Renamed from PRINT_SYSNAME.
(PRINT_KERNEL_RELEASE): Renamed from PRINT_RELEASE.
(PRINT_KERNEL_VERSION): Renamed from PRINT_VERSION.
(PRINT_HARDWARE_PLATFORM, PRINT_OPERATING_SYSTEM): New macros.
(toprint): Remove global var; now local in `main'.
(long_options, usage, main): Implement changes described in NEWS.
Reorder options to reflect output order.
(main): Use buffers one byte longer, for compatibility with Solaris 8.
Output newline at end.  -a sets `toprint' to -1 now; this is simpler.
Do not bother invoking system calls like uname if the resulting
information does not need to be printed.
Do not fail if sysinfo fails; just print "unknown".

22 years ago*** empty log message ***
Jim Meyering [Thu, 6 Sep 2001 14:36:28 +0000 (14:36 +0000)]
*** empty log message ***

22 years ago(join invocation): Describe the GNU
Jim Meyering [Thu, 6 Sep 2001 14:36:21 +0000 (14:36 +0000)]
(join invocation): Describe the GNU
extension to join, which does not require sorted input when
the input contains no unpairable lines.

22 years ago*** empty log message ***
Jim Meyering [Tue, 4 Sep 2001 20:28:35 +0000 (20:28 +0000)]
*** empty log message ***

22 years agoRevert some of the previous change; intead,
Jim Meyering [Tue, 4 Sep 2001 20:28:31 +0000 (20:28 +0000)]
Revert some of the previous change; intead,
fix the HAVE_GETCWD_NULL code to behave more like the
!HAVE_GETCWD_NULL code used to.

Include "xalloc.h".
(xgetcwd): Do not return NULL when memory is exhausted; instead,
invoke xalloc_die.

22 years ago*** empty log message ***
Jim Meyering [Tue, 4 Sep 2001 20:24:18 +0000 (20:24 +0000)]
*** empty log message ***

22 years ago(get_link_name): Update use of xreadlink.
Jim Meyering [Tue, 4 Sep 2001 20:23:48 +0000 (20:23 +0000)]
(get_link_name): Update use of xreadlink.

22 years ago.
Jim Meyering [Tue, 4 Sep 2001 20:22:47 +0000 (20:22 +0000)]
.

22 years ago(jm_PREREQ_XREADLINK): New macro.
Jim Meyering [Tue, 4 Sep 2001 20:22:27 +0000 (20:22 +0000)]
(jm_PREREQ_XREADLINK): New macro.
(jm_PREREQ): Use it.

22 years ago*** empty log message ***
Jim Meyering [Tue, 4 Sep 2001 20:22:18 +0000 (20:22 +0000)]
*** empty log message ***