Commit Graph

2370 Commits

Author SHA1 Message Date
Jim Meyering 8f8938e366 add format args to match new %lu directives 2000-05-20 15:37:26 +00:00
Jim Meyering 15ecc0f435 tweak warning diagnostic 2000-05-20 12:41:13 +00:00
Jim Meyering 5c34a06b45 (struct File_spec) [have_device, st_dev]: New members 2000-05-20 09:23:41 +00:00
Jim Meyering f5fb72e12c Save device number as well as inode number for each directory.
(struct active_dir_ent) [st_dev]: New member.
[st_ino]: Rename from `inum'.
(make_active_dir_ent) [device]: New parameter.
(hash_compare_active_dir_ents): Compare using SAME_INODE macro.
(fspec_init_common): New function, factored out.
(fspec_init_file): Initialize have_device member.
(fspec_get_full_mode): Remove parameter.  Update caller.
Set have_device and st_dev members.
2000-05-20 09:23:27 +00:00
Jim Meyering b55a5cc86c (rm): Combine adjacent fputc and fprintf. 2000-05-18 21:10:55 +00:00
Jim Meyering 4d453f5691 remove some parens from some cpp lines 2000-05-18 14:56:42 +00:00
Jim Meyering 9d67112156 (remove_dir): Detect (and fail upon) attempt to subvert a running `rm -r'.
Reported by Morten Welinder.
2000-05-18 14:49:34 +00:00
Jim Meyering 1ca5f870b6 tweak comment 2000-05-17 12:19:39 +00:00
Jim Meyering f13c5ee9ce (do_link): Use complete strings in diagnostics so they
are easier to translate.  Reported by Michel Robitaille.
(main): Drop support for the case in which S_ISLNK wasn't defined.
It was broken in any case.
2000-05-15 20:41:52 +00:00
Jim Meyering 81b16373ae Arrange to call close_stdout only upon exit. 2000-05-13 06:49:53 +00:00
Jim Meyering 47827e2ec2 Include closeout.h.
(usage): Don't call close_stdout here.
(close_stdout_wrapper): New, kludgey, function and file-scoped global.
(main): Register it with atexit.
2000-05-13 06:46:55 +00:00
Jim Meyering 30c412049f Detect and report write failure of --help/--version. 2000-05-12 22:38:58 +00:00
Jim Meyering fc64ba37d4 (copy_internal): Fix force and interactive tests. 2000-05-12 20:40:39 +00:00
Jim Meyering a5c02a198b Unlike for mv, -i doesn't cancel the effect of -f
and -f doesn't cancel the effect of -i.
(main) ['f']: Don't reset `x.interactive'.
['i']: Don't reset `x.force'.
2000-05-12 20:39:34 +00:00
Jim Meyering b0fd0aa567 (string_to_integer): Restrict base to 10. 2000-05-12 20:30:22 +00:00
Jim Meyering 1224b48d7f New option: --first-only
(anonymous enum) [CONVERT_FIRST_ONLY_OPTION]: Define.
(long_options): Add `first-only'.
(main): Handle new option.
2000-05-12 08:55:13 +00:00
Jim Meyering 9590fbf43c (usage): Don't call close_stdout_status directly,
since that didn't cover --version output.
(main): Instead, call close_stdout_set_status and arrange to
call close_stdout via atexit.
2000-05-11 07:24:05 +00:00
Jim Meyering 5a3d9df9a1 (usage): Don't call close_stdout_status directly,
since that didn't cover --version output.
(main): Instead, call close_stdout_set_status and arrange to
call close_stdout via atexit.
2000-05-11 07:23:42 +00:00
Jim Meyering 70e5178bde (usage): Don't call close_stdout directly, since that
didn't cover --version output.
(main):  Arrange to call close_stdout via atexit, instead.
2000-05-11 07:21:33 +00:00
Jim Meyering a210d7d35c Include sys/types.h in shred.c before including
sys/stat.h or system.h.  From John David Anglin.
2000-05-09 20:27:54 +00:00
Jim Meyering b9c210715c back out last change -- the two should be separate 2000-05-09 20:27:11 +00:00
Jim Meyering 5c4406f731 Include sys/types.h in shred.c before including
sys/stat.h or system.h.  From John David Anglin.
2000-05-09 20:25:58 +00:00
Jim Meyering babf9bb7ac (case_GETOPT_VERSION_CHAR): Don't call close_stdout. 2000-05-09 06:32:24 +00:00
Jim Meyering 661f74698e Include "closeout.h".
(usage): Call close_stdout just before exit.
2000-05-07 15:00:12 +00:00
Jim Meyering c6b0fefde1 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:57:52 +00:00
Jim Meyering 2d4fd1ab6e Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:57:24 +00:00
Jim Meyering c4d7de4d1c (usage): Call close_stdout_status. 2000-05-07 14:57:03 +00:00
Jim Meyering 7942b60d47 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:56:12 +00:00
Jim Meyering c6bd79ad34 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:55:15 +00:00
Jim Meyering 52150ef51d Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:54:43 +00:00
Jim Meyering 071e5e3b25 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:53:15 +00:00
Jim Meyering 21f7f8fb60 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:52:54 +00:00
Jim Meyering 1a898f0449 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:52:16 +00:00
Jim Meyering ab241ac3be Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:51:49 +00:00
Jim Meyering d3683509b3 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:51:07 +00:00
Jim Meyering ddb8aa8b9f (usage): Call close_stdout_status. 2000-05-07 14:50:39 +00:00
Jim Meyering 73ed5ed51e Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:49:06 +00:00
Jim Meyering a3d40a9447 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:48:25 +00:00
Jim Meyering 309c1c3e47 Include "closeout.h".
(usage): Call close_stdout just before exit.
2000-05-07 14:47:44 +00:00
Jim Meyering 72bdac7271 Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:46:33 +00:00
Jim Meyering f1013a1535 Include "closeout.h".
(main): Call atexit with close_stdout.
Remove explicit close_stdout.
2000-05-07 14:46:11 +00:00
Jim Meyering e1133c7a28 Include "closeout.h".
(usage): Call close_stdout just before exit.
2000-05-07 14:41:19 +00:00
Jim Meyering 9b6eb98d41 (EEXIST): Remove now-unused definition.
(ENOTEMPTY): Likewise.
(errno_rmdir_non_empty): Rewrite to use RMDIR_ERRNO_NOT_EMPTY,
which is determined by the autoconf test in m4/rmdir-errno.m4..
2000-05-06 14:31:32 +00:00
Jim Meyering c141f3a34e (main): Warn about arguments, don't fail.
(usage): Call close_stdout_status from here as well as from main.
2000-05-06 13:18:00 +00:00
Jim Meyering 3140984fab Include "closeout.h".
(main): Call close_stdout.
2000-05-05 21:55:32 +00:00
Jim Meyering 19c397acdc Include "closeout.h".
(main): Call close_stdout.
2000-05-05 21:53:41 +00:00
Jim Meyering 80b5341cb8 Include "closeout.h".
(main): Call close_stdout.
2000-05-05 21:52:22 +00:00
Jim Meyering f2fde491db Include "closeout.h".
(main): Call close_stdout.
2000-05-05 21:51:02 +00:00
Jim Meyering e1c98ab3fb Include "closeout.h".
(main): Call close_stdout.
2000-05-05 21:49:44 +00:00
Jim Meyering 3684b16708 Exit nonzero upon write failure.
Include "closeout.h".
(main): Call close_stdout.
Reported by Ian Jackson via Michael Stone.
2000-05-05 21:41:29 +00:00