comparison lib/lib.h @ 589:7013fd450ff4

Changed my mind about the design again, now callback is dirtree_opennode() and recursion choice is how caller interprets flags.
author Rob Landley <rob@landley.net>
date Fri, 01 Jun 2012 20:27:51 -0500
parents 9c2277b92b86
children 7becb497c3c4
comparison
equal deleted inserted replaced
588:9c2277b92b86 589:7013fd450ff4
72 }; 72 };
73 73
74 struct dirtree *dirtree_add_node(int dirfd, char *name); 74 struct dirtree *dirtree_add_node(int dirfd, char *name);
75 char *dirtree_path(struct dirtree *node, int *plen); 75 char *dirtree_path(struct dirtree *node, int *plen);
76 int dirtree_notdotdot(struct dirtree *catch); 76 int dirtree_notdotdot(struct dirtree *catch);
77 int dirtree_comeagain(struct dirtree *try, int recurse); 77 int dirtree_opennode(struct dirtree *try);
78 struct dirtree *handle_callback(struct dirtree *new, 78 struct dirtree *handle_callback(struct dirtree *new,
79 int (*callback)(struct dirtree *node)); 79 int (*callback)(struct dirtree *node));
80 void dirtree_recurse(struct dirtree *node, 80 void dirtree_recurse(struct dirtree *node,
81 int (*callback)(struct dirtree *node)); 81 int (*callback)(struct dirtree *node));
82 struct dirtree *dirtree_read(char *path, int (*callback)(struct dirtree *node)); 82 struct dirtree *dirtree_read(char *path, int (*callback)(struct dirtree *node));