X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/adns/blobdiff_plain/2953d358511ac5d196362f6b339c010d4e9cae3e..2b1c6979bb36a0e3a5aaa7f18b0c72b528f886b9:/src/internal.h diff --git a/src/internal.h b/src/internal.h index 9e442fe..4fc7d7f 100644 --- a/src/internal.h +++ b/src/internal.h @@ -683,6 +683,9 @@ static inline int ctype_alpha(int c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } static inline int ctype_822special(int c) { return strchr("()<>@,;:\\\".[]",c) != 0; } +static inline int ctype_domainunquoted(int c) { + return ctype_alpha(c) || ctype_digit(c) || (strchr("-_/+",c) != 0); +} static inline int errno_resources(int e) { return e==ENOMEM || e==ENOBUFS; }