Mercurial > hg > toybox
diff lib/lib.h @ 201:5d523752715a
Start of "patch" support. Writes to stdout at the moment.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 15 Dec 2007 21:47:25 -0600 |
parents | 29e2051296fd |
children | 9a0d4e8a9c61 |
line wrap: on
line diff
--- a/lib/lib.h Thu Dec 13 07:00:27 2007 -0600 +++ b/lib/lib.h Sat Dec 15 21:47:25 2007 -0600 @@ -21,6 +21,12 @@ char *arg; }; +struct double_list { + struct double_list *next; + struct double_list *prev; + char *data; +}; + // args.c void get_optflags(void); @@ -56,6 +62,7 @@ void xaccess(char *path, int flags); int xcreate(char *path, int flags, int mode); int xopen(char *path, int flags); +void xclose(int fd); FILE *xfopen(char *path, char *mode); ssize_t readall(int fd, void *buf, size_t len); ssize_t writeall(int fd, void *buf, size_t len); @@ -74,6 +81,9 @@ off_t fdlength(int fd); char *xreadlink(char *name); void loopfiles(char **argv, void (*function)(int fd, char *name)); +char *get_rawline(int fd, long *plen); +char *get_line(int fd); +void xsendfile(int in, int out); // getmountlist.c struct mtab_list {