X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fx.h;h=64a18a22c2492d5727379258efb059d4e1d3b2e2;hb=509e7fd528db9f7b1224b82aa955c978076dc2e5;hp=b3384af43d93b37aad0a96523cef97d2f616ab66;hpb=15672ac8305a1c5ba0d9bf6edabb0a194c30628e;p=ttt diff --git a/src/x.h b/src/x.h index b3384af..64a18a2 100644 --- a/src/x.h +++ b/src/x.h @@ -45,11 +45,14 @@ xcalloc (size_t nmemb, size_t size); void * xrealloc (void *ptr, size_t size); +FILE * +xfopen (const char *path, const char *mode); + FILE * xfdopen (int filedes, const char *mode); void -xfreopen (const char *path, const char *mode, FILE *stream); +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);