diff options
author | Rob Landley <rob@landley.net> | 2007-10-04 02:04:10 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2007-10-04 02:04:10 -0500 |
commit | 103b7e031c4de0f9753e02d2217aa81819242278 (patch) | |
tree | 884c3216b7912b8c79a8ff1bd76c27a54ee37b23 /lib/lib.h | |
parent | df27a6052e79a854db0e1337d28768f7c013d4f9 (diff) | |
download | toybox-103b7e031c4de0f9753e02d2217aa81819242278.tar.gz |
Break out dirtree.c and let it call a function instead of returning the data.
Diffstat (limited to 'lib/lib.h')
-rw-r--r-- | lib/lib.h | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -21,16 +21,21 @@ struct arg_list { char *arg; }; +// args.c +void get_optflags(void); + +// dirtree.c struct dirtree { struct dirtree *next, *child, *parent; struct stat st; char name[]; }; -// args.c -void get_optflags(void); +struct dirtree *dirtree_add_node(char *path); +struct dirtree *dirtree_read(char *path, struct dirtree *parent, + int (*callback)(struct dirtree *node)); -// functions.c +// lib.c #if !defined(__UCLIBC__) && !defined(__KLIBC__) void strlcpy(char *dest, char *src, size_t size); #endif @@ -72,8 +77,6 @@ char *itoa(int n); long atolx(char *c); off_t fdlength(int fd); char *xreadlink(char *name); -struct dirtree *read_dirtree_node(char *path); -struct dirtree *read_dirtree(char *path, struct dirtree *parent); // getmountlist.c struct mtab_list { |