aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-11-03 00:05:52 -0500
committerRob Landley <rob@landley.net>2006-11-03 00:05:52 -0500
commit0a04b3ef850cd3d6f06b3c8d0036993adc9ba7b2 (patch)
tree6833c64668f917b4f03c9c5317a4313937960ba4 /lib/lib.h
parent7fc43f79783658a38be23ca8b3cdac5f11e397d1 (diff)
downloadtoybox-0a04b3ef850cd3d6f06b3c8d0036993adc9ba7b2.tar.gz
Implement which. Add hello world to menuconfig. Wrap the various applet main
functions in main.c with USE() macros so --gc-sections can strip them.
Diffstat (limited to 'lib/lib.h')
-rw-r--r--lib/lib.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/lib.h b/lib/lib.h
index 10d33bde..d013af9d 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -4,6 +4,15 @@
* Copyright 2006 Rob Landley <rob@landley.net>
*/
+// llist.c
+void llist_free(void *list, void (*freeit)(void *data));
+void *llist_pop(void *list); // actually void **list, but the compiler's dumb
+
+struct string_list {
+ struct string_list *next;
+ char str[0];
+};
+
// functions.c
void verror_msg(char *msg, int err, va_list va);
void error_msg(char *msg, ...);
@@ -25,22 +34,12 @@ ssize_t readall(int fd, void *buf, size_t count);
void xread(int fd, char *buf, size_t count);
char *xgetcwd(void);
char *xabspath(char *path);
-int is_file_type(char *path, int type);
-char *which_in_path(char *filename);
-char *find_in_path(char *path, char *filename, int type);
+struct string_list *find_in_path(char *path, char *filename);
void utoa_to_buf(unsigned n, char *buf, unsigned buflen);
void itoa_to_buf(int n, char *buf, unsigned buflen);
char *utoa(unsigned n);
char *itoa(int n);
-// llist.c
-void llist_free(void *list, void (*freeit)(void *data));
-
-struct string_list {
- struct string_list *next;
- char *str;
-};
-
// getmountlist.c
struct mtab_list {
struct mtab_list *next;