Back to index

courier  0.68.2
strcasecmp.c
Go to the documentation of this file.
00001 #include "config.h"
00002 /*
00003 ** Copyright 1998 - 1999 Double Precision, Inc.  See COPYING for
00004 ** distribution information.
00005 */
00006 
00007 
00008 /*
00009 */
00010 #include      <ctype.h>
00011 
00012 int strcasecmp(const char *a, const char *b)
00013 {
00014        while (*a || *b)
00015        {
00016        int    ca=toupper(*a);
00017        int    cb=toupper(*b);
00018 
00019               if (ca < cb)  return (-1);
00020               if (ca > cb)  return (1);
00021               ++a;
00022               ++b;
00023        }
00024        return (0);
00025 }