X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/adns/blobdiff_plain/82ae109eba3901127fcd5267872b0afd64af4a7c..f9ba6e01db03965cc1a40a693dedcc863b6de4d8:/src/internal.h diff --git a/src/internal.h b/src/internal.h index 0b39418..18aabf4 100644 --- a/src/internal.h +++ b/src/internal.h @@ -39,6 +39,7 @@ typedef unsigned char byte; #include #include #include +#include #include @@ -865,6 +866,8 @@ void adns__update_expires(adns_query qu, unsigned long ttl, int vbuf__append_quoted1035(vbuf *vb, const byte *buf, int len); +bool adns__labels_equal(const byte *a, int al, const byte *b, int bl); + /* From event.c: */ void adns__tcp_broken(adns_state ads, const char *what, const char *why); @@ -913,6 +916,9 @@ static inline int ctype_digit(int c) { return c>='0' && c<='9'; } static inline int ctype_alpha(int c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } +static inline int ctype_toupper(int c) { + return ctype_alpha(c) ? (c & ~32) : c; +} static inline int ctype_822special(int c) { return strchr("()<>@,;:\\\".[]",c) != 0; }