comparison lib/lib.h @ 63:69efffcacd70

Add fdprintf(). Remove reread() and rewrite() which handle -EINTR, which shouldn't be a problem if we register signal handlers with sigaction(SA_RESTART) Straighten out count and len (I generally consistently use "count" for the current progress and "len" for the total, but this time I got them backwards for some reason and don't want to confuse myself in future.)
author Rob Landley <rob@landley.net>
date Thu, 18 Jan 2007 21:54:08 -0500
parents 41d55b5d49fd
children 67ee3a0b76e1
comparison
equal deleted inserted replaced
62:f41f997c1e73 63:69efffcacd70
41 void xexec(char **argv); 41 void xexec(char **argv);
42 void xaccess(char *path, int flags); 42 void xaccess(char *path, int flags);
43 int xcreate(char *path, int flags, int mode); 43 int xcreate(char *path, int flags, int mode);
44 int xopen(char *path, int flags); 44 int xopen(char *path, int flags);
45 FILE *xfopen(char *path, char *mode); 45 FILE *xfopen(char *path, char *mode);
46 ssize_t reread(int fd, void *buf, size_t count); 46 ssize_t readall(int fd, void *buf, size_t len);
47 ssize_t rewrite(int fd, void *buf, size_t count); 47 ssize_t writeall(int fd, void *buf, size_t len);
48 ssize_t readall(int fd, void *buf, size_t count); 48 size_t xread(int fd, void *buf, size_t len);
49 ssize_t writeall(int fd, void *buf, size_t count); 49 void xreadall(int fd, void *buf, size_t len);
50 size_t xread(int fd, void *buf, size_t count); 50 void xwrite(int fd, void *buf, size_t len);
51 void xreadall(int fd, void *buf, size_t count);
52 void xwrite(int fd, void *buf, size_t count);
53 char *xgetcwd(void); 51 char *xgetcwd(void);
54 char *xabspath(char *path); 52 char *xabspath(char *path);
55 struct string_list *find_in_path(char *path, char *filename); 53 struct string_list *find_in_path(char *path, char *filename);
56 void utoa_to_buf(unsigned n, char *buf, unsigned buflen); 54 void utoa_to_buf(unsigned n, char *buf, unsigned buflen);
57 void itoa_to_buf(int n, char *buf, unsigned buflen); 55 void itoa_to_buf(int n, char *buf, unsigned buflen);