ObjFW  Check-in [64a39262ca]

Overview
Comment:Some older gcc versions require an explicit cast here.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 64a39262ca43ee21ffbfcd82139bcea21b860ecee136b3a6e089df2dba2917b4
User & Date: js on 2010-09-23 16:40:07
Other Links: manifest | tags
Context
2010-09-23
22:53
Add -[objectsFromIndex:toIndex:] to OFArray. check-in: 14e949de94 user: js tags: trunk
16:40
Some older gcc versions require an explicit cast here. check-in: 64a39262ca user: js tags: trunk
2010-09-20
11:26
Better API for the writte buffer of streams.
Can now be disabled without flushing and then be flushed later.
check-in: c3c2bcca46 user: js tags: trunk
Changes

Modified src/OFString.m from [4289e64de5] to [76a2397995].

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

static inline int
memcasecmp(const char *s1, const char *s2, size_t len)
{
	size_t i;

	for (i = 0; i < len; i++) {
		if (tolower(s1[i]) > tolower(s2[i]))
			return OF_ORDERED_DESCENDING;
		if (tolower(s1[i]) < tolower(s2[i]))
			return OF_ORDERED_ASCENDING;
	}

	return OF_ORDERED_SAME;
}

/* References for static linking */







|

|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

static inline int
memcasecmp(const char *s1, const char *s2, size_t len)
{
	size_t i;

	for (i = 0; i < len; i++) {
		if (tolower((int)s1[i]) > tolower((int)s2[i]))
			return OF_ORDERED_DESCENDING;
		if (tolower((int)s1[i]) < tolower((int)s2[i]))
			return OF_ORDERED_ASCENDING;
	}

	return OF_ORDERED_SAME;
}

/* References for static linking */