home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / include / case.h < prev    next >
C/C++ Source or Header  |  1990-12-22  |  489b  |  18 lines

  1. #ifndef _CASE_H
  2. #define _CASE_H
  3.  
  4. extern int cistrncmp();
  5. extern char *rfc822ize();
  6.  
  7. extern char casemap[];
  8.  
  9. /* must call cistrncmp before invoking TOLOW... */
  10. #define    TOLOW(c)    (casemap[(c)+128])    /* see case.c for why 128 */
  11.  
  12. /* ...but the use of it in CISTREQN is safe without the preliminary call (!) */
  13. /* CISTREQN is an optimised case-insensitive strncmp(a,b,n)==0; n > 0 */
  14. #define CISTREQN(a, b, n) \
  15.     (TOLOW((a)[0]) == TOLOW((b)[0]) && cistrncmp(a, b, n) == 0)
  16.  
  17. #endif /* _CASE_H */
  18.