ObjFW  Diff

Differences From Artifact [93873903ed]:

To Artifact [b78aed1909]:


33
34
35
36
37
38
39









40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#import "macros.h"

#import "asprintf.h"
#import "unicode.h"

extern const uint16_t of_iso_8859_15[256];
extern const uint16_t of_windows_1252[256];










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 */
void _references_to_categories_of_OFString()
{
	_OFString_Hashing_reference = 1;
	_OFString_URLEncoding_reference = 1;
	_OFString_XMLEscaping_reference = 1;
	_OFString_XMLUnescaping_reference = 1;
};

int
of_string_check_utf8(const char *str, size_t len)
{
	size_t i;
	int utf8 = 0;

	madvise((void*)str, len, MADV_SEQUENTIAL);







>
>
>
>
>
>
>
>
>
















<
<
<
<
<
<
<
<
<







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64









65
66
67
68
69
70
71
#import "macros.h"

#import "asprintf.h"
#import "unicode.h"

extern const uint16_t of_iso_8859_15[256];
extern const uint16_t of_windows_1252[256];

/* References for static linking */
void _references_to_categories_of_OFString()
{
	_OFString_Hashing_reference = 1;
	_OFString_URLEncoding_reference = 1;
	_OFString_XMLEscaping_reference = 1;
	_OFString_XMLUnescaping_reference = 1;
};

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;
}










int
of_string_check_utf8(const char *str, size_t len)
{
	size_t i;
	int utf8 = 0;

	madvise((void*)str, len, MADV_SEQUENTIAL);