Jim Meyering
4f73ecaf7d
rm: rewrite to use fts
* remove.c: Don't include "unlinkdir.h"; no longer used.
Do not include <setjmp.h> or "cycle-check.h". Likewise.
Include "xfts.h".
(dir_name, dir_len): Remove definitions.
(CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Likewise.
(INODE_SORT_DIR_ENTRIES_THRESHOLD, NEED_REWIND, D_TYPE): Likewise.
(struct dirstack_state, Dirstack_state): Likewise.
(g_buf, g_n_allocated): Remove declarations.
(hash_freer, hash_compare_strings, rm_malloc): Remove functions.
(rm_free, push_dir, top_dir, pop_dir, right_justify): Likewise.
(full_filename0, xfull_filename, full_filename_): Likewise.
(AD_stack_height, AD_stack_top, AD_stack_pop, AD_stack_clear): Likewise.
(obstack_init_minimal, ds_init, ds_clear, ds_free): Likewise.
(AD_pop_and_chdir, AD_ensure_initialized, AD_mark_helper): Likewise.
(AD_mark_as_unremovable, AD_mark_current_as_unremovable): Likewise.
(AD_push_initial, AD_push, AD_push, AD_is_removable): Likewise.
(write_protected_non_symlink): Change 3rd parameter from
dirstack_state "ds" to full_name.
(prompt): Adjust parameters. Now, state comes from FTS/FTSENT pair.
Those replace fd_cwd and "ds". Remove "filename". Remove pdirent_type
in favor of new "is_dir" parameter. Rename is_empty to is_empty_p.
(DO_RMDIR, DO_UNLINK): Remove definitions.
(remove_entry, fd_to_subdirp, compare_ino): Remove functions.
(dirent_count, dirent_inode_sort_may_be_useful): Likewise.
(preprocess_dir): Likewise.
(fts_skip_tree, mark_ancestor_dirs, excise, rm_fts): New functions.
(remove_cwd_entries, remove_dir, rm_1): Remove functions.
(rm): Rewrite as a simple loop calling fts_read and dispatching
each entry via rm_fts.
* src/rm.c (main): Adapt to new signature of rm().
* bootstrap.conf (gnulib_modules): Remove unlinkdir, no longer used.
* src/Makefile.am (sc_tight_scope): Also recognize an extern "enum"
declaration.
* tests/rm/empty-name: Adjust expected output to match new diagnostic.
* NEWS (Improvements): Mention it.
2009-09-11 14:08:51 +02:00
..
2009-06-17 14:54:29 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-01 13:05:06 +02:00
2009-08-25 09:21:00 +02:00
2009-09-01 13:05:06 +02:00
2009-09-01 13:05:06 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-05 17:22:09 +01:00
2009-08-29 00:24:49 +01:00
2009-08-25 09:21:00 +02:00
2008-11-20 10:21:52 +01:00
2009-08-29 00:24:49 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-06-23 22:33:15 +02:00
2009-09-10 12:25:04 +02:00
2009-09-10 15:28:50 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-06-23 22:33:15 +02:00
2009-09-10 15:28:50 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2005-07-18 07:52:37 +00:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-06-23 22:33:15 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-29 00:24:49 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-06-17 14:54:29 +01:00
2009-08-25 09:21:00 +02:00
2009-09-04 14:54:55 -06:00
2009-08-25 09:21:00 +02:00
2009-09-10 15:28:50 +01:00
2009-09-11 14:08:51 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-11 14:08:51 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-02-28 11:06:35 +01:00
2009-06-23 22:33:15 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-06-23 22:33:15 +02:00
2009-03-02 09:10:17 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-11 14:08:51 +02:00
2009-09-11 14:08:51 +02:00
2009-09-11 14:08:51 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-01 12:10:07 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-10 15:28:50 +01:00
2009-08-25 09:21:00 +02:00
2009-08-31 09:44:30 +02:00
2009-09-05 15:54:26 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-10 15:28:50 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-08 13:30:38 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-01 11:07:15 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-09-10 15:28:50 +01:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2007-07-10 19:00:00 +02:00
2007-07-10 19:00:00 +02:00
2009-08-25 09:21:00 +02:00
2007-07-10 19:00:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00
2009-08-25 09:21:00 +02:00