platform/upstream/coreutils.git
23 years ago.
Jim Meyering [Sat, 9 Dec 2000 22:18:02 +0000 (22:18 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 22:17:31 +0000 (22:17 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 22:16:57 +0000 (22:16 +0000)]
*** empty log message ***

23 years ago.
Jim Meyering [Sat, 9 Dec 2000 22:07:28 +0000 (22:07 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 22:06:03 +0000 (22:06 +0000)]
*** empty log message ***

23 years ago(jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
Jim Meyering [Sat, 9 Dec 2000 22:05:54 +0000 (22:05 +0000)]
(jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.

23 years ago.
Jim Meyering [Sat, 9 Dec 2000 22:05:28 +0000 (22:05 +0000)]
.

23 years ago.
Jim Meyering [Sat, 9 Dec 2000 20:55:41 +0000 (20:55 +0000)]
.

23 years ago(chopt_free): don't free anything
Jim Meyering [Sat, 9 Dec 2000 20:54:23 +0000 (20:54 +0000)]
(chopt_free): don't free anything

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 20:44:39 +0000 (20:44 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 20:39:17 +0000 (20:39 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 20:38:12 +0000 (20:38 +0000)]
*** empty log message ***

23 years agoInclude "chown-core.h".
Jim Meyering [Sat, 9 Dec 2000 20:38:01 +0000 (20:38 +0000)]
Include "chown-core.h".
[enum Change_status, enum Verbosity]: Remove declarations.
Remove decls of globals that are now part of struct Chown_option.
Remove decl of xstat.
(describe_change): Remove function.
(change_file_group): Likewise.
(change_dir_group): Likewise.
(parse_group): Don't set global, groupname, here...
(main): ... instead, initialize `chopt.group_name' here.
Initialize chopt and update uses of the now-members.
Set group_name also when it's obtained via a --reference=FILE option.
Call change_file_owner (with -1 for uids), not change_file_group.

23 years agoadd 3 more prototypes
Jim Meyering [Sat, 9 Dec 2000 20:31:56 +0000 (20:31 +0000)]
add 3 more prototypes

23 years agoInclude <pwd.h>, <grp.h>, and "xalloc.h".
Jim Meyering [Sat, 9 Dec 2000 20:31:34 +0000 (20:31 +0000)]
Include <pwd.h>, <grp.h>, and "xalloc.h".
[!_POSIX_VERSION]: Declare getgrnam and getgrgid.
(gid_to_name): New function.
(uid_to_name): Likewise.
(chopt_free): Likewise.

23 years agoDon't include pwd.h or grp.h -- no longer needed.
Jim Meyering [Sat, 9 Dec 2000 20:29:32 +0000 (20:29 +0000)]
Don't include pwd.h or grp.h -- no longer needed.
Include chown-core.h.
[enum Change_status, enum Verbosity]: Remove declarations.
Remove decls of globals that are now part of struct Chown_option.
(describe_change): Remove function.
(change_file_owner): Likewise.
(change_dir_owner): Likewise.
(main): Initialize chopt and update uses of the now-members.
Set user_name and group_name also when they're obtained via a
--reference=FILE option.
Pass `chopt' to change_file_owner.

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 14:47:06 +0000 (14:47 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 14:46:34 +0000 (14:46 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 14:08:07 +0000 (14:08 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 13:50:13 +0000 (13:50 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 13:48:03 +0000 (13:48 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 13:44:37 +0000 (13:44 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 13:44:10 +0000 (13:44 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 13:38:51 +0000 (13:38 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 12:47:51 +0000 (12:47 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 10:15:26 +0000 (10:15 +0000)]
*** empty log message ***

23 years ago(change_file_owner): Restore special file permission
Jim Meyering [Sat, 9 Dec 2000 10:15:17 +0000 (10:15 +0000)]
(change_file_owner): Restore special file permission
bits, since calling chown resets them on some systems.
Reported by Matt Perry.

23 years ago*** empty log message ***
Jim Meyering [Sat, 9 Dec 2000 10:14:52 +0000 (10:14 +0000)]
*** empty log message ***

23 years agoDon't make the success of the test depend
Jim Meyering [Fri, 8 Dec 2000 20:31:47 +0000 (20:31 +0000)]
Don't make the success of the test depend
on the order in which directory entries are processed.

23 years ago*** empty log message ***
Jim Meyering [Fri, 8 Dec 2000 20:31:15 +0000 (20:31 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Fri, 8 Dec 2000 18:32:11 +0000 (18:32 +0000)]
*** empty log message ***

23 years ago(mbsnwidth): Don't loop endlessly when called with an
Jim Meyering [Fri, 8 Dec 2000 18:31:38 +0000 (18:31 +0000)]
(mbsnwidth): Don't loop endlessly when called with an
invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.

23 years ago*** empty log message ***
Jim Meyering [Fri, 8 Dec 2000 08:06:33 +0000 (08:06 +0000)]
*** empty log message ***

23 years agoInclude xalloc.h.
Jim Meyering [Fri, 8 Dec 2000 07:55:05 +0000 (07:55 +0000)]
Include xalloc.h.
(main): Use dir_name rather than the underlying dir_name_r.
The former now handles cwd-relative names with drive-letter prefixes.

23 years ago*** empty log message ***
Jim Meyering [Thu, 7 Dec 2000 14:14:18 +0000 (14:14 +0000)]
*** empty log message ***

23 years agoconvert a > expression to the equivalent < one
Jim Meyering [Thu, 7 Dec 2000 14:13:51 +0000 (14:13 +0000)]
convert a > expression to the equivalent < one

23 years ago(ISSLASH): Define.
Jim Meyering [Thu, 7 Dec 2000 14:13:13 +0000 (14:13 +0000)]
(ISSLASH): Define.
(strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
From Prashant TR.

23 years agoconvert a > expression to the equivalent < one
Jim Meyering [Thu, 7 Dec 2000 14:11:52 +0000 (14:11 +0000)]
convert a > expression to the equivalent < one

23 years ago*** empty log message ***
Jim Meyering [Thu, 7 Dec 2000 14:10:33 +0000 (14:10 +0000)]
*** empty log message ***

23 years ago(FILESYSTEM_PREFIX_LEN): Define.
Jim Meyering [Thu, 7 Dec 2000 14:10:21 +0000 (14:10 +0000)]
(FILESYSTEM_PREFIX_LEN): Define.
(dir_name_r): Declare this function as static.
[BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
manifest itself on a name containing a mix of slashes and
backslashes.
Make this function work with names starting with a DOS-style
drive letter and colon prefix.
(dir_name): Append `.' if necessary.
Based mostly on patches from Prashant TR and Eli Zaretskii.

23 years ago(dir_name_r): Remove prototype.
Jim Meyering [Thu, 7 Dec 2000 11:50:35 +0000 (11:50 +0000)]
(dir_name_r): Remove prototype.

23 years ago*** empty log message ***
Jim Meyering [Thu, 7 Dec 2000 10:07:28 +0000 (10:07 +0000)]
*** empty log message ***

23 years ago(address_base): Declare to be static.
Jim Meyering [Thu, 7 Dec 2000 10:07:08 +0000 (10:07 +0000)]
(address_base): Declare to be static.

23 years ago(address_base, address_pad_len): New var.
Jim Meyering [Thu, 7 Dec 2000 10:05:09 +0000 (10:05 +0000)]
(address_base, address_pad_len): New var.
(output_address_fmt_string, address_fmt_buffer, address_pad): Remove.
(flag_pseudo_start): Now int, not long int.
(pseudo_offset): Now off_t, not long int.
(n_specs, n_specs_allocated): Now size_t, not unsigned int.
(format_address, format_address_none, format_address_std,
format_address_label): Now accepts an extra char argument (an extra
char to print if nonzero), and prints instead of returning a string.
All callers changed.
(bytes_per_block): Now size_t, not int.
(format_address_none): Do not even print the extra char argument.
This simplifies the callers.
(format_address_std, format_address_label): Print off_t ourself
instead of trying to use autoconfigured format.  This is faster and
more portable.
(format_address_paren): New function.
(dump): Remove unnecessary cast.
(expand_address_fmt): Remove.
(main): Use size_t, off_t, etc. instead of builtin types where this is
advisable.  Adjust to above changes.  Remove unnecessary cast.

23 years ago*** empty log message ***
Jim Meyering [Wed, 6 Dec 2000 11:06:43 +0000 (11:06 +0000)]
*** empty log message ***

23 years agoCheck for strtol. Mainly as a cue to cause automake to include CPPI-1_8
Jim Meyering [Wed, 6 Dec 2000 11:06:39 +0000 (11:06 +0000)]
Check for strtol.  Mainly as a cue to cause automake to include
strtol.c -- that file is included by each of strtoul.c and strtoull.c.
Check for limits.h -- strtol.c needs it.

23 years ago*** empty log message ***
Jim Meyering [Wed, 6 Dec 2000 10:52:37 +0000 (10:52 +0000)]
*** empty log message ***

23 years agoCheck for declarations of strtoul and strtoull.
Jim Meyering [Wed, 6 Dec 2000 10:52:28 +0000 (10:52 +0000)]
Check for declarations of strtoul and strtoull.

23 years agoseparate conditions for strtoul and strtoull
Jim Meyering [Wed, 6 Dec 2000 10:26:51 +0000 (10:26 +0000)]
separate conditions for strtoul and strtoull

23 years ago*** empty log message ***
Jim Meyering [Wed, 6 Dec 2000 09:55:03 +0000 (09:55 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Wed, 6 Dec 2000 09:35:48 +0000 (09:35 +0000)]
*** empty log message ***

23 years ago(jm_AC_PREREQ_XSTRTOUMAX): If we need the replacement
Jim Meyering [Wed, 6 Dec 2000 09:35:40 +0000 (09:35 +0000)]
(jm_AC_PREREQ_XSTRTOUMAX): If we need the replacement
strtoull, we may well need the replacement strtoul, too.

23 years ago.
Jim Meyering [Tue, 5 Dec 2000 13:53:13 +0000 (13:53 +0000)]
.

23 years ago(dir_name_r): Add `const' in a few local declarations.
Jim Meyering [Tue, 5 Dec 2000 13:14:13 +0000 (13:14 +0000)]
(dir_name_r): Add `const' in a few local declarations.

23 years ago*** empty log message ***
Jim Meyering [Mon, 4 Dec 2000 09:41:28 +0000 (09:41 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Mon, 4 Dec 2000 09:37:40 +0000 (09:37 +0000)]
*** empty log message ***

23 years agoAlso include memory.h, stdlib.h, unistd.h if appropriate.
Jim Meyering [Mon, 4 Dec 2000 09:37:33 +0000 (09:37 +0000)]
Also include memory.h, stdlib.h, unistd.h if appropriate.

23 years ago*** empty log message ***
Jim Meyering [Mon, 4 Dec 2000 09:15:54 +0000 (09:15 +0000)]
*** empty log message ***

23 years ago[!HAVE_DECL_MALLOC]: Declare malloc.
Jim Meyering [Mon, 4 Dec 2000 09:15:49 +0000 (09:15 +0000)]
[!HAVE_DECL_MALLOC]: Declare malloc.

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 22:40:40 +0000 (22:40 +0000)]
*** empty log message ***

23 years ago(gobble_file) [USE_ACL]: Set have_acl member unconditionally
Jim Meyering [Sun, 3 Dec 2000 22:40:31 +0000 (22:40 +0000)]
(gobble_file) [USE_ACL]: Set have_acl member unconditionally
to avoid uninitialized memory reference via FILE_HAS_ACL.

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 20:46:07 +0000 (20:46 +0000)]
*** empty log message ***

23 years ago(TESTS): Add assert-2.
Jim Meyering [Sun, 3 Dec 2000 20:43:51 +0000 (20:43 +0000)]
(TESTS): Add assert-2.

23 years agoremove instrumentation
Jim Meyering [Sun, 3 Dec 2000 20:37:55 +0000 (20:37 +0000)]
remove instrumentation

23 years agoadd instrumentation to detect some UMRs
Jim Meyering [Sun, 3 Dec 2000 20:37:18 +0000 (20:37 +0000)]
add instrumentation to detect some UMRs

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 20:36:29 +0000 (20:36 +0000)]
*** empty log message ***

23 years ago(tail_file): Initialize ignore, dev, and ino members,
Jim Meyering [Sun, 3 Dec 2000 20:36:19 +0000 (20:36 +0000)]
(tail_file): Initialize ignore, dev, and ino members,
when tailing forever and the open failed.  Otherwise, we could get
uninitialized memory references of those fields in recheck.

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 13:10:48 +0000 (13:10 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 12:46:55 +0000 (12:46 +0000)]
*** empty log message ***

23 years ago(alpha): Use rsync rather than scp, so the destination
Jim Meyering [Sun, 3 Dec 2000 12:46:44 +0000 (12:46 +0000)]
(alpha): Use rsync rather than scp, so the destination
file is created only after the successful completion of the copy.

23 years ago.
Jim Meyering [Sun, 3 Dec 2000 12:31:59 +0000 (12:31 +0000)]
.

23 years agouse CHAR_BIT, not BITSPERBYTE TEXTUTILS-2_0_9
Jim Meyering [Sun, 3 Dec 2000 11:00:06 +0000 (11:00 +0000)]
use CHAR_BIT, not BITSPERBYTE

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 10:59:49 +0000 (10:59 +0000)]
*** empty log message ***

23 years ago(CHAR_BIT): Define.
Jim Meyering [Sun, 3 Dec 2000 10:59:44 +0000 (10:59 +0000)]
(CHAR_BIT): Define.

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 10:39:03 +0000 (10:39 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 10:22:32 +0000 (10:22 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 10:21:34 +0000 (10:21 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sun, 3 Dec 2000 10:18:09 +0000 (10:18 +0000)]
*** empty log message ***

23 years agoMake od print valid addresses for offsets of 2^32 and larger. (cont'd)
Jim Meyering [Sun, 3 Dec 2000 10:18:04 +0000 (10:18 +0000)]
Make od print valid addresses for offsets of 2^32 and larger. (cont'd)

(MAX_ADDRESS_LENGTH): Don't hard-code as a literal.
Rather, define in terms of the type, off_t.
(string_min): Declare to be of type size_t.
(flag_dump_strings): Declare to be of type int.
(print_s_char): Declare the n_bytes parameter and the local, `i',
to be of type off_t.
(print_char): Likewise.
(print_s_short): Likewise.
(print_short): Likewise.
(print_int): Likewise.
(print_long): Likewise.
(print_long_long): Likewise.
(print_float): Likewise.
(print_double): Likewise.
(print_long_double): Likewise.
(dump_hexl_mode_trailer): Likewise.
(print_named_ascii): Likewise.
(print_ascii): Likewise.
(write_block): Likewise.
(print_ascii): Declare local, `print_function' with a prototype.
Change a few `>' comparisons to the equivalent `<' form.
(parse_options): Declare `tmp' to be of type uintmax_t.
Use xstrtoumax, not xstrtoul.
Fail if the specified offset if larger than OFF_T_MAX.
(dump_strings): Declare local `i' to be of type size_t.
Remove the now-unnecessary cast-to-off_t.
(main) [IF_LINT]: Initialize desired_width to avoid a warning.
Declare `tmp' to be of type uintmax_t.
Use xstrtoumax, not xstrtoul.
Fail if minimum string length is larger than SIZE_MAX.
Fail if specified width is larger than ULONG_MAX.

23 years agoAdd this:
Jim Meyering [Sun, 3 Dec 2000 10:04:30 +0000 (10:04 +0000)]
Add this:
  AC_REQUIRE([AC_TYPE_OFF_T])

23 years ago(OFF_T_MIN): Remove definition.
Jim Meyering [Sun, 3 Dec 2000 08:55:51 +0000 (08:55 +0000)]
(OFF_T_MIN): Remove definition.
(OFF_T_MAX): Likewise.

23 years ago(OFF_T_MIN): Define.
Jim Meyering [Sun, 3 Dec 2000 08:54:37 +0000 (08:54 +0000)]
(OFF_T_MIN): Define.
(OFF_T_MAX): Define.

23 years agoMake od print valid addresses for offsets of 2^32 and larger.
Jim Meyering [Sun, 3 Dec 2000 08:44:12 +0000 (08:44 +0000)]
Make od print valid addresses for offsets of 2^32 and larger.

(format_address): Use off_t, not long unsigned_int as the
parameter type.
(format_address_none): Likewise.  Mark parameter as unused.
(format_address_std): Likewise.
(format_address_label): Likewise.
(print_ascii): Mark format string parameter as unused.
(write_block): Use off_t, not long unsigned_int as offset type.
(expand_address_fmt): New function.
(main): Use it to expand each address format string template.
Reported by Mark Nudelman, via Andreas Jaeger.

23 years ago(parse_options): Use xstrtoumax to parse the byte and line
Jim Meyering [Sun, 3 Dec 2000 08:35:48 +0000 (08:35 +0000)]
(parse_options): Use xstrtoumax to parse the byte and line
offset.  Give a better diagnostic when the requested offset is still
representable but larger than OFF_T_MAX.

23 years ago*** empty log message ***
Jim Meyering [Sat, 2 Dec 2000 22:18:29 +0000 (22:18 +0000)]
*** empty log message ***

23 years ago(valid_format): Move pre-increment to a separate statement to avoid a warning.
Jim Meyering [Sat, 2 Dec 2000 22:18:21 +0000 (22:18 +0000)]
(valid_format): Move pre-increment to a separate statement to avoid a warning.

23 years agoMove dcls of globals used only in main...
Jim Meyering [Sat, 2 Dec 2000 22:16:41 +0000 (22:16 +0000)]
Move dcls of globals used only in main...
(main): ...to here.
(usage): Clarify option descriptions.

23 years agowhoops. rename the use, too -- not just the decl!!
Jim Meyering [Sat, 2 Dec 2000 21:14:41 +0000 (21:14 +0000)]
whoops.  rename the use, too -- not just the decl!!

23 years ago*** empty log message ***
Jim Meyering [Sat, 2 Dec 2000 21:14:09 +0000 (21:14 +0000)]
*** empty log message ***

23 years ago(checkfp): Rename local `buf' to avoid shadowing previous declaration.
Jim Meyering [Sat, 2 Dec 2000 21:14:02 +0000 (21:14 +0000)]
(checkfp): Rename local `buf' to avoid shadowing previous declaration.

23 years ago(skip): Use lseek instead of worrying about fseeko or fseek.
Jim Meyering [Sat, 2 Dec 2000 21:08:01 +0000 (21:08 +0000)]
(skip): Use lseek instead of worrying about fseeko or fseek.
This should be portable, as we seek before doing any I/O.
(fseeko): Remove; no longer used.

23 years agoadd back the parens Paul removed :-)
Jim Meyering [Sat, 2 Dec 2000 20:55:25 +0000 (20:55 +0000)]
add back the parens Paul removed :-)

23 years ago(gobble_file): Do not fall back on lstat if stat
Jim Meyering [Sat, 2 Dec 2000 20:55:02 +0000 (20:55 +0000)]
(gobble_file): Do not fall back on lstat if stat
fails; POSIX.2 does not allow this.  Invoke acl only on
non-symlinks, and only if lstat or stat succeeds.

23 years ago*** empty log message ***
Jim Meyering [Sat, 2 Dec 2000 20:52:09 +0000 (20:52 +0000)]
*** empty log message ***

23 years ago*** empty log message ***
Jim Meyering [Sat, 2 Dec 2000 20:45:40 +0000 (20:45 +0000)]
*** empty log message ***

23 years agoMake idempotent, to avoid some obscure warnings.
Jim Meyering [Sat, 2 Dec 2000 20:45:30 +0000 (20:45 +0000)]
Make idempotent, to avoid some obscure warnings.

23 years ago.
Jim Meyering [Sat, 2 Dec 2000 18:52:17 +0000 (18:52 +0000)]
.

23 years ago*** empty log message ***
Jim Meyering [Sat, 2 Dec 2000 18:52:03 +0000 (18:52 +0000)]
*** empty log message ***

23 years ago(OFF_T_PRINTF_FORMAT_STRING): require it.
Jim Meyering [Sat, 2 Dec 2000 18:51:26 +0000 (18:51 +0000)]
(OFF_T_PRINTF_FORMAT_STRING): require it.

23 years ago*** empty log message ***
Jim Meyering [Sat, 2 Dec 2000 18:04:19 +0000 (18:04 +0000)]
*** empty log message ***