diff options
author | landley <landley@driftwood> | 2006-10-30 01:38:00 -0500 |
---|---|---|
committer | landley <landley@driftwood> | 2006-10-30 01:38:00 -0500 |
commit | 09ea7ac1a269db3c9a3b76840b37a7cb1eccbc24 (patch) | |
tree | 83d36320286fee20f7a7b4cc317f9cc3802926fe /lib/lib.h | |
parent | 2f588f7f47c43b5949e520b80cfd755a6b4ca4e6 (diff) | |
download | toybox-09ea7ac1a269db3c9a3b76840b37a7cb1eccbc24.tar.gz |
Implement df. Add -Wall to build and fix up warnings. Add copyright notices.
Add error_msg() and itoa() to library. Remove argc from globals (since argv is
null terminated), add optflags to globals.
Diffstat (limited to 'lib/lib.h')
-rw-r--r-- | lib/lib.h | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,25 +1,44 @@ /* vi: set ts=4 :*/ +/* lib.h - header file for lib directory + * + * Copyright 2006 Rob Landley <rob@landley.net> + */ // functions.c +void verror_msg(char *msg, int err, va_list va); +void error_msg(char *msg, ...); +void perror_msg(char *msg, ...); void error_exit(char *msg, ...); +void perror_exit(char *msg, ...); void strlcpy(char *dest, char *src, size_t size); void *xmalloc(size_t size); void *xzalloc(size_t size); void xrealloc(void **ptr, size_t size); void *xstrndup(char *s, size_t n); char *xmsprintf(char *format, ...); -void *xexec(char **argv); +void xexec(char **argv); int xopen(char *path, int flags, int mode); FILE *xfopen(char *path, char *mode); char *xgetcwd(void); char *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; + struct stat stat; + struct statvfs statvfs; char *dir; char *device; char type[0]; |