comparison 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
comparison
equal deleted inserted replaced
200:f868f933bd3b 201:5d523752715a
17 }; 17 };
18 18
19 struct arg_list { 19 struct arg_list {
20 struct arg_list *next; 20 struct arg_list *next;
21 char *arg; 21 char *arg;
22 };
23
24 struct double_list {
25 struct double_list *next;
26 struct double_list *prev;
27 char *data;
22 }; 28 };
23 29
24 // args.c 30 // args.c
25 void get_optflags(void); 31 void get_optflags(void);
26 32
54 void xflush(void); 60 void xflush(void);
55 void xexec(char **argv); 61 void xexec(char **argv);
56 void xaccess(char *path, int flags); 62 void xaccess(char *path, int flags);
57 int xcreate(char *path, int flags, int mode); 63 int xcreate(char *path, int flags, int mode);
58 int xopen(char *path, int flags); 64 int xopen(char *path, int flags);
65 void xclose(int fd);
59 FILE *xfopen(char *path, char *mode); 66 FILE *xfopen(char *path, char *mode);
60 ssize_t readall(int fd, void *buf, size_t len); 67 ssize_t readall(int fd, void *buf, size_t len);
61 ssize_t writeall(int fd, void *buf, size_t len); 68 ssize_t writeall(int fd, void *buf, size_t len);
62 size_t xread(int fd, void *buf, size_t len); 69 size_t xread(int fd, void *buf, size_t len);
63 void xreadall(int fd, void *buf, size_t len); 70 void xreadall(int fd, void *buf, size_t len);
72 char *itoa(int n); 79 char *itoa(int n);
73 long atolx(char *c); 80 long atolx(char *c);
74 off_t fdlength(int fd); 81 off_t fdlength(int fd);
75 char *xreadlink(char *name); 82 char *xreadlink(char *name);
76 void loopfiles(char **argv, void (*function)(int fd, char *name)); 83 void loopfiles(char **argv, void (*function)(int fd, char *name));
84 char *get_rawline(int fd, long *plen);
85 char *get_line(int fd);
86 void xsendfile(int in, int out);
77 87
78 // getmountlist.c 88 // getmountlist.c
79 struct mtab_list { 89 struct mtab_list {
80 struct mtab_list *next; 90 struct mtab_list *next;
81 struct stat stat; 91 struct stat stat;