Add history and config-struct to recurse
For loop detection, a history is mandatory. In the process of also adding a flexible struct to recurse, the recurse-definition was moved to fs.h. The motivation behind the struct is to allow easy extensions to the recurse-function without having to change the prototypes of all functions in the process. Adding flags is really simple as well now. Using the recursor-struct, it's also easier to see which defaults apply to a program (for instance, which type of follow, ...). Another change was to add proper stat-lstat-usage in recurse. It was wrong before.
This commit is contained in:
3
util.h
3
util.h
@@ -65,9 +65,6 @@ mode_t getumask(void);
|
||||
char *humansize(double);
|
||||
mode_t parsemode(const char *, mode_t, mode_t);
|
||||
void putword(const char *);
|
||||
extern int recurse_follow;
|
||||
extern int recurse_samedev;
|
||||
void recurse(const char *, void (*)(const char *, int, void *), int, void *);
|
||||
#undef strtonum
|
||||
long long strtonum(const char *, long long, long long, const char **);
|
||||
long long enstrtonum(int, const char *, long long, long long);
|
||||
|
Reference in New Issue
Block a user