ObjFW  Check-in [13ee56edf3]

Overview
Comment:Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 13ee56edf355ce3bb25d78faa8c1a0018fedab1e9936e5209f5ccbedf7a038c6
User & Date: js on 2014-06-21 21:43:43
Other Links: manifest | tags
Context
2014-06-23
00:12
runtime/lookup.m: Fix build with GCC check-in: 1c1064611f user: js tags: trunk
2014-06-21
21:43
Move all macros from OFObject.h to macros.h check-in: 13ee56edf3 user: js tags: trunk
2014-06-20
10:52
Revert 3758bd8 check-in: 1f1ef23b3f user: js tags: trunk
Changes

Modified src/OFApplication.m from [ba9e0c219a] to [560f80331f].

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFRunLoop.h"
#import "OFRunLoop+Private.h"
#import "OFThread.h"
#import "OFThread+Private.h"

#import "autorelease.h"
#import "macros.h"

#if defined(__MACH__) && !defined(OF_IOS)
# include <crt_externs.h>
#elif defined(_WIN32)
# include <windows.h>

extern int _CRT_glob;
extern void __wgetmainargs(int*, wchar_t***, wchar_t***, int, int*);







<
<
<







27
28
29
30
31
32
33



34
35
36
37
38
39
40
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFRunLoop.h"
#import "OFRunLoop+Private.h"
#import "OFThread.h"
#import "OFThread+Private.h"




#if defined(__MACH__) && !defined(OF_IOS)
# include <crt_externs.h>
#elif defined(_WIN32)
# include <windows.h>

extern int _CRT_glob;
extern void __wgetmainargs(int*, wchar_t***, wchar_t***, int, int*);

Modified src/OFArray.m from [1814e666e5] to [c3b70333fd].

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#import "OFXMLElement.h"
#import "OFDataArray.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

static struct {
	Class isa;
} placeholder;

@interface OFArray (OF_PRIVATE_CATEGORY)
- (OFString*)OF_JSONRepresentationWithOptions: (int)options
					depth: (size_t)depth;







<
<
<







28
29
30
31
32
33
34



35
36
37
38
39
40
41
#import "OFXMLElement.h"
#import "OFDataArray.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"




static struct {
	Class isa;
} placeholder;

@interface OFArray (OF_PRIVATE_CATEGORY)
- (OFString*)OF_JSONRepresentationWithOptions: (int)options
					depth: (size_t)depth;

Modified src/OFArray_adjacent.m from [99931c4432] to [babbf9f98a].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFArray_adjacent
- init
{
	self = [super init];

	@try {
		_array = [[OFDataArray alloc] initWithItemSize: sizeof(id)];







<
<
<







25
26
27
28
29
30
31



32
33
34
35
36
37
38
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"




@implementation OFArray_adjacent
- init
{
	self = [super init];

	@try {
		_array = [[OFDataArray alloc] initWithItemSize: sizeof(id)];

Modified src/OFAutoreleasePool+Private.h from [1f3e003793] to [f86bfab037].

12
13
14
15
16
17
18
19
20
21
22
23
24
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFAutoreleasePool.h"

#import "macros.h"

@interface OFAutoreleasePool (OF_PRIVATE_CATEGORY)
+ (void)OF_handleThreadTermination;
- (void)OF_super_dealloc;
@end







<
<




12
13
14
15
16
17
18


19
20
21
22
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFAutoreleasePool.h"



@interface OFAutoreleasePool (OF_PRIVATE_CATEGORY)
+ (void)OF_handleThreadTermination;
- (void)OF_super_dealloc;
@end

Modified src/OFAutoreleasePool.m from [c6736b8348] to [0f577bcb9a].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 */

#include "config.h"

#import "OFAutoreleasePool.h"
#import "OFAutoreleasePool+Private.h"

#import "macros.h"
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
# import "threading.h"

# import "OFInitializationFailedException.h"
#endif

#import "autorelease.h"

#define MAX_CACHE_SIZE 0x20

#if defined(OF_HAVE_COMPILER_TLS)
static thread_local OFAutoreleasePool **cache = NULL;
#elif defined(OF_HAVE_THREADS)
static of_tlskey_t cacheKey;
#else







<


|



<
<







15
16
17
18
19
20
21

22
23
24
25
26
27


28
29
30
31
32
33
34
 */

#include "config.h"

#import "OFAutoreleasePool.h"
#import "OFAutoreleasePool+Private.h"


#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
# import "threading.h"
#
# import "OFInitializationFailedException.h"
#endif



#define MAX_CACHE_SIZE 0x20

#if defined(OF_HAVE_COMPILER_TLS)
static thread_local OFAutoreleasePool **cache = NULL;
#elif defined(OF_HAVE_THREADS)
static of_tlskey_t cacheKey;
#else

Modified src/OFBigDataArray.m from [294c220cb4] to [81ffd86fff].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import "OFBigDataArray.h"
#import "OFSystemInfo.h"

#import "OFInvalidArgumentException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"

#import "macros.h"

@implementation OFBigDataArray
- init
{
	return [self initWithItemSize: 1
			     capacity: 0];
}








<
<







21
22
23
24
25
26
27


28
29
30
31
32
33
34
#import "OFBigDataArray.h"
#import "OFSystemInfo.h"

#import "OFInvalidArgumentException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"



@implementation OFBigDataArray
- init
{
	return [self initWithItemSize: 1
			     capacity: 0];
}

Modified src/OFBlock.m from [f3946988e2] to [9cf137c0dc].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35


36
37
38
39
40
41
42

#include "config.h"

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#if defined(OF_OBJFW_RUNTIME)
# import "runtime.h"
# import "runtime-private.h"
#elif defined(OF_APPLE_RUNTIME)
# import <objc/runtime.h>
#endif

#import "OFBlock.h"

#import "OFAllocFailedException.h"
#import "OFInitializationFailedException.h"


#import "macros.h"


#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif
#ifdef OF_HAVE_THREADS
# import "threading.h"
#endif








<
<
<
<
<
<
<





>
|
>
>







16
17
18
19
20
21
22







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

#include "config.h"

#include <stdint.h>
#include <stdlib.h>
#include <string.h>








#import "OFBlock.h"

#import "OFAllocFailedException.h"
#import "OFInitializationFailedException.h"

#if defined(OF_OBJFW_RUNTIME)
# import "runtime-private.h"
#endif

#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif
#ifdef OF_HAVE_THREADS
# import "threading.h"
#endif

Modified src/OFConstantString.m from [1ddb7fb002] to [340ec99b9c].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "OFConstantString.h"
#import "OFString_UTF8.h"

#import "OFInitializationFailedException.h"
#import "OFInvalidEncodingException.h"
#import "OFOutOfMemoryException.h"

#import "macros.h"

#if defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__)
# import <objc/runtime.h>

struct {
	struct class *isa, *super_class;
	const char *name;
	long version, info, instance_size;







<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#import "OFConstantString.h"
#import "OFString_UTF8.h"

#import "OFInitializationFailedException.h"
#import "OFInvalidEncodingException.h"
#import "OFOutOfMemoryException.h"



#if defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__)
# import <objc/runtime.h>

struct {
	struct class *isa, *super_class;
	const char *name;
	long version, info, instance_size;

Modified src/OFCountedSet.m from [25c3c02efe] to [2e1b287954].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

#import "OFCountedSet.h"
#import "OFCountedSet_hashtable.h"
#import "OFNumber.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "autorelease.h"
#import "macros.h"

static struct {
	Class isa;
} placeholder;

@interface OFCountedSet_placeholder: OFCountedSet
@end








<
<
<







20
21
22
23
24
25
26



27
28
29
30
31
32
33

#import "OFCountedSet.h"
#import "OFCountedSet_hashtable.h"
#import "OFNumber.h"
#import "OFString.h"
#import "OFXMLElement.h"




static struct {
	Class isa;
} placeholder;

@interface OFCountedSet_placeholder: OFCountedSet
@end

Modified src/OFCountedSet_hashtable.m from [4285e1f843] to [187bb454df].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#import "OFXMLAttribute.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFEnumerationMutationException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"

@implementation OFCountedSet_hashtable
+ (void)initialize
{
	if (self == [OFCountedSet_hashtable class])
		[self inheritMethodsFromClass: [OFMutableSet_hashtable class]];
}








<
<







25
26
27
28
29
30
31


32
33
34
35
36
37
38
#import "OFXMLAttribute.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFEnumerationMutationException.h"
#import "OFOutOfRangeException.h"



@implementation OFCountedSet_hashtable
+ (void)initialize
{
	if (self == [OFCountedSet_hashtable class])
		[self inheritMethodsFromClass: [OFMutableSet_hashtable class]];
}

Modified src/OFDataArray+Hashing.m from [b047e37f49] to [b68e631dbd].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#import "OFDataArray.h"
#import "OFString.h"
#import "OFHash.h"
#import "OFMD5Hash.h"
#import "OFSHA1Hash.h"

#import "autorelease.h"

int _OFDataArray_Hashing_reference;

@implementation OFDataArray (Hashing)
- (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass
{
	void *pool = objc_autoreleasePoolPush();
	id <OFHash> hash = [hashClass hash];







<
<







18
19
20
21
22
23
24


25
26
27
28
29
30
31

#import "OFDataArray.h"
#import "OFString.h"
#import "OFHash.h"
#import "OFMD5Hash.h"
#import "OFSHA1Hash.h"



int _OFDataArray_Hashing_reference;

@implementation OFDataArray (Hashing)
- (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass
{
	void *pool = objc_autoreleasePoolPush();
	id <OFHash> hash = [hashClass hash];

Modified src/OFDataArray+MessagePackValue.m from [471c1f50f3] to [ea38c26d0e].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFMessagePackExtension.h"

#import "OFInvalidFormatException.h"

#import "autorelease.h"
#import "macros.h"

int _OFDataArray_MessagePackValue_reference;

static size_t parseObject(const uint8_t*, size_t, id*);

static uint16_t
readUInt16(const uint8_t *buffer)
{







<
<
<







21
22
23
24
25
26
27



28
29
30
31
32
33
34
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFMessagePackExtension.h"

#import "OFInvalidFormatException.h"




int _OFDataArray_MessagePackValue_reference;

static size_t parseObject(const uint8_t*, size_t, id*);

static uint16_t
readUInt16(const uint8_t *buffer)
{

Modified src/OFDataArray.m from [138d34be0b] to [e58d501e5e].

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"

#import "autorelease.h"
#import "base64.h"
#import "macros.h"

/* References for static linking */
void _references_to_categories_of_OFDataArray(void)
{
	_OFDataArray_MessagePackValue_reference = 1;
	_OFDataArray_Hashing_reference = 1;
}







<

<







41
42
43
44
45
46
47

48

49
50
51
52
53
54
55
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"


#import "base64.h"


/* References for static linking */
void _references_to_categories_of_OFDataArray(void)
{
	_OFDataArray_MessagePackValue_reference = 1;
	_OFDataArray_Hashing_reference = 1;
}

Modified src/OFDate.m from [6d1066057e] to [58d1e162c8].

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import "OFSystemInfo.h"

#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"
#import "of_strptime.h"

#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
    defined(OF_HAVE_THREADS)
static OFMutex *mutex;
#endif








<
<







34
35
36
37
38
39
40


41
42
43
44
45
46
47
#import "OFSystemInfo.h"

#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"



#import "of_strptime.h"

#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
    defined(OF_HAVE_THREADS)
static OFMutex *mutex;
#endif

Modified src/OFDeflateStream.m from [e0f523d409] to [505e08ef0e].

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#import "OFDataArray.h"

#import "OFInitializationFailedException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFReadFailedException.h"

#import "autorelease.h"
#import "macros.h"

#define BLOCK_HEADER		  OF_DEFLATE_STREAM_BLOCK_HEADER
#define UNCOMPRESSED_BLOCK_HEADER OF_DEFLATE_STREAM_UNCOMPRESSED_BLOCK_HEADER
#define UNCOMPRESSED_BLOCK	  OF_DEFLATE_STREAM_UNCOMPRESSED_BLOCK
#define HUFFMAN_BLOCK		  OF_DEFLATE_STREAM_HUFFMAN_BLOCK
#define HUFFMAN_TREE		  OF_DEFLATE_STREAM_HUFFMAN_TREE
#define CONSTRUCT_CODELEN_TREE	  OF_DEFLATE_STREAM_CONSTRUCT_CODELEN_TREE
#define CONSTRUCT_LITLEN_TREE	  OF_DEFLATE_STREAM_CONSTRUCT_LITLEN_TREE







<
<
<







32
33
34
35
36
37
38



39
40
41
42
43
44
45
#import "OFDataArray.h"

#import "OFInitializationFailedException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFReadFailedException.h"




#define BLOCK_HEADER		  OF_DEFLATE_STREAM_BLOCK_HEADER
#define UNCOMPRESSED_BLOCK_HEADER OF_DEFLATE_STREAM_UNCOMPRESSED_BLOCK_HEADER
#define UNCOMPRESSED_BLOCK	  OF_DEFLATE_STREAM_UNCOMPRESSED_BLOCK
#define HUFFMAN_BLOCK		  OF_DEFLATE_STREAM_HUFFMAN_BLOCK
#define HUFFMAN_TREE		  OF_DEFLATE_STREAM_HUFFMAN_TREE
#define CONSTRUCT_CODELEN_TREE	  OF_DEFLATE_STREAM_CONSTRUCT_CODELEN_TREE
#define CONSTRUCT_LITLEN_TREE	  OF_DEFLATE_STREAM_CONSTRUCT_LITLEN_TREE

Modified src/OFDictionary.m from [64a914391d] to [cc9eebbd4d].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFDataArray.h"

#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

static struct {
	Class isa;
} placeholder;

@interface OFDictionary (OF_PRIVATE_CATEGORY)
- (OFString*)OF_JSONRepresentationWithOptions: (int)options
					depth: (size_t)depth;







<
<
<







26
27
28
29
30
31
32



33
34
35
36
37
38
39
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFDataArray.h"

#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"




static struct {
	Class isa;
} placeholder;

@interface OFDictionary (OF_PRIVATE_CATEGORY)
- (OFString*)OF_JSONRepresentationWithOptions: (int)options
					depth: (size_t)depth;

Modified src/OFDictionary_hashtable.m from [6963fcfbf5] to [773b906c93].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"

#import "autorelease.h"

static void*
copy(void *value)
{
	return [(id)value copy];
}

static void*







<
<







26
27
28
29
30
31
32


33
34
35
36
37
38
39
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"



static void*
copy(void *value)
{
	return [(id)value copy];
}

static void*

Modified src/OFEnumerator.m from [0e524a539a] to [eb4aa87e40].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "config.h"

#include <stdlib.h>

#import "OFEnumerator.h"
#import "OFArray.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFEnumerator
- init
{
	if (object_getClass(self) == [OFEnumerator class]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
			abort();







<
<
<







17
18
19
20
21
22
23



24
25
26
27
28
29
30
#include "config.h"

#include <stdlib.h>

#import "OFEnumerator.h"
#import "OFArray.h"




@implementation OFEnumerator
- init
{
	if (object_getClass(self) == [OFEnumerator class]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
			abort();

Modified src/OFFile.m from [5df3b4edba] to [282630ecb7].

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRemoveItemFailedException.h"
#import "OFSeekFailedException.h"
#import "OFUnlockFailedException.h"
#import "OFWriteFailedException.h"

#import "autorelease.h"
#import "macros.h"

#ifdef _WIN32
# include <windows.h>
# include <direct.h>
#endif

#ifndef O_BINARY
# define O_BINARY 0







<
<
<







81
82
83
84
85
86
87



88
89
90
91
92
93
94
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRemoveItemFailedException.h"
#import "OFSeekFailedException.h"
#import "OFUnlockFailedException.h"
#import "OFWriteFailedException.h"




#ifdef _WIN32
# include <windows.h>
# include <direct.h>
#endif

#ifndef O_BINARY
# define O_BINARY 0

Modified src/OFHTTPClient.m from [26d3992686] to [bf3f67d78a].

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFUnsupportedVersionException.h"
#import "OFWriteFailedException.h"

#import "autorelease.h"
#import "macros.h"

static OF_INLINE void
normalizeKey(char *str_)
{
	uint8_t *str = (uint8_t*)str_;
	bool firstLetter = true;

	while (*str != '\0') {







<
<
<







40
41
42
43
44
45
46



47
48
49
50
51
52
53
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFUnsupportedVersionException.h"
#import "OFWriteFailedException.h"




static OF_INLINE void
normalizeKey(char *str_)
{
	uint8_t *str = (uint8_t*)str_;
	bool firstLetter = true;

	while (*str != '\0') {

Modified src/OFHTTPRequest.m from [7522c047c2] to [fa66100730].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#import "OFHTTPRequest.h"
#import "OFString.h"
#import "OFURL.h"
#import "OFDictionary.h"
#import "OFDataArray.h"
#import "OFArray.h"

#import "autorelease.h"
#import "macros.h"

#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "OFUnsupportedVersionException.h"

const char*
of_http_request_method_to_string(of_http_request_method_t method)
{







<
<
<







21
22
23
24
25
26
27



28
29
30
31
32
33
34
#import "OFHTTPRequest.h"
#import "OFString.h"
#import "OFURL.h"
#import "OFDictionary.h"
#import "OFDataArray.h"
#import "OFArray.h"




#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "OFUnsupportedVersionException.h"

const char*
of_http_request_method_to_string(of_http_request_method_t method)
{

Modified src/OFHTTPResponse.m from [8ff5658d59] to [08747a2e4f].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

#import "OFHTTPResponse.h"
#import "OFString.h"
#import "OFDictionary.h"
#import "OFArray.h"
#import "OFDataArray.h"

#import "autorelease.h"
#import "macros.h"

#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedVersionException.h"

@implementation OFHTTPResponse
- init







<
<
<







18
19
20
21
22
23
24



25
26
27
28
29
30
31

#import "OFHTTPResponse.h"
#import "OFString.h"
#import "OFDictionary.h"
#import "OFArray.h"
#import "OFDataArray.h"




#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedVersionException.h"

@implementation OFHTTPResponse
- init

Modified src/OFHTTPServer.m from [7f98124205] to [79b7aacf76].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import "OFAlreadyConnectedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFWriteFailedException.h"

#import "autorelease.h"
#import "macros.h"

#define BUFFER_SIZE 1024

/*
 * FIXME: Key normalization replaces headers like "DNT" with "Dnt".
 * FIXME: Errors are not reported to the user.
 */








<
<
<







33
34
35
36
37
38
39



40
41
42
43
44
45
46
#import "OFAlreadyConnectedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFWriteFailedException.h"




#define BUFFER_SIZE 1024

/*
 * FIXME: Key normalization replaces headers like "DNT" with "Dnt".
 * FIXME: Errors are not reported to the user.
 */

Modified src/OFINICategory+Private.h from [963e590a59] to [e411ac2081].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFINICategory.h"
#import "OFString.h"

#import "macros.h"

@class OFStream;

@interface OFINICategory (OF_PRIVATE_CATEGORY)
- (instancetype)OF_init;
- (void)OF_parseLine: (OFString*)line;
- (bool)OF_writeToStream: (OFStream*)stream
		encoding: (of_string_encoding_t)encoding
		   first: (bool)first;
@end







<
<









13
14
15
16
17
18
19


20
21
22
23
24
25
26
27
28
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFINICategory.h"
#import "OFString.h"



@class OFStream;

@interface OFINICategory (OF_PRIVATE_CATEGORY)
- (instancetype)OF_init;
- (void)OF_parseLine: (OFString*)line;
- (bool)OF_writeToStream: (OFStream*)stream
		encoding: (of_string_encoding_t)encoding
		   first: (bool)first;
@end

Modified src/OFINICategory.m from [20041b8f65] to [35a8661d37].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFArray.h"
#import "OFString.h"
#import "OFStream.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"

#import "autorelease.h"
#import "macros.h"

@interface OFINICategory_Pair: OFObject
{
@public
	OFString *_key, *_value;
}
@end








<
<
<







19
20
21
22
23
24
25



26
27
28
29
30
31
32
#import "OFArray.h"
#import "OFString.h"
#import "OFStream.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"




@interface OFINICategory_Pair: OFObject
{
@public
	OFString *_key, *_value;
}
@end

Modified src/OFINIFile.m from [7cf0535b70] to [9fa7520bf5].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import "OFFile.h"
#import "OFINICategory.h"
#import "OFINICategory+Private.h"

#import "OFInvalidFormatException.h"
#import "OFOpenFileFailedException.h"

#import "autorelease.h"
#import "macros.h"

@interface OFINIFile (OF_PRIVATE_CATEGORY)
- (void)OF_parseFile: (OFString*)path
	    encoding: (of_string_encoding_t)encoding;
@end

static bool
isWhitespaceLine(OFString *line)







<
<
<







20
21
22
23
24
25
26



27
28
29
30
31
32
33
#import "OFFile.h"
#import "OFINICategory.h"
#import "OFINICategory+Private.h"

#import "OFInvalidFormatException.h"
#import "OFOpenFileFailedException.h"




@interface OFINIFile (OF_PRIVATE_CATEGORY)
- (void)OF_parseFile: (OFString*)path
	    encoding: (of_string_encoding_t)encoding;
@end

static bool
isWhitespaceLine(OFString *line)

Modified src/OFIntrospection.m from [9e051f7ab4] to [f9f3542aad].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 */

#include "config.h"

#include <string.h>
#include <ctype.h>

#if defined(OF_APPLE_RUNTIME)
# import <objc/runtime.h>
#endif

#import "OFIntrospection.h"
#import "OFString.h"
#import "OFArray.h"

#import "OFInitializationFailedException.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFMethod
#if defined(OF_OBJFW_RUNTIME)
- (instancetype)OF_initWithMethod: (struct objc_method*)method
{
	self = [super init];

	@try {







<
<
<
<






<
<
<







15
16
17
18
19
20
21




22
23
24
25
26
27



28
29
30
31
32
33
34
 */

#include "config.h"

#include <string.h>
#include <ctype.h>





#import "OFIntrospection.h"
#import "OFString.h"
#import "OFArray.h"

#import "OFInitializationFailedException.h"




@implementation OFMethod
#if defined(OF_OBJFW_RUNTIME)
- (instancetype)OF_initWithMethod: (struct objc_method*)method
{
	self = [super init];

	@try {

Modified src/OFKernelEventObserver+Private.h from [4c35b436cf] to [9baa15c51b].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFKernelEventObserver.h"

#import "macros.h"

@interface OFKernelEventObserver (OF_PRIVATE_CATEGORY)
- (void)OF_addFileDescriptorForReading: (int)fd;
- (void)OF_addFileDescriptorForWriting: (int)fd;
- (void)OF_removeFileDescriptorForReading: (int)fd;
- (void)OF_removeFileDescriptorForWriting: (int)fd;
- (void)OF_processQueue;
- (bool)OF_processCache;
@end







<
<








12
13
14
15
16
17
18


19
20
21
22
23
24
25
26
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFKernelEventObserver.h"



@interface OFKernelEventObserver (OF_PRIVATE_CATEGORY)
- (void)OF_addFileDescriptorForReading: (int)fd;
- (void)OF_addFileDescriptorForWriting: (int)fd;
- (void)OF_removeFileDescriptorForReading: (int)fd;
- (void)OF_removeFileDescriptorForWriting: (int)fd;
- (void)OF_processQueue;
- (bool)OF_processCache;
@end

Modified src/OFKernelEventObserver.m from [cb71953a13] to [380728b304].

45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# import "OFKernelEventObserver_select.h"
#endif

#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"
#import "socket_helpers.h"

enum {
	QUEUE_ADD = 0,
	QUEUE_REMOVE = 1,
	QUEUE_READ = 0,
	QUEUE_WRITE = 2







<
<







45
46
47
48
49
50
51


52
53
54
55
56
57
58
# import "OFKernelEventObserver_select.h"
#endif

#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"



#import "socket_helpers.h"

enum {
	QUEUE_ADD = 0,
	QUEUE_REMOVE = 1,
	QUEUE_READ = 0,
	QUEUE_WRITE = 2

Modified src/OFKernelEventObserver_kqueue.m from [79faaa634a] to [76859e1d9d].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#import "OFKernelEventObserver_kqueue.h"
#import "OFDataArray.h"

#import "OFInitializationFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"
#import "socket_helpers.h"

#define EVENTLIST_SIZE 64

@implementation OFKernelEventObserver_kqueue
- init
{







<
<







30
31
32
33
34
35
36


37
38
39
40
41
42
43
#import "OFKernelEventObserver_kqueue.h"
#import "OFDataArray.h"

#import "OFInitializationFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"



#import "socket_helpers.h"

#define EVENTLIST_SIZE 64

@implementation OFKernelEventObserver_kqueue
- init
{

Modified src/OFKernelEventObserver_poll.m from [0822c7de55] to [daca96d316].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#import "OFKernelEventObserver.h"
#import "OFKernelEventObserver+Private.h"
#import "OFKernelEventObserver_poll.h"
#import "OFDataArray.h"

#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"
#import "socket_helpers.h"

#ifdef __wii__
# define pollfd pollsd
# define fd socket
#endif








<
<







25
26
27
28
29
30
31


32
33
34
35
36
37
38
#import "OFKernelEventObserver.h"
#import "OFKernelEventObserver+Private.h"
#import "OFKernelEventObserver_poll.h"
#import "OFDataArray.h"

#import "OFOutOfRangeException.h"



#import "socket_helpers.h"

#ifdef __wii__
# define pollfd pollsd
# define fd socket
#endif

Modified src/OFKernelEventObserver_select.m from [71a3935230] to [b091506593].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <sys/time.h>

#import "OFKernelEventObserver.h"
#import "OFKernelEventObserver+Private.h"
#import "OFKernelEventObserver_select.h"
#import "OFArray.h"

#import "autorelease.h"
#import "macros.h"
#import "socket_helpers.h"

@implementation OFKernelEventObserver_select
- init
{
	self = [super init];








<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#include <sys/time.h>

#import "OFKernelEventObserver.h"
#import "OFKernelEventObserver+Private.h"
#import "OFKernelEventObserver_select.h"
#import "OFArray.h"



#import "socket_helpers.h"

@implementation OFKernelEventObserver_select
- init
{
	self = [super init];

Modified src/OFList.m from [fae299202c] to [15d02f769c].

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFArray.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFList
+ (instancetype)list
{
	return [[[self alloc] init] autorelease];
}

- initWithSerialization: (OFXMLElement*)element







<
<
<







23
24
25
26
27
28
29



30
31
32
33
34
35
36
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFArray.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"




@implementation OFList
+ (instancetype)list
{
	return [[[self alloc] init] autorelease];
}

- initWithSerialization: (OFXMLElement*)element

Modified src/OFMD5Hash.m from [32fa8ff9bf] to [9801b1cb04].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#include <string.h>

#import "OFMD5Hash.h"

#import "OFHashAlreadyCalculatedException.h"

#import "macros.h"

/* The four MD5 core functions - F1 is optimized somewhat */
#define F1(x, y, z) (z ^ (x & (y ^ z)))
#define F2(x, y, z) F1(z, x, y)
#define F3(x, y, z) (x ^ y ^ z)
#define F4(x, y, z) (y ^ (x | ~z))

/* This is the central step in the MD5 algorithm. */







<
<







18
19
20
21
22
23
24


25
26
27
28
29
30
31

#include <string.h>

#import "OFMD5Hash.h"

#import "OFHashAlreadyCalculatedException.h"



/* The four MD5 core functions - F1 is optimized somewhat */
#define F1(x, y, z) (z ^ (x & (y ^ z)))
#define F2(x, y, z) F1(z, x, y)
#define F3(x, y, z) (x ^ y ^ z)
#define F4(x, y, z) (y ^ (x | ~z))

/* This is the central step in the MD5 algorithm. */

Modified src/OFMapTable.m from [05916c8969] to [bf79826698].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "OFMapTable+Private.h"
#import "OFEnumerator.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"

#import "macros.h"

#define MIN_CAPACITY 16

struct of_map_table_bucket {
	void *key, *value;
	uint32_t hash;
};
static struct of_map_table_bucket deleted = { 0 };







<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#import "OFMapTable+Private.h"
#import "OFEnumerator.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"



#define MIN_CAPACITY 16

struct of_map_table_bucket {
	void *key, *value;
	uint32_t hash;
};
static struct of_map_table_bucket deleted = { 0 };

Modified src/OFMessagePackExtension.m from [331e6c7f3f] to [bef8e54d15].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#import "OFMessagePackExtension.h"
#import "OFDataArray.h"
#import "OFString.h"

#import "OFInvalidArgumentException.h"

#import "macros.h"

@implementation OFMessagePackExtension
+ (instancetype)extensionWithType: (int8_t)type
			     data: (OFDataArray*)data
{
	return [[[self alloc] initWithType: type
				      data: data] autorelease];
}







<
<







18
19
20
21
22
23
24


25
26
27
28
29
30
31

#import "OFMessagePackExtension.h"
#import "OFDataArray.h"
#import "OFString.h"

#import "OFInvalidArgumentException.h"



@implementation OFMessagePackExtension
+ (instancetype)extensionWithType: (int8_t)type
			     data: (OFDataArray*)data
{
	return [[[self alloc] initWithType: type
				      data: data] autorelease];
}

Modified src/OFMutableArray.m from [ba61e978ab] to [07a8eaaa30].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#import "OFMutableArray.h"
#import "OFMutableArray_adjacent.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

static struct {
	Class isa;
} placeholder;

@interface OFMutableArray_placeholder: OFMutableArray
@end








<
<
<







24
25
26
27
28
29
30



31
32
33
34
35
36
37
#import "OFMutableArray.h"
#import "OFMutableArray_adjacent.h"

#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"




static struct {
	Class isa;
} placeholder;

@interface OFMutableArray_placeholder: OFMutableArray
@end

Modified src/OFMutableDictionary.m from [f131fe5ace] to [5eb0295031].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "config.h"

#include <stdlib.h>

#import "OFMutableDictionary_hashtable.h"
#import "OFArray.h"

#import "autorelease.h"
#import "macros.h"

static struct {
	Class isa;
} placeholder;

@interface OFMutableDictionary_placeholder: OFDictionary
@end








<
<
<







17
18
19
20
21
22
23



24
25
26
27
28
29
30
#include "config.h"

#include <stdlib.h>

#import "OFMutableDictionary_hashtable.h"
#import "OFArray.h"




static struct {
	Class isa;
} placeholder;

@interface OFMutableDictionary_placeholder: OFDictionary
@end

Modified src/OFMutableDictionary_hashtable.m from [59ff18f66b] to [7d21848c75].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import "OFMutableDictionary_hashtable.h"
#import "OFDictionary_hashtable.h"
#import "OFMapTable.h"

#import "OFEnumerationMutationException.h"
#import "OFOutOfRangeException.h"

#import "macros.h"

@implementation OFMutableDictionary_hashtable
+ (void)initialize
{
	if (self == [OFMutableDictionary_hashtable class])
		[self inheritMethodsFromClass: [OFDictionary_hashtable class]];
}








<
<







21
22
23
24
25
26
27


28
29
30
31
32
33
34
#import "OFMutableDictionary_hashtable.h"
#import "OFDictionary_hashtable.h"
#import "OFMapTable.h"

#import "OFEnumerationMutationException.h"
#import "OFOutOfRangeException.h"



@implementation OFMutableDictionary_hashtable
+ (void)initialize
{
	if (self == [OFMutableDictionary_hashtable class])
		[self inheritMethodsFromClass: [OFDictionary_hashtable class]];
}

Modified src/OFMutableSet.m from [6937da2a87] to [0db3d60d53].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdlib.h>

#include <assert.h>

#import "OFMutableSet.h"
#import "OFMutableSet_hashtable.h"

#import "autorelease.h"
#import "macros.h"

static struct {
	Class isa;
} placeholder;

@interface OFMutableSet_placeholder: OFMutableSet
@end








<
<
<







19
20
21
22
23
24
25



26
27
28
29
30
31
32
#include <stdlib.h>

#include <assert.h>

#import "OFMutableSet.h"
#import "OFMutableSet_hashtable.h"




static struct {
	Class isa;
} placeholder;

@interface OFMutableSet_placeholder: OFMutableSet
@end

Modified src/OFMutableString.m from [9ed108e4c1] to [f4c986f8d9].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#import "OFString.h"
#import "OFMutableString_UTF8.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

#import "of_asprintf.h"
#import "unicode.h"

static struct {
	Class isa;
} placeholder;








<
<
<







25
26
27
28
29
30
31



32
33
34
35
36
37
38
#import "OFString.h"
#import "OFMutableString_UTF8.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"




#import "of_asprintf.h"
#import "unicode.h"

static struct {
	Class isa;
} placeholder;

Modified src/OFMutableString_UTF8.m from [bd98368f71] to [b53250c187].

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

#import "of_asprintf.h"
#import "unicode.h"

@implementation OFMutableString_UTF8
+ (void)initialize
{
	if (self == [OFMutableString_UTF8 class])







<
<
<







27
28
29
30
31
32
33



34
35
36
37
38
39
40

#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"




#import "of_asprintf.h"
#import "unicode.h"

@implementation OFMutableString_UTF8
+ (void)initialize
{
	if (self == [OFMutableString_UTF8 class])

Modified src/OFMutex.m from [9762b9a489] to [54ba474cf0].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFString.h"

#import "OFInitializationFailedException.h"
#import "OFLockFailedException.h"
#import "OFStillLockedException.h"
#import "OFUnlockFailedException.h"

#import "macros.h"

@implementation OFMutex
+ (instancetype)mutex
{
	return [[[self alloc] init] autorelease];
}

- init







<
<







20
21
22
23
24
25
26


27
28
29
30
31
32
33
#import "OFString.h"

#import "OFInitializationFailedException.h"
#import "OFLockFailedException.h"
#import "OFStillLockedException.h"
#import "OFUnlockFailedException.h"



@implementation OFMutex
+ (instancetype)mutex
{
	return [[[self alloc] init] autorelease];
}

- init

Modified src/OFNull.m from [3046b23b8f] to [b3acc69d72].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFNull.h"
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFDataArray.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"
#import "macros.h"

@interface OFNull (OF_PRIVATE_CATEGORY)
- (OFString*)OF_JSONRepresentationWithOptions: (int)options
					depth: (size_t)depth;
@end

static OFNull *null = nil;








<
<
<







19
20
21
22
23
24
25



26
27
28
29
30
31
32
#import "OFNull.h"
#import "OFString.h"
#import "OFXMLElement.h"
#import "OFDataArray.h"

#import "OFInvalidArgumentException.h"




@interface OFNull (OF_PRIVATE_CATEGORY)
- (OFString*)OF_JSONRepresentationWithOptions: (int)options
					depth: (size_t)depth;
@end

static OFNull *null = nil;

Modified src/OFNumber.m from [27ec58b2db] to [f23f2bec10].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#import "OFXMLAttribute.h"
#import "OFDataArray.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

#define RETURN_AS(t)							\
	switch (_type) {						\
	case OF_NUMBER_BOOL:						\
		return (t)_value.bool_;					\
	case OF_NUMBER_CHAR:						\
		return (t)_value.schar;					\
	case OF_NUMBER_SHORT:						\







<
<
<







24
25
26
27
28
29
30



31
32
33
34
35
36
37
#import "OFXMLAttribute.h"
#import "OFDataArray.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"




#define RETURN_AS(t)							\
	switch (_type) {						\
	case OF_NUMBER_BOOL:						\
		return (t)_value.bool_;					\
	case OF_NUMBER_CHAR:						\
		return (t)_value.schar;					\
	case OF_NUMBER_SHORT:						\

Modified src/OFObject+Serialization.m from [dd2ecc566b] to [16211d6d3b].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#import "OFObject.h"
#import "OFObject+Serialization.h"
#import "OFSerialization.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "autorelease.h"

int _OFObject_Serialization_reference;

@implementation OFObject (Serialization)
- (OFString*)stringBySerializing
{
	void *pool;
	OFXMLElement *element;







<
<







20
21
22
23
24
25
26


27
28
29
30
31
32
33

#import "OFObject.h"
#import "OFObject+Serialization.h"
#import "OFSerialization.h"
#import "OFString.h"
#import "OFXMLElement.h"



int _OFObject_Serialization_reference;

@implementation OFObject (Serialization)
- (OFString*)stringBySerializing
{
	void *pool;
	OFXMLElement *element;

Modified src/OFObject.h from [3a0e0599cf] to [94f4198362].

24
25
26
27
28
29
30
31
32
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#endif

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>

#ifdef OF_OBJFW_RUNTIME
# import "runtime.h"
#else
# import <objc/objc.h>
#endif

#ifdef OF_APPLE_RUNTIME
# import <objc/runtime.h>
# import <objc/message.h>
#endif

/*! @file */

#if defined(__GNUC__)
# define restrict __restrict__
#elif __STDC_VERSION__ < 199901L
# define restrict
#endif

#if __STDC_VERSION__ >= 201112L
# ifdef OF_HAVE_STDNORETURN_H
#  include <stdnoreturn.h>
# else
#  define noreturn _Noreturn
# endif
#elif defined(__GNUC__)
# define noreturn __attribute__((__noreturn__))
#else
# define noreturn
#endif

/*
 * Work around Apple's libc headers breaking by defining noreturn.
 * They use __attribute__((noreturn)) where they should be using
 * __attribute__((__noreturn__)).
 */
#if defined(__APPLE__) && defined(__dead2)
# undef __dead2
# define __dead2 __attribute__((__noreturn__))
#endif

#if defined(OF_HAVE__THREAD_LOCAL)
# define OF_HAVE_COMPILER_TLS
# ifdef OF_HAVE_THREADS_H
#  include <threads.h>
# else
#  define thread_local _Thread_local
# endif
#elif defined(OF_HAVE___THREAD)
# define OF_HAVE_COMPILER_TLS
# define thread_local __thread
#endif

#ifndef __has_feature
# define __has_feature(x) 0
#endif

#ifndef __has_attribute
# define __has_attribute(x) 0
#endif

#ifdef __GNUC__
# define __GCC_VERSION__ (__GNUC__ * 100 + __GNUC_MINOR__)
#else
# define __GCC_VERSION__ 0
#endif

#if defined(__clang__) || __GCC_VERSION__ >= 406 || defined(OBJC_NEW_PROPERTIES)
# define OF_HAVE_PROPERTIES
# define OF_HAVE_OPTIONAL_PROTOCOLS
# if defined(__clang__) || __GCC_VERSION__ >= 406 || defined(OF_APPLE_RUNTIME)
#  define OF_HAVE_FAST_ENUMERATION
# endif
# define OF_HAVE_CLASS_EXTENSIONS
#endif

#if !__has_feature(objc_instancetype)
# define instancetype id
#endif

#if __has_feature(blocks)
# define OF_HAVE_BLOCKS
#endif

#if __has_feature(objc_bool)
# undef YES
# define YES __objc_yes
# undef NO
# define NO __objc_no
# ifndef __cplusplus
#  undef true
#  define true ((bool)1)
#  undef false
#  define false ((bool)0)
# endif
#endif

#if defined(__clang__) || __GCC_VERSION__ >= 406
# define OF_SENTINEL __attribute__((__sentinel__))
# define OF_METHOD_NORETURN __attribute__((__noreturn__))
#else
# define OF_SENTINEL
# define OF_METHOD_NORETURN
#endif

#if __has_attribute(__objc_requires_super__)
# define OF_REQUIRES_SUPER __attribute__((__objc_requires_super__))
#else
# define OF_REQUIRES_SUPER
#endif

#if __has_attribute(__objc_root_class__)
# define OF_ROOT_CLASS __attribute__((__objc_root_class__))
#else
# define OF_ROOT_CLASS
#endif

#ifdef OF_APPLE_RUNTIME
# if defined(__x86_64__) || defined(__i386__) || defined(__ARM64_ARCH_8__) || \
	defined(__arm__) || defined(__ppc__)
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
# endif
#else
# if defined(__ELF__)
#  if defined(__x86_64__) || defined(__amd64__) || defined(__i386__) || \
	defined(__arm__) || defined(__ARM__) || defined(__ppc__) || \
	defined(__PPC__)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#   if __OBJFW_RUNTIME_ABI__ >= 800
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
#  if (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) || \
	(defined(__mips_eabi) && _MIPS_SZPTR == 32)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#   if __OBJFW_RUNTIME_ABI__ >= 800
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
# elif defined(_WIN32)
#  if defined(__x86_64__) || defined(__i386__)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#   if __OBJFW_RUNTIME_ABI__ >= 800
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
# endif
#endif

#if __has_feature(objc_arc)
# define OF_RETURNS_RETAINED __attribute__((__ns_returns_retained__))
# define OF_RETURNS_NOT_RETAINED __attribute__((__ns_returns_not_retained__))
# define OF_RETURNS_INNER_POINTER \
	__attribute__((__objc_returns_inner_pointer__))
# define OF_CONSUMED __attribute__((__ns_consumed__))
# define OF_WEAK_UNAVAILABLE __attribute__((__objc_arc_weak_unavailable__))
#else
# define OF_RETURNS_RETAINED
# define OF_RETURNS_NOT_RETAINED
# define OF_RETURNS_INNER_POINTER
# define OF_CONSUMED
# define OF_WEAK_UNAVAILABLE
# define __unsafe_unretained
# define __bridge
# define __autoreleasing
#endif

#define OF_RETAIN_COUNT_MAX UINT_MAX
#define OF_NOT_FOUND SIZE_MAX

/*!
 * @brief A result of a comparison.
 */
typedef enum {
	/*! The left object is smaller than the right */
	OF_ORDERED_ASCENDING = -1,
	/*! Both objects are equal */







<
|
<
<
<
|
<
<
<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







24
25
26
27
28
29
30

31



32




33
34
35






























































































































































36
37
38
39
40
41
42
#endif

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>


#import "macros.h"



#import "autorelease.h"





/*! @file */































































































































































/*!
 * @brief A result of a comparison.
 */
typedef enum {
	/*! The left object is smaller than the right */
	OF_ORDERED_ASCENDING = -1,
	/*! Both objects are equal */
228
229
230
231
232
233
234















235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251















252
253
254
255
256
257
258
259
260
261
262
263















264
265
266
267
268
269
270
271
272
273
274
275




















276
277
278
279
280
281
282
 */
typedef struct {
	/*! The start of the range */
	size_t location;
	/*! The length of the range */
	size_t length;
} of_range_t;
















/*!
 * @brief A time interval in seconds.
 */
typedef double of_time_interval_t;

/*!
 * @struct of_point_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A point.
 */
typedef struct {
	/*! The x coordinate of the point */
	float x;
	/*! The y coordinate of the point */
	float y;
} of_point_t;
















/*!
 * @struct of_dimension_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A dimension.
 */
typedef struct {
	/*! The width of the dimension */
	float width;
	/*! The height of the dimension */
	float height;
} of_dimension_t;
















/*!
 * @struct of_rectangle_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A rectangle.
 */
typedef struct {
	/*! The point from where the rectangle originates */
	of_point_t origin;
	/*! The size of the rectangle */
	of_dimension_t size;
} of_rectangle_t;





















@class OFString;
@class OFThread;

/*!
 * @protocol OFObject OFObject.h ObjFW/OFObject.h
 *







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
 */
typedef struct {
	/*! The start of the range */
	size_t location;
	/*! The length of the range */
	size_t length;
} of_range_t;

/*!
 * @brief Creates a new of_range_t.
 *
 * @param start The starting index of the range
 * @param length The length of the range
 * @return An of_range with the specified start and length
 */
static OF_INLINE of_range_t OF_CONST_FUNC
of_range(size_t start, size_t length)
{
	of_range_t range = { start, length };

	return range;
}

/*!
 * @brief A time interval in seconds.
 */
typedef double of_time_interval_t;

/*!
 * @struct of_point_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A point.
 */
typedef struct {
	/*! The x coordinate of the point */
	float x;
	/*! The y coordinate of the point */
	float y;
} of_point_t;

/*!
 * @brief Creates a new of_point_t.
 *
 * @param x The x coordinate of the point
 * @param y The x coordinate of the point
 * @return An of_point_t with the specified coordinates
 */
static OF_INLINE of_point_t OF_CONST_FUNC
of_point(float x, float y)
{
	of_point_t point = { x, y };

	return point;
}

/*!
 * @struct of_dimension_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A dimension.
 */
typedef struct {
	/*! The width of the dimension */
	float width;
	/*! The height of the dimension */
	float height;
} of_dimension_t;

/*!
 * @brief Creates a new of_dimension_t.
 *
 * @param width The width of the dimension
 * @param height The height of the dimension
 * @return An of_dimension_t with the specified width and height
 */
static OF_INLINE of_dimension_t OF_CONST_FUNC
of_dimension(float width, float height)
{
	of_dimension_t dimension = { width, height };

	return dimension;
}

/*!
 * @struct of_rectangle_t OFObject.h ObjFW/OFObject.h
 *
 * @brief A rectangle.
 */
typedef struct {
	/*! The point from where the rectangle originates */
	of_point_t origin;
	/*! The size of the rectangle */
	of_dimension_t size;
} of_rectangle_t;

/*!
 * @brief Creates a new of_rectangle_t.
 *
 * @param x The x coordinate of the top left corner of the rectangle
 * @param y The y coordinate of the top left corner of the rectangle
 * @param width The width of the rectangle
 * @param height The height of the rectangle
 * @return An of_rectangle_t with the specified origin and size
 */
static OF_INLINE of_rectangle_t OF_CONST_FUNC
of_rectangle(float x, float y, float width, float height)
{
	of_rectangle_t rectangle = {
		of_point(x, y),
		of_dimension(width, height)
	};

	return rectangle;
}

@class OFString;
@class OFThread;

/*!
 * @protocol OFObject OFObject.h ObjFW/OFObject.h
 *

Modified src/OFObject.m from [31f7e1ca7d] to [dcda168113].

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFMemoryNotPartOfObjectException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

#if defined(OF_APPLE_RUNTIME) && __OBJC2__
# import <objc/objc-exception.h>
#elif defined(OF_OBJFW_RUNTIME)
# import "runtime.h"
#endif

#ifdef _WIN32







<
<
<







35
36
37
38
39
40
41



42
43
44
45
46
47
48
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFMemoryNotPartOfObjectException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"




#if defined(OF_APPLE_RUNTIME) && __OBJC2__
# import <objc/objc-exception.h>
#elif defined(OF_OBJFW_RUNTIME)
# import "runtime.h"
#endif

#ifdef _WIN32

Modified src/OFOptionsParser.m from [400eee9b4e] to [b40bf8527b].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

#include "config.h"

#import "OFOptionsParser.h"
#import "OFApplication.h"
#import "OFArray.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFOptionsParser
+ (instancetype)parserWithOptions: (OFString*)options
{
	return [[[self alloc] initWithOptions: options] autorelease];
}

- init







<
<
<







16
17
18
19
20
21
22



23
24
25
26
27
28
29

#include "config.h"

#import "OFOptionsParser.h"
#import "OFApplication.h"
#import "OFArray.h"




@implementation OFOptionsParser
+ (instancetype)parserWithOptions: (OFString*)options
{
	return [[[self alloc] initWithOptions: options] autorelease];
}

- init

Modified src/OFPlugin.m from [a5b4d66f4b] to [72b6e8f4e8].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#endif

#import "OFPlugin.h"
#import "OFString.h"

#import "OFInitializationFailedException.h"

#import "autorelease.h"

#ifdef _WIN32
# define dlsym(handle, symbol) GetProcAddress(handle, symbol)
# define dlclose(handle) FreeLibrary(handle)
#endif

typedef OFPlugin* (*init_plugin_t)(void);








<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#endif

#import "OFPlugin.h"
#import "OFString.h"

#import "OFInitializationFailedException.h"



#ifdef _WIN32
# define dlsym(handle, symbol) GetProcAddress(handle, symbol)
# define dlclose(handle) FreeLibrary(handle)
#endif

typedef OFPlugin* (*init_plugin_t)(void);

Modified src/OFProcess.m from [bf59320c7a] to [486d495193].

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"

#ifdef _WIN32
# include <windows.h>
#endif

#import "autorelease.h"
#import "macros.h"

#ifndef __MACH__
extern char **environ;
#endif

@interface OFProcess (OF_PRIVATE_CATEGORY)
#ifndef _WIN32
- (char**)OF_environmentForDictionary: (OFDictionary*)dictionary;







<
<
<







44
45
46
47
48
49
50



51
52
53
54
55
56
57
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"

#ifdef _WIN32
# include <windows.h>
#endif




#ifndef __MACH__
extern char **environ;
#endif

@interface OFProcess (OF_PRIVATE_CATEGORY)
#ifndef _WIN32
- (char**)OF_environmentForDictionary: (OFDictionary*)dictionary;

Modified src/OFRecursiveMutex.m from [98dcd7a3d1] to [6018a775f1].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFString.h"

#import "OFInitializationFailedException.h"
#import "OFLockFailedException.h"
#import "OFStillLockedException.h"
#import "OFUnlockFailedException.h"

#import "macros.h"

@implementation OFRecursiveMutex
+ (instancetype)mutex
{
	return [[[self alloc] init] autorelease];
}

- init







<
<







20
21
22
23
24
25
26


27
28
29
30
31
32
33
#import "OFString.h"

#import "OFInitializationFailedException.h"
#import "OFLockFailedException.h"
#import "OFStillLockedException.h"
#import "OFUnlockFailedException.h"



@implementation OFRecursiveMutex
+ (instancetype)mutex
{
	return [[[self alloc] init] autorelease];
}

- init

Modified src/OFRunLoop+Private.h from [6ac847c954] to [1624d09230].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#import "OFRunLoop.h"
#import "OFStream.h"
#ifdef OF_HAVE_SOCKETS
# import "OFUDPSocket.h"
#endif

#import "macros.h"

@interface OFRunLoop (OF_PRIVATE_CATEGORY)
+ (void)OF_setMainRunLoop: (OFRunLoop*)runLoop;
#ifdef OF_HAVE_SOCKETS
+ (void)OF_addAsyncReadForStream: (OFStream*)stream
			  buffer: (void*)buffer
			  length: (size_t)length
			  target: (id)target







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#import "OFRunLoop.h"
#import "OFStream.h"
#ifdef OF_HAVE_SOCKETS
# import "OFUDPSocket.h"
#endif



@interface OFRunLoop (OF_PRIVATE_CATEGORY)
+ (void)OF_setMainRunLoop: (OFRunLoop*)runLoop;
#ifdef OF_HAVE_SOCKETS
+ (void)OF_addAsyncReadForStream: (OFStream*)stream
			  buffer: (void*)buffer
			  length: (size_t)length
			  target: (id)target

Modified src/OFRunLoop.m from [6b234d3dd8] to [c3c6b10589].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# import "OFCondition.h"
#endif
#import "OFSortedList.h"
#import "OFTimer.h"
#import "OFTimer+Private.h"
#import "OFDate.h"

#import "autorelease.h"
#import "macros.h"

static OFRunLoop *mainRunLoop = nil;

#ifdef OF_HAVE_SOCKETS
@interface OFRunLoop_QueueItem: OFObject
{
@public
	id _target;







<
<
<







30
31
32
33
34
35
36



37
38
39
40
41
42
43
# import "OFCondition.h"
#endif
#import "OFSortedList.h"
#import "OFTimer.h"
#import "OFTimer+Private.h"
#import "OFDate.h"




static OFRunLoop *mainRunLoop = nil;

#ifdef OF_HAVE_SOCKETS
@interface OFRunLoop_QueueItem: OFObject
{
@public
	id _target;

Modified src/OFSHA1Hash.m from [c9601948c4] to [8ad65dbc27].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#include <string.h>

#import "OFSHA1Hash.h"

#import "OFHashAlreadyCalculatedException.h"

#import "macros.h"

/* blk0() and blk() perform the initial expand. */
#ifndef OF_BIG_ENDIAN
#define blk0(i)							\
	(block.l[i] = (OF_ROL(block.l[i], 24) & 0xFF00FF00) |	\
	    (OF_ROL(block.l[i], 8) & 0x00FF00FF))
#else
#define blk0(i) block.l[i]







<
<







18
19
20
21
22
23
24


25
26
27
28
29
30
31

#include <string.h>

#import "OFSHA1Hash.h"

#import "OFHashAlreadyCalculatedException.h"



/* blk0() and blk() perform the initial expand. */
#ifndef OF_BIG_ENDIAN
#define blk0(i)							\
	(block.l[i] = (OF_ROL(block.l[i], 24) & 0xFF00FF00) |	\
	    (OF_ROL(block.l[i], 8) & 0x00FF00FF))
#else
#define blk0(i) block.l[i]

Modified src/OFSeekableStream.m from [f1a559726a] to [a7e1d973bb].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "config.h"

#include <stdlib.h>
#include <stdio.h>

#import "OFSeekableStream.h"

#import "macros.h"

@implementation OFSeekableStream
- init
{
	if (object_getClass(self) == [OFSeekableStream class]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
			abort();







<
<







19
20
21
22
23
24
25


26
27
28
29
30
31
32
#include "config.h"

#include <stdlib.h>
#include <stdio.h>

#import "OFSeekableStream.h"



@implementation OFSeekableStream
- init
{
	if (object_getClass(self) == [OFSeekableStream class]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
			abort();

Modified src/OFSet.m from [75c0bccec2] to [c491517e92].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

#import "OFSet.h"
#import "OFSet_hashtable.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFXMLElement.h"

#import "autorelease.h"
#import "macros.h"

static struct {
	Class isa;
} placeholder;

@interface OFSet_placeholder: OFSet
@end








<
<
<







20
21
22
23
24
25
26



27
28
29
30
31
32
33

#import "OFSet.h"
#import "OFSet_hashtable.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFXMLElement.h"




static struct {
	Class isa;
} placeholder;

@interface OFSet_placeholder: OFSet
@end

Modified src/OFSet_hashtable.m from [68e410fce6] to [24087ae033].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "OFArray.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"
#import "OFEnumerationMutationException.h"

#import "autorelease.h"

static void*
retain(void *value)
{
	return [(id)value retain];
}

static void







<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#import "OFArray.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"
#import "OFEnumerationMutationException.h"



static void*
retain(void *value)
{
	return [(id)value retain];
}

static void

Modified src/OFSettings.m from [4790524e18] to [390d542a71].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

#include "config.h"

#import "OFSettings.h"
#import "OFSettings_INIFile.h"
#import "OFString.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFSettings
+ alloc
{
	if (self == [OFSettings class])
		return [OFSettings_INIFile alloc];

	return [super alloc];







<
<
<







16
17
18
19
20
21
22



23
24
25
26
27
28
29

#include "config.h"

#import "OFSettings.h"
#import "OFSettings_INIFile.h"
#import "OFString.h"




@implementation OFSettings
+ alloc
{
	if (self == [OFSettings class])
		return [OFSettings_INIFile alloc];

	return [super alloc];

Modified src/OFSettings_INIFile.m from [a6dc81e428] to [26bae693c9].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "config.h"

#import "OFSettings_INIFile.h"
#import "OFString.h"
#import "OFINIFile.h"
#import "OFSystemInfo.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFSettings_INIFile
- initWithApplicationName: (OFString*)applicationName
{
	self = [super initWithApplicationName: applicationName];

	@try {
		void *pool = objc_autoreleasePoolPush();







<
<
<







17
18
19
20
21
22
23



24
25
26
27
28
29
30
#include "config.h"

#import "OFSettings_INIFile.h"
#import "OFString.h"
#import "OFINIFile.h"
#import "OFSystemInfo.h"




@implementation OFSettings_INIFile
- initWithApplicationName: (OFString*)applicationName
{
	self = [super initWithApplicationName: applicationName];

	@try {
		void *pool = objc_autoreleasePoolPush();

Modified src/OFSortedList.m from [c068ee4e05] to [6fa65d0fed].

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 * file.
 */

#include "config.h"

#import "OFSortedList.h"

#import "macros.h"

@implementation OFSortedList
- (of_list_object_t*)appendObject: (id)object
{
	OF_UNRECOGNIZED_SELECTOR
}

- (of_list_object_t*)prependObject: (id)object







<
<







14
15
16
17
18
19
20


21
22
23
24
25
26
27
 * file.
 */

#include "config.h"

#import "OFSortedList.h"



@implementation OFSortedList
- (of_list_object_t*)appendObject: (id)object
{
	OF_UNRECOGNIZED_SELECTOR
}

- (of_list_object_t*)prependObject: (id)object

Modified src/OFStdIOStream.m from [13750b442d] to [3cbe48a8b1].

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#import "OFDate.h"
#import "OFApplication.h"

#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"

#import "autorelease.h"
#import "macros.h"

OFStdIOStream *of_stdin = nil;
OFStdIOStream *of_stdout = nil;
OFStdIOStream *of_stderr = nil;

@interface OFStdIOStream (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithFileDescriptor: (int)fd;
@end







<
<
<







28
29
30
31
32
33
34



35
36
37
38
39
40
41
#import "OFDate.h"
#import "OFApplication.h"

#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"




OFStdIOStream *of_stdin = nil;
OFStdIOStream *of_stdout = nil;
OFStdIOStream *of_stderr = nil;

@interface OFStdIOStream (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithFileDescriptor: (int)fd;
@end

Modified src/OFStream+Private.h from [4c68cfbc34] to [a3b1be7f5f].

12
13
14
15
16
17
18
19
20
21
22
23
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFStream.h"

#import "macros.h"

@interface OFStream (OF_PRIVATE_CATEGORY)
- (bool)OF_isWaitingForDelimiter;
@end







<
<



12
13
14
15
16
17
18


19
20
21
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFStream.h"



@interface OFStream (OF_PRIVATE_CATEGORY)
- (bool)OF_isWaitingForDelimiter;
@end

Modified src/OFStream.m from [6cbe514a9d] to [8ee1cb7e9e].

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

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfRangeException.h"
#import "OFSetOptionFailedException.h"

#import "macros.h"
#import "of_asprintf.h"

@implementation OFStream
#ifndef _WIN32
+ (void)initialize
{
	if (self == [OFStream class])







<







41
42
43
44
45
46
47

48
49
50
51
52
53
54

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfRangeException.h"
#import "OFSetOptionFailedException.h"


#import "of_asprintf.h"

@implementation OFStream
#ifndef _WIN32
+ (void)initialize
{
	if (self == [OFStream class])

Modified src/OFString+Hashing.m from [18dda25665] to [ec17a0338c].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "config.h"

#import "OFString.h"
#import "OFHash.h"
#import "OFMD5Hash.h"
#import "OFSHA1Hash.h"

#import "autorelease.h"

int _OFString_Hashing_reference;

@implementation OFString (Hashing)
- (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass
{
	void *pool = objc_autoreleasePoolPush();
	id <OFHash> hash = [hashClass hash];







<
<







17
18
19
20
21
22
23


24
25
26
27
28
29
30
#include "config.h"

#import "OFString.h"
#import "OFHash.h"
#import "OFMD5Hash.h"
#import "OFSHA1Hash.h"



int _OFString_Hashing_reference;

@implementation OFString (Hashing)
- (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass
{
	void *pool = objc_autoreleasePoolPush();
	id <OFHash> hash = [hashClass hash];

Modified src/OFString+JSONValue.m from [848285d233] to [f9c7af6229].

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFNumber.h"
#import "OFNull.h"

#import "OFInvalidJSONException.h"

#import "macros.h"

int _OFString_JSONValue_reference;

static id nextObject(const char *restrict *, const char*,
    size_t *restrict line, size_t depth, size_t depthLimit);

static void
skipWhitespaces(const char *restrict *pointer, const char *stop,







<
<







27
28
29
30
31
32
33


34
35
36
37
38
39
40
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFNumber.h"
#import "OFNull.h"

#import "OFInvalidJSONException.h"



int _OFString_JSONValue_reference;

static id nextObject(const char *restrict *, const char*,
    size_t *restrict line, size_t depth, size_t depthLimit);

static void
skipWhitespaces(const char *restrict *pointer, const char *stop,

Modified src/OFString+Serialization.m from [95a3da2531] to [bcbbdef2c4].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "OFXMLAttribute.h"

#import "OFInvalidArgumentException.h"
#import "OFMalformedXMLException.h"
#import "OFUnboundNamespaceException.h"
#import "OFUnsupportedVersionException.h"

#import "autorelease.h"

int _OFString_Serialization_reference;

@implementation OFString (Serialization)
- (id)objectByDeserializing
{
	void *pool = objc_autoreleasePoolPush();
	OFXMLElement *root;







<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#import "OFXMLAttribute.h"

#import "OFInvalidArgumentException.h"
#import "OFMalformedXMLException.h"
#import "OFUnboundNamespaceException.h"
#import "OFUnsupportedVersionException.h"



int _OFString_Serialization_reference;

@implementation OFString (Serialization)
- (id)objectByDeserializing
{
	void *pool = objc_autoreleasePoolPush();
	OFXMLElement *root;

Modified src/OFString+XMLUnescaping.m from [9ce8dfa504] to [196faf3bb5].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

#include <string.h>

#import "OFString.h"

#import "OFInvalidFormatException.h"

#import "autorelease.h"
#import "macros.h"

int _OFString_XMLUnescaping_reference;

static OF_INLINE OFString*
parseNumericEntity(const char *entity, size_t length)
{
	of_unichar_t c;
	size_t i;







<
<
<







18
19
20
21
22
23
24



25
26
27
28
29
30
31

#include <string.h>

#import "OFString.h"

#import "OFInvalidFormatException.h"




int _OFString_XMLUnescaping_reference;

static OF_INLINE OFString*
parseNumericEntity(const char *entity, size_t length)
{
	of_unichar_t c;
	size_t i;

Modified src/OFString.m from [78d8e753df] to [c9e153f6dd].

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#import "OFNotImplementedException.h"
#import "OFOpenFileFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"

#import "autorelease.h"
#import "macros.h"
#import "of_asprintf.h"
#import "unicode.h"

/*
 * It seems strtod is buggy on Win32.
 * However, the MinGW version __strtod seems to be ok.
 */







<
<







50
51
52
53
54
55
56


57
58
59
60
61
62
63
#import "OFNotImplementedException.h"
#import "OFOpenFileFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"



#import "of_asprintf.h"
#import "unicode.h"

/*
 * It seems strtod is buggy on Win32.
 * However, the MinGW version __strtod seems to be ok.
 */

Modified src/OFString_UTF8+Private.h from [01c19d493d] to [356a632e3b].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString_UTF8.h"

#import "macros.h"

@interface OFString_UTF8 (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithUTF8String: (const char*)UTF8String
			       length: (size_t)UTF8StringLength
			      storage: (char*)storage;
@end







<
<





12
13
14
15
16
17
18


19
20
21
22
23
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString_UTF8.h"



@interface OFString_UTF8 (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithUTF8String: (const char*)UTF8String
			       length: (size_t)UTF8StringLength
			      storage: (char*)storage;
@end

Modified src/OFString_UTF8.m from [26025dccab] to [60dc6c49fb].

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"
#import "of_asprintf.h"
#import "unicode.h"

extern const of_char16_t of_iso_8859_15[128];
extern const of_char16_t of_windows_1252[128];
extern const of_char16_t of_codepage_437[128];








<
<







31
32
33
34
35
36
37


38
39
40
41
42
43
44
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"



#import "of_asprintf.h"
#import "unicode.h"

extern const of_char16_t of_iso_8859_15[128];
extern const of_char16_t of_windows_1252[128];
extern const of_char16_t of_codepage_437[128];

Modified src/OFSystemInfo.m from [99dd897c16] to [2cb1c686e3].

30
31
32
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
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFApplication.h"

#import "OFNotImplementedException.h"

#import "autorelease.h"
#import "macros.h"

#ifdef __APPLE__
# include <NSSystemDirectories.h>
#endif

#ifdef _WIN32
# include <windows.h>
#endif

#ifdef __HAIKU__
# include <FindDirectory.h>
#endif

#ifdef __QNX__
# include <sys/syspage.h>
#endif

static size_t pageSize;
static size_t numberOfCPUs;








<
<
<



<



<



<







30
31
32
33
34
35
36



37
38
39

40
41
42

43
44
45

46
47
48
49
50
51
52
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFApplication.h"

#import "OFNotImplementedException.h"




#ifdef __APPLE__
# include <NSSystemDirectories.h>
#endif

#ifdef _WIN32
# include <windows.h>
#endif

#ifdef __HAIKU__
# include <FindDirectory.h>
#endif

#ifdef __QNX__
# include <sys/syspage.h>
#endif

static size_t pageSize;
static size_t numberOfCPUs;

Modified src/OFTCPSocket.m from [3b9e3e0a34] to [dc50295dfd].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#import "OFInvalidArgumentException.h"
#import "OFListenFailedException.h"
#import "OFNotConnectedException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfMemoryException.h"
#import "OFSetOptionFailedException.h"

#import "autorelease.h"
#import "macros.h"
#import "resolver.h"
#import "socket_helpers.h"

/* References for static linking */
void _references_to_categories_of_OFTCPSocket(void)
{
	_OFTCPSocket_SOCKS5_reference = 1;







<
<







39
40
41
42
43
44
45


46
47
48
49
50
51
52
#import "OFInvalidArgumentException.h"
#import "OFListenFailedException.h"
#import "OFNotConnectedException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfMemoryException.h"
#import "OFSetOptionFailedException.h"



#import "resolver.h"
#import "socket_helpers.h"

/* References for static linking */
void _references_to_categories_of_OFTCPSocket(void)
{
	_OFTCPSocket_SOCKS5_reference = 1;

Modified src/OFThread+Private.h from [9f2c900420] to [cf8fa48c2c].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFThread.h"

#import "macros.h"

#ifdef OF_HAVE_THREADS
@interface OFThread (OF_PRIVATE_CATEGORY)
+ (void)OF_createMainThread;
@end
#endif







<
<





12
13
14
15
16
17
18


19
20
21
22
23
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFThread.h"



#ifdef OF_HAVE_THREADS
@interface OFThread (OF_PRIVATE_CATEGORY)
+ (void)OF_createMainThread;
@end
#endif

Modified src/OFThread.m from [57ac3c2fe7] to [fc3b904999].

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# import "OFThreadStartFailedException.h"
# import "OFThreadStillRunningException.h"
#endif

#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif
#import "autorelease.h"
#import "macros.h"

#ifdef __DJGPP__
# define lrint(x) rint(x)
# define useconds_t unsigned int
#endif

#ifdef OF_HAVE_THREADS







<
<







68
69
70
71
72
73
74


75
76
77
78
79
80
81
# import "OFThreadStartFailedException.h"
# import "OFThreadStillRunningException.h"
#endif

#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif



#ifdef __DJGPP__
# define lrint(x) rint(x)
# define useconds_t unsigned int
#endif

#ifdef OF_HAVE_THREADS

Modified src/OFThreadPool.m from [2aadc2da3a] to [c1f2526e6a].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#import "OFThreadPool.h"
#import "OFArray.h"
#import "OFList.h"
#import "OFThread.h"
#import "OFCondition.h"
#import "OFSystemInfo.h"

#import "autorelease.h"

@interface OFThreadPoolJob: OFObject
{
	id _target;
	SEL _selector;
	id _object;
#ifdef OF_HAVE_BLOCKS
	of_thread_pool_block_t _block;







<
<







19
20
21
22
23
24
25


26
27
28
29
30
31
32
#import "OFThreadPool.h"
#import "OFArray.h"
#import "OFList.h"
#import "OFThread.h"
#import "OFCondition.h"
#import "OFSystemInfo.h"



@interface OFThreadPoolJob: OFObject
{
	id _target;
	SEL _selector;
	id _object;
#ifdef OF_HAVE_BLOCKS
	of_thread_pool_block_t _block;

Modified src/OFTimer+Private.h from [7aa09bfabb] to [5cf7455065].

12
13
14
15
16
17
18
19
20
21
22
23
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFTimer.h"

#import "macros.h"

@interface OFTimer (OF_PRIVATE_CATEGORY)
- (void)OF_setInRunLoop: (OFRunLoop*)inRunLoop;
@end







<
<



12
13
14
15
16
17
18


19
20
21
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFTimer.h"



@interface OFTimer (OF_PRIVATE_CATEGORY)
- (void)OF_setInRunLoop: (OFRunLoop*)inRunLoop;
@end

Modified src/OFTimer.m from [530e886394] to [3ae679cd77].

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#import "OFRunLoop+Private.h"
#ifdef OF_HAVE_THREADS
# import "OFCondition.h"
#endif

#import "OFInvalidArgumentException.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFTimer
+ (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval
					target: (id)target
				      selector: (SEL)selector
				       repeats: (bool)repeats
{
	void *pool = objc_autoreleasePoolPush();







<
<
<







27
28
29
30
31
32
33



34
35
36
37
38
39
40
#import "OFRunLoop+Private.h"
#ifdef OF_HAVE_THREADS
# import "OFCondition.h"
#endif

#import "OFInvalidArgumentException.h"




@implementation OFTimer
+ (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval
					target: (id)target
				      selector: (SEL)selector
				       repeats: (bool)repeats
{
	void *pool = objc_autoreleasePoolPush();

Modified src/OFUDPSocket.m from [473e259227] to [2b1705fa68].

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFNotConnectedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"

#import "autorelease.h"
#import "macros.h"
#import "resolver.h"
#import "socket_helpers.h"

#ifdef __wii__
static uint16_t freePort = 65532;
#endif








<
<







31
32
33
34
35
36
37


38
39
40
41
42
43
44
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFNotConnectedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"



#import "resolver.h"
#import "socket_helpers.h"

#ifdef __wii__
static uint16_t freePort = 65532;
#endif

Modified src/OFURL.m from [50139ad3bd] to [bcc6187243].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#import "OFArray.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFURL
+ (instancetype)URL
{
	return [[[self alloc] init] autorelease];
}

+ (instancetype)URLWithString: (OFString*)string







<
<
<







24
25
26
27
28
29
30



31
32
33
34
35
36
37
#import "OFArray.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfMemoryException.h"




@implementation OFURL
+ (instancetype)URL
{
	return [[[self alloc] init] autorelease];
}

+ (instancetype)URLWithString: (OFString*)string

Modified src/OFXMLAttribute.m from [15d4c89e57] to [5edd5a2978].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFXMLAttribute.h"
#import "OFString.h"
#import "OFDictionary.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"
#import "macros.h"

@implementation OFXMLAttribute
+ (instancetype)attributeWithName: (OFString*)name
			namespace: (OFString*)namespace
		      stringValue: (OFString*)stringValue
{
	return [[[self alloc] initWithName: name
				 namespace: namespace







<
<
<







19
20
21
22
23
24
25



26
27
28
29
30
31
32
#import "OFXMLAttribute.h"
#import "OFString.h"
#import "OFDictionary.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"




@implementation OFXMLAttribute
+ (instancetype)attributeWithName: (OFString*)name
			namespace: (OFString*)namespace
		      stringValue: (OFString*)stringValue
{
	return [[[self alloc] initWithName: name
				 namespace: namespace

Modified src/OFXMLCDATA.m from [9d629883bd] to [2f0fb15669].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#import "OFXMLCDATA.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

@implementation OFXMLCDATA
+ (instancetype)CDATAWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string







<
<







18
19
20
21
22
23
24


25
26
27
28
29
30
31

#import "OFXMLCDATA.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"



@implementation OFXMLCDATA
+ (instancetype)CDATAWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string

Modified src/OFXMLCharacters.m from [a711001bc8] to [b46ce4ea79].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#import "OFXMLCharacters.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

@implementation OFXMLCharacters
+ (instancetype)charactersWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string







<
<







18
19
20
21
22
23
24


25
26
27
28
29
30
31

#import "OFXMLCharacters.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"



@implementation OFXMLCharacters
+ (instancetype)charactersWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string

Modified src/OFXMLComment.m from [88a264cbd8] to [463d3b45a9].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#import "OFXMLComment.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

@implementation OFXMLComment
+ (instancetype)commentWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string







<
<







20
21
22
23
24
25
26


27
28
29
30
31
32
33

#import "OFXMLComment.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"



@implementation OFXMLComment
+ (instancetype)commentWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string

Modified src/OFXMLElement+Serialization.m from [f2800c9eb6] to [9f69c54430].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFXMLElement.h"
#import "OFXMLElement+Serialization.h"
#import "OFSerialization.h"
#import "OFString.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"
#import "macros.h"

int _OFXMLElement_Serialization_reference;

@implementation OFXMLElement (Serialization)
- (id)objectByDeserializing
{
	void *pool = objc_autoreleasePoolPush();
	Class class;







<
<
<







19
20
21
22
23
24
25



26
27
28
29
30
31
32
#import "OFXMLElement.h"
#import "OFXMLElement+Serialization.h"
#import "OFSerialization.h"
#import "OFString.h"

#import "OFInvalidArgumentException.h"




int _OFXMLElement_Serialization_reference;

@implementation OFXMLElement (Serialization)
- (id)objectByDeserializing
{
	void *pool = objc_autoreleasePoolPush();
	Class class;

Modified src/OFXMLElement.m from [9625f21669] to [580c49cc96].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import "OFXMLElementBuilder.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFMalformedXMLException.h"
#import "OFUnboundNamespaceException.h"

#import "autorelease.h"
#import "macros.h"

/* References for static linking */
void _references_to_categories_of_OFXMLElement(void)
{
	_OFXMLElement_Serialization_reference = 1;
}

static Class charactersClass = Nil;







<
<
<







33
34
35
36
37
38
39



40
41
42
43
44
45
46
#import "OFXMLElementBuilder.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFMalformedXMLException.h"
#import "OFUnboundNamespaceException.h"




/* References for static linking */
void _references_to_categories_of_OFXMLElement(void)
{
	_OFXMLElement_Serialization_reference = 1;
}

static Class charactersClass = Nil;

Modified src/OFXMLElementBuilder.m from [119bcfbb79] to [da7871c822].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "OFXMLComment.h"
#import "OFXMLProcessingInstructions.h"
#import "OFXMLParser.h"
#import "OFArray.h"

#import "OFMalformedXMLException.h"

#import "macros.h"

@implementation OFXMLElementBuilder
+ (instancetype)elementBuilder
{
	return [[[self alloc] init] autorelease];
}

- init







<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#import "OFXMLComment.h"
#import "OFXMLProcessingInstructions.h"
#import "OFXMLParser.h"
#import "OFArray.h"

#import "OFMalformedXMLException.h"



@implementation OFXMLElementBuilder
+ (instancetype)elementBuilder
{
	return [[[self alloc] init] autorelease];
}

- init

Modified src/OFXMLNode.m from [b9283daef7] to [90b24c9f4c].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 */

#include "config.h"

#import "OFXMLNode.h"
#import "OFString.h"

#import "macros.h"

@implementation OFXMLNode
- initWithSerialization: (OFXMLElement*)element
{
	OF_INVALID_INIT_METHOD
}

- (OFString*)stringValue







<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
 */

#include "config.h"

#import "OFXMLNode.h"
#import "OFString.h"



@implementation OFXMLNode
- initWithSerialization: (OFXMLElement*)element
{
	OF_INVALID_INIT_METHOD
}

- (OFString*)stringValue

Modified src/OFXMLParser.m from [75261e507a] to [006e6e5905].

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#endif
#import "OFSystemInfo.h"

#import "OFInitializationFailedException.h"
#import "OFMalformedXMLException.h"
#import "OFUnboundPrefixException.h"

#import "autorelease.h"
#import "macros.h"

typedef void (*state_function)(id, SEL);
static SEL selectors[OF_XMLPARSER_NUM_STATES];
static state_function lookupTable[OF_XMLPARSER_NUM_STATES];

static OF_INLINE void
appendToBuffer(OFDataArray *buffer, const char *string,
    of_string_encoding_t encoding, size_t length)
{
	if (OF_LIKELY(encoding == OF_STRING_ENCODING_UTF_8))
		[buffer addItems: string







<
<
<
|

|







32
33
34
35
36
37
38



39
40
41
42
43
44
45
46
47
48
#endif
#import "OFSystemInfo.h"

#import "OFInitializationFailedException.h"
#import "OFMalformedXMLException.h"
#import "OFUnboundPrefixException.h"




typedef void (*state_function_t)(id, SEL);
static SEL selectors[OF_XMLPARSER_NUM_STATES];
static state_function_t lookupTable[OF_XMLPARSER_NUM_STATES];

static OF_INLINE void
appendToBuffer(OFDataArray *buffer, const char *string,
    of_string_encoding_t encoding, size_t length)
{
	if (OF_LIKELY(encoding == OF_STRING_ENCODING_UTF_8))
		[buffer addItems: string
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
	memcpy(selectors, selectors_, sizeof(selectors_));

	for (i = 0; i < OF_XMLPARSER_NUM_STATES; i++) {
		if (![self instancesRespondToSelector: selectors[i]])
			@throw [OFInitializationFailedException
			    exceptionWithClass: self];

		lookupTable[i] = (state_function)
		    [self instanceMethodForSelector: selectors[i]];
	}
}

+ (instancetype)parser
{
	return [[[self alloc] init] autorelease];







|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
	memcpy(selectors, selectors_, sizeof(selectors_));

	for (i = 0; i < OF_XMLPARSER_NUM_STATES; i++) {
		if (![self instancesRespondToSelector: selectors[i]])
			@throw [OFInitializationFailedException
			    exceptionWithClass: self];

		lookupTable[i] = (state_function_t)
		    [self instanceMethodForSelector: selectors[i]];
	}
}

+ (instancetype)parser
{
	return [[[self alloc] init] autorelease];

Modified src/OFXMLProcessingInstructions.m from [4fb0c9bf2e] to [88a227947b].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#import "OFXMLProcessingInstructions.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

@implementation OFXMLProcessingInstructions
+ (instancetype)processingInstructionsWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string







<
<







20
21
22
23
24
25
26


27
28
29
30
31
32
33

#import "OFXMLProcessingInstructions.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"



@implementation OFXMLProcessingInstructions
+ (instancetype)processingInstructionsWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

- initWithString: (OFString*)string

Modified src/OFZIPArchive.m from [dff17fc4c0] to [e1f5b7ea93].

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#import "OFNotImplementedException.h"
#import "OFOpenFileFailedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFSeekFailedException.h"
#import "OFUnsupportedVersionException.h"

#import "autorelease.h"
#import "macros.h"

#define CRC32_MAGIC 0xEDB88320

/*
 * FIXME: Current limitations:
 *  - Split archives are not supported.
 *  - Write support is missing.
 *  - The ZIP has to be a file on the local file system.







<
<
<







32
33
34
35
36
37
38



39
40
41
42
43
44
45
#import "OFNotImplementedException.h"
#import "OFOpenFileFailedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFSeekFailedException.h"
#import "OFUnsupportedVersionException.h"




#define CRC32_MAGIC 0xEDB88320

/*
 * FIXME: Current limitations:
 *  - Split archives are not supported.
 *  - Write support is missing.
 *  - The ZIP has to be a file on the local file system.

Modified src/OFZIPArchiveEntry+Private.h from [b4739fadc1] to [a6d0709e96].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFZIPArchive.h"

#import "macros.h"

@interface OFZIPArchiveEntry (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithFile: (OFFile*)file;
- (uint16_t)OF_generalPurposeBitFlag;
- (uint16_t)OF_lastModifiedFileTime;
- (uint16_t)OF_lastModifiedFileDate;
- (uint64_t)OF_localFileHeaderOffset;
@end







<
<







12
13
14
15
16
17
18


19
20
21
22
23
24
25
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFZIPArchive.h"



@interface OFZIPArchiveEntry (OF_PRIVATE_CATEGORY)
- (instancetype)OF_initWithFile: (OFFile*)file;
- (uint16_t)OF_generalPurposeBitFlag;
- (uint16_t)OF_lastModifiedFileTime;
- (uint16_t)OF_lastModifiedFileDate;
- (uint64_t)OF_localFileHeaderOffset;
@end

Modified src/OFZIPArchiveEntry.m from [35f57b5408] to [f67f7363c8].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFZIPArchiveEntry.h"
#import "OFZIPArchiveEntry+Private.h"
#import "OFString.h"
#import "OFDataArray.h"
#import "OFFile.h"
#import "OFDate.h"

#import "autorelease.h"
#import "macros.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"

extern uint32_t of_zip_archive_read_field32(uint8_t**, uint16_t*);
extern uint64_t of_zip_archive_read_field64(uint8_t**, uint16_t*);

OFString*







<
<
<







19
20
21
22
23
24
25



26
27
28
29
30
31
32
#import "OFZIPArchiveEntry.h"
#import "OFZIPArchiveEntry+Private.h"
#import "OFString.h"
#import "OFDataArray.h"
#import "OFFile.h"
#import "OFDate.h"




#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"

extern uint32_t of_zip_archive_read_field32(uint8_t**, uint16_t*);
extern uint64_t of_zip_archive_read_field64(uint8_t**, uint16_t*);

OFString*

Modified src/ObjFW.h from [79328b56d1] to [06bed39988].

156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#import "OFTruncatedDataException.h"
#import "OFUnboundNamespaceException.h"
#import "OFUnlockFailedException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFUnsupportedVersionException.h"
#import "OFWriteFailedException.h"

#import "macros.h"

#ifdef OF_HAVE_PLUGINS
# import "OFPlugin.h"
#endif

#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif

#import "OFLocking.h"
#import "OFThread.h"
#ifdef OF_HAVE_THREADS
# import "threading.h"
# import "OFThreadPool.h"
# import "OFMutex.h"
# import "OFRecursiveMutex.h"
# import "OFCondition.h"
#endif

#import "autorelease.h"
#import "asprintf.h"
#import "base64.h"
#import "of_asprintf.h"
#import "of_strptime.h"
#ifdef OF_HAVE_SOCKETS
# import "resolver.h"
#endif







<
<


















<







156
157
158
159
160
161
162


163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

181
182
183
184
185
186
187
#import "OFTruncatedDataException.h"
#import "OFUnboundNamespaceException.h"
#import "OFUnlockFailedException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFUnsupportedVersionException.h"
#import "OFWriteFailedException.h"



#ifdef OF_HAVE_PLUGINS
# import "OFPlugin.h"
#endif

#ifdef OF_HAVE_ATOMIC_OPS
# import "atomic.h"
#endif

#import "OFLocking.h"
#import "OFThread.h"
#ifdef OF_HAVE_THREADS
# import "threading.h"
# import "OFThreadPool.h"
# import "OFMutex.h"
# import "OFRecursiveMutex.h"
# import "OFCondition.h"
#endif


#import "asprintf.h"
#import "base64.h"
#import "of_asprintf.h"
#import "of_strptime.h"
#ifdef OF_HAVE_SOCKETS
# import "resolver.h"
#endif

Modified src/autorelease.m from [3bbb1328d7] to [25db58e712].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

#import "OFObject.h"
#import "OFSystemInfo.h"

#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
# import "threading.h"
#endif
#import "macros.h"

#import "autorelease.h"

#if defined(OF_HAVE_COMPILER_TLS)
static thread_local id *objects = NULL;
static thread_local id *top = NULL;
static thread_local size_t size = 0;
#elif defined(OF_HAVE_THREADS)
static of_tlskey_t objectsKey, topKey, sizeKey;







<
<
<







21
22
23
24
25
26
27



28
29
30
31
32
33
34

#import "OFObject.h"
#import "OFSystemInfo.h"

#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
# import "threading.h"
#endif




#if defined(OF_HAVE_COMPILER_TLS)
static thread_local id *objects = NULL;
static thread_local id *top = NULL;
static thread_local size_t size = 0;
#elif defined(OF_HAVE_THREADS)
static of_tlskey_t objectsKey, topKey, sizeKey;

Modified src/codepage_437.m from [47788b36f8] to [a2c17327ad].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString.h"

#import "macros.h"

const of_char16_t of_codepage_437[128] = {
	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
	0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
	0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
	0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
	0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,







<
<







12
13
14
15
16
17
18


19
20
21
22
23
24
25
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString.h"



const of_char16_t of_codepage_437[128] = {
	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
	0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
	0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
	0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
	0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,

Modified src/exceptions/OFAcceptFailedException.m from [36ac9f1562] to [cc6678dd71].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFAcceptFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFAcceptFailedException
+ (instancetype)exceptionWithSocket: (id)socket
{
	return [[[self alloc] initWithSocket: socket] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFAcceptFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFAcceptFailedException
+ (instancetype)exceptionWithSocket: (id)socket
{
	return [[[self alloc] initWithSocket: socket] autorelease];
}

Modified src/exceptions/OFAddressTranslationFailedException.m from [978b1ac512] to [35959c301f].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFAddressTranslationFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFAddressTranslationFailedException
+ (instancetype)exceptionWithHost: (OFString*)host
{
	return [[[self alloc] initWithHost: host] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFAddressTranslationFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFAddressTranslationFailedException
+ (instancetype)exceptionWithHost: (OFString*)host
{
	return [[[self alloc] initWithHost: host] autorelease];
}

Modified src/exceptions/OFAllocFailedException.m from [ce02c643d6] to [1b470ab29b].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 */

#include "config.h"

#import "OFAllocFailedException.h"
#import "OFString.h"

#import "macros.h"

@implementation OFAllocFailedException
+ alloc
{
	OF_UNRECOGNIZED_SELECTOR
}

- init







<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
 */

#include "config.h"

#import "OFAllocFailedException.h"
#import "OFString.h"



@implementation OFAllocFailedException
+ alloc
{
	OF_UNRECOGNIZED_SELECTOR
}

- init

Modified src/exceptions/OFBindFailedException.m from [7ed64ab589] to [b53cdc515d].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFBindFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFBindFailedException
+ (instancetype)exceptionWithHost: (OFString*)host
			     port: (uint16_t)port
			   socket: (id)socket
{
	return [[[self alloc] initWithHost: host







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFBindFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFBindFailedException
+ (instancetype)exceptionWithHost: (OFString*)host
			     port: (uint16_t)port
			   socket: (id)socket
{
	return [[[self alloc] initWithHost: host

Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.m from [799a39b3c9] to [55707773de].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFChangeCurrentDirectoryPathFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFChangeCurrentDirectoryPathFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFChangeCurrentDirectoryPathFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFChangeCurrentDirectoryPathFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}

Modified src/exceptions/OFChangeOwnerFailedException.m from [8857e6e8df] to [a5a8e3d566].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFChangeOwnerFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

#ifdef OF_HAVE_CHOWN
@implementation OFChangeOwnerFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
			    owner: (OFString*)owner
			    group: (OFString*)group
{







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFChangeOwnerFailedException.h"
#import "OFString.h"

#import "common.h"


#ifdef OF_HAVE_CHOWN
@implementation OFChangeOwnerFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
			    owner: (OFString*)owner
			    group: (OFString*)group
{

Modified src/exceptions/OFChangePermissionsFailedException.m from [f46d90e9ae] to [adc72ba6e6].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFChangePermissionsFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFChangePermissionsFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
		      permissions: (mode_t)permissions
{
	return [[[self alloc] initWithPath: path
			       permissions: permissions] autorelease];







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFChangePermissionsFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFChangePermissionsFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
		      permissions: (mode_t)permissions
{
	return [[[self alloc] initWithPath: path
			       permissions: permissions] autorelease];

Modified src/exceptions/OFConditionBroadcastFailedException.m from [1318cb166f] to [9466ba9e8b].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "config.h"

#import "OFConditionBroadcastFailedException.h"
#import "OFString.h"
#import "OFCondition.h"

#import "macros.h"

@implementation OFConditionBroadcastFailedException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#include "config.h"

#import "OFConditionBroadcastFailedException.h"
#import "OFString.h"
#import "OFCondition.h"



@implementation OFConditionBroadcastFailedException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init

Modified src/exceptions/OFConditionSignalFailedException.m from [7b4c7fc683] to [f1eb914ce2].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "config.h"

#import "OFConditionSignalFailedException.h"
#import "OFString.h"
#import "OFCondition.h"

#import "macros.h"

@implementation OFConditionSignalFailedException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#include "config.h"

#import "OFConditionSignalFailedException.h"
#import "OFString.h"
#import "OFCondition.h"



@implementation OFConditionSignalFailedException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init

Modified src/exceptions/OFConditionStillWaitingException.m from [21a716b9ae] to [3f74049866].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "config.h"

#import "OFConditionStillWaitingException.h"
#import "OFString.h"
#import "OFCondition.h"

#import "macros.h"

@implementation OFConditionStillWaitingException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#include "config.h"

#import "OFConditionStillWaitingException.h"
#import "OFString.h"
#import "OFCondition.h"



@implementation OFConditionStillWaitingException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init

Modified src/exceptions/OFConditionWaitFailedException.m from [90cb478e3d] to [add01946fb].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "config.h"

#import "OFConditionWaitFailedException.h"
#import "OFString.h"
#import "OFCondition.h"

#import "macros.h"

@implementation OFConditionWaitFailedException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#include "config.h"

#import "OFConditionWaitFailedException.h"
#import "OFString.h"
#import "OFCondition.h"



@implementation OFConditionWaitFailedException
+ (instancetype)exceptionWithCondition: (OFCondition*)condition
{
	return [[[self alloc] initWithCondition: condition] autorelease];
}

- init

Modified src/exceptions/OFConnectionFailedException.m from [9a3aa0b1c9] to [72c4bcebf0].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFConnectionFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFConnectionFailedException
+ (instancetype)exceptionWithHost: (OFString*)host
			     port: (uint16_t)port
			   socket: (id)socket
{
	return [[[self alloc] initWithHost: host







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFConnectionFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFConnectionFailedException
+ (instancetype)exceptionWithHost: (OFString*)host
			     port: (uint16_t)port
			   socket: (id)socket
{
	return [[[self alloc] initWithHost: host

Modified src/exceptions/OFCopyItemFailedException.m from [62c565d7ab] to [d6b33a978d].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFCopyItemFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFCopyItemFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath
				 destinationPath: destinationPath] autorelease];







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFCopyItemFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFCopyItemFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath
				 destinationPath: destinationPath] autorelease];

Modified src/exceptions/OFCreateDirectoryFailedException.m from [040122b5d2] to [d129c0ab15].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFCreateDirectoryFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFCreateDirectoryFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFCreateDirectoryFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFCreateDirectoryFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}

Modified src/exceptions/OFCreateSymbolicLinkFailedException.m from [e0ac6f7a61] to [96a5e229ae].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFCreateSymbolicLinkFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

#ifdef OF_HAVE_SYMLINK
@implementation OFCreateSymbolicLinkFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFCreateSymbolicLinkFailedException.h"
#import "OFString.h"

#import "common.h"


#ifdef OF_HAVE_SYMLINK
@implementation OFCreateSymbolicLinkFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath

Modified src/exceptions/OFEnumerationMutationException.m from [0218ad9aca] to [9c1e59cdb6].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFEnumerationMutationException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFEnumerationMutationException
+ (instancetype)exceptionWithObject: (id)object
{
	return [[[self alloc] initWithObject: object] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFEnumerationMutationException.h"
#import "OFString.h"

#import "common.h"


@implementation OFEnumerationMutationException
+ (instancetype)exceptionWithObject: (id)object
{
	return [[[self alloc] initWithObject: object] autorelease];
}

Modified src/exceptions/OFException.m from [d55e878757] to [fa215236ea].

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# include <dlfcn.h>
#endif

#import "OFException.h"
#import "OFString.h"
#import "OFArray.h"

#import "autorelease.h"

#if defined(_WIN32) && defined(OF_HAVE_SOCKETS)
# include <errno.h>
# include <winerror.h>
#endif

/*
 * Define HAVE_DWARF_EXCEPTIONS if OBJC_ZEROCOST_EXCEPTIONS is defined, but







<
<







22
23
24
25
26
27
28


29
30
31
32
33
34
35
# include <dlfcn.h>
#endif

#import "OFException.h"
#import "OFString.h"
#import "OFArray.h"



#if defined(_WIN32) && defined(OF_HAVE_SOCKETS)
# include <errno.h>
# include <winerror.h>
#endif

/*
 * Define HAVE_DWARF_EXCEPTIONS if OBJC_ZEROCOST_EXCEPTIONS is defined, but

Modified src/exceptions/OFHTTPRequestFailedException.m from [836d5fe377] to [8b0d092fc3].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

#import "OFHTTPRequestFailedException.h"
#import "OFString.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"

#import "common.h"
#import "macros.h"

@implementation OFHTTPRequestFailedException
+ (instancetype)exceptionWithRequest: (OFHTTPRequest*)request
			    response: (OFHTTPResponse*)response
{
	return [[[self alloc] initWithRequest: request
				     response: response] autorelease];







<







18
19
20
21
22
23
24

25
26
27
28
29
30
31

#import "OFHTTPRequestFailedException.h"
#import "OFString.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"

#import "common.h"


@implementation OFHTTPRequestFailedException
+ (instancetype)exceptionWithRequest: (OFHTTPRequest*)request
			    response: (OFHTTPResponse*)response
{
	return [[[self alloc] initWithRequest: request
				     response: response] autorelease];

Modified src/exceptions/OFHashAlreadyCalculatedException.m from [09e1024e5c] to [fe14d7295f].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFHashAlreadyCalculatedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFHashAlreadyCalculatedException
+ (instancetype)exceptionWithHash: (id <OFHash>)hash
{
	return [[[self alloc] initWithHash: hash] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFHashAlreadyCalculatedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFHashAlreadyCalculatedException
+ (instancetype)exceptionWithHash: (id <OFHash>)hash
{
	return [[[self alloc] initWithHash: hash] autorelease];
}

Modified src/exceptions/OFInitializationFailedException.m from [051b8ce663] to [750ee7954f].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFInitializationFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFInitializationFailedException
+ (instancetype)exceptionWithClass: (Class)class
{
	return [[[self alloc] initWithClass: class] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFInitializationFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFInitializationFailedException
+ (instancetype)exceptionWithClass: (Class)class
{
	return [[[self alloc] initWithClass: class] autorelease];
}

Modified src/exceptions/OFInvalidJSONException.m from [a9ed2cf61c] to [d868e0b6fe].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 */

#include "config.h"

#import "OFInvalidJSONException.h"
#import "OFString.h"

#import "macros.h"

@implementation OFInvalidJSONException
+ (instancetype)exceptionWithString: (OFString*)string
			       line: (size_t)line
{
	return [[[self alloc] initWithString: string
					line: line] autorelease];
}







<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
 */

#include "config.h"

#import "OFInvalidJSONException.h"
#import "OFString.h"



@implementation OFInvalidJSONException
+ (instancetype)exceptionWithString: (OFString*)string
			       line: (size_t)line
{
	return [[[self alloc] initWithString: string
					line: line] autorelease];
}

Modified src/exceptions/OFLinkFailedException.m from [66ba4d7d8a] to [48c8309787].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFLinkFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

#ifdef OF_HAVE_LINK
@implementation OFLinkFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFLinkFailedException.h"
#import "OFString.h"

#import "common.h"


#ifdef OF_HAVE_LINK
@implementation OFLinkFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath

Modified src/exceptions/OFListenFailedException.m from [b2b7b98b39] to [051386808a].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFListenFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFListenFailedException
+ (instancetype)exceptionWithSocket: (id)socket
			    backLog: (int)backLog
{
	return [[[self alloc] initWithSocket: socket
				     backLog: backLog] autorelease];







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFListenFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFListenFailedException
+ (instancetype)exceptionWithSocket: (id)socket
			    backLog: (int)backLog
{
	return [[[self alloc] initWithSocket: socket
				     backLog: backLog] autorelease];

Modified src/exceptions/OFMemoryNotPartOfObjectException.m from [3efb7e828b] to [9338731956].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 */

#include "config.h"

#import "OFMemoryNotPartOfObjectException.h"
#import "OFString.h"

#import "macros.h"

@implementation OFMemoryNotPartOfObjectException
+ (instancetype)exceptionWithPointer: (void*)pointer
			      object: (id)object
{
	return [[[self alloc] initWithPointer: pointer
				       object: object] autorelease];
}







<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
 */

#include "config.h"

#import "OFMemoryNotPartOfObjectException.h"
#import "OFString.h"



@implementation OFMemoryNotPartOfObjectException
+ (instancetype)exceptionWithPointer: (void*)pointer
			      object: (id)object
{
	return [[[self alloc] initWithPointer: pointer
				       object: object] autorelease];
}

Modified src/exceptions/OFMoveItemFailedException.m from [6a8711fd82] to [2e3b735bfd].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFMoveItemFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFMoveItemFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath
				 destinationPath: destinationPath] autorelease];







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFMoveItemFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFMoveItemFailedException
+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath
			destinationPath: (OFString*)destinationPath
{
	return [[[self alloc] initWithSourcePath: sourcePath
				 destinationPath: destinationPath] autorelease];

Modified src/exceptions/OFNotConnectedException.m from [916c8267e0] to [32f81be35f].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFNotConnectedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFNotConnectedException
+ (instancetype)exceptionWithSocket: (id)socket
{
	return [[[self alloc] initWithSocket: socket] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFNotConnectedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFNotConnectedException
+ (instancetype)exceptionWithSocket: (id)socket
{
	return [[[self alloc] initWithSocket: socket] autorelease];
}

Modified src/exceptions/OFNotImplementedException.m from [0718839ad1] to [bb842ef9d5].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFNotImplementedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFNotImplementedException
+ (instancetype)exceptionWithSelector: (SEL)selector
			       object: (id)object
{
	return [[[self alloc] initWithSelector: selector
					object: object] autorelease];







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFNotImplementedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFNotImplementedException
+ (instancetype)exceptionWithSelector: (SEL)selector
			       object: (id)object
{
	return [[[self alloc] initWithSelector: selector
					object: object] autorelease];

Modified src/exceptions/OFOpenFileFailedException.m from [681ccbbaf3] to [4f20d070a7].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFOpenFileFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFOpenFileFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
			     mode: (OFString*)mode
{
	return [[[self alloc] initWithPath: path
				      mode: mode] autorelease];







<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFOpenFileFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFOpenFileFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
			     mode: (OFString*)mode
{
	return [[[self alloc] initWithPath: path
				      mode: mode] autorelease];

Modified src/exceptions/OFReadOrWriteFailedException.m from [555499f2ea] to [83c83ae07d].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#import "OFString.h"
#ifdef OF_HAVE_SOCKETS
# import "OFStreamSocket.h"
# import "OFUDPSocket.h"
#endif

#import "common.h"
#import "macros.h"

@implementation OFReadOrWriteFailedException
+ (instancetype)exceptionWithObject: (id)object
		    requestedLength: (size_t)requestedLength
{
	return [[[self alloc] initWithObject: object
			     requestedLength: requestedLength] autorelease];







<







20
21
22
23
24
25
26

27
28
29
30
31
32
33
#import "OFString.h"
#ifdef OF_HAVE_SOCKETS
# import "OFStreamSocket.h"
# import "OFUDPSocket.h"
#endif

#import "common.h"


@implementation OFReadOrWriteFailedException
+ (instancetype)exceptionWithObject: (id)object
		    requestedLength: (size_t)requestedLength
{
	return [[[self alloc] initWithObject: object
			     requestedLength: requestedLength] autorelease];

Modified src/exceptions/OFRemoveItemFailedException.m from [fe3df5f784] to [cbe97a0ade].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFRemoveItemFailedException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFRemoveItemFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFRemoveItemFailedException.h"
#import "OFString.h"

#import "common.h"


@implementation OFRemoveItemFailedException
+ (instancetype)exceptionWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}

Modified src/exceptions/OFSeekFailedException.m from [ec581305be] to [9c20229078].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "config.h"

#import "OFSeekFailedException.h"
#import "OFString.h"
#import "OFSeekableStream.h"

#import "common.h"
#import "macros.h"

@implementation OFSeekFailedException
+ (instancetype)exceptionWithStream: (OFSeekableStream*)stream
			     offset: (off_t)offset
			     whence: (int)whence
{
	return [[[self alloc] initWithStream: stream







<







17
18
19
20
21
22
23

24
25
26
27
28
29
30
#include "config.h"

#import "OFSeekFailedException.h"
#import "OFString.h"
#import "OFSeekableStream.h"

#import "common.h"


@implementation OFSeekFailedException
+ (instancetype)exceptionWithStream: (OFSeekableStream*)stream
			     offset: (off_t)offset
			     whence: (int)whence
{
	return [[[self alloc] initWithStream: stream

Modified src/exceptions/OFSetOptionFailedException.m from [2cc951a582] to [38ffd1bb32].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "config.h"

#import "OFSetOptionFailedException.h"
#import "OFString.h"
#import "OFStream.h"

#import "common.h"
#import "macros.h"

@implementation OFSetOptionFailedException
+ (instancetype)exceptionWithStream: (OFStream*)stream
{
	return [[[self alloc] initWithStream: stream] autorelease];
}








<







17
18
19
20
21
22
23

24
25
26
27
28
29
30
#include "config.h"

#import "OFSetOptionFailedException.h"
#import "OFString.h"
#import "OFStream.h"

#import "common.h"


@implementation OFSetOptionFailedException
+ (instancetype)exceptionWithStream: (OFStream*)stream
{
	return [[[self alloc] initWithStream: stream] autorelease];
}

Modified src/exceptions/OFThreadJoinFailedException.m from [15d1900618] to [5cf88cb959].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "config.h"

#import "OFThreadJoinFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "macros.h"

@implementation OFThreadJoinFailedException
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
	return [[[self alloc] initWithThread: thread] autorelease];
}

- init







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#include "config.h"

#import "OFThreadJoinFailedException.h"
#import "OFString.h"
#import "OFThread.h"



@implementation OFThreadJoinFailedException
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
	return [[[self alloc] initWithThread: thread] autorelease];
}

- init

Modified src/exceptions/OFThreadStartFailedException.m from [ae49b383fd] to [129a87668a].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "config.h"

#import "OFThreadStartFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "macros.h"

@implementation OFThreadStartFailedException
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
	return [[[self alloc] initWithThread: thread] autorelease];
}

- init







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#include "config.h"

#import "OFThreadStartFailedException.h"
#import "OFString.h"
#import "OFThread.h"



@implementation OFThreadStartFailedException
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
	return [[[self alloc] initWithThread: thread] autorelease];
}

- init

Modified src/exceptions/OFThreadStillRunningException.m from [73919fb2f9] to [098c198f8a].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include "config.h"

#import "OFThreadStillRunningException.h"
#import "OFString.h"
#import "OFThread.h"

#import "macros.h"

@implementation OFThreadStillRunningException
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
	return [[[self alloc] initWithThread: thread] autorelease];
}

- init







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29

#include "config.h"

#import "OFThreadStillRunningException.h"
#import "OFString.h"
#import "OFThread.h"



@implementation OFThreadStillRunningException
+ (instancetype)exceptionWithThread: (OFThread*)thread
{
	return [[[self alloc] initWithThread: thread] autorelease];
}

- init

Modified src/exceptions/OFUnboundNamespaceException.m from [8641d71c91] to [cfc045d0e0].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "config.h"

#import "OFUnboundNamespaceException.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "common.h"
#import "macros.h"

@implementation OFUnboundNamespaceException
+ (instancetype)exceptionWithNamespace: (OFString*)namespace
			       element: (OFXMLElement*)element
{
	return [[[self alloc] initWithNamespace: namespace
					element: element] autorelease];







<







17
18
19
20
21
22
23

24
25
26
27
28
29
30
#include "config.h"

#import "OFUnboundNamespaceException.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "common.h"


@implementation OFUnboundNamespaceException
+ (instancetype)exceptionWithNamespace: (OFString*)namespace
			       element: (OFXMLElement*)element
{
	return [[[self alloc] initWithNamespace: namespace
					element: element] autorelease];

Modified src/exceptions/OFUnboundPrefixException.m from [95b9ec4331] to [6c992e9b2f].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "config.h"

#import "OFUnboundPrefixException.h"
#import "OFString.h"
#import "OFXMLParser.h"

#import "common.h"
#import "macros.h"

@implementation OFUnboundPrefixException
+ (instancetype)exceptionWithPrefix: (OFString*)prefix
			     parser: (OFXMLParser*)parser
{
	return [[[self alloc] initWithPrefix: prefix
				      parser: parser] autorelease];







<







17
18
19
20
21
22
23

24
25
26
27
28
29
30
#include "config.h"

#import "OFUnboundPrefixException.h"
#import "OFString.h"
#import "OFXMLParser.h"

#import "common.h"


@implementation OFUnboundPrefixException
+ (instancetype)exceptionWithPrefix: (OFString*)prefix
			     parser: (OFXMLParser*)parser
{
	return [[[self alloc] initWithPrefix: prefix
				      parser: parser] autorelease];

Modified src/exceptions/OFUnsupportedProtocolException.m from [81940174f5] to [5a70a73e8b].

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "config.h"

#import "OFUnsupportedProtocolException.h"
#import "OFString.h"
#import "OFURL.h"

#import "common.h"
#import "macros.h"

@implementation OFUnsupportedProtocolException
+ (instancetype)exceptionWithURL: (OFURL*)url
{
	return [[[self alloc] initWithURL: url] autorelease];
}








<







17
18
19
20
21
22
23

24
25
26
27
28
29
30
#include "config.h"

#import "OFUnsupportedProtocolException.h"
#import "OFString.h"
#import "OFURL.h"

#import "common.h"


@implementation OFUnsupportedProtocolException
+ (instancetype)exceptionWithURL: (OFURL*)url
{
	return [[[self alloc] initWithURL: url] autorelease];
}

Modified src/exceptions/OFUnsupportedVersionException.m from [9075519b26] to [b843820a03].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#include "config.h"

#import "OFUnsupportedVersionException.h"
#import "OFString.h"

#import "common.h"
#import "macros.h"

@implementation OFUnsupportedVersionException
+ (instancetype)exceptionWithVersion: (OFString*)version
{
	return [[[self alloc] initWithVersion: version] autorelease];
}








<







16
17
18
19
20
21
22

23
24
25
26
27
28
29

#include "config.h"

#import "OFUnsupportedVersionException.h"
#import "OFString.h"

#import "common.h"


@implementation OFUnsupportedVersionException
+ (instancetype)exceptionWithVersion: (OFString*)version
{
	return [[[self alloc] initWithVersion: version] autorelease];
}

Modified src/exceptions/common.h from [b75cd971df] to [9631779c5c].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include <string.h>
#include <errno.h>

#import "macros.h"

#ifdef OF_HAVE_SOCKETS
# include "socket.h"
# include "socket_helpers.h"
#endif

#ifndef _WIN32
# define GET_ERRNO	errno







<
<







13
14
15
16
17
18
19


20
21
22
23
24
25
26
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include <string.h>
#include <errno.h>



#ifdef OF_HAVE_SOCKETS
# include "socket.h"
# include "socket_helpers.h"
#endif

#ifndef _WIN32
# define GET_ERRNO	errno

Modified src/iso_8859_15.m from [5e18523a01] to [2d8262ed3a].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString.h"

#import "macros.h"

const of_char16_t of_iso_8859_15[128] = {
	0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
	0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
	0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
	0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
	0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7,
	0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,







<
<







12
13
14
15
16
17
18


19
20
21
22
23
24
25
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString.h"



const of_char16_t of_iso_8859_15[128] = {
	0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
	0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
	0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
	0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
	0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7,
	0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,

Modified src/macros.h from [d84414160a] to [605fc19a18].

10
11
12
13
14
15
16
17







18
19
20
21
22
23
24



25

26














































27
28
29
30
31
32
33
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"








#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>




#if defined(OF_APPLE_RUNTIME)

# import <objc/runtime.h>














































#endif

#ifdef __GNUC__
# define OF_INLINE inline __attribute__((__always_inline__))
# define OF_LIKELY(cond) (__builtin_expect(!!(cond), 1))
# define OF_UNLIKELY(cond) (__builtin_expect(!!(cond), 0))
# define OF_CONST_FUNC __attribute__((__const__))







|
>
>
>
>
>
>
>







>
>
>
|
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "objfw-defs.h"

#ifndef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
#endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif

#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifdef OF_OBJFW_RUNTIME
# import "runtime.h"
#endif
#ifdef OF_APPLE_RUNTIME
# import <objc/objc.h>
# import <objc/runtime.h>
# import <objc/message.h>
#endif

#if defined(__GNUC__)
# define restrict __restrict__
#elif __STDC_VERSION__ < 199901L
# define restrict
#endif

#if __STDC_VERSION__ >= 201112L
# ifdef OF_HAVE_STDNORETURN_H
#  include <stdnoreturn.h>
# else
#  define noreturn _Noreturn
# endif
#elif defined(__GNUC__)
# define noreturn __attribute__((__noreturn__))
#else
# define noreturn
#endif

/*
 * Work around Apple's libc headers breaking by defining noreturn.
 * They use __attribute__((noreturn)) where they should be using
 * __attribute__((__noreturn__)).
 */
#if defined(__APPLE__) && defined(__dead2)
# undef __dead2
# define __dead2 __attribute__((__noreturn__))
#endif

#if __STDC_VERSION__ >= 201112L && !defined(static_assert)
/* C11 compiler, but old libc */
# define static_assert _Static_assert
#endif

#if defined(OF_HAVE__THREAD_LOCAL)
# define OF_HAVE_COMPILER_TLS
# ifdef OF_HAVE_THREADS_H
#  include <threads.h>
# else
#  define thread_local _Thread_local
# endif
#elif defined(OF_HAVE___THREAD)
# define OF_HAVE_COMPILER_TLS
# define thread_local __thread
#endif

#ifdef __GNUC__
# define OF_INLINE inline __attribute__((__always_inline__))
# define OF_LIKELY(cond) (__builtin_expect(!!(cond), 1))
# define OF_UNLIKELY(cond) (__builtin_expect(!!(cond), 0))
# define OF_CONST_FUNC __attribute__((__const__))
60
61
62
63
64
65
66









































































67
68
69
70
71
72
73
# ifdef __BIGGEST_ALIGNMENT__
#  define OF_BIGGEST_ALIGNMENT __BIGGEST_ALIGNMENT__
# else
#  /* Hopefully no arch needs more than 16 byte alignment */
#  define OF_BIGGEST_ALIGNMENT 16
# endif
#endif










































































#ifdef __GNUC__
# if defined(__x86_64__) || defined(__amd64__)
#  define OF_X86_64_ASM
# elif defined(__i386__)
#  define OF_X86_ASM
# elif defined(__ppc__) || defined(__PPC__)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# ifdef __BIGGEST_ALIGNMENT__
#  define OF_BIGGEST_ALIGNMENT __BIGGEST_ALIGNMENT__
# else
#  /* Hopefully no arch needs more than 16 byte alignment */
#  define OF_BIGGEST_ALIGNMENT 16
# endif
#endif

#ifdef __GNUC__
# define __GCC_VERSION__ (__GNUC__ * 100 + __GNUC_MINOR__)
#else
# define __GCC_VERSION__ 0
#endif

#if defined(__clang__) || __GCC_VERSION__ >= 406 || defined(OBJC_NEW_PROPERTIES)
# define OF_HAVE_PROPERTIES
# define OF_HAVE_OPTIONAL_PROTOCOLS
# if defined(__clang__) || __GCC_VERSION__ >= 406 || defined(OF_APPLE_RUNTIME)
#  define OF_HAVE_FAST_ENUMERATION
# endif
# define OF_HAVE_CLASS_EXTENSIONS
# define OF_PRIVATE_CATEGORY
#else
# define OF_PRIVATE_CATEGORY Private
#endif

#ifndef __has_feature
# define __has_feature(x) 0
#endif

#ifndef __has_attribute
# define __has_attribute(x) 0
#endif

#if !__has_feature(objc_instancetype)
# define instancetype id
#endif

#if __has_feature(blocks)
# define OF_HAVE_BLOCKS
#endif

#if __has_feature(objc_bool)
# undef YES
# define YES __objc_yes
# undef NO
# define NO __objc_no
# ifndef __cplusplus
#  undef true
#  define true ((bool)1)
#  undef false
#  define false ((bool)0)
# endif
#endif

#if defined(__clang__) || __GCC_VERSION__ >= 405
# define OF_UNREACHABLE __builtin_unreachable();
#else
# define OF_UNREACHABLE abort();
#endif

#if defined(__clang__) || __GCC_VERSION__ >= 406
# define OF_SENTINEL __attribute__((__sentinel__))
# define OF_METHOD_NORETURN __attribute__((__noreturn__))
#else
# define OF_SENTINEL
# define OF_METHOD_NORETURN
#endif

#if __has_attribute(__objc_requires_super__)
# define OF_REQUIRES_SUPER __attribute__((__objc_requires_super__))
#else
# define OF_REQUIRES_SUPER
#endif

#if __has_attribute(__objc_root_class__)
# define OF_ROOT_CLASS __attribute__((__objc_root_class__))
#else
# define OF_ROOT_CLASS
#endif

#ifdef __GNUC__
# if defined(__x86_64__) || defined(__amd64__)
#  define OF_X86_64_ASM
# elif defined(__i386__)
#  define OF_X86_ASM
# elif defined(__ppc__) || defined(__PPC__)
111
112
113
114
115
116
117



118

119
























120
121
122

123
124










125
126


127

128



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172


173

174
175






176
177
178
179
180
181
182
#   define OF_ARMV6_ASM
#  endif
# elif defined(__arm64__) || defined(__aarch64__)
#  define OF_ARM64_ASM
# endif
#endif




#define OF_ENSURE(cond)							\

	if (!(cond)) {							\
























		fprintf(stderr, "Failed to ensure condition in "	\
		    __FILE__ ":%d:\n" #cond "\n", __LINE__);		\
		abort();						\

	}











#if __STDC_VERSION__ >= 201112L && !defined(static_assert)
/* C11 compiler, but old libc */


# define static_assert _Static_assert

#endif




#if !defined(_WIN32) && !defined(__DJGPP__)
# define OF_PATH_DELIMITER '/'
# define OF_PATH_DELIMITER_STRING @"/"
# define OF_IS_PATH_DELIMITER(c) (c == '/')
#else
# define OF_PATH_DELIMITER '\\'
# define OF_PATH_DELIMITER_STRING @"\\"
# define OF_IS_PATH_DELIMITER(c) (c == '\\' || c == '/')
#endif
#define OF_PATH_CURRENT_DIRECTORY @"."
#define OF_PATH_PARENT_DIRECTORY @".."

extern id objc_getProperty(id, SEL, ptrdiff_t, BOOL);
extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, signed char);

#define OF_IVAR_OFFSET(ivar) ((intptr_t)&ivar - (intptr_t)self)
#define OF_GETTER(ivar, atomic) \
	return objc_getProperty(self, _cmd, OF_IVAR_OFFSET(ivar), atomic);
#define OF_SETTER(ivar, value, atomic, copy) \
	objc_setProperty(self, _cmd, OF_IVAR_OFFSET(ivar), value, atomic, copy);

#if defined(__clang__) || __GCC_VERSION__ >= 405
# define OF_UNREACHABLE __builtin_unreachable();
#else
# define OF_UNREACHABLE abort();
#endif

#define OF_UNRECOGNIZED_SELECTOR		\
	[self doesNotRecognizeSelector: _cmd];	\
	OF_UNREACHABLE
#define OF_INVALID_INIT_METHOD				\
	@try {						\
		[self doesNotRecognizeSelector: _cmd];	\
	} @catch (id e) {				\
		[self release];				\
		@throw e;				\
	}						\
							\
	abort();

#ifdef OF_HAVE_CLASS_EXTENSIONS
# define OF_PRIVATE_CATEGORY
#else


# define OF_PRIVATE_CATEGORY Private

#endif







static OF_INLINE uint16_t OF_CONST_FUNC
OF_BSWAP16_CONST(uint16_t i)
{
	return (i & UINT16_C(0xFF00)) >> 8 |
	    (i & UINT16_C(0x00FF)) << 8;
}








>
>
>
|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
>
|
|
>
>
>
>
>
>
>
>
>
>
|
<
>
>
|
>

>
>
>













|
|
|
|
|
<
<
<
|
<
<
<
<
<














|
|
|
>
>
|
>


>
>
>
>
>
>







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278


279
280
281
282
283
284
285
286
287
288
289
290
291
292

293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318



319





320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
#   define OF_ARMV6_ASM
#  endif
# elif defined(__arm64__) || defined(__aarch64__)
#  define OF_ARM64_ASM
# endif
#endif

#ifdef OF_APPLE_RUNTIME
# if defined(__x86_64__) || defined(__i386__) || defined(__ARM64_ARCH_8__) || \
	defined(__arm__) || defined(__ppc__)
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
# endif
#else
# if defined(__ELF__)
#  if defined(__x86_64__) || defined(__amd64__) || defined(__i386__) || \
	defined(__arm__) || defined(__ARM__) || defined(__ppc__) || \
	defined(__PPC__)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#   if __OBJFW_RUNTIME_ABI__ >= 800
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
#  if (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) || \
	(defined(__mips_eabi) && _MIPS_SZPTR == 32)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#   if __OBJFW_RUNTIME_ABI__ >= 800
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
# elif defined(_WIN32)
#  if defined(__x86_64__) || defined(__i386__)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#   if __OBJFW_RUNTIME_ABI__ >= 800
#    define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
#   endif
#  endif
# endif


#endif

#if __has_feature(objc_arc)
# define OF_RETURNS_RETAINED __attribute__((__ns_returns_retained__))
# define OF_RETURNS_NOT_RETAINED __attribute__((__ns_returns_not_retained__))
# define OF_RETURNS_INNER_POINTER \
	__attribute__((__objc_returns_inner_pointer__))
# define OF_CONSUMED __attribute__((__ns_consumed__))
# define OF_WEAK_UNAVAILABLE __attribute__((__objc_arc_weak_unavailable__))
#else
# define OF_RETURNS_RETAINED
# define OF_RETURNS_NOT_RETAINED
# define OF_RETURNS_INNER_POINTER
# define OF_CONSUMED

# define OF_WEAK_UNAVAILABLE
# define __unsafe_unretained
# define __bridge
# define __autoreleasing
#endif

#define OF_RETAIN_COUNT_MAX UINT_MAX
#define OF_NOT_FOUND SIZE_MAX

#if !defined(_WIN32) && !defined(__DJGPP__)
# define OF_PATH_DELIMITER '/'
# define OF_PATH_DELIMITER_STRING @"/"
# define OF_IS_PATH_DELIMITER(c) (c == '/')
#else
# define OF_PATH_DELIMITER '\\'
# define OF_PATH_DELIMITER_STRING @"\\"
# define OF_IS_PATH_DELIMITER(c) (c == '\\' || c == '/')
#endif
#define OF_PATH_CURRENT_DIRECTORY @"."
#define OF_PATH_PARENT_DIRECTORY @".."

#define OF_ENSURE(cond)							\
	if (!(cond)) {							\
		fprintf(stderr, "Failed to ensure condition in "	\
		    __FILE__ ":%d:\n" #cond "\n", __LINE__);		\
		abort();						\



	}






#define OF_UNRECOGNIZED_SELECTOR		\
	[self doesNotRecognizeSelector: _cmd];	\
	OF_UNREACHABLE
#define OF_INVALID_INIT_METHOD				\
	@try {						\
		[self doesNotRecognizeSelector: _cmd];	\
	} @catch (id e) {				\
		[self release];				\
		@throw e;				\
	}						\
							\
	abort();

#ifdef __cplusplus
extern "C" {
#endif
extern id objc_getProperty(id, SEL, ptrdiff_t, BOOL);
extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, signed char);
#ifdef __cplusplus
}
#endif

#define OF_IVAR_OFFSET(ivar) ((intptr_t)&ivar - (intptr_t)self)
#define OF_GETTER(ivar, atomic) \
	return objc_getProperty(self, _cmd, OF_IVAR_OFFSET(ivar), atomic);
#define OF_SETTER(ivar, value, atomic, copy) \
	objc_setProperty(self, _cmd, OF_IVAR_OFFSET(ivar), value, atomic, copy);

static OF_INLINE uint16_t OF_CONST_FUNC
OF_BSWAP16_CONST(uint16_t i)
{
	return (i & UINT16_C(0xFF00)) >> 8 |
	    (i & UINT16_C(0x00FF)) << 8;
}

386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
		uint32_t otherCopy = other;			\
		OF_HASH_ADD(hash, (otherCopy >> 24) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >> 16) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >>  8) & 0xFF);	\
		OF_HASH_ADD(hash, otherCopy & 0xFF);		\
	}

static OF_INLINE of_range_t OF_CONST_FUNC
of_range(size_t start, size_t length)
{
	of_range_t range = { start, length };

	return range;
}

static OF_INLINE of_point_t OF_CONST_FUNC
of_point(float x, float y)
{
	of_point_t point = { x, y };

	return point;
}

static OF_INLINE of_dimension_t OF_CONST_FUNC
of_dimension(float width, float height)
{
	of_dimension_t dimension = { width, height };

	return dimension;
}

static OF_INLINE of_rectangle_t OF_CONST_FUNC
of_rectangle(float x, float y, float width, float height)
{
	of_rectangle_t rectangle = {
		of_point(x, y),
		of_dimension(width, height)
	};

	return rectangle;
}

static OF_INLINE char*
of_strdup(const char *string)
{
	char *copy;
	size_t length = strlen(string);

	if ((copy = (char*)malloc(length + 1)) == NULL)
		return NULL;

	memcpy(copy, string, length + 1);

	return copy;
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













559
560
561
562
563
564
565



































566
567
568
569
570
571
572
573
574
575
576
577
578
		uint32_t otherCopy = other;			\
		OF_HASH_ADD(hash, (otherCopy >> 24) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >> 16) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >>  8) & 0xFF);	\
		OF_HASH_ADD(hash, otherCopy & 0xFF);		\
	}




































static OF_INLINE char*
of_strdup(const char *string)
{
	char *copy;
	size_t length = strlen(string);

	if ((copy = (char*)malloc(length + 1)) == NULL)
		return NULL;

	memcpy(copy, string, length + 1);

	return copy;
}

Modified src/of_asprintf.m from [db322fe9c1] to [6eaf017199].

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <wchar.h>

#include <sys/types.h>

#import "OFString.h"

#import "asprintf.h"
#import "autorelease.h"
#import "macros.h"

#define MAX_SUBFORMAT_LEN 64

struct context {
	const char *format;
	size_t formatLen;
	char subformat[MAX_SUBFORMAT_LEN + 1];







<
<







24
25
26
27
28
29
30


31
32
33
34
35
36
37
#include <wchar.h>

#include <sys/types.h>

#import "OFString.h"

#import "asprintf.h"



#define MAX_SUBFORMAT_LEN 64

struct context {
	const char *format;
	size_t formatLen;
	char subformat[MAX_SUBFORMAT_LEN + 1];

Modified src/runtime/property.m from [db56428575] to [9720c4267f].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <string.h>

#import "runtime.h"
#import "runtime-private.h"

#import "OFObject.h"

#import "macros.h"
#ifdef OF_HAVE_THREADS
# import "threading.h"
# define NUM_SPINLOCKS 8	/* needs to be a power of 2 */
# define SPINLOCK_HASH(p) ((unsigned)((uintptr_t)p >> 4) & (NUM_SPINLOCKS - 1))
static of_spinlock_t spinlocks[NUM_SPINLOCKS];
#endif








<







19
20
21
22
23
24
25

26
27
28
29
30
31
32
#include <string.h>

#import "runtime.h"
#import "runtime-private.h"

#import "OFObject.h"


#ifdef OF_HAVE_THREADS
# import "threading.h"
# define NUM_SPINLOCKS 8	/* needs to be a power of 2 */
# define SPINLOCK_HASH(p) ((unsigned)((uintptr_t)p >> 4) & (NUM_SPINLOCKS - 1))
static of_spinlock_t spinlocks[NUM_SPINLOCKS];
#endif

Modified src/threading.h from [65cc15f272] to [c4677d1bcf].

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# error No threads available!
#endif

#include <math.h>

#import "OFObject.h"

#import "macros.h"

#if defined(OF_HAVE_PTHREADS)
# include <pthread.h>
typedef pthread_t of_thread_t;
typedef pthread_key_t of_tlskey_t;
typedef pthread_mutex_t of_mutex_t;
typedef pthread_cond_t of_condition_t;
typedef pthread_once_t of_once_t;







<
<







21
22
23
24
25
26
27


28
29
30
31
32
33
34
# error No threads available!
#endif

#include <math.h>

#import "OFObject.h"



#if defined(OF_HAVE_PTHREADS)
# include <pthread.h>
typedef pthread_t of_thread_t;
typedef pthread_key_t of_tlskey_t;
typedef pthread_mutex_t of_mutex_t;
typedef pthread_cond_t of_condition_t;
typedef pthread_once_t of_once_t;

Modified src/windows_1252.m from [0ee0cc83a8] to [fbc12484d1].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString.h"

#import "macros.h"

const of_char16_t of_windows_1252[128] = {
	0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
	0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0x017D, 0xFFFD,
	0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
	0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0x017E, 0x0178,
	0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
	0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,







<
<







12
13
14
15
16
17
18


19
20
21
22
23
24
25
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFString.h"



const of_char16_t of_windows_1252[128] = {
	0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
	0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0x017D, 0xFFFD,
	0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
	0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0x017E, 0x0178,
	0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
	0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,