Jim Meyering
a06a563ea4
(touch): Only do the fstat if we need to.
...
Resort to calling stat for directories, but only when necessary.
(usage): Mention --no-create.
1999-05-07 18:44:20 +00:00
Jim Meyering
9250d1a34f
(main): Use better wording in diagnostic: `cannot
...
create directory' rather than `cannot make directory'. The former
also matches the one in makepath.c.
1999-05-07 18:40:11 +00:00
Jim Meyering
a8d7df994f
(apply_translations): Use TOUPPER, not toupper.
1999-05-07 18:36:54 +00:00
Jim Meyering
b10e58db1b
(numcompare): Handle comparison of two negative
...
numbers correctly in the ENABLE_NLS case.
1999-05-06 21:51:06 +00:00
Jim Meyering
1db78f41bf
(show_date): Change an automatic aggregate initializer
...
to be a static one. For SunOS4's cc.
1999-05-05 13:26:06 +00:00
Jim Meyering
19d33cea2b
(USE_ACL): Define this only #if
...
(HAVE_SYS_ACL_H && HAVE_ACL && defined GETACLCNT).
Use `USE_ACL' in place of `HAVE_ACL' everywhere else. From Kaveh Ghazi.
1999-05-05 13:12:28 +00:00
Jim Meyering
431db6c847
add missing backslash-before-newline in usage message
1999-05-05 01:56:45 +00:00
Jim Meyering
207d6b3cda
add missing backslash-before-newline in usage message
1999-05-05 01:55:39 +00:00
Jim Meyering
cb5153fefa
(usage): Break the usage message into 3 pieces instead of
...
only 2. The strings had grown to be longer than 2048, which evokes
errors when compiling with Irix4's cc.
1999-05-04 18:46:06 +00:00
Jim Meyering
b08eca15fd
(search_item): Use 1' instead of +1'. The latter
...
elicits a syntax error from SunOS4's cc. From Kaveh Ghazi.
1999-05-04 14:31:27 +00:00
Jim Meyering
6f922edf2d
<ctype.h>: Don't include.
...
[!STDC_HEADERS]: Remove definitions of ctype macros.
Convert e.g., isspace to ISSPACE to use definitions from sys2.h.
Reported by Kaveh Ghazi.
1999-05-03 18:01:49 +00:00
Jim Meyering
85514c7e0b
(TOLOWER): Define.
...
(TOUPPER): Define.
1999-05-03 17:59:43 +00:00
Jim Meyering
e060631c35
(TOLOWER): Remove definition.
1999-05-03 17:55:53 +00:00
Jim Meyering
73bc7f0777
(main): Give a better diagnostic when we fail to set the hostname.
1999-05-03 02:45:37 +00:00
Jim Meyering
99571c629e
(main): Manually handle `--', since we no longer call getopt.
1999-05-03 02:42:49 +00:00
Jim Meyering
5e1ffee4d6
(main): Manually handle `--', since we no longer
...
call getopt. Reported by Joseph S. Myers.
1999-05-01 02:29:17 +00:00
Jim Meyering
910287474f
(main): Manually handle `--', since we no longer
...
call getopt. Reported by Joseph S. Myers.
1999-05-01 02:28:54 +00:00
Jim Meyering
6faa50c135
(decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead of 0, 1.
1999-05-01 02:08:30 +00:00
Jim Meyering
9fca49f67c
Always use STDIN_FILENO for input and STDOUT_FILENO
...
for output, to avoid confusion with closed input and output fds.
(input_fd, output_fd): Remove; all uses changed to STDIN_FILENO
and STDOUT_FILENO.
(open_fd): New function.
(main): Use it, instead of open, to ensure that file descriptors
don't get confused.
(skip): Don't fstat the input file; the result is no longer used.
1999-05-01 02:05:56 +00:00
Jim Meyering
2f7eb5cdf5
(usage): Document the differences between the
...
obsolescent, +POS1[-POS2] form, and the POSIX -k option.
1999-05-01 00:12:26 +00:00
Jim Meyering
25a8d1f1e9
(copy_internal): Move the one-file-system test so that
...
it follows the `if (new_dst || !S_ISDIR (dst_sb.st_mode))' block.
Prior to this change, `cp --one-file-system' would traverse a file-
system boundary if the destination directory existed.
From thospel@mail.dma.be .
1999-04-30 15:40:34 +00:00
Jim Meyering
40d99818ef
(copy_internal): Don't make `mv foo symlink-to-foo' fail.
...
That is, even though source and destination are `the same,' don't fail
if the destination is a symlink. From Peter Samuelson.
1999-04-30 15:15:02 +00:00
Jim Meyering
9622d45140
(main): If you can't open an output file (with seek=...) read-write,
...
then open it for write and report an error if we can't seek.
1999-04-26 13:31:49 +00:00
Jim Meyering
157b3ef61f
(main): Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 13:03:49 +00:00
Jim Meyering
73e540ea1b
(do_copy, cp_option_init, main): Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 13:03:11 +00:00
Jim Meyering
12dd796d8a
(struct cp_options.umask_kill): Use mode_t, not unsigned int.
1999-04-26 12:55:36 +00:00
Jim Meyering
d1c7f62ba8
(copy_reg, copy_internal): Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 12:54:51 +00:00
Jim Meyering
5d76644c3e
(describe_change, change_file_mode): Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 12:51:43 +00:00
Jim Meyering
750e5969ff
(main): Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 12:49:59 +00:00
Jim Meyering
6fc1cc1b6a
(isodigit): Remove unused macro.
...
(mode, cp_option_init, DIR_MODE): Use proper mode_t types and macros.
Don't assume the traditional Unix values for mode bits.
1999-04-26 12:49:16 +00:00
Jim Meyering
9e37b40aa1
(S_ISUID, S_ISGID, S_ISVTX, S_IRWXU, S_IRWXG, S_IRWXO):
...
Define if not defined.
(CHMOD_MODE_BITS): New macro.
1999-04-26 12:48:12 +00:00
Jim Meyering
ebb207dc5a
(open_maybe_create): Don't pass 0666 to open; it's not needed and isn't
...
guaranteed to be portable.
1999-04-26 12:47:33 +00:00
Jim Meyering
d0eeabbc32
Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 12:20:54 +00:00
Jim Meyering
259838277b
Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 12:20:26 +00:00
Jim Meyering
0b6ee7158e
Use proper mode_t types and macros.
...
Don't assume the traditional Unix values for mode bits.
1999-04-26 12:19:37 +00:00
Jim Meyering
3baa7fa854
(main): Revert last change.
...
Instead, loop on `optind < argc' to protect use of argv[optind].
1999-04-26 02:19:51 +00:00
Jim Meyering
0d13ededce
revert last change
1999-04-26 02:18:09 +00:00
Jim Meyering
bf73dd5297
(main): Handle the case in which seq is given no args.
1999-04-26 00:39:47 +00:00
Jim Meyering
12bf2f8f8b
[NDEBUG]: Remove definition.
1999-04-25 19:18:20 +00:00
Jim Meyering
f90a5e94b8
(print_entry): Use #if', not #ifdef HAVE_UT_HOST'.
1999-04-24 21:29:22 +00:00
Jim Meyering
88c9f81346
Include new "xstrtol.h", not "xstrtoul.h".
1999-04-24 12:43:39 +00:00
Jim Meyering
55865fda6c
Include new "xstrtol.h", not "xstrtoul.h".
...
(struct control) [repeat]: Declare as uintmax_t, not int.
(struct control) [lines_required]: Likewise.
(handle_line_error): Use human_readable to print lines_required.
(parse_repeat_count): Parse a uintmax_t.
(parse_patterns): Parse a uintmax_t.
1999-04-24 12:42:53 +00:00
Jim Meyering
bdb9cd3f2c
Include new "xstrtol.h", not "xstrtoul.h".
1999-04-24 12:33:56 +00:00
Jim Meyering
cef6937705
Include new "xstrtol.h", not "xstrtoul.h".
...
Change all U_LONG_LONG to uintmax_t.
(head_lines): Move a couple dcls into an inner scope.
(string_to_integer): Rename from string_to_ull.
1999-04-24 12:33:25 +00:00
Jim Meyering
62edaf0b55
(word32): Don't use `#error'; it runs afoul of SunOS 4.1.4 cc.
1999-04-22 14:38:50 +00:00
Jim Meyering
e8b570e45a
update comment
1999-04-21 03:19:26 +00:00
Jim Meyering
cf6eaeb03b
<xstrtol.h>: Include this, not xstrtoul.h.
...
<human.h>: Include.
Use uintmax_t in place of unsigned long.
Use human_readable to convert to strings for printing.
1999-04-21 03:18:23 +00:00
Jim Meyering
c7a0b8f429
<config.h>: Include first, since it can do
...
things like #define const, and this must be done before
including any system headers.
1999-04-20 13:26:06 +00:00
Jim Meyering
c37f2f6355
(main): Restore `+' in getopt_long string. Otherwise,
...
commands like `seq 10 -2 0' wouldn't work. From Andreas Schwab.
1999-04-19 14:05:34 +00:00
Jim Meyering
95e8d410ff
(tempname): Wrap after 99999 only for length-impaired file systems.
1999-04-19 02:39:09 +00:00