summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
1999-05-05add missing backslash-before-newline in usage messageJim Meyering
1999-05-04(usage): Break the usage message into 3 pieces instead ofJim Meyering
only 2. The strings had grown to be longer than 2048, which evokes errors when compiling with Irix4's cc.
1999-05-04(search_item): Use `1' instead of `+1'. The latterJim Meyering
elicits a syntax error from SunOS4's cc. From Kaveh Ghazi.
1999-05-03<ctype.h>: Don't include.Jim Meyering
[!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(TOLOWER): Define.Jim Meyering
(TOUPPER): Define.
1999-05-03(TOLOWER): Remove definition.Jim Meyering
1999-05-03(main): Give a better diagnostic when we fail to set the hostname.Jim Meyering
1999-05-03(main): Manually handle `--', since we no longer call getopt.Jim Meyering
1999-05-01(main): Manually handle `--', since we no longerJim Meyering
call getopt. Reported by Joseph S. Myers.
1999-05-01(main): Manually handle `--', since we no longerJim Meyering
call getopt. Reported by Joseph S. Myers.
1999-05-01(decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead of 0, 1.Jim Meyering
1999-05-01Always use STDIN_FILENO for input and STDOUT_FILENOJim Meyering
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(usage): Document the differences between theJim Meyering
obsolescent, +POS1[-POS2] form, and the POSIX -k option.
1999-04-30(copy_internal): Move the one-file-system test so thatJim Meyering
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(copy_internal): Don't make `mv foo symlink-to-foo' fail.Jim Meyering
That is, even though source and destination are `the same,' don't fail if the destination is a symlink. From Peter Samuelson.
1999-04-26(main): If you can't open an output file (with seek=...) read-write,Jim Meyering
then open it for write and report an error if we can't seek.
1999-04-26(main): Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26(do_copy, cp_option_init, main): Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26(struct cp_options.umask_kill): Use mode_t, not unsigned int.Jim Meyering
1999-04-26(copy_reg, copy_internal): Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26(describe_change, change_file_mode): Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26(main): Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26(isodigit): Remove unused macro.Jim Meyering
(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(S_ISUID, S_ISGID, S_ISVTX, S_IRWXU, S_IRWXG, S_IRWXO):Jim Meyering
Define if not defined. (CHMOD_MODE_BITS): New macro.
1999-04-26(open_maybe_create): Don't pass 0666 to open; it's not needed and isn'tJim Meyering
guaranteed to be portable.
1999-04-26Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-26(main): Revert last change.Jim Meyering
Instead, loop on `optind < argc' to protect use of argv[optind].
1999-04-26revert last changeJim Meyering
1999-04-26(main): Handle the case in which seq is given no args.Jim Meyering
1999-04-25[NDEBUG]: Remove definition.Jim Meyering
1999-04-24(print_entry): Use `#if', not `#ifdef HAVE_UT_HOST'.Jim Meyering
1999-04-24Include new "xstrtol.h", not "xstrtoul.h".Jim Meyering
1999-04-24Include new "xstrtol.h", not "xstrtoul.h".Jim Meyering
(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-24Include new "xstrtol.h", not "xstrtoul.h".Jim Meyering
1999-04-24Include new "xstrtol.h", not "xstrtoul.h".Jim Meyering
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-22(word32): Don't use `#error'; it runs afoul of SunOS 4.1.4 cc.Jim Meyering
1999-04-21update commentJim Meyering
1999-04-21<xstrtol.h>: Include this, not xstrtoul.h.Jim Meyering
<human.h>: Include. Use uintmax_t in place of unsigned long. Use human_readable to convert to strings for printing.
1999-04-20<config.h>: Include first, since it can doJim Meyering
things like #define const, and this must be done before including any system headers.
1999-04-19(main): Restore `+' in getopt_long string. Otherwise,Jim Meyering
commands like `seq 10 -2 0' wouldn't work. From Andreas Schwab.
1999-04-19(tempname): Wrap after 99999 only for length-impaired file systems.Jim Meyering
1999-04-19(main, longopts):Jim Meyering
Use -u instead of -R for --remove, so that we can preserve future compatibility with rm.
1999-04-19[!HAVE_CONFIG_H] (ST_BLKSIZE): Define to 65536.Jim Meyering
(do_wipefd): Use ST_BLKSIZE instead of referring to the st_blksize member directly.
1999-04-18Include xstrtol.h.Jim Meyering
(parse_integer): Migrate most of the work into the new xstrtoumax fn.
1999-04-18Include xstrtol.h, not obsolete file xstrtoul.h.Jim Meyering
1999-04-18Include xstrtol.h, not obsolete file xstrtoul.h.Jim Meyering
"human.h", "xalloc.h": Include. (attribute): Remove; no longer needed. (xstrdup): New decl. (STDOUT_FILENO): New macro. (O_NOCTTY): Make sure it's always defined, even if HAVE_CONFIG_H. The following changes have effect only if !HAVE_CONFIG_H. <ctype.h>: New include. (RETSIGTYPE): Remove bogus semicolon at end. (STDOUT_FILENO, uintmax_t, human_readable, LONGEST_HUMAN_READABLE): New macros. (xstrtoumax): Renamed from xstrtoul, with corresponding type changes. Handle suffixes like the real routine does. (error): Remove bogus assignment of errno to errnum. (xmalloc, xstrdup): New functions. (O_NOCTTY): Define even if !HAVE_CONFIG_H. (S_ISFIFO, S_ISSOCK): New macros, if not already defined. (OUTPUT_BLOCK_SIZE): New macro. (struct Options.verbose): Now a boolean, since we no longer have two levels of verbosity. (long_opts, usage, main): Remove -D or --device option. Invert -p or --preserve option, and rename it to -R or --remove. (usage): Describe G suffix. (usage): "-" no longer conflicts with -v. (UCHAR_MAX): Indent `#error' so that SunOS 4.1.4 cc doesn't reject it. (ind): Portability fixes: return word32, not unsigned; multiply by sizeof (word32) instead of shifting left by 2. (isaac_refill, isaac_mix): Comment out size of array parameter, as ansi2knr mishandles this. (status_visible, status_pos, pfstatus, flushstatus): Remove, since pfstatus isn't portable to users with varying width fonts, or internationalized messages, and vfprintf is problematic. All callers of pfstatus changed to use error instead; this removes incompatibility of -v with -. All calls to flushstatus removed. (dopass, do_wipefd): Do not translate non-English msgs with gettext. (dopass): Cast lseek constant arguments to (off_t) for benefit of pre-ANSI compilers; fix one lseek call whose args were interchanged. Remove unnecessary casts to (off_t). Do not check for EIO when determining file size; this was just my earlier wild guess. Use human_readable to print off_t, instead of casting to unsigned long (which doesn't work in Solaris 2.6, where off_t is longer than long). Output human-readable sizes, instead of always using "K". Check for offset overflow (it happened to me in SunOS 4.1.4). (do_wipefd): Do not insist on regular files, but do check for special files that cannot possibly be shredded. Use xmalloc instead of malloc + check. Do not inspect st_size for non-regular files. Try to find the size of a non-regular file by seeking to its end. Do not assume that a regular file of size-0 has unknown size. Check for regular files with negative sizes, and for overflow after rounding to next block. Always try to truncate, even for special files, but do not report an error if truncation fails on a special file. (dopass, wipefile): Do not return 1 for special files; the caller doesn't care any more. (wipefd): Remove unnecessary (and nonportable) check for whether the file descriptor is read-only. Remove no-longer-needed check for `-v -'. (incname): Return 1 for carry bit, like the documentation says. (wipename, wipefile): Accept new argument, specifying the quoted file name. All callers changed. (wipename): Use xstrdup instead of strdup+error check. (wipefile): Check for ENOTDIR when opening /dev/fd/NNN. Check for errors in NNN more carefully. Restore errno after the check. Check for errors when closing the file descriptor. Use more consistent wording when unable to remove a file. (main): Do not remove files by default. Use xstrtoumax instead of xstrtoul uniformly, since xstrtoul won't exist if !HAVE_CONFIG_H. In diagnostics, quote invalid operands to -n and -s options. Allow T, P, E, Z, and Y suffixes in -s operand. flags.verbose is now a boolean, not a counter. Use STDOUT_FILENO instead of 1, for clarity.
1999-04-18(tempname): Add a FIXME comment.Jim Meyering
1999-04-18(NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,Jim Meyering
not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than #if HAVE_UNISTD_H.