/* Whoops, EMX doesn't have strncasecmp. */

#include <ctype.h>

/* Compare at most COUNT characters from string1 to string2.  Case
   doesn't matter. */
int
strncasecmp (string1, string2, count)
     char *string1, *string2;
     int count;
{
  register char ch1, ch2;

  while (count)
    {
      ch1 = *string1++;
      ch2 = *string2++;
      if (toupper(ch1) == toupper(ch2))
	count--;
      else break;
    }
  return (count);
}
