X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=src%2Finternal.h;fp=src%2Finternal.h;h=55da2b928593eec651e072da94f8ce4d6519d4b5;hp=c2656c80fe173e2a84e46e3fc54833c0391e84f3;hb=e734125afd36224ccbf7e7208f7c3d9aea4fa9be;hpb=e2fec10fdb9e1052965b7b37187e89a8b1db7073 diff --git a/src/internal.h b/src/internal.h index c2656c8..55da2b9 100644 --- a/src/internal.h +++ b/src/internal.h @@ -851,6 +851,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); @@ -898,6 +900,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; }