X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=src%2Fx.h;h=64a18a22c2492d5727379258efb059d4e1d3b2e2;hp=58f1297e864ec80e25170b8d57d0b7a902725f20;hb=95898262b4ce4a2a3d36f70a4e6cc8188decc142;hpb=c23865689e087ec70e36e13075f997ba39fcda75 diff --git a/src/x.h b/src/x.h index 58f1297..64a18a2 100644 --- a/src/x.h +++ b/src/x.h @@ -46,10 +46,13 @@ void * xrealloc (void *ptr, size_t size); FILE * -xfdopen (int filedes, const char *mode); +xfopen (const char *path, const char *mode); FILE * -xfreopen (const char *path, const char *mode, FILE *stream); +xfdopen (int filedes, const char *mode); + +void +xdup2 (int oldfd, int newfd); char * xstrdup (const char *s); @@ -63,6 +66,9 @@ xsocket (int domain, int type, int protocol); void xbind (int sockfd, const struct sockaddr *my_addr, socklen_t addrlen); +ttt_status_t +xconnect (int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen); + void xlisten (int s, int backlog); @@ -76,4 +82,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_ */