2 ===================================================================
3 RCS file: /fetish/cu/src/remove.c,v
4 retrieving revision 1.156
5 diff -u -p -r1.156 remove.c
6 --- src/remove.c 3 Jul 2006 17:38:20 -0000 1.156
7 +++ src/remove.c 5 Jul 2006 06:52:31 -0000
8 @@ -202,9 +202,10 @@ pop_dir (Dirstack_state *ds)
10 size_t n_lengths = obstack_object_size (&ds->len_stack) / sizeof (size_t);
11 size_t *length = obstack_base (&ds->len_stack);
14 assert (n_lengths > 0);
15 - size_t top_len = length[n_lengths - 1];
16 + top_len = length[n_lengths - 1];
17 assert (top_len >= 2);
19 /* Pop the specified length of file name. */
20 @@ -336,10 +337,11 @@ AD_stack_top (Dirstack_state const *ds)
22 AD_stack_pop (Dirstack_state *ds)
25 assert (0 < AD_stack_height (ds));
27 /* operate on Active_dir. pop and free top entry */
28 - struct AD_ent *top = AD_stack_top (ds);
29 + top = AD_stack_top (ds);
31 hash_free (top->unremovable);
32 obstack_blank (&ds->Active_dir, -(int) sizeof (struct AD_ent));
33 @@ -1059,6 +1061,7 @@ fd_to_subdirp (int fd_cwd, char const *f
38 DIR *subdir_dirp = fdopendir (fd_sub);
39 if (subdir_dirp == NULL)
41 @@ -1067,6 +1070,7 @@ fd_to_subdirp (int fd_cwd, char const *f
48 /* Remove entries in the directory open on DIRP
49 @@ -1302,9 +1306,10 @@ remove_dir (int fd_cwd, Dirstack_state *
50 /* The name of the directory that we have just processed,
51 nominally removing all of its contents. */
55 AD_pop_and_chdir (&dirp, ds, &empty_dir);
56 - int fd = (dirp != NULL ? dirfd (dirp) : AT_FDCWD);
57 + fd = (dirp != NULL ? dirfd (dirp) : AT_FDCWD);
58 assert (dirp != NULL || AD_stack_height (ds) == 1);
60 /* Try to remove EMPTY_DIR only if remove_cwd_entries succeeded. */
61 @@ -1381,6 +1386,7 @@ rm_1 (Dirstack_state *ds, char const *fi
63 AD_INIT_OTHER_MEMBERS ();
66 int fd_cwd = AT_FDCWD;
67 enum RM_status status = remove_entry (fd_cwd, ds, filename, x, NULL);
68 if (status == RM_NONEMPTY_DIR)
69 @@ -1399,6 +1405,7 @@ rm_1 (Dirstack_state *ds, char const *fi
76 /* Remove all files and/or directories specified by N_FILES and FILE.
77 @@ -1421,9 +1428,11 @@ rm (size_t n_files, char const *const *f
80 cycle_check_init (&ds->cycle_check_state);
82 enum RM_status s = rm_1 (ds, file[i], x, &cwd_errno);
83 assert (VALID_STATUS (s));
84 UPDATE_STATUS (status, s);
88 if (x->require_restore_cwd && cwd_errno)