summaryrefslogtreecommitdiff
path: root/src/rm.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-11-09 23:00:32 +0000
committerJim Meyering <jim@meyering.net>1995-11-09 23:00:32 +0000
commit0bf332a016325b90b43907a7dceaf1d95740ae92 (patch)
tree756fe5ac1904318bfb8e41c0eeef024e830252e3 /src/rm.c
parent3e12088cf062f165218d5768540ee0a48155f70d (diff)
downloadcoreutils-0bf332a016325b90b43907a7dceaf1d95740ae92.tar.xz
(struct pathstack): Move dcl to precede prototypes.
Diffstat (limited to 'src/rm.c')
-rw-r--r--src/rm.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/rm.c b/src/rm.c
index 32dc4500a..e8f99cc83 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -33,6 +33,16 @@
# define D_INO(dp) 1
#endif
+/* An element in a stack of pointers into `pathname'.
+ `pathp' points to where in `pathname' the terminating '\0' goes
+ for this level's directory name. */
+struct pathstack
+{
+ struct pathstack *next;
+ char *pathp;
+ ino_t inum;
+};
+
char *basename (char *);
char *stpcpy ();
char *xmalloc ();
@@ -51,6 +61,11 @@ static void usage (int status);
/* Name this program was run with. */
char *program_name;
+/* Linked list of pathnames of directories in progress in recursive rm.
+ The entries actually contain pointers into `pathname'.
+ `pathstack' is the current deepest level. */
+static struct pathstack *pathstack = NULL;
+
/* Path of file now being processed; extended as necessary. */
static char *pathname;
@@ -311,21 +326,6 @@ remove_dir (struct stat *statp)
return 0;
}
-/* An element in a stack of pointers into `pathname'.
- `pathp' points to where in `pathname' the terminating '\0' goes
- for this level's directory name. */
-struct pathstack
-{
- struct pathstack *next;
- char *pathp;
- ino_t inum;
-};
-
-/* Linked list of pathnames of directories in progress in recursive rm.
- The entries actually contain pointers into `pathname'.
- `pathstack' is the current deepest level. */
-static struct pathstack *pathstack = NULL;
-
/* Read directory `pathname' and remove all of its entries,
avoiding use of chdir.
On entry, STATP points to the results of stat on `pathname'.