4
/* Return values for rm_scope() */
9
/* Flags for rm_update() */
15
/* A simple job structure */
17
/* Options set at run time */
18
unsigned int force; /* -f option */
19
unsigned int recursive; /* -r option */
20
unsigned int safe; /* -s option */
22
/* Keeps track of the job in progress */
23
int advance; /* How far deep we've gone since entering */
24
DIR *entry; /* Entry point to the tree being removed */
25
char *owd; /* Where we were when we invoked rm */
26
char *cwd; /* Current directory being transversed */
27
char *nwd; /* Next directory to be transversed */
30
int f_removed; /* Number of files unlinked */
31
int d_removed; /* Number of directories unlinked */
35
/* Prototypes for the rm command, excluding entry points */
36
static unsigned int rm_start(rm_job_t *);
37
static void rm_end(rm_job_t *rm);
38
static unsigned int rm_recursive(const char *);
39
static unsigned int rm_single(const char *);
40
static unsigned int rm_scope(const char *);