static char rcsid[] = "@(#)$Id: istrcmp.c,v 1.9 2006/04/09 07:37:05 hurtta Exp $";
/******************************************************************************
* The Elm (ME+) Mail System - $Revision: 1.9 $ $State: Exp $
*
* Modified by: Kari Hurtta <hurtta+elm@posti.FMI.FI>
* (was hurtta+elm@ozone.FMI.FI)
******************************************************************************
* The Elm Mail System
*
* Copyright (c) 1988-1992 USENET Community Trust
* Copyright (c) 1986,1987 Dave Taylor
*****************************************************************************/
/**
**/
#include "headers.h"
/* This is same than strcasecmp. - K E H <hurtta@ozone.FMI.FI> */
int istrcmp(s1,s2)
CONST char *s1, *s2;
{
/* case insensitive comparison */
int d;
for (;;) {
#ifdef ASCII_CTYPE
if (!isascii(*s1) || !isascii(*s2))
d = *s1 - *s2;
else
#endif
d = (tolower((unsigned char) *s1) - tolower((unsigned char)*s2));
if ( d != 0 || *s1 == '\0' || *s2 == '\0' )
return d;
++s1;
++s2;
}
/*NOTREACHED*/
}
/*
* Local Variables:
* mode:c
* c-basic-offset:4
* buffer-file-coding-system: iso-8859-1
* End:
*/
syntax highlighted by Code2HTML, v. 0.9.1