hirc

IRC client
Log | Files | Refs

commit 2f7556bcb5859eaf79cb0cd48d955ee5c9b7ca25
parent a70bdf802ce19aaf0f9442e0a005cef3c6d55d4a
Author: hhvn <dev@hhvn.uk>
Date:   Fri, 12 Nov 2021 22:53:17 +0000

hirc.h: macro for strcmp with nulls

Diffstat:
Mhirc.h | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/hirc.h b/hirc.h @@ -9,6 +9,7 @@ * 12345 */ #define MAX_HISTORY 8192 /* real maximum = MAX_HISTORY * (channels + servers + queries) */ +#define strcmp_n(s1, s2) s1 == s2 ? 0 : (s1 ? s2 ? strcmp(s1, s2) : -1 : -1) /* main.c */ void * emalloc(size_t size); @@ -82,6 +83,8 @@ void support_set(struct Server *server, char *key, char *value); /* handle.c */ void handle(int rfd, struct Server *server); +void handle_expect(char *cmd, char *about); +char * handle_expect_get(char *cmd); void handle_PING(char *msg, char **params, struct Server *server, time_t timestamp); void handle_JOIN(char *msg, char **params, struct Server *server, time_t timestamp); void handle_PART(char *msg, char **params, struct Server *server, time_t timestamp);