Skip to content
Newer
Older
100644 22 lines (19 sloc) 323 Bytes
19712e8 * parse.y (primary): rescue and ensure clauses should be allowed
matz authored Mar 6, 2001
1 /* public domain rewrite of strncasecmp(3) */
2
07bb9f2 1.4.0
matz authored Aug 13, 1999
3 #include <ctype.h>
4
5 int
6 strncasecmp(p1, p2, len)
7 char *p1;
8 char *p2;
9 int len;
10 {
19712e8 * parse.y (primary): rescue and ensure clauses should be allowed
matz authored Mar 6, 2001
11 while (len != 0) {
07bb9f2 1.4.0
matz authored Aug 13, 1999
12 if (toupper(*p1) != toupper(*p2)) {
13 return toupper(*p1) - toupper(*p2);
14 }
15 if (*p1 == '\0') {
16 return 0;
17 }
19712e8 * parse.y (primary): rescue and ensure clauses should be allowed
matz authored Mar 6, 2001
18 len--; p1++; p2++;
07bb9f2 1.4.0
matz authored Aug 13, 1999
19 }
20 return 0;
21 }
Something went wrong with that request. Please try again.