From fa98d0193aaacbc900fd77507e2490b00fe72ee9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 2 Nov 2006 02:57:27 -0500 Subject: Add xabspath(), is_file_type(), which_in_path(), and find_in_path(). --- lib/lib.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/lib.h') diff --git a/lib/lib.h b/lib/lib.h index 28888a49..10d33bde 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -15,6 +15,7 @@ void *xmalloc(size_t size); 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 reread(int fd, void *buf, size_t count); 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); -- cgit v1.2.3