X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=src%2Fx.h;h=024d8c283885590596cfe566e6cb70747b23b2b6;hp=52c3acdd6ffe7a79ac1fe3f23f36d628784a7555;hb=49f7f9e3dc198c3593021bff5514f19090a4834c;hpb=cce891bb05118330ca609ac989491ad8a2fa7f71 diff --git a/src/x.h b/src/x.h index 52c3acd..024d8c2 100644 --- a/src/x.h +++ b/src/x.h @@ -23,7 +23,7 @@ #define _X_H_ void -xasprintf (char **strp, const char *fmt, ...) WDO_PRINTF_FORMAT(2, 3); +xasprintf (char **strp, const char *fmt, ...) TTT_PRINTF_FORMAT(2, 3); void xvasprintf (char **strp, const char *fmt, va_list ap); @@ -46,7 +46,32 @@ xrealloc (void *ptr, size_t size); FILE * xfdopen (int filedes, const char *mode); +FILE * +xfreopen (const char *path, const char *mode, FILE *stream); + char * xstrdup (const char *s); +void +xfwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream); + +int +xsocket (int domain, int type, int protocol); + +void +xbind (int sockfd, const struct sockaddr *my_addr, socklen_t addrlen); + +void +xlisten (int s, int backlog); + +int +xfcntl (int fd, int cmd, long arg); + +int +xselect (int n, + fd_set *readfds, + fd_set *writefds, + fd_set *exceptfds, + struct timeval *timeout); + #endif /* _X_H_ */