diff lib/lib.h @ 95:a636e4d20f13

Add xstat(), read_dirtree(), and read_dirtree_node().
author Rob Landley <rob@landley.net>
date Sat, 03 Feb 2007 14:11:26 -0500
parents 89ca591a9236
children 4c81e6375719
line wrap: on
line diff
--- a/lib/lib.h	Sat Feb 03 14:10:00 2007 -0500
+++ b/lib/lib.h	Sat Feb 03 14:11:26 2007 -0500
@@ -21,6 +21,13 @@
 	char *arg;
 };
 
+struct dirtree {
+	struct dirtree *next;
+	struct dirtree *child;
+	struct stat st;
+	char name[];
+};
+
 // args.c
 void get_optflags(void);
 
@@ -52,6 +59,7 @@
 void xreadall(int fd, void *buf, size_t len);
 void xwrite(int fd, void *buf, size_t len);
 char *xgetcwd(void);
+void xstat(char *path, struct stat *st);
 char *xabspath(char *path);
 struct string_list *find_in_path(char *path, char *filename);
 void utoa_to_buf(unsigned n, char *buf, unsigned buflen);
@@ -59,6 +67,8 @@
 char *utoa(unsigned n);
 char *itoa(int n);
 off_t fdlength(int fd);
+struct dirtree *read_dirtree_node(char *path);
+struct dirtree *read_dirtree(char *path);
 
 // getmountlist.c
 struct mtab_list {