main.h (484B)
1 /* Copyright (c) 2021 hhvn <dev@hhvn.uk> */ 2 3 #ifndef H_MAIN 4 #define H_MAIN 5 void usage(void); 6 int verbose(const char *format, ...); 7 int error(const char *format, ...); 8 void die(const int exitc, const char *format, ...); 9 int getsock(struct addrinfo *hints, char *host, char *port); 10 int read_line(int fd, char *dest, size_t len); 11 void handoff(int fd); 12 13 #define EXIT_USAGE 2 14 #define CQUEUE 255 15 16 #ifndef __OpenBSD__ 17 #define pledge(a,b) 0 18 #define unveil(a,b) 0 19 #endif 20 21 #endif /* H_MAIN */