Don't include dirname.h, since system.h does it now.
commite5fc4f24aae41c3028c1dff46f00a103db5bfd44
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Sep 2006 02:54:51 +0000 (3 02:54 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Sep 2006 02:54:51 +0000 (3 02:54 +0000)
tree505dc72dfeed0aae7eb5d76cb22d7bca817f0bb8
parentfcf498b1b4e8b87b5f964bd1b68d2157b1199330
Don't include dirname.h, since system.h does it now.
(cache_fstatat, cache_stat_init): New functions.
(cache_statted, cache_stat_ok): New functions.
(write_protected_non_symlink): Remove struct stat ** buf_p arg,
which is no longer needed with the new functions.  All callers
changed.
(prompt, is_dir_lstat, remove_entry, remove_dir):
New struct stat * arg.  All callers changed.
(write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
(remove_cwd_entries, remove_dir, rm_1):
Use and maintain the file status cache.
(prompt, remove_entry): Omit the first "directory" in the diagnostic
"Cannot remove directory `foo': is a directory".  This causes "rm"
to pass a test case that it would otherwise fail now that it
"knows" more about its argument.  I think the diagnostic is better
without the first "directory" anyway.
(prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
(rm_1): Reject attempts to remove /, ./, or ../.
src/remove.c