diff lib/lib.h @ 143:9cbb323f297f

Break out dirtree.c and let it call a function instead of returning the data.
author Rob Landley <rob@landley.net>
date Thu, 04 Oct 2007 02:04:10 -0500
parents 0901b3b2bbe9
children 1fbc50374a30
line wrap: on
line diff
--- a/lib/lib.h	Wed Sep 05 21:23:56 2007 -0500
+++ b/lib/lib.h	Thu Oct 04 02:04:10 2007 -0500
@@ -21,16 +21,21 @@
 	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 @@
 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 {