Initial import from FreeBSD RELENG_4:
[games.git] / contrib / libio / dbz / case.h
1 extern int cistrncmp();
2 extern char *rfc822ize();
3
4 extern char casemap[];
5
6 /* must call cistrncmp before invoking TOLOW... */
7 #define TOLOW(c)        (casemap[(c)+128])      /* see case.c for why 128 */
8
9 /* ...but the use of it in CISTREQN is safe without the preliminary call (!) */
10 /* CISTREQN is an optimised case-insensitive strncmp(a,b,n)==0; n > 0 */
11 #define CISTREQN(a, b, n) \
12         (TOLOW((a)[0]) == TOLOW((b)[0]) && cistrncmp(a, b, n) == 0)