home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / include / case.h < prev    next >
C/C++ Source or Header  |  1992-06-18  |  441b  |  13 lines

  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, (int)(n)) == 0)
  13.