Commit Graph

1635 Commits

Author SHA1 Message Date
Jim Meyering 3fa1d4bb24 (main): Move the test of the result of the read_filesystem_list call
up out of if-block -- code in the else-block depends on it too.
1998-06-30 02:27:51 +00:00
Jim Meyering f3c14cb59f revert back to using lower case _unlocked wrapper names 1998-06-29 16:24:01 +00:00
Jim Meyering 8ba97d963e Include system.h only after error.h and readutmp.h
so we don't get redefinition warnings about getc, etc.
Revert back to using lower case _unlocked wrapper names.
1998-06-29 16:23:15 +00:00
Jim Meyering 83d4b736d2 revert back to using lower case _unlocked wrapper names 1998-06-29 15:59:39 +00:00
Jim Meyering 257c5c4737 revert back to using lower case _unlocked wrapper names 1998-06-29 15:57:45 +00:00
Jim Meyering 391c960cba Update call to human_readable -- now there's one fewer arg. 1998-06-29 15:56:23 +00:00
Jim Meyering 60ae0b81a5 (__xstrtol), src/dd.c (parse_integer):
Add support for SI-like suffixes like "GB" and "TD".
(usage): Describe it.
1998-06-29 15:36:28 +00:00
Jim Meyering 09d344df5b (human_readable_base, output_units): Remove;
replace with new variable output_block_size.  All uses changed.
(long_options, usage, main): Add --block-size.
(main, decode_switches): Use new human_block_size function to
initialize output block size consistently with other programs.

From Paul Eggert.
1998-06-29 15:34:54 +00:00
Jim Meyering 43f4099c95 (human_readable_base, output_units): Remove;
replace with new variable output_block_size.  All uses changed.
(long_options, usage, main): Add --block-size.
(main, decode_switches): Use new human_block_size function to
initialize output block size consistently with other programs.

(print_header, show_dev): Shrink some columns and expand
others, to squeeze in support for today's larger filesystems.
(print_header): Print output block size using power-of-1024 SI format.
(df_readable): Coalesce last two args into one, for convenience.
All callers changed.
(main): Remove check for portable output format and larger
or human-readable block sizes.

From Paul Eggert.
1998-06-29 15:33:38 +00:00
Jim Meyering 868ed3b0af (usage): Make --kilobytes description consistent with
that in du and df.  From Göran Uddeborg.
1998-06-29 03:42:50 +00:00
Jim Meyering c5eb9edf26 Change all uses of unlocked-wrapped functions to their upper case wrapper names. 1998-06-29 02:13:21 +00:00
Jim Meyering dd9470cb58 Change all uses of unlocked-wrapped functions to their upper case wrapper names. 1998-06-29 02:11:07 +00:00
Jim Meyering 02fc5fa0d0 Change all uses of unlocked-wrapped functions to their upper case wrapper names. 1998-06-29 02:10:24 +00:00
Jim Meyering e989012b57 add #undefs, alphabetize 1998-06-29 01:00:51 +00:00
Jim Meyering 73ab48d4e7 experimental support for -t [optional fd] -- probably soon to be backed out 1998-06-28 21:53:05 +00:00
Jim Meyering 439fdff851 Add macro definitions for GNU libc unlocked wrappers. 1998-06-28 21:38:14 +00:00
Jim Meyering 933b990ab9 add a FIXME for output delimiter 1998-06-28 21:32:51 +00:00
Jim Meyering a92dd43b7c Add DIRED_ prefix to the macros: FPUTS and FPUTS_LITERAL. 1998-06-28 20:34:29 +00:00
Jim Meyering d2698caef3 s/PUTCHAR/DIRED_PUTCHAR/g. 1998-06-28 20:31:16 +00:00
Jim Meyering 182a1780ac (print_page): Break out of loop before double space test
if cols_ready_to_print is zero.
1998-06-27 23:43:40 +00:00
Jim Meyering 6ae99a4290 (copy_internal): Fix it so hard-link test is no longer hidden inside
big if-(backup_type == none) block.
1998-06-27 22:09:45 +00:00
Jim Meyering 9d9fef5595 (copy_reg): Detect identical source and dest here.
(copy_internal): Make the test symmetric.
1998-06-27 20:44:23 +00:00
Jim Meyering d200f4974b (remove_file): Remove `non-directory' part of
`removing non-directory FILE' verbose message.
1998-06-27 04:39:25 +00:00
Jim Meyering de45950430 (show_dev): Increase field width for blocks, used,
and available columns from 7 to 8.
1998-06-24 03:02:06 +00:00
Jim Meyering dcfb3e037a (main): Fix argv-handling bug in my 1998-05-09 change.
Reported by Don Parsons.
1998-06-01 03:28:16 +00:00
Jim Meyering 9e1c89c38e (two_arguments): Don't test argv[pos][2] if it's past end of string. 1998-05-26 13:36:49 +00:00
Jim Meyering 84d222f735 new version from automake-1.3 1998-05-24 17:43:17 +00:00
Jim Meyering dd2934197b tweak --changed diagnostic 1998-05-24 14:17:33 +00:00
Jim Meyering 45d32cef80 tweak comment 1998-05-24 13:36:54 +00:00
Jim Meyering 3f51edcdec Accept new option, --dereference. --no-dereference is now the default.
(Change_status) [CH_NOT_APPLIED]: New member.
(change_symlinks): Enable this by default, now.
(describe_change): Handle new case.
(change_file_owner): Add new parameter: cmdline_arg.  Update callers.
Reorganize to reflect changed semantics.
(LCHOWN): Remove definitions.
1998-05-24 12:51:37 +00:00
Jim Meyering 3fdd4e6cd2 add copyright 1998-05-16 20:21:39 +00:00
Jim Meyering 42755ceb62 cast for losing Solaris 1998-05-16 20:21:06 +00:00
Jim Meyering 24a7456cc0 (tac_seekable): Fix error in handling regex separators. 1998-05-16 20:06:56 +00:00
Jim Meyering 085866c1a3 (hash_compare_strings): Return true or false, not 1/0.
(remove_cwd_entries): Use RM_OK, not equivalent literal `1'.
1998-05-16 04:40:38 +00:00
Jim Meyering 15aac9a45d (copy_internal): Plug a small leak. 1998-05-13 03:47:02 +00:00
Jim Meyering 0d7fe8a4de (do_move): Remove lots of code that was duplicated in
copy.c (copy), now that copy() has better support for mv.  This fixes
a bug with cross-filesystem `mv -i' whereby you could get two prompts
for the same destination file and eventually remove the destination
file even though one of the responses was negative.
Reported by Dirk Lattermann.
1998-05-11 04:12:51 +00:00
Jim Meyering 859bfc78b1 reflect additional parameter to copy
initialize new member: move_mode.
1998-05-11 04:07:16 +00:00
Jim Meyering 21ae3d911c (copy_internal): Use new move_mode member.
Add parameter.
(copy): Add parameter.
1998-05-11 04:06:22 +00:00
Jim Meyering 4520ff31e2 Better support for mv:
[struct cp_options] (move_mode): New member.
1998-05-11 04:04:16 +00:00
Jim Meyering 4cc5661b42 (cp_option_init): s/use_mode/set_mode/ 1998-05-10 12:22:58 +00:00
Jim Meyering 19a98e3edc (cp_option_init): Likewise.
(main): Set new preserve_* options.
1998-05-10 12:22:23 +00:00
Jim Meyering 50e17793c8 (cp_option_init): Initialize new members. 1998-05-10 12:19:30 +00:00
Jim Meyering 8a0a50e6b0 (new_nondir_mode): New function. Use where appropriate.
Use more-specific preserve_* members in place of removed `preserve'.
(copy_internal): Honor failed_unlink_is_fatal.
1998-05-10 12:18:21 +00:00
Jim Meyering a42054dd57 Support for install:
[struct cp_options] (failed_unlink_is_fatal): New member.
(preserve_owner_and_group): New member.
(preserve_chmod_bits): New member.
(preserve_timestamps): New member.
(preserve): Remove member.
(set_mode): New member.
(mode): New member.
1998-05-10 12:17:46 +00:00
Jim Meyering 24da56f990 (main): Rewrite argv-handling to be clearer.
(copy_file): Rewrite to use copy.c (copy).
(change_attributes): Get rid of now-(with chown wrapper)-unnecessary
`no_need_to_chown' parameter.  Fix caller.
(install_file_in_file): Remove now-unnecessary `to_created' parameter.
(cp_option_init): New function.
Update several functions to take new parameter specifying copy options.
1998-05-10 03:05:44 +00:00
Jim Meyering 83c2cfa04d Include safe-read.h.
Don't declare safe_read.
1998-05-09 17:42:50 +00:00
Jim Meyering 53c7a54a58 Include safe-read.h.
Don't declare safe_read.
1998-05-09 17:41:37 +00:00
Jim Meyering bbf4d37373 (tac_seekable): Rename from tac_stream.
Change `FILE *in' parameter to `int input_fd'. Adjust callers.
Revert to using safe_read -- can't mix lseek and fread.
And can't use fseek because it can't handle files larger than 2^32.
1998-05-09 14:42:31 +00:00
Jim Meyering 9bb85624cf fix up compile warnings 1998-05-07 17:45:10 +00:00
Jim Meyering 9b5402ec48 Don't use safe_read. Use fread instead.
Fix open and fdopen to agree that file is read/write: O_RDWR and "w+".
This is required on at least solaris5.5.1.
1998-05-07 17:43:13 +00:00