diff lib/lib.h @ 16:dd10785b6532

Add xabspath(), is_file_type(), which_in_path(), and find_in_path().
author Rob Landley <rob@landley.net>
date Thu, 02 Nov 2006 02:57:27 -0500
parents 04f66da2bdbf
children 3981c96f9285
line wrap: on
line diff
--- a/lib/lib.h	Wed Nov 01 22:28:46 2006 -0500
+++ b/lib/lib.h	Thu Nov 02 02:57:27 2006 -0500
@@ -15,6 +15,7 @@
 void *xzalloc(size_t size);
 void xrealloc(void **ptr, size_t size);
 void *xstrndup(char *s, size_t n);
+void *xstrdup(char *s);
 char *xmsprintf(char *format, ...);
 void xexec(char **argv);
 int xopen(char *path, int flags, int mode);
@@ -23,7 +24,10 @@
 ssize_t readall(int fd, void *buf, size_t count);
 void xread(int fd, char *buf, size_t count);
 char *xgetcwd(void);
-char *find_in_path(char *path, char *filename);
+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);
 void utoa_to_buf(unsigned n, char *buf, unsigned buflen);
 void itoa_to_buf(int n, char *buf, unsigned buflen);
 char *utoa(unsigned n);