ObjFW  Diff

Differences From Artifact [c460dbfe91]:

To Artifact [f214cc2fb6]:


42
43
44
45
46
47
48
49

50
51

52
53
54
55
56
57
58
extern const of_char16_t of_windows_1252[128];
extern const of_char16_t of_codepage_437[128];

static inline int
memcasecmp(const char *first, const char *second, size_t length)
{
	for (size_t i = 0; i < length; i++) {
		if (tolower((int)first[i]) > tolower((int)second[i]))

			return OF_ORDERED_DESCENDING;
		if (tolower((int)first[i]) < tolower((int)second[i]))

			return OF_ORDERED_ASCENDING;
	}

	return OF_ORDERED_SAME;
}

int







|
>

|
>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
extern const of_char16_t of_windows_1252[128];
extern const of_char16_t of_codepage_437[128];

static inline int
memcasecmp(const char *first, const char *second, size_t length)
{
	for (size_t i = 0; i < length; i++) {
		if (tolower((unsigned char)first[i]) >
		    tolower((unsigned char)second[i]))
			return OF_ORDERED_DESCENDING;
		if (tolower((unsigned char)first[i]) <
		    tolower((unsigned char)second[i]))
			return OF_ORDERED_ASCENDING;
	}

	return OF_ORDERED_SAME;
}

int