File: strcasecmp.c

package info (click to toggle)
libmikmod 3.3.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,188 kB
  • sloc: ansic: 36,299; sh: 5,013; makefile: 548; javascript: 1
file content (23 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "mikmod_internals.h"
#include "mikmod_ctype.h"

int _mm_strcasecmp(const char *__s1, const char *__s2)
{
	const char *p1 = __s1;
	const char *p2 = __s2;
	char c1, c2;

	if (p1 == p2) return 0;

	do {
		c1 = mik_tolower(*p1++);
		c2 = mik_tolower(*p2++);
		if (c1 == '\0') break;
	} while (c1 == c2);

	return (int)(c1 - c2);
}