X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=src%2Fx.h;h=b3384af43d93b37aad0a96523cef97d2f616ab66;hp=e3efdb8f0d89547c0350845e7eeeef41c743e464;hb=f8bdcd97af8d0dcee79ab692fffb83dba5a5498a;hpb=2cd70db8433cc9d02a4ca784190260889c835198 diff --git a/src/x.h b/src/x.h index e3efdb8..b3384af 100644 --- a/src/x.h +++ b/src/x.h @@ -22,6 +22,8 @@ #ifndef _X_H_ #define _X_H_ +#include "ttt.h" + void xasprintf (char **strp, const char *fmt, ...) TTT_PRINTF_FORMAT(2, 3); @@ -46,6 +48,9 @@ xrealloc (void *ptr, size_t size); FILE * xfdopen (int filedes, const char *mode); +void +xfreopen (const char *path, const char *mode, FILE *stream); + char * xstrdup (const char *s); @@ -71,4 +76,10 @@ xselect (int n, fd_set *exceptfds, struct timeval *timeout); +ssize_t +xread (int fd, void *buf, size_t count); + +ssize_t +xwrite (int fd, const void *buf, size_t count); + #endif /* _X_H_ */