Commit Graph

100 Commits

Author SHA1 Message Date
Jim Meyering 81b16373ae Arrange to call close_stdout only upon exit. 2000-05-13 06:49:53 +00:00
Jim Meyering 4c69db64f2 don't hard-code `rm' 2000-05-02 06:56:31 +00:00
Jim Meyering acd9c429c0 (usage): Add the answer to `How do I remove a file named -f?' 2000-05-02 06:55:49 +00:00
Jim Meyering 7872d7c932 Adjust comments to reflect that lots of code has moved to remove.c. 1999-11-12 10:42:13 +00:00
Jim Meyering 667799f7e2 Don't include closeout.h or version-etc.h explicitly. Now, they're included via sys2.h. 1999-03-31 05:59:13 +00:00
Jim Meyering 3d308f9549 No longer include long-options.h.
Include version-etc.h instead.
(PROGRAM_NAME, AUTHORS): Define.
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
1999-03-26 14:23:59 +00:00
Jim Meyering 61fa70ac19 Include long-options.h
[long_options]: Remove the "help" and "version" entries.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
1999-03-04 05:09:05 +00:00
Jim Meyering 07c6f5e387 update copyright dates 1999-02-16 04:14:17 +00:00
Jim Meyering 20bc02752b (usage): Don't make it static so that it can be called from libfu.a by xargmatch. 1999-01-16 15:34:59 +00:00
Jim Meyering 08cfef16a2 update bug-reporting address 1998-09-19 17:17:58 +00:00
Jim Meyering df7cef21c7 Remove and minimally librarify guts for use in mv.c.
(main): Pass options (`&x') to rm.
Call remove_init and remove_fini instead of open-coding them.
1998-01-22 08:14:52 +00:00
Jim Meyering 2bec121abb add `,' in comment 1998-01-19 09:29:27 +00:00
Jim Meyering 5d4f8ebdfd (main, usage): Check for write error to stdout before exiting.
Include "closeout.h".
1998-01-04 22:45:28 +00:00
Jim Meyering b3d19ee824 (remove_cwd_entries): Initialize the entry-name obstack
only once and never free it.
1998-01-01 21:32:46 +00:00
Jim Meyering 5cc8090de2 (remove_cwd_entries): Plug a gross leak -- don't call
obstack_init inside the loop.
1997-12-29 21:04:26 +00:00
Jim Meyering 9afbb6eec6 (ASSIGN_STRDUPA): Cast alloca return value to char*. 1997-12-14 15:38:04 +00:00
Jim Meyering f7ecccf234 (full_filename): Use memcpy, not mempcpy when not using the return value. 1997-11-30 11:02:47 +00:00
Jim Meyering 4c3aa5cba3 (hash_pjw): Don't use ANSI `U' suffix. Cast instead. 1997-11-19 18:59:02 +00:00
Jim Meyering 5b399f4fe0 [!HAVE_MEMPCPY] (mempcpy): Define here instead. 1997-11-12 17:21:54 +00:00
Jim Meyering 36ce9a1c1c use 2 mempcpy instead of two memcpy calls 1997-11-08 02:59:16 +00:00
Jim Meyering 1b3376c9da Put cycle-detecting code inside an
#ifdef ENABLE_CYCLE_CHECK, for systems lacking d_ino.
[D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK.

(ASSIGN_STRDUPA): Clean up.
(right_justify): Use memcpy return value directly.
Suggestions from Ulrich Drepper.

(remove_cwd_entries) [! defined HAVE_WORKING_READDIR]: Impose overhead
of working around non-POSIX readdir implementation only on systems
that need it.
(remove_cwd_entries): Temporarily save a copy of each entry name in
an obstack rather than on the stack via alloca, then free it in the
likely event that we don't save the entry in the hash table.
1997-11-03 04:22:57 +00:00
Jim Meyering 0b5e948104 Guard cycle-detecting code inside #ifdef ENABLE_CYCLE_CHECK.
[D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK.
1997-10-28 00:55:11 +00:00
Jim Meyering 94c4bdd4c8 fix typo in comment 1997-10-27 03:22:01 +00:00
Jim Meyering df445b0891 Remove old-style xmalloc and xrealloc decls. 1997-10-25 22:03:55 +00:00
Jim Meyering f4d8e10147 Remove stpcpy decl.
Remove free, malloc, and realloc decls.
1997-10-23 16:06:59 +00:00
Jim Meyering a7e650ac12 (remove_cwd_entries): Entries in table of processed dir
entries are not malloc'd, so don't have hash cleanup free them.
Rewind dirp upon NULL readdir, required for at least SunOS.
1997-10-19 03:09:40 +00:00
Jim Meyering c555721842 (remove_cwd_entries): Change the while(dp...) to a while(1) loop,
and move dcl and assignment of dp into the loop.
1997-10-17 18:06:34 +00:00
Jim Meyering 05bbdbd786 update bug-reporting address 1997-10-07 23:53:36 +00:00
Jim Meyering a8cf858306 (fspec_init_dp): Use DTTOIF. Fix syntax error in code
that gets compiled on BSDI3.0 systems.
1997-10-03 02:44:33 +00:00
Jim Meyering de2517a1f4 (remove_dir): Update old comment. 1997-09-28 03:51:00 +00:00
Jim Meyering 4a32d010ef [enum RM_status]: Remove `= 2'. Add comment.
(dir_stack): Describe.
(remove_file): Revert s/fprintf/error/ change.  We don't want newlines at
end of prompt strings.
(remove_dir): Likewise.
1997-09-28 03:47:53 +00:00
Jim Meyering 3e90df41a9 tweak comment 1997-09-27 23:45:54 +00:00
Jim Meyering fc802521f3 Use hash.c (chaining) functions, not those of oa-hash.c
(open addressing).  The latter implementation is wonderful when
deletions are rare, but doen't support the frequent deletions
required to implement the active directory set.
1997-09-21 04:53:14 +00:00
Jim Meyering b4204ff74c (remove_cwd_entries): Don't free entries -- they're alloca'd, now. 1997-09-15 13:24:43 +00:00
Jim Meyering 45853bf653 Use memcpy, not stpncpy. This fixes a UMR. 1997-09-15 12:34:25 +00:00
Jim Meyering eaa1924e36 Write implementation overview. 1997-09-15 03:56:19 +00:00
Jim Meyering e33f73ba8d remove obsolete comment 1997-09-15 03:31:42 +00:00
Jim Meyering e01071c1d7 tweak comment 1997-09-15 03:24:03 +00:00
Jim Meyering 6d77a9d346 (full_filename): Use realloc, not xrealloc. 1997-09-15 03:23:12 +00:00
Jim Meyering 548bd7cf11 s/__inline/inline/. 1997-09-14 03:41:26 +00:00
Jim Meyering b208989a75 (PARAMS): Define.
(rm): Guard prototype in forward dcl with PARAMS.
1997-09-14 03:39:26 +00:00
Jim Meyering 561028f4ac merge from rm-fix branch 1997-09-14 02:00:48 +00:00
Jim Meyering 4c2adcbd56 Use base_name, not basename. 1997-05-27 11:04:41 +00:00
Jim Meyering b7ffe8cdaf update copyrights for 1997 1997-02-09 04:52:50 +00:00
Jim Meyering a882d55b52 bracket bug address with <> and append a period 1997-02-01 04:24:08 +00:00
Jim Meyering 4f51b86bfb Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call. 1997-02-01 03:03:44 +00:00
Jim Meyering bded355394 (usage): Alphabetize option descriptions the way sort -f would. 1996-11-23 22:13:00 +00:00
Jim Meyering 5582e6dad3 change bug-reporting address 1996-11-03 03:16:27 +00:00
Jim Meyering b8e689dc67 change bug-reporting address 1996-11-02 20:44:15 +00:00
Jim Meyering 4f28f318d8 (main): update --version output to conform to coding standard 1996-10-05 13:14:11 +00:00