2 ===================================================================
3 RCS file: /fetish/cu/src/remove.c,v
4 retrieving revision 1.158
5 diff -u -p -u -r1.158 remove.c
6 --- src/remove.c 3 Sep 2006 02:54:51 -0000 1.158
7 +++ src/remove.c 6 Sep 2006 18:57:46 -0000
8 @@ -245,9 +245,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 @@ -379,10 +380,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 @@ -549,6 +551,7 @@ AD_mark_helper (Hash_table **ht, char *f
38 void *ent = hash_insert (*ht, filename);
41 @@ -557,7 +560,7 @@ AD_mark_helper (Hash_table **ht, char *f
49 /* Mark FILENAME (in current directory) as unremovable. */
50 @@ -1126,6 +1129,7 @@ fd_to_subdirp (int fd_cwd, char const *f
55 DIR *subdir_dirp = fdopendir (fd_sub);
56 if (subdir_dirp == NULL)
58 @@ -1134,6 +1138,7 @@ fd_to_subdirp (int fd_cwd, char const *f
65 /* Remove entries in the directory open on DIRP
66 @@ -1369,9 +1374,10 @@ remove_dir (int fd_cwd, Dirstack_state *
67 /* The name of the directory that we have just processed,
68 nominally removing all of its contents. */
72 AD_pop_and_chdir (&dirp, ds, &empty_dir);
73 - int fd = (dirp != NULL ? dirfd (dirp) : AT_FDCWD);
74 + fd = (dirp != NULL ? dirfd (dirp) : AT_FDCWD);
75 assert (dirp != NULL || AD_stack_height (ds) == 1);
77 /* Try to remove EMPTY_DIR only if remove_cwd_entries succeeded. */
78 @@ -1449,6 +1455,7 @@ rm_1 (Dirstack_state *ds, char const *fi
84 cache_stat_init (&st);
86 @@ -1470,6 +1477,7 @@ rm_1 (Dirstack_state *ds, char const *fi
88 AD_INIT_OTHER_MEMBERS ();
91 int fd_cwd = AT_FDCWD;
92 enum RM_status status = remove_entry (fd_cwd, ds, filename, &st, x, NULL);
93 if (status == RM_NONEMPTY_DIR)
94 @@ -1488,6 +1496,8 @@ rm_1 (Dirstack_state *ds, char const *fi
102 /* Remove all files and/or directories specified by N_FILES and FILE.
103 @@ -1510,9 +1520,11 @@ rm (size_t n_files, char const *const *f
106 cycle_check_init (&ds->cycle_check_state);
108 enum RM_status s = rm_1 (ds, file[i], x, &cwd_errno);
109 assert (VALID_STATUS (s));
110 UPDATE_STATUS (status, s);
114 if (x->require_restore_cwd && cwd_errno)
116 ===================================================================
117 RCS file: /fetish/cu/src/rm.c,v
118 retrieving revision 1.140
119 diff -u -p -u -r1.140 rm.c
120 --- src/rm.c 3 Sep 2006 02:53:58 -0000 1.140
121 +++ src/rm.c 6 Sep 2006 18:57:46 -0000
122 @@ -357,8 +357,10 @@ main (int argc, char **argv)
127 enum RM_status status = rm (n_files, file, &x);
128 assert (VALID_STATUS (status));
129 exit (status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS);