ObjFW  Check-in [fb515e8e24]

Overview
Comment:Make use of instancetype.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fb515e8e242097f5700fe20440a0028d31fa3e86a348d1bdbf42effac5861e6d
User & Date: js on 2012-10-09 15:07:30
Other Links: manifest | tags
Context
2012-10-09
21:57
Remove wrong byte swaps. check-in: 3f29426e99 user: js tags: trunk
15:07
Make use of instancetype. check-in: fb515e8e24 user: js tags: trunk
14:59
OFNumber: Make sure -[boolValue] is always a bool. check-in: 916ee17654 user: js tags: trunk
Changes

Modified src/OFApplication.h from [8da8c6a3f6] to [ec565e513e].

128
129
130
131
132
133
134
135

136
137
138
139
140
141
142
128
129
130
131
132
133
134

135
136
137
138
139
140
141
142







-
+







#endif

/**
 * \brief Returns the only OFApplication instance in the application.
 *
 * \return The only OFApplication instance in the application
 */
+ sharedApplication;
+ (OFApplication*)sharedApplication;

/**
 * \brief Returns the name of the program (argv[0]).
 *
 * \return The name of the program (argv[0])
 */
+ (OFString*)programName;

Modified src/OFApplication.m from [d77b6b1207] to [9867bc719f].

81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
81
82
83
84
85
86
87

88
89
90
91
92
93
94
95







-
+








	[app run];

	return 0;
}

@implementation OFApplication
+ sharedApplication
+ (OFApplication*)sharedApplication
{
	if (app == nil)
		app = [[self alloc] init];

	return app;
}

Modified src/OFArray.h from [c839777bdd] to [f0be2224cd].

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







-
+







-
+







-
+







-
+









-
-
+
+







#endif

/**
 * \brief Creates a new OFArray.
 *
 * \return A new autoreleased OFArray
 */
+ array;
+ (instancetype)array;

/**
 * \brief Creates a new OFArray with the specified object.
 *
 * \param object An object
 * \return A new autoreleased OFArray
 */
+ arrayWithObject: (id)object;
+ (instancetype)arrayWithObject: (id)object;

/**
 * \brief Creates a new OFArray with the specified objects, terminated by nil.
 *
 * \param firstObject The first object in the array
 * \return A new autoreleased OFArray
 */
+ arrayWithObjects: (id)firstObject, ...;
+ (instancetype)arrayWithObjects: (id)firstObject, ...;

/**
 * \brief Creates a new OFArray with the objects from the specified array.
 *
 * \param array An array
 * \return A new autoreleased OFArray
 */
+ arrayWithArray: (OFArray*)array;
+ (instancetype)arrayWithArray: (OFArray*)array;

/**
 * \brief Creates a new OFArray with the objects from the specified C array of
 *	  the specified length.
 *
 * \param objects A C array of objects
 * \param length The length of the C array
 * \return A new autoreleased OFArray
 */
+ arrayWithObjects: (id const*)objects
	     count: (size_t)count;
+ (instancetype)arrayWithObjects: (id const*)objects
			   count: (size_t)count;

/**
 * \brief Initializes an OFArray with the specified object.
 *
 * \param object An object
 * \return An initialized OFArray
 */

Modified src/OFArray.m from [208e599910] to [65f72110ac].

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







-
+




-
+




-
+












-
+




-
-
+
+







{
	if (self == [OFArray class])
		return (id)&placeholder;

	return [super alloc];
}

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

+ arrayWithObject: (id)object
+ (instancetype)arrayWithObject: (id)object
{
	return [[[self alloc] initWithObject: object] autorelease];
}

+ arrayWithObjects: (id)firstObject, ...
+ (instancetype)arrayWithObjects: (id)firstObject, ...
{
	id ret;
	va_list arguments;

	va_start(arguments, firstObject);
	ret = [[[self alloc] initWithObject: firstObject
				  arguments: arguments] autorelease];
	va_end(arguments);

	return ret;
}

+ arrayWithArray: (OFArray*)array
+ (instancetype)arrayWithArray: (OFArray*)array
{
	return [[[self alloc] initWithArray: array] autorelease];
}

+ arrayWithObjects: (id const*)objects
	     count: (size_t)count
+ (instancetype)arrayWithObjects: (id const*)objects
			   count: (size_t)count
{
	return [[[self alloc] initWithObjects: objects
					count: count] autorelease];
}

- init
{

Modified src/OFArray_subarray.h from [83f7687532] to [f561bc8a44].

18
19
20
21
22
23
24
25
26


27
28
29
18
19
20
21
22
23
24


25
26
27
28
29







-
-
+
+




@interface OFArray_subarray: OFArray
{
	OFArray *array;
	of_range_t range;
}

+ arrayWithArray: (OFArray*)array
	   range: (of_range_t)range;
+ (instancetype)arrayWithArray: (OFArray*)array
			 range: (of_range_t)range;
- initWithArray: (OFArray*)array
	  range: (of_range_t)range;
@end

Modified src/OFArray_subarray.m from [1f6f789ff3] to [3219b4036a].

17
18
19
20
21
22
23
24
25


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


24
25
26
27
28
29
30
31
32







-
-
+
+







#include "config.h"

#import "OFArray_subarray.h"

#import "OFOutOfRangeException.h"

@implementation OFArray_subarray
+ arrayWithArray: (OFArray*)array
	   range: (of_range_t)range
+ (instancetype)arrayWithArray: (OFArray*)array
			 range: (of_range_t)range
{
	return [[[self alloc] initWithArray: array
				      range: range] autorelease];
}

- initWithArray: (OFArray*)array_
	  range: (of_range_t)range_

Modified src/OFDataArray+Hashing.m from [763b1e6eda] to [d10ff72ecd].

54
55
56
57
58
59
60
61

62
63
64
65
66
67
68
54
55
56
57
58
59
60

61
62
63
64
65
66
67
68







-
+







				  encoding: OF_STRING_ENCODING_ASCII
				    length: 32];
}

- (OFString*)SHA1Hash
{
	void *pool = objc_autoreleasePoolPush();
	OFMD5Hash *hash = [OFSHA1Hash hash];
	OFSHA1Hash *hash = [OFSHA1Hash hash];
	uint8_t *digest;
	char cString[OF_SHA1_DIGEST_SIZE * 2];
	size_t i;

	[hash updateWithBuffer: data
			length: count * itemSize];
	digest = [hash digest];

Modified src/OFDataArray.h from [7e3588642e] to [fe192fcada].

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







-
+







-
+








-
+








-
+








-
+








-
+







#endif

/**
 * \brief Creates a new OFDataArray with an item size of 1.
 *
 * \return A new autoreleased OFDataArray
 */
+ dataArray;
+ (instancetype)dataArray;

/**
 * \brief Creates a new OFDataArray whose items all have the same size.
 *
 * \param itemSize The size of each element in the OFDataArray
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithItemSize: (size_t)itemSize;
+ (instancetype)dataArrayWithItemSize: (size_t)itemSize;

/**
 * \brief Creates a new OFDataArary with an item size of 1, containing the data
 *	  of the specified file.
 *
 * \param path The path of the file
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithContentsOfFile: (OFString*)path;
+ (instancetype)dataArrayWithContentsOfFile: (OFString*)path;

/**
 * \brief Creates a new OFDataArray with an item size of 1, containing the data
 *	  of the specified URL.
 *
 * \param URL The URL to the contents for the OFDataArray
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithContentsOfURL: (OFURL*)URL;
+ (instancetype)dataArrayWithContentsOfURL: (OFURL*)URL;

/**
 * \brief Creates a new OFDataArray with an item size of 1, containing the data
 *	  of the string representation.
 *
 * \param string The string representation of the data
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithStringRepresentation: (OFString*)string;
+ (instancetype)dataArrayWithStringRepresentation: (OFString*)string;

/**
 * \brief Creates a new OFDataArray with an item size of 1, containing the data
 *	  of the Base64-encoded string.
 *
 * \param string The string with the Base64-encoded data
 * \return A new autoreleased OFDataArray
 */
+ dataArrayWithBase64EncodedString: (OFString*)string;
+ (instancetype)dataArrayWithBase64EncodedString: (OFString*)string;

/**
 * \brief Initializes an already allocated OFDataArray with an item size of 1.
 *
 * \return A initialized OFDataArray
 */
- init;

Modified src/OFDataArray.m from [3f32c8135b] to [191802fe3a].

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







-
+




-
+




-
+




-
+




-
+





-
+







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

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

+ dataArrayWithItemSize: (size_t)itemSize
+ (instancetype)dataArrayWithItemSize: (size_t)itemSize
{
	return [[[self alloc] initWithItemSize: itemSize] autorelease];
}

+ dataArrayWithContentsOfFile: (OFString*)path
+ (instancetype)dataArrayWithContentsOfFile: (OFString*)path
{
	return [[[self alloc] initWithContentsOfFile: path] autorelease];
}

+ dataArrayWithContentsOfURL: (OFURL*)URL
+ (instancetype)dataArrayWithContentsOfURL: (OFURL*)URL
{
	return [[[self alloc] initWithContentsOfURL: URL] autorelease];
}

+ dataArrayWithStringRepresentation: (OFString*)string
+ (instancetype)dataArrayWithStringRepresentation: (OFString*)string
{
	return [[[self alloc]
	    initWithStringRepresentation: string] autorelease];
}

+ dataArrayWithBase64EncodedString: (OFString*)string
+ (instancetype)dataArrayWithBase64EncodedString: (OFString*)string
{
	return [[[self alloc] initWithBase64EncodedString: string] autorelease];
}

- init
{
	self = [super init];

Modified src/OFDate.h from [1702b03e5a] to [09915d0305].

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







-
+








-
+







-
+

















-
-
+
+














-
-
+
+








-
+








-
+







}

/**
 * \brief Creates a new OFDate with the current date and time.
 *
 * \return A new, autoreleased OFDate with the current date and time
 */
+ date;
+ (instancetype)date;

/**
 * \brief Creates a new OFDate with the specified date and time since
 *	  1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSince1970: (double)seconds;
+ (instancetype)dateWithTimeIntervalSince1970: (double)seconds;

/**
 * \brief Creates a new OFDate with the specified date and time since now.
 *
 * \param seconds The seconds since now
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSinceNow: (double)seconds;
+ (instancetype)dateWithTimeIntervalSinceNow: (double)seconds;

/**
 * \brief Creates a new OFDate with the specified string in the specified
 *	  format.
 *
 * The time zone used is UTC. See +[dateWithLocalDateString:format:] if you
 * want local time.
 *
 * See the manpage for strftime for information on the format.
 *
 * \warning The format is currently limited to the following format specifiers:
 *	    %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t.
 *
 * \param string The string describing the date
 * \param format The format of the string describing the date
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithDateString: (OFString*)string
	      format: (OFString*)format;
+ (instancetype)dateWithDateString: (OFString*)string
			    format: (OFString*)format;

/**
 * \brief Creates a new OFDate with the specified string in the specified
 *	  format.
 *
 * See the manpage for strftime for information on the format.
 *
 * \warning The format is currently limited to the following format specifiers:
 *	    %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t.
 *
 * \param string The string describing the date
 * \param format The format of the string describing the date
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithLocalDateString: (OFString*)string
		   format: (OFString*)format;
+ (instancetype)dateWithLocalDateString: (OFString*)string
				 format: (OFString*)format;

/**
 * \brief Returns a date in the distant future.
 *
 * The date is system-dependant.
 *
 * \return A date in the distant future
 */
+ distantFuture;
+ (instancetype)distantFuture;

/**
 * \brief Returns a date in the distant past.
 *
 * The date is system-dependant.
 *
 * \return A date in the distant past
 */
+ distantPast;
+ (instancetype)distantPast;

/**
 * \brief Initializes an already allocated OFDate with the specified date and
 *	  time since 1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \return An initialized OFDate with the specified date and time

Modified src/OFDate.m from [8b872152c8] to [5aa753194e].

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
209

210
211
212
213
214
215
216
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

209
210
211
212
213
214
215
216







-
+




-
+





-
+





-
-
+
+





-
-
+
+





-
+





-
+







+ (void)initialize
{
	if (self == [OFDate class])
		mutex = [[OFMutex alloc] init];
}
#endif

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

+ dateWithTimeIntervalSince1970: (double)seconds
+ (instancetype)dateWithTimeIntervalSince1970: (double)seconds
{
	return [[[self alloc]
	    initWithTimeIntervalSince1970: seconds] autorelease];
}

+ dateWithTimeIntervalSinceNow: (double)seconds
+ (instancetype)dateWithTimeIntervalSinceNow: (double)seconds
{
	return [[[self alloc]
	    initWithTimeIntervalSinceNow: seconds] autorelease];
}

+ dateWithDateString: (OFString*)string
	      format: (OFString*)format
+ (instancetype)dateWithDateString: (OFString*)string
			    format: (OFString*)format
{
	return [[[self alloc] initWithDateString: string
					  format: format] autorelease];
}

+ dateWithLocalDateString: (OFString*)string
		   format: (OFString*)format
+ (instancetype)dateWithLocalDateString: (OFString*)string
				 format: (OFString*)format
{
	return [[[self alloc] initWithLocalDateString: string
					       format: format] autorelease];
}

+ distantFuture
+ (instancetype)distantFuture
{
	return [[[self alloc]
	    initWithTimeIntervalSince1970: DBL_MAX] autorelease];
}

+ distantPast
+ (instancetype)distantPast
{
	return [[[self alloc]
	    initWithTimeIntervalSince1970: DBL_MIN] autorelease];
}

- init
{

Modified src/OFDictionary.h from [29ca8f86ea] to [29c6aaef45].

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







-
+







-
+








-
-
+
+








-
-
+
+









-
-
+
+








-
+







@interface OFDictionary: OFObject <OFCopying, OFMutableCopying, OFCollection,
    OFSerialization, OFJSONRepresentation>
/**
 * \brief Creates a new OFDictionary.
 *
 * \return A new autoreleased OFDictionary
 */
+ dictionary;
+ (instancetype)dictionary;

/**
 * \brief Creates a new OFDictionary with the specified dictionary.
 *
 * \param dictionary An OFDictionary
 * \return A new autoreleased OFDictionary
 */
+ dictionaryWithDictionary: (OFDictionary*)dictionary;
+ (instancetype)dictionaryWithDictionary: (OFDictionary*)dictionary;

/**
 * \brief Creates a new OFDictionary with the specified key and object.
 *
 * \param key The key
 * \param object The object
 * \return A new autoreleased OFDictionary
 */
+ dictionaryWithObject: (id)object
		forKey: (id)key;
+ (instancetype)dictionaryWithObject: (id)object
			      forKey: (id)key;

/**
 * \brief Creates a new OFDictionary with the specified keys and objects.
 *
 * \param keys An array of keys
 * \param objects An array of objects
 * \return A new autoreleased OFDictionary
 */
+ dictionaryWithObjects: (OFArray*)objects
		forKeys: (OFArray*)keys;
+ (instancetype)dictionaryWithObjects: (OFArray*)objects
			      forKeys: (OFArray*)keys;

/**
 * \brief Creates a new OFDictionary with the specified keys and objects.
 *
 * \param keys An array of keys
 * \param objects An array of objects
 * \param count The number of objects in the arrays
 * \return A new autoreleased OFDictionary
 */
+ dictionaryWithObjects: (id const*)objects
		forKeys: (id const*)keys
+ (instancetype)dictionaryWithObjects: (id const*)objects
			      forKeys: (id const*)keys
		  count: (size_t)count;

/**
 * \brief Creates a new OFDictionary with the specified keys objects.
 *
 * \param firstKey The first key
 * \return A new autoreleased OFDictionary
 */
+ dictionaryWithKeysAndObjects: (id)firstKey, ...;
+ (instancetype)dictionaryWithKeysAndObjects: (id)firstKey, ...;

/**
 * \brief Initializes an already allocated OFDictionary.
 *
 * \return An initialized OFDictionary
 */
- init;

Modified src/OFDictionary.m from [5774d8a182] to [dd1d8a52aa].

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







-
+




-
+




-
-
+
+





-
-
+
+





-
-
+
+







-
+







{
	if (self == [OFDictionary class])
		return (id)&placeholder;

	return [super alloc];
}

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

+ dictionaryWithDictionary: (OFDictionary*)dictionary
+ (instancetype)dictionaryWithDictionary: (OFDictionary*)dictionary
{
	return [[[self alloc] initWithDictionary: dictionary] autorelease];
}

+ dictionaryWithObject: (id)object
		forKey: (id)key
+ (instancetype)dictionaryWithObject: (id)object
			      forKey: (id)key
{
	return [[[self alloc] initWithObject: object
				      forKey: key] autorelease];
}

+ dictionaryWithObjects: (OFArray*)objects
		forKeys: (OFArray*)keys
+ (instancetype)dictionaryWithObjects: (OFArray*)objects
			      forKeys: (OFArray*)keys
{
	return [[[self alloc] initWithObjects: objects
				      forKeys: keys] autorelease];
}

+ dictionaryWithObjects: (id const*)objects
		forKeys: (id const*)keys
+ (instancetype)dictionaryWithObjects: (id const*)objects
			      forKeys: (id const*)keys
		  count: (size_t)count
{
	return [[[self alloc] initWithObjects: objects
				      forKeys: keys
					count: count] autorelease];
}

+ dictionaryWithKeysAndObjects: (id)firstKey, ...
+ (instancetype)dictionaryWithKeysAndObjects: (id)firstKey, ...
{
	id ret;
	va_list arguments;

	va_start(arguments, firstKey);
	ret = [[[self alloc] initWithKey: firstKey
			       arguments: arguments] autorelease];

Modified src/OFFile.h from [32d36c992f] to [9ede7ee4ac].

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







-
-
+
+








-
+







/**
 * \brief Creates a new OFFile with the specified path and mode.
 *
 * \param path The path to the file to open as a string
 * \param mode The mode in which the file should be opened as a string
 * \return A new autoreleased OFFile
 */
+ fileWithPath: (OFString*)path
	  mode: (OFString*)mode;
+ (instancetype)fileWithPath: (OFString*)path
			mode: (OFString*)mode;

/**
 * \brief Creates a new OFFile with the specified file descriptor.
 *
 * \param fileDescriptor A file descriptor, returned from for example open().
 *			 It is not closed when the OFFile object is deallocated!
 * \return A new autoreleased OFFile
 */
+ fileWithFileDescriptor: (int)fileDescriptor;
+ (instancetype)fileWithFileDescriptor: (int)fileDescriptor;

/**
 * \brief Returns the path fo the current working directory.
 *
 * \return The path of the current working directory
 */
+ (OFString*)currentDirectoryPath;

Modified src/OFFile.m from [a11a54fb53] to [f6bb1bb8aa].

169
170
171
172
173
174
175
176
177


178
179
180
181
182
183

184
185
186
187
188
189
190
169
170
171
172
173
174
175


176
177
178
179
180
181
182

183
184
185
186
187
188
189
190







-
-
+
+





-
+








	if (!of_mutex_new(&mutex))
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}
#endif

+ fileWithPath: (OFString*)path
	  mode: (OFString*)mode
+ (instancetype)fileWithPath: (OFString*)path
			mode: (OFString*)mode
{
	return [[[self alloc] initWithPath: path
				      mode: mode] autorelease];
}

+ fileWithFileDescriptor: (int)filedescriptor
+ (instancetype)fileWithFileDescriptor: (int)filedescriptor
{
	return [[[self alloc]
	    initWithFileDescriptor: filedescriptor] autorelease];
}

+ (OFString*)currentDirectoryPath
{

Modified src/OFHTTPRequest.h from [62c4ad9368] to [afa9ff2eb3].

125
126
127
128
129
130
131
132

133
134
135
136
137
138
139
140

141
142
143
144
145
146
147
125
126
127
128
129
130
131

132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147







-
+







-
+







#endif

/**
 * \brief Creates a new OFHTTPRequest.
 *
 * \return A new, autoreleased OFHTTPRequest
 */
+ request;
+ (instancetype)request;

/**
 * \brief Creates a new OFHTTPRequest with the specified URL.
 *
 * \param URL The URL for the request
 * \return A new, autoreleased OFHTTPRequest
 */
+ requestWithURL: (OFURL*)URL;
+ (instancetype)requestWithURL: (OFURL*)URL;

/**
 * \brief Initializes an already allocated OFHTTPRequest with the specified URL.
 *
 * \param URL The URL for the request
 * \return An initialized OFHTTPRequest
 */

Modified src/OFHTTPRequest.m from [8854292a15] to [5b57ee93bc].

59
60
61
62
63
64
65
66

67
68
69
70
71

72
73
74
75
76
77
78
59
60
61
62
63
64
65

66
67
68
69
70

71
72
73
74
75
76
77
78







-
+




-
+








		firstLetter = NO;
		str++;
	}
}

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

+ requestWithURL: (OFURL*)URL
+ (instancetype)requestWithURL: (OFURL*)URL
{
	return [[[self alloc] initWithURL: URL] autorelease];
}

- init
{
	self = [super init];

Modified src/OFHash.h from [b9ba1a51a3] to [51a74f2d37].

29
30
31
32
33
34
35
36

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

36
37
38
39
40
41
42
43







-
+







#endif

/**
 * \brief Creates a new hash.
 *
 * \return A new autoreleased OFHash
 */
+ hash;
+ (instancetype)hash;

/**
 * \brief Returns the digest size of the hash, in bytes.
 *
 * \return The digest size of the hash, in bytes
 */
+ (size_t)digestSize;

Modified src/OFHash.m from [5f584d8a06] to [a3d9e07296].

17
18
19
20
21
22
23
24

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

24
25
26
27
28
29
30
31







-
+







#include "config.h"

#import "OFHash.h"

#import "OFNotImplementedException.h"

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

+ (size_t)digestSize
{
	@throw [OFNotImplementedException exceptionWithClass: self

Modified src/OFIntrospection.h from [a52b80111f] to [2314d4ab1a].

116
117
118
119
120
121
122
123

124
125
126
127
128
129
130
116
117
118
119
120
121
122

123
124
125
126
127
128
129
130







-
+







#endif

/**
 * \brief Creates a new introspection for the specified class.
 *
 * \return A new, autoreleased introspection for the specified class
 */
+ introspectionWithClass: (Class)class_;
+ (instancetype)introspectionWithClass: (Class)class_;

/**
 * \brief Initializes an already allocated OFIntrospection with the specified
 *	  class.
 *
 * \return An initialized OFIntrospection
 */

Modified src/OFIntrospection.m from [5c4e5cd23b] to [bb255a727b].

163
164
165
166
167
168
169
170

171
172
173
174
175
176
177
163
164
165
166
167
168
169

170
171
172
173
174
175
176
177







-
+







	return [OFString stringWithFormat:
	    @"<OFInstanceVariable: %@ [%s] @ 0x%tx>",
	    name, typeEncoding, offset];
}
@end

@implementation OFIntrospection
+ introspectionWithClass: (Class)class
+ (instancetype)introspectionWithClass: (Class)class
{
	return [[[self alloc] initWithClass: class] autorelease];
}

- initWithClass: (Class)class
{
	self = [super init];

Modified src/OFList.h from [2db9ff8a81] to [d4ed52a4cc].

52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66







-
+







#endif

/**
 * \brief Creates a new OFList.
 *
 * \return A new autoreleased OFList
 */
+ list;
+ (instancetype)list;

/**
 * \brief Returns the first list object of the list.
 *
 * \return The first list object of the list
 */
- (of_list_object_t*)firstListObject;

Modified src/OFList.m from [9579281a19] to [ccac864af8].

26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
26
27
28
29
30
31
32

33
34
35
36
37
38
39
40







-
+







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

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

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

- initWithSerialization: (OFXMLElement*)element
{
	self = [self init];

Modified src/OFNull.h from [23bbed5cc4] to [c231d998aa].

23
24
25
26
27
28
29
30

31
23
24
25
26
27
28
29

30
31







-
+

 */
@interface OFNull: OFObject <OFCopying, OFSerialization, OFJSONRepresentation>
/**
 * \brief Returns an OFNull singleton.
 *
 * \return An OFNull singleton
 */
+ null;
+ (OFNull*)null;
@end

Modified src/OFNull.m from [712c4645d0] to [145485c3f5].

24
25
26
27
28
29
30
31

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

31
32
33
34
35
36
37
38







-
+







#import "OFNotImplementedException.h"

#import "autorelease.h"

static OFNull *null = nil;

@implementation OFNull
+ null
+ (OFNull*)null
{
	if (null != nil)
		return null;

	null = [[self alloc] init];

	return null;

Modified src/OFNumber.h from [5d836abad6] to [325eff17e3].

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
209
210
211
212
213
214

215
216
217
218
219
220
221
222

223
224
225
226
227
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
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
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
209
210
211
212
213

214
215
216
217
218
219
220
221

222
223
224
225
226
227
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
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







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+







-
+








/**
 * \brief Creates a new OFNumber with the specified BOOL.
 *
 * \param bool_ A BOOL which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithBool: (BOOL)bool_;
+ (instancetype)numberWithBool: (BOOL)bool_;

/**
 * \brief Creates a new OFNumber with the specified signed char.
 *
 * \param char_ A signed char which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithChar: (signed char)char_;
+ (instancetype)numberWithChar: (signed char)char_;

/**
 * \brief Creates a new OFNumber with the specified signed short.
 *
 * \param short_ A signed short which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithShort: (signed short)short_;
+ (instancetype)numberWithShort: (signed short)short_;

/**
 * \brief Creates a new OFNumber with the specified signed int.
 *
 * \param int_ A signed int which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt: (signed int)int_;
+ (instancetype)numberWithInt: (signed int)int_;

/**
 * \brief Creates a new OFNumber with the specified signed long.
 *
 * \param long_ A signed long which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithLong: (signed long)long_;
+ (instancetype)numberWithLong: (signed long)long_;

/**
 * \brief Creates a new OFNumber with the specified unsigned char.
 *
 * \param uchar An unsigned char which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUnsignedChar: (unsigned char)uchar;
+ (instancetype)numberWithUnsignedChar: (unsigned char)uchar;

/**
 * \brief Creates a new OFNumber with the specified unsigned short.
 *
 * \param ushort An unsigned short which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUnsignedShort: (unsigned short)ushort;
+ (instancetype)numberWithUnsignedShort: (unsigned short)ushort;

/**
 * \brief Creates a new OFNumber with the specified unsigned int.
 *
 * \param uint An unsigned int which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUnsignedInt: (unsigned int)uint;
+ (instancetype)numberWithUnsignedInt: (unsigned int)uint;

/**
 * \brief Creates a new OFNumber with the specified unsigned long.
 *
 * \param ulong An unsigned long which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUnsignedLong: (unsigned long)ulong;
+ (instancetype)numberWithUnsignedLong: (unsigned long)ulong;

/**
 * \brief Creates a new OFNumber with the specified int8_t.
 *
 * \param int8 An int8_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt8: (int8_t)int8;
+ (instancetype)numberWithInt8: (int8_t)int8;

/**
 * \brief Creates a new OFNumber with the specified int16_t.
 *
 * \param int16 An int16_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt16: (int16_t)int16;
+ (instancetype)numberWithInt16: (int16_t)int16;

/**
 * \brief Creates a new OFNumber with the specified int32_t.
 *
 * \param int32 An int32_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt32: (int32_t)int32;
+ (instancetype)numberWithInt32: (int32_t)int32;

/**
 * \brief Creates a new OFNumber with the specified int64_t.
 *
 * \param int64 An int64_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithInt64: (int64_t)int64;
+ (instancetype)numberWithInt64: (int64_t)int64;

/**
 * \brief Creates a new OFNumber with the specified uint8_t.
 *
 * \param uint8 A uint8_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt8: (uint8_t)uint8;
+ (instancetype)numberWithUInt8: (uint8_t)uint8;

/**
 * \brief Creates a new OFNumber with the specified uint16_t.
 *
 * \param uint16 A uint16_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt16: (uint16_t)uint16;
+ (instancetype)numberWithUInt16: (uint16_t)uint16;

/**
 * \brief Creates a new OFNumber with the specified uint32_t.
 *
 * \param uint32 A uint32_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt32: (uint32_t)uint32;
+ (instancetype)numberWithUInt32: (uint32_t)uint32;

/**
 * \brief Creates a new OFNumber with the specified uint64_t.
 *
 * \param uint64 A uint64_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUInt64: (uint64_t)uint64;
+ (instancetype)numberWithUInt64: (uint64_t)uint64;

/**
 * \brief Creates a new OFNumber with the specified size_t.
 *
 * \param size A size_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithSize: (size_t)size;
+ (instancetype)numberWithSize: (size_t)size;

/**
 * \brief Creates a new OFNumber with the specified ssize_t.
 *
 * \param ssize An ssize_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithSSize: (ssize_t)ssize;
+ (instancetype)numberWithSSize: (ssize_t)ssize;

/**
 * \brief Creates a new OFNumber with the specified intmax_t.
 *
 * \param intmax An intmax_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithIntMax: (intmax_t)intmax;
+ (instancetype)numberWithIntMax: (intmax_t)intmax;

/**
 * \brief Creates a new OFNumber with the specified uintmax_t.
 *
 * \param uintmax A uintmax_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUIntMax: (uintmax_t)uintmax;
+ (instancetype)numberWithUIntMax: (uintmax_t)uintmax;

/**
 * \brief Creates a new OFNumber with the specified ptrdiff_t.
 *
 * \param ptrdiff A ptrdiff_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithPtrDiff: (ptrdiff_t)ptrdiff;
+ (instancetype)numberWithPtrDiff: (ptrdiff_t)ptrdiff;

/**
 * \brief Creates a new OFNumber with the specified intptr_t.
 *
 * \param intptr An intptr_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithIntPtr: (intptr_t)intptr;
+ (instancetype)numberWithIntPtr: (intptr_t)intptr;

/**
 * \brief Creates a new OFNumber with the specified uintptr_t.
 *
 * \param uintptr A uintptr_t which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithUIntPtr: (uintptr_t)uintptr;
+ (instancetype)numberWithUIntPtr: (uintptr_t)uintptr;

/**
 * \brief Creates a new OFNumber with the specified float.
 *
 * \param float_ A float which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithFloat: (float)float_;
+ (instancetype)numberWithFloat: (float)float_;

/**
 * \brief Creates a new OFNumber with the specified double.
 *
 * \param double_ A double which the OFNumber should contain
 * \return A new autoreleased OFNumber
 */
+ numberWithDouble: (double)double_;
+ (instancetype)numberWithDouble: (double)double_;

/**
 * \brief Initializes an already allocated OFNumber with the specified BOOL.
 *
 * \param bool_ A BOOL which the OFNumber should contain
 * \return An initialized OFNumber
 */

Modified src/OFNumber.m from [ff6f294978] to [8ca41e7471].

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
356

357
358
359
360
361

362
363
364
365
366

367
368
369
370
371

372
373
374
375
376

377
378
379
380
381

382
383
384
385
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
441

442
443
444
445
446

447
448
449
450
451
452
453
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

356
357
358
359
360

361
362
363
364
365

366
367
368
369
370

371
372
373
374
375

376
377
378
379
380

381
382
383
384
385

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

441
442
443
444
445

446
447
448
449
450
451
452
453







-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+







		return [OFNumber numberWithDouble: value.double_ o];	\
	default:							\
		@throw [OFInvalidFormatException			\
		    exceptionWithClass: [self class]];			\
	}

@implementation OFNumber
+ numberWithBool: (BOOL)bool_
+ (instancetype)numberWithBool: (BOOL)bool_
{
	return [[[self alloc] initWithBool: bool_] autorelease];
}

+ numberWithChar: (signed char)char_
+ (instancetype)numberWithChar: (signed char)char_
{
	return [[[self alloc] initWithChar: char_] autorelease];
}

+ numberWithShort: (signed short)short_
+ (instancetype)numberWithShort: (signed short)short_
{
	return [[[self alloc] initWithShort: short_] autorelease];
}

+ numberWithInt: (signed int)int_
+ (instancetype)numberWithInt: (signed int)int_
{
	return [[[self alloc] initWithInt: int_] autorelease];
}

+ numberWithLong: (signed long)long_
+ (instancetype)numberWithLong: (signed long)long_
{
	return [[[self alloc] initWithLong: long_] autorelease];
}

+ numberWithUnsignedChar: (unsigned char)uchar
+ (instancetype)numberWithUnsignedChar: (unsigned char)uchar
{
	return [[[self alloc] initWithUnsignedChar: uchar] autorelease];
}

+ numberWithUnsignedShort: (unsigned short)ushort
+ (instancetype)numberWithUnsignedShort: (unsigned short)ushort
{
	return [[[self alloc] initWithUnsignedShort: ushort] autorelease];
}

+ numberWithUnsignedInt: (unsigned int)uint
+ (instancetype)numberWithUnsignedInt: (unsigned int)uint
{
	return [[[self alloc] initWithUnsignedInt: uint] autorelease];
}

+ numberWithUnsignedLong: (unsigned long)ulong
+ (instancetype)numberWithUnsignedLong: (unsigned long)ulong
{
	return [[[self alloc] initWithUnsignedLong: ulong] autorelease];
}

+ numberWithInt8: (int8_t)int8
+ (instancetype)numberWithInt8: (int8_t)int8
{
	return [[[self alloc] initWithInt8: int8] autorelease];
}

+ numberWithInt16: (int16_t)int16
+ (instancetype)numberWithInt16: (int16_t)int16
{
	return [[[self alloc] initWithInt16: int16] autorelease];
}

+ numberWithInt32: (int32_t)int32
+ (instancetype)numberWithInt32: (int32_t)int32
{
	return [[[self alloc] initWithInt32: int32] autorelease];
}

+ numberWithInt64: (int64_t)int64
+ (instancetype)numberWithInt64: (int64_t)int64
{
	return [[[self alloc] initWithInt64: int64] autorelease];
}

+ numberWithUInt8: (uint8_t)uint8
+ (instancetype)numberWithUInt8: (uint8_t)uint8
{
	return [[[self alloc] initWithUInt8: uint8] autorelease];
}

+ numberWithUInt16: (uint16_t)uint16
+ (instancetype)numberWithUInt16: (uint16_t)uint16
{
	return [[[self alloc] initWithUInt16: uint16] autorelease];
}

+ numberWithUInt32: (uint32_t)uint32
+ (instancetype)numberWithUInt32: (uint32_t)uint32
{
	return [[[self alloc] initWithUInt32: uint32] autorelease];
}

+ numberWithUInt64: (uint64_t)uint64
+ (instancetype)numberWithUInt64: (uint64_t)uint64
{
	return [[[self alloc] initWithUInt64: uint64] autorelease];
}

+ numberWithSize: (size_t)size
+ (instancetype)numberWithSize: (size_t)size
{
	return [[[self alloc] initWithSize: size] autorelease];
}

+ numberWithSSize: (ssize_t)ssize
+ (instancetype)numberWithSSize: (ssize_t)ssize
{
	return [[[self alloc] initWithSSize: ssize] autorelease];
}

+ numberWithIntMax: (intmax_t)intmax
+ (instancetype)numberWithIntMax: (intmax_t)intmax
{
	return [[[self alloc] initWithIntMax: intmax] autorelease];
}

+ numberWithUIntMax: (uintmax_t)uintmax
+ (instancetype)numberWithUIntMax: (uintmax_t)uintmax
{
	return [[[self alloc] initWithUIntMax: uintmax] autorelease];
}

+ numberWithPtrDiff: (ptrdiff_t)ptrdiff
+ (instancetype)numberWithPtrDiff: (ptrdiff_t)ptrdiff
{
	return [[[self alloc] initWithPtrDiff: ptrdiff] autorelease];
}

+ numberWithIntPtr: (intptr_t)intptr
+ (instancetype)numberWithIntPtr: (intptr_t)intptr
{
	return [[[self alloc] initWithIntPtr: intptr] autorelease];
}

+ numberWithUIntPtr: (uintptr_t)uintptr
+ (instancetype)numberWithUIntPtr: (uintptr_t)uintptr
{
	return [[[self alloc] initWithUIntPtr: uintptr] autorelease];
}

+ numberWithFloat: (float)float_
+ (instancetype)numberWithFloat: (float)float_
{
	return [[[self alloc] initWithFloat: float_] autorelease];
}

+ numberWithDouble: (double)double_
+ (instancetype)numberWithDouble: (double)double_
{
	return [[[self alloc] initWithDouble: double_] autorelease];
}

- init
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]

Modified src/OFObject.h from [5242dae164] to [b59326f934].

47
48
49
50
51
52
53
54

55
56
57
58
59







60
61
62
63
64
65
66
47
48
49
50
51
52
53

54





55
56
57
58
59
60
61
62
63
64
65
66
67
68







-
+
-
-
-
-
-
+
+
+
+
+
+
+







# define __has_feature(x) 0
#endif

#if defined(__clang__)
# define OF_HAVE_PROPERTIES
# define OF_HAVE_OPTIONAL_PROTOCOLS
# define OF_HAVE_FAST_ENUMERATION
#elif defined(__GNUC__)
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC__) >= 406
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#  define OF_HAVE_PROPERTIES
#  define OF_HAVE_OPTIONAL_PROTOCOLS
#  define OF_HAVE_FAST_ENUMERATION
# endif
# define OF_HAVE_PROPERTIES
# define OF_HAVE_OPTIONAL_PROTOCOLS
# define OF_HAVE_FAST_ENUMERATION
#endif

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

#if __has_feature(blocks)
# define OF_HAVE_BLOCKS
#endif

#if __has_feature(objc_bool)

Modified src/OFProcess.h from [f3d3f9f669] to [acd107a1ee].

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







-
+










-
-
+
+












-
-
-
+
+
+







 * \brief Creates a new OFProcess with the specified program and invokes the
 *	  program.
 *
 * \param program The program to execute. If it does not start with a slash, the
 *		  search path specified in PATH is used.
 * \return A new, autoreleased OFProcess.
 */
+ processWithProgram: (OFString*)program;
+ (instancetype)processWithProgram: (OFString*)program;

/**
 * \brief Creates a new OFProcess with the specified program and arguments and
 *	  invokes the program.
 *
 * \param program The program to execute. If it does not start with a slash, the
 *		  search path specified in PATH is used.
 * \param arguments The arguments to pass to the program, or nil
 * \return A new, autoreleased OFProcess.
 */
+ processWithProgram: (OFString*)program
	   arguments: (OFArray*)arguments;
+ (instancetype)processWithProgram: (OFString*)program
			 arguments: (OFArray*)arguments;

/**
 * \brief Creates a new OFProcess with the specified program, program name and
 *	  arguments and invokes the program.
 *
 * \param program The program to execute. If it does not start with a slash, the
 *		  search path specified in PATH is used.
 * \param programName The program name for the program to invoke (argv[0]).
 *		      Usually, this is equal to program.
 * \param arguments The arguments to pass to the program, or nil
 * \return A new, autoreleased OFProcess.
 */
+ processWithProgram: (OFString*)program
	 programName: (OFString*)programName
	   arguments: (OFArray*)arguments;
+ (instancetype)processWithProgram: (OFString*)program
		       programName: (OFString*)programName
			 arguments: (OFArray*)arguments;

/**
 * \brief Initializes an already allocated OFProcess with the specified program
 *	  and invokes the program.
 *
 * \param program The program to execute. If it does not start with a slash, the
 *		  search path specified in PATH is used.

Modified src/OFProcess.m from [7f1558d0a7] to [3ceef225bf].

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







-
+




-
-
+
+





-
-
-
+
+
+







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

#import "autorelease.h"

@implementation OFProcess
+ processWithProgram: (OFString*)program
+ (instancetype)processWithProgram: (OFString*)program
{
	return [[[self alloc] initWithProgram: program] autorelease];
}

+ processWithProgram: (OFString*)program
	   arguments: (OFArray*)arguments
+ (instancetype)processWithProgram: (OFString*)program
			 arguments: (OFArray*)arguments
{
	return [[[self alloc] initWithProgram: program
				    arguments: arguments] autorelease];
}

+ processWithProgram: (OFString*)program
	 programName: (OFString*)programName
	   arguments: (OFArray*)arguments
+ (instancetype)processWithProgram: (OFString*)program
		       programName: (OFString*)programName
			 arguments: (OFArray*)arguments
{
	return [[[self alloc] initWithProgram: program
				  programName: programName
				    arguments: arguments] autorelease];
}

- initWithProgram: (OFString*)program

Modified src/OFSet.h from [ec53fbdca5] to [e720d47024].

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







-
+







-
+







-
+







-
+








-
-
+
+







@interface OFSet: OFObject <OFCollection, OFCopying, OFMutableCopying,
    OFSerialization>
/**
 * \brief Creates a new set.
 *
 * \return A new, autoreleased set
 */
+ set;
+ (instancetype)set;

/**
 * \brief Creates a new set with the specified set.
 *
 * \param set The set to initialize the set with
 * \return A new, autoreleased set with the specified set
 */
+ setWithSet: (OFSet*)set;
+ (instancetype)setWithSet: (OFSet*)set;

/**
 * \brief Creates a new set with the specified array.
 *
 * \param array The array to initialize the set with
 * \return A new, autoreleased set with the specified array
 */
+ setWithArray: (OFArray*)array;
+ (instancetype)setWithArray: (OFArray*)array;

/**
 * \brief Creates a new set with the specified objects.
 *
 * \param firstObject The first object for the set
 * \return A new, autoreleased set with the specified objects
 */
+ setWithObjects: (id)firstObject, ...;
+ (instancetype)setWithObjects: (id)firstObject, ...;

/**
 * \brief Creates a new set with the specified objects.
 *
 * \param objects An array of objects for the set
 * \param count The number of objects in the specified array
 * \return A new, autoreleased set with the specified objects
 */
+ setWithObjects: (id const*)objects
	   count: (size_t)count;
+ (instancetype)setWithObjects: (id const*)objects
			 count: (size_t)count;

/**
 * \brief Initializes an already allocated set with the specified set.
 *
 * \param set The set to initialize the set with
 * \return An initialized set with the specified set
 */

Modified src/OFSet.m from [9be4537608] to [ec5ebbb3c2].

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







-
+




-
+




-
+




-
+












-
-
+
+







{
	if (self == [OFSet class])
		return (id)&placeholder;

	return [super alloc];
}

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

+ setWithSet: (OFSet*)set
+ (instancetype)setWithSet: (OFSet*)set
{
	return [[[self alloc] initWithSet: set] autorelease];
}

+ setWithArray: (OFArray*)array
+ (instancetype)setWithArray: (OFArray*)array
{
	return [[[self alloc] initWithArray: array] autorelease];
}

+ setWithObjects: (id)firstObject, ...
+ (instancetype)setWithObjects: (id)firstObject, ...
{
	id ret;
	va_list arguments;

	va_start(arguments, firstObject);
	ret = [[[self alloc] initWithObject: firstObject
				  arguments: arguments] autorelease];
	va_end(arguments);

	return ret;
}

+ setWithObjects: (id const*)objects
	   count: (size_t)count
+ (instancetype)setWithObjects: (id const*)objects
			 count: (size_t)count
{
	return [[[self alloc] initWithObjects: objects
					count: count] autorelease];
}

- init
{

Modified src/OFStreamObserver.h from [f66d4f6eb3] to [85b360a246].

97
98
99
100
101
102
103
104

105
106
107
108
109
110
111
97
98
99
100
101
102
103

104
105
106
107
108
109
110
111







-
+







#endif

/**
 * \brief Creates a new OFStreamObserver.
 *
 * \return A new, autoreleased OFStreamObserver
 */
+ observer;
+ (instancetype)observer;

/**
 * \brief Returns the delegate for the OFStreamObserver.
 *
 * \return The delegate for the OFStreamObserver
 */
- (id <OFStreamObserverDelegate>)delegate;

Modified src/OFStreamObserver.m from [62e60a6cd0] to [44c71d7505].

55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
55
56
57
58
59
60
61

62
63
64
65
66
67
68
69







-
+







	QUEUE_REMOVE = 1,
	QUEUE_READ = 0,
	QUEUE_WRITE = 2
};
#define QUEUE_ACTION (QUEUE_ADD | QUEUE_REMOVE)

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

#if defined(HAVE_KQUEUE)
+ alloc
{

Modified src/OFStreamSocket.h from [bda81dff5e] to [943ba253dc].

33
34
35
36
37
38
39
40

41
33
34
35
36
37
38
39

40
41







-
+

}

/**
 * \brief Returns a new, autoreleased OFTCPSocket.
 *
 * \return A new, autoreleased OFTCPSocket
 */
+ socket;
+ (instancetype)socket;
@end

Modified src/OFStreamSocket.m from [b406096bcb] to [ccc1ba2bd0].

56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70







-
+








	if (WSAStartup(MAKEWORD(2, 0), &wsa))
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}
#endif

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

- (BOOL)lowlevelIsAtEndOfStream
{
	return atEndOfStream;

Modified src/OFString+Hashing.m from [c7fc790b94] to [e9a2adf039].

53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67







-
+







				  encoding: OF_STRING_ENCODING_ASCII
				    length: 32];
}

- (OFString*)SHA1Hash
{
	void *pool = objc_autoreleasePoolPush();
	OFMD5Hash *hash = [OFSHA1Hash hash];
	OFSHA1Hash *hash = [OFSHA1Hash hash];
	uint8_t *digest;
	char ret[OF_SHA1_DIGEST_SIZE * 2];
	size_t i;

	[hash updateWithBuffer: [self UTF8String]
			length: [self UTF8StringLength]];
	digest = [hash digest];

Modified src/OFString.h from [189c6c26d9] to [ef2dd82880].

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
209
210
211
212
213
214


215
216
217
218
219
220
221
222
223
224
225
226
227
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
283
284
285
286
287
288
289
290
291
292


293
294
295
296
297
298
299
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
209
210
211
212


213
214
215
216
217
218
219
220
221
222
223
224
225



226
227
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
283
284
285
286
287
288
289
290


291
292
293
294
295
296
297
298
299







-
+







-
+









-
-
+
+








-
-
+
+










-
-
-
+
+
+







-
+







-
+









-
-
+
+









-
-
+
+










-
-
-
+
+
+







-
+









-
-
+
+









-
-
+
+











-
-
-
+
+
+










-
+







-
+








-
+









-
-
+
+













-
+









-
-
+
+







#endif

/**
 * \brief Creates a new OFString.
 *
 * \return A new, autoreleased OFString
 */
+ string;
+ (instancetype)string;

/**
 * \brief Creates a new OFString from a UTF-8 encoded C string.
 *
 * \param UTF8String A UTF-8 encoded C string to initialize the OFString with
 * \return A new autoreleased OFString
 */
+ stringWithUTF8String: (const char*)UTF8String;
+ (instancetype)stringWithUTF8String: (const char*)UTF8String;

/**
 * \brief Creates a new OFString from a UTF-8 encoded C string with the
 *	  specified length.
 *
 * \param UTF8String A UTF-8 encoded C string to initialize the OFString with
 * \param UTF8StringLength The length of the UTF-8 encoded C string
 * \return A new autoreleased OFString
 */
+ stringWithUTF8String: (const char*)UTF8String
		length: (size_t)UTF8StringLength;
+ (instancetype)stringWithUTF8String: (const char*)UTF8String
			      length: (size_t)UTF8StringLength;

/**
 * \brief Creates a new OFString from a C string with the specified encoding.
 *
 * \param string A C string to initialize the OFString with
 * \param encoding The encoding of the C string
 * \return A new autoreleased OFString
 */
+ stringWithCString: (const char*)cString
	   encoding: (of_string_encoding_t)encoding;
+ (instancetype)stringWithCString: (const char*)cString
			 encoding: (of_string_encoding_t)encoding;

/**
 * \brief Creates a new OFString from a C string with the specified encoding
 *	  and length.
 *
 * \param cString A C string to initialize the OFString with
 * \param encoding The encoding of the C string
 * \param cStringLength The length of the C string
 * \return A new autoreleased OFString
 */
+ stringWithCString: (const char*)cString
	   encoding: (of_string_encoding_t)encoding
	     length: (size_t)cStringLength;
+ (instancetype)stringWithCString: (const char*)cString
			 encoding: (of_string_encoding_t)encoding
			   length: (size_t)cStringLength;

/**
 * \brief Creates a new OFString from another string.
 *
 * \param string A string to initialize the OFString with
 * \return A new autoreleased OFString
 */
+ stringWithString: (OFString*)string;
+ (instancetype)stringWithString: (OFString*)string;

/**
 * \brief Creates a new OFString from a unicode string.
 *
 * \param string The unicode string
 * \return A new autoreleased OFString
 */
+ stringWithUnicodeString: (const of_unichar_t*)string;
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string;

/**
 * \brief Creates a new OFString from a unicode string, assuming the specified
 *	  byte order if no BOM is found.
 *
 * \param string The unicode string
 * \param byteOrder The byte order to assume if there is no BOM
 * \return A new autoreleased OFString
 */
+ stringWithUnicodeString: (const of_unichar_t*)string
		byteOrder: (of_endianess_t)byteOrder;
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string
			      byteOrder: (of_endianess_t)byteOrder;

/**
 * \brief Creates a new OFString from a unicode string with the specified
 *	  length.
 *
 * \param string The unicode string
 * \param length The length of the unicode string
 * \return A new autoreleased OFString
 */
+ stringWithUnicodeString: (const of_unichar_t*)string
		   length: (size_t)length;
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string
				 length: (size_t)length;

/**
 * \brief Creates a new OFString from a unicode string with the specified
 *	  length, assuming the specified byte order if no BOM is found.
 *
 * \param string The unicode string
 * \param byteOrder The byte order to assume if there is no BOM
 * \param length The length of the unicode string
 * \return A new autoreleased OFString
 */
+ stringWithUnicodeString: (const of_unichar_t*)string
		byteOrder: (of_endianess_t)byteOrder
		   length: (size_t)length;
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string
			      byteOrder: (of_endianess_t)byteOrder
				 length: (size_t)length;

/**
 * \brief Creates a new OFString from a UTF-16 encoded string.
 *
 * \param string The UTF-16 string
 * \return A new autoreleased OFString
 */
+ stringWithUTF16String: (const uint16_t*)string;
+ (instancetype)stringWithUTF16String: (const uint16_t*)string;

/**
 * \brief Creates a new OFString from a UTF-16 encoded string, assuming the
 *	  specified byte order if no BOM is found.
 *
 * \param string The UTF-16 string
 * \param byteOrder The byte order to assume if there is no BOM
 * \return A new autoreleased OFString
 */
+ stringWithUTF16String: (const uint16_t*)string
	      byteOrder: (of_endianess_t)byteOrder;
+ (instancetype)stringWithUTF16String: (const uint16_t*)string
			    byteOrder: (of_endianess_t)byteOrder;

/**
 * \brief Creates a new OFString from a UTF-16 encoded string with the specified
 *	  length.
 *
 * \param string The UTF-16 string
 * \param length The length of the unicode string
 * \return A new autoreleased OFString
 */
+ stringWithUTF16String: (const uint16_t*)string
		 length: (size_t)length;
+ (instancetype)stringWithUTF16String: (const uint16_t*)string
			       length: (size_t)length;

/**
 * \brief Creates a new OFString from a UTF-16 encoded string with the
 *	  specified length, assuming the specified byte order if no BOM is
 *	  found.
 *
 * \param string The UTF-16 string
 * \param byteOrder The byte order to assume if there is no BOM
 * \param length The length of the unicode string
 * \return A new autoreleased OFString
 */
+ stringWithUTF16String: (const uint16_t*)string
	      byteOrder: (of_endianess_t)byteOrder
		 length: (size_t)length;
+ (instancetype)stringWithUTF16String: (const uint16_t*)string
			    byteOrder: (of_endianess_t)byteOrder
			       length: (size_t)length;

/**
 * \brief Creates a new OFString from a format string.
 *
 * See printf for the format syntax. As an addition, %@ is available as format
 * specifier for objects.
 *
 * \param format A string used as format to initialize the OFString
 * \return A new autoreleased OFString
 */
+ stringWithFormat: (OFConstantString*)format, ...;
+ (instancetype)stringWithFormat: (OFConstantString*)format, ...;

/**
 * \brief Creates a new OFString containing the constructed specified path.
 *
 * \param firstComponent The first component of the path
 * \return A new autoreleased OFString
 */
+ stringWithPath: (OFString*)firstComponent, ...;
+ (instancetype)stringWithPath: (OFString*)firstComponent, ...;

/**
 * \brief Creates a new OFString with the contents of the specified UTF-8
 *	  encoded file.
 *
 * \param path The path to the file
 * \return A new autoreleased OFString
 */
+ stringWithContentsOfFile: (OFString*)path;
+ (instancetype)stringWithContentsOfFile: (OFString*)path;

/**
 * \brief Creates a new OFString with the contents of the specified file in the
 *	  specified encoding.
 *
 * \param path The path to the file
 * \param encoding The encoding of the file
 * \return A new autoreleased OFString
 */
+ stringWithContentsOfFile: (OFString*)path
		  encoding: (of_string_encoding_t)encoding;
+ (instancetype)stringWithContentsOfFile: (OFString*)path
				encoding: (of_string_encoding_t)encoding;

/**
 * \brief Creates a new OFString with the contents of the specified URL.
 *
 * If the URL's scheme is file, it tries UTF-8 encoding.
 *
 * If the URL's scheme is http(s), it tries to detect the encoding from the HTTP
 * headers. If it could not detect the encoding using the HTTP headers, it tries
 * UTF-8.
 *
 * \param URL The URL to the contents for the string
 * \return A new autoreleased OFString
 */
+ stringWithContentsOfURL: (OFURL*)URL;
+ (instancetype)stringWithContentsOfURL: (OFURL*)URL;

/**
 * \brief Creates a new OFString with the contents of the specified URL in the
 *	  specified encoding.
 *
 * \param URL The URL to the contents for the string
 * \param encoding The encoding to assume
 * \return A new autoreleased OFString
 */
+ stringWithContentsOfURL: (OFURL*)URL
		 encoding: (of_string_encoding_t)encoding;
+ (instancetype)stringWithContentsOfURL: (OFURL*)URL
			       encoding: (of_string_encoding_t)encoding;

/**
 * \brief Initializes an already allocated OFString from a UTF-8 encoded C
 *	  string.
 *
 * \param UTF8String A UTF-8 encoded C string to initialize the OFString with
 * \return An initialized OFString

Modified src/OFString.m from [813606e445] to [9dca518311].

510
511
512
513
514
515
516
517

518
519
520
521
522

523
524
525
526
527
528


529
530
531
532
533
534
535
536


537
538
539
540
541
542
543


544
545
546
547
548
549
550
551

552
553
554
555
556

557
558
559
560
561
562


563
564
565
566
567
568
569


570
571
572
573
574
575
576
577



578
579
580
581
582
583
584

585
586
587
588
589
590


591
592
593
594
595
596
597


598
599
600
601
602
603
604
605



606
607
608
609
610
611
612

613
614
615
616
617
618
619
620
621
622
623
624
625

626
627
628
629
630
631
632
633
634
635
636
637
638

639
640
641
642
643
644


645
646
647
648
649
650

651
652
653
654
655
656


657
658
659
660
661
662
663
510
511
512
513
514
515
516

517
518
519
520
521

522
523
524
525
526


527
528
529
530
531
532
533
534


535
536
537
538
539
540
541


542
543
544
545
546
547
548
549
550

551
552
553
554
555

556
557
558
559
560


561
562
563
564
565
566
567


568
569
570
571
572
573
574



575
576
577
578
579
580
581
582
583

584
585
586
587
588


589
590
591
592
593
594
595


596
597
598
599
600
601
602



603
604
605
606
607
608
609
610
611

612
613
614
615
616
617
618
619
620
621
622
623
624

625
626
627
628
629
630
631
632
633
634
635
636
637

638
639
640
641
642


643
644
645
646
647
648
649

650
651
652
653
654


655
656
657
658
659
660
661
662
663







-
+




-
+




-
-
+
+






-
-
+
+





-
-
+
+







-
+




-
+




-
-
+
+





-
-
+
+





-
-
-
+
+
+






-
+




-
-
+
+





-
-
+
+





-
-
-
+
+
+






-
+












-
+












-
+




-
-
+
+





-
+




-
-
+
+







{
	if (self == [OFString class])
		return (id)&placeholder;

	return [super alloc];
}

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

+ stringWithUTF8String: (const char*)UTF8String
+ (instancetype)stringWithUTF8String: (const char*)UTF8String
{
	return [[[self alloc] initWithUTF8String: UTF8String] autorelease];
}

+ stringWithUTF8String: (const char*)UTF8String
		length: (size_t)UTF8StringLength
+ (instancetype)stringWithUTF8String: (const char*)UTF8String
			      length: (size_t)UTF8StringLength
{
	return [[[self alloc]
	    initWithUTF8String: UTF8String
			length: UTF8StringLength] autorelease];
}

+ stringWithCString: (const char*)cString
	   encoding: (of_string_encoding_t)encoding
+ (instancetype)stringWithCString: (const char*)cString
			 encoding: (of_string_encoding_t)encoding
{
	return [[[self alloc] initWithCString: cString
				     encoding: encoding] autorelease];
}

+ stringWithCString: (const char*)cString
	   encoding: (of_string_encoding_t)encoding
+ (instancetype)stringWithCString: (const char*)cString
			 encoding: (of_string_encoding_t)encoding
	     length: (size_t)cStringLength
{
	return [[[self alloc] initWithCString: cString
				     encoding: encoding
				       length: cStringLength] autorelease];
}

+ stringWithString: (OFString*)string
+ (instancetype)stringWithString: (OFString*)string
{
	return [[[self alloc] initWithString: string] autorelease];
}

+ stringWithUnicodeString: (const of_unichar_t*)string
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string
{
	return [[[self alloc] initWithUnicodeString: string] autorelease];
}

+ stringWithUnicodeString: (const of_unichar_t*)string
		byteOrder: (of_endianess_t)byteOrder
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string
			      byteOrder: (of_endianess_t)byteOrder
{
	return [[[self alloc] initWithUnicodeString: string
					  byteOrder: byteOrder] autorelease];
}

+ stringWithUnicodeString: (const of_unichar_t*)string
		   length: (size_t)length
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string
				 length: (size_t)length
{
	return [[[self alloc] initWithUnicodeString: string
					     length: length] autorelease];
}

+ stringWithUnicodeString: (const of_unichar_t*)string
		byteOrder: (of_endianess_t)byteOrder
		   length: (size_t)length
+ (instancetype)stringWithUnicodeString: (const of_unichar_t*)string
			      byteOrder: (of_endianess_t)byteOrder
				 length: (size_t)length
{
	return [[[self alloc] initWithUnicodeString: string
					  byteOrder: byteOrder
					     length: length] autorelease];
}

+ stringWithUTF16String: (const uint16_t*)string
+ (instancetype)stringWithUTF16String: (const uint16_t*)string
{
	return [[[self alloc] initWithUTF16String: string] autorelease];
}

+ stringWithUTF16String: (const uint16_t*)string
	      byteOrder: (of_endianess_t)byteOrder
+ (instancetype)stringWithUTF16String: (const uint16_t*)string
			    byteOrder: (of_endianess_t)byteOrder
{
	return [[[self alloc] initWithUTF16String: string
					byteOrder: byteOrder] autorelease];
}

+ stringWithUTF16String: (const uint16_t*)string
		 length: (size_t)length
+ (instancetype)stringWithUTF16String: (const uint16_t*)string
			       length: (size_t)length
{
	return [[[self alloc] initWithUTF16String: string
					   length: length] autorelease];
}

+ stringWithUTF16String: (const uint16_t*)string
	      byteOrder: (of_endianess_t)byteOrder
		 length: (size_t)length
+ (instancetype)stringWithUTF16String: (const uint16_t*)string
			    byteOrder: (of_endianess_t)byteOrder
			       length: (size_t)length
{
	return [[[self alloc] initWithUTF16String: string
					byteOrder: byteOrder
					   length: length] autorelease];
}

+ stringWithFormat: (OFConstantString*)format, ...
+ (instancetype)stringWithFormat: (OFConstantString*)format, ...
{
	id ret;
	va_list arguments;

	va_start(arguments, format);
	ret = [[[self alloc] initWithFormat: format
				  arguments: arguments] autorelease];
	va_end(arguments);

	return ret;
}

+ stringWithPath: (OFString*)firstComponent, ...
+ (instancetype)stringWithPath: (OFString*)firstComponent, ...
{
	id ret;
	va_list arguments;

	va_start(arguments, firstComponent);
	ret = [[[self alloc] initWithPath: firstComponent
				arguments: arguments] autorelease];
	va_end(arguments);

	return ret;
}

+ stringWithContentsOfFile: (OFString*)path
+ (instancetype)stringWithContentsOfFile: (OFString*)path
{
	return [[[self alloc] initWithContentsOfFile: path] autorelease];
}

+ stringWithContentsOfFile: (OFString*)path
		  encoding: (of_string_encoding_t)encoding
+ (instancetype)stringWithContentsOfFile: (OFString*)path
				encoding: (of_string_encoding_t)encoding
{
	return [[[self alloc] initWithContentsOfFile: path
					    encoding: encoding] autorelease];
}

+ stringWithContentsOfURL: (OFURL*)URL
+ (instancetype)stringWithContentsOfURL: (OFURL*)URL
{
	return [[[self alloc] initWithContentsOfURL: URL] autorelease];
}

+ stringWithContentsOfURL: (OFURL*)URL
		 encoding: (of_string_encoding_t)encoding
+ (instancetype)stringWithContentsOfURL: (OFURL*)URL
			       encoding: (of_string_encoding_t)encoding
{
	return [[[self alloc] initWithContentsOfURL: URL
					   encoding: encoding] autorelease];
}

- init
{

Modified src/OFThread.h from [db7d8eaae9] to [f7ea444098].

45
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
45
46
47
48
49
50
51

52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67







-
+







-
+







}

/**
 * \brief Creates a new Thread Local Storage key
 *
 * \return A new, autoreleased Thread Local Storage key
 */
+ TLSKey;
+ (instancetype)TLSKey;

/**
 * \brief Creates a new Thread Local Storage key with the specified destructor.
 *
 * \param destructor A destructor that is called when the thread is terminated
 * \return A new autoreleased Thread Local Storage key
 */
+ TLSKeyWithDestructor: (void(*)(id))destructor;
+ (instancetype)TLSKeyWithDestructor: (void(*)(id))destructor;

+ (void)callAllDestructors;

/**
 * \brief Initializes an already allocated Thread Local Storage Key with the
 *	  specified destructor.
 *
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
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







-
+







-
+








-
+







#endif

/**
 * \brief Creates a new thread.
 *
 * \return A new, autoreleased thread
 */
+ thread;
+ (instancetype)thread;

/**
 * \brief Creates a new thread with the specified object.
 *
 * \param object An object which is passed for use in the main method or nil
 * \return A new, autoreleased thread
 */
+ threadWithObject: (id)object;
+ (instancetype)threadWithObject: (id)object;

#ifdef OF_HAVE_BLOCKS
/**
 * \brief Creates a new thread with the specified block.
 *
 * \param block A block which is executed by the thread
 * \return A new, autoreleased thread
 */
+ threadWithBlock: (of_thread_block_t)block;
+ (instancetype)threadWithBlock: (of_thread_block_t)block;
#endif

/**
 * \brief Sets the Thread Local Storage for the specified key.
 *
 * The specified object is first retained and then the object stored before is
 * released. You can specify nil as object if you want the old object to be
271
272
273
274
275
276
277
278

279
280
281
282
283
284
285
271
272
273
274
275
276
277

278
279
280
281
282
283
284
285







-
+







}

/**
 * \brief Creates a new mutex.
 *
 * \return A new autoreleased mutex.
 */
+ mutex;
+ (instancetype)mutex;

/**
 * \brief Locks the mutex.
 */
- (void)lock;

/**
315
316
317
318
319
320
321
322

323
324
325
326
327
328
329
315
316
317
318
319
320
321

322
323
324
325
326
327
328
329







-
+







}

/**
 * \brief Creates a new condition.
 *
 * \return A new, autoreleased OFCondition
 */
+ condition;
+ (instancetype)condition;

/**
 * \brief Blocks the current thread until another thread calls -[signal] or
 *	  -[broadcast].
 */
- (void)wait;

Modified src/OFThread.m from [c8c14f68e1] to [bab03511a5].

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







-
+




-
+





-
+







		return;

	if (!of_tlskey_new(&threadSelfKey))
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}

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

+ threadWithObject: (id)object
+ (instancetype)threadWithObject: (id)object
{
	return [[[self alloc] initWithObject: object] autorelease];
}

#ifdef OF_HAVE_BLOCKS
+ threadWithBlock: (of_thread_block_t)block
+ (instancetype)threadWithBlock: (of_thread_block_t)block
{
	return [[[self alloc] initWithBlock: block] autorelease];
}
#endif

+ (void)setObject: (id)object
	forTLSKey: (OFTLSKey*)key
366
367
368
369
370
371
372
373

374
375
376
377
378

379
380
381
382
383
384
385
366
367
368
369
370
371
372

373
374
375
376
377

378
379
380
381
382
383
384
385







-
+




-
+







@implementation OFTLSKey
+ (void)initialize
{
	if (self == [OFTLSKey class])
		TLSKeys = [[OFList alloc] init];
}

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

+ TLSKeyWithDestructor: (void(*)(id))destructor
+ (instancetype)TLSKeyWithDestructor: (void(*)(id))destructor
{
	return [[[self alloc] initWithDestructor: destructor] autorelease];
}

+ (void)callAllDestructors
{
	of_list_object_t *iter;
442
443
444
445
446
447
448
449

450
451
452
453
454
455
456
442
443
444
445
446
447
448

449
450
451
452
453
454
455
456







-
+







	}

	[super dealloc];
}
@end

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

- init
{
	self = [super init];
550
551
552
553
554
555
556
557

558
559
560
561
562
563
564
550
551
552
553
554
555
556

557
558
559
560
561
562
563
564







-
+







					 mutex: self];

	[super dealloc];
}
@end

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

- init
{
	self = [super init];

Modified src/OFThreadPool.h from [b5511b4c56] to [9c891bd73d].

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







-
+










-
+







 * \brief Returns a new thread pool with one thread for each core in the system.
 *
 * \warning If for some reason the number of cores in the system could not be
 *	    determined, the pool will only have one thread!
 *
 * \return A new thread pool with one thread for each core in the system
 */
+ threadPool;
+ (instancetype)threadPool;

/**
 * \brief Returns a new thread pool with the specified number of threads.
 *
 * \warning If for some reason the number of cores in the system could not be
 *	    determined, the pool will only have one thread!
 *
 * \param size The number of threads for the pool
 * \return A new thread pool with the specified number of threads
 */
+ threadPoolWithSize: (size_t)size;
+ (instancetype)threadPoolWithSize: (size_t)size;

/**
 * \brief Initializes an already allocated OFThreadPool with one thread for
 *	  each core in the system.
 *
 * \warning If for some reason the number of cores in the system could not be
 *	    determined, the pool will only have one thread!

Modified src/OFThreadPool.m from [1b7b5d2a56] to [ba662533a2].

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







-
-
-
+
+
+

-
+











-
-
-
+
+
+







-
+







	SEL selector;
	id object;
#ifdef OF_HAVE_BLOCKS
	of_thread_pool_block_t block;
#endif
}

+ jobWithTarget: (id)target
       selector: (SEL)selector
	 object: (id)object;
+ (instancetype)jobWithTarget: (id)target
		     selector: (SEL)selector
		       object: (id)object;
#ifdef OF_HAVE_BLOCKS
+ jobWithBlock: (of_thread_pool_block_t)block;
+ (instancetype)jobWithBlock: (of_thread_pool_block_t)block;
#endif
- initWithTarget: (id)target
	selector: (SEL)selector
	  object: (id)object;
#ifdef OF_HAVE_BLOCKS
- initWithBlock: (of_thread_pool_block_t)block;
#endif
- (void)perform;
@end

@implementation OFThreadPoolJob
+ jobWithTarget: (id)target
       selector: (SEL)selector
	 object: (id)object
+ (instancetype)jobWithTarget: (id)target
		     selector: (SEL)selector
		       object: (id)object
{
	return [[[self alloc] initWithTarget: target
				    selector: selector
				      object: object] autorelease];
}

#ifdef OF_HAVE_BLOCKS
+ jobWithBlock: (of_thread_pool_block_t)block
+ (instancetype)jobWithBlock: (of_thread_pool_block_t)block
{
	return [[(OFThreadPoolJob*)[self alloc]
	    initWithBlock: block] autorelease];
}
#endif

- initWithTarget: (id)target_
128
129
130
131
132
133
134
135

136
137
138
139
140

141
142
143
144
145
146
147
128
129
130
131
132
133
134

135
136
137
138
139

140
141
142
143
144
145
146
147







-
+




-
+







	OFList *queue;
	OFCondition *queueCondition, *countCondition;
@public
	volatile BOOL terminate;
	volatile int *doneCount;
}

+ threadWithThreadPool: (OFThreadPool*)threadPool;
+ (instancetype)threadWithThreadPool: (OFThreadPool*)threadPool;
- initWithThreadPool: (OFThreadPool*)threadPool;
@end

@implementation OFThreadPoolThread
+ threadWithThreadPool: (OFThreadPool*)threadPool
+ (instancetype)threadWithThreadPool: (OFThreadPool*)threadPool
{
	return [[[self alloc] initWithThreadPool: threadPool] autorelease];
}

- initWithThreadPool: (OFThreadPool*)threadPool
{
	self = [super init];
237
238
239
240
241
242
243
244

245
246
247
248
249

250
251
252
253
254
255
256
237
238
239
240
241
242
243

244
245
246
247
248

249
250
251
252
253
254
255
256







-
+




-
+







			[countCondition unlock];
		}
	}
}
@end

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

+ threadPoolWithSize: (size_t)size
+ (instancetype)threadPoolWithSize: (size_t)size
{
	return [[[self alloc] initWithSize: size] autorelease];
}

- init
{
	return [self initWithSize: of_num_cpus];

Modified src/OFTimer.h from [3a4d8a5c86] to [72b838b1fd].

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







-
-
-
-
+
+
+
+












-
-
-
-
-
+
+
+
+
+















-
-
-
-
-
-
+
+
+
+
+
+











-
-
-
+
+
+












-
-
-
-
+
+
+
+












-
-
-
-
-
+
+
+
+
+















-
-
-
-
-
-
+
+
+
+
+
+











-
-
-
+
+
+







 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param target The target on which to call the selector
 * \param selector The selector to call on the target
 * \param repeats Whether the timer repeats after it has been executed
 * \return A new, autoreleased timer
 */
+ scheduledTimerWithTimeInterval: (double)interval
			  target: (id)target
			selector: (SEL)selector
			 repeats: (BOOL)repeats;
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
					target: (id)target
				      selector: (SEL)selector
				       repeats: (BOOL)repeats;

/**
 * \brief Creates and schedules a new timer with the specified time interval.
 *
 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param target The target on which to call the selector
 * \param selector The selector to call on the target
 * \param object An object to pass when calling the selector on the target
 * \param repeats Whether the timer repeats after it has been executed
 * \return A new, autoreleased timer
 */
+ scheduledTimerWithTimeInterval: (double)interval
			  target: (id)target
			selector: (SEL)selector
			  object: (id)object
			 repeats: (BOOL)repeats;
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
					target: (id)target
				      selector: (SEL)selector
					object: (id)object
				       repeats: (BOOL)repeats;

/**
 * \brief Creates and schedules a new timer with the specified time interval.
 *
 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param target The target on which to call the selector
 * \param selector The selector to call on the target
 * \param object1 The first object to pass when calling the selector on the
 *		  target
 * \param object2 The second object to pass when calling the selector on the
 *		  target
 * \param repeats Whether the timer repeats after it has been executed
 * \return A new, autoreleased timer
 */
+ scheduledTimerWithTimeInterval: (double)interval
			  target: (id)target
			selector: (SEL)selector
			  object: (id)object1
			  object: (id)object2
			 repeats: (BOOL)repeats;
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
					target: (id)target
				      selector: (SEL)selector
					object: (id)object1
					object: (id)object2
				       repeats: (BOOL)repeats;

#ifdef OF_HAVE_BLOCKS
/**
 * \brief Creates and schedules a new timer with the specified time interval.
 *
 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param repeats Whether the timer repeats after it has been executed
 * \param block The block to invoke when the timer fires
 * \return A new, autoreleased timer
 */
+ scheduledTimerWithTimeInterval: (double)interval
			 repeats: (BOOL)repeats
			   block: (of_timer_block_t)block;
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
				       repeats: (BOOL)repeats
					 block: (of_timer_block_t)block;
#endif

/**
 * \brief Creates a new timer with the specified time interval.
 *
 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param target The target on which to call the selector
 * \param selector The selector to call on the target
 * \param repeats Whether the timer repeats after it has been executed
 * \return A new, autoreleased timer
 */
+ timerWithTimeInterval: (double)interval
		 target: (id)target
	       selector: (SEL)selector
		repeats: (BOOL)repeats;
+ (instancetype)timerWithTimeInterval: (double)interval
			       target: (id)target
			     selector: (SEL)selector
			      repeats: (BOOL)repeats;

/**
 * \brief Creates a new timer with the specified time interval.
 *
 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param target The target on which to call the selector
 * \param selector The selector to call on the target
 * \param object An object to pass when calling the selector on the target
 * \param repeats Whether the timer repeats after it has been executed
 * \return A new, autoreleased timer
 */
+ timerWithTimeInterval: (double)interval
		 target: (id)target
	       selector: (SEL)selector
		 object: (id)object
		repeats: (BOOL)repeats;
+ (instancetype)timerWithTimeInterval: (double)interval
			       target: (id)target
			     selector: (SEL)selector
			       object: (id)object
			      repeats: (BOOL)repeats;

/**
 * \brief Creates a new timer with the specified time interval.
 *
 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param target The target on which to call the selector
 * \param selector The selector to call on the target
 * \param object1 The first object to pass when calling the selector on the
 *		  target
 * \param object2 The second object to pass when calling the selector on the
 *		  target
 * \param repeats Whether the timer repeats after it has been executed
 * \return A new, autoreleased timer
 */
+ timerWithTimeInterval: (double)interval
		 target: (id)target
	       selector: (SEL)selector
		 object: (id)object1
		 object: (id)object2
		repeats: (BOOL)repeats;
+ (instancetype)timerWithTimeInterval: (double)interval
			       target: (id)target
			     selector: (SEL)selector
			       object: (id)object1
			       object: (id)object2
			      repeats: (BOOL)repeats;

#ifdef OF_HAVE_BLOCKS
/**
 * \brief Creates a new timer with the specified time interval.
 *
 * \param interval The time interval after which the timer should be executed
 *		   when fired
 * \param repeats Whether the timer repeats after it has been executed
 * \param block The block to invoke when the timer fires
 * \return A new, autoreleased timer
 */
+ timerWithTimeInterval: (double)interval
		repeats: (BOOL)repeats
		  block: (of_timer_block_t)block;
+ (instancetype)timerWithTimeInterval: (double)interval
			      repeats: (BOOL)repeats
				block: (of_timer_block_t)block;
#endif

/**
 * \brief Initializes an already allocated timer with the specified time
 *	  interval.
 *
 * \param fireDate The date at which the timer should fire

Modified src/OFTimer.m from [2c4f439273] to [614e54faf3].

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







-
-
-
-
+
+
+
+

















-
-
-
-
-
+
+
+
+
+


















-
-
-
-
-
-
+
+
+
+
+
+




















-
-
-
+
+
+

















-
-
-
-
+
+
+
+















-
-
-
-
-
+
+
+
+
+
















-
-
-
-
-
-
+
+
+
+
+
+


















-
-
-
+
+
+







#import "OFInvalidArgumentException.h"
#import "OFNotImplementedException.h"

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

@implementation OFTimer
+ scheduledTimerWithTimeInterval: (double)interval
			  target: (id)target
			selector: (SEL)selector
			 repeats: (BOOL)repeats
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
					target: (id)target
				      selector: (SEL)selector
				       repeats: (BOOL)repeats
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					    target: target
					  selector: selector
					   repeats: repeats] autorelease];

	[[OFRunLoop currentRunLoop] addTimer: timer];

	[timer retain];
	objc_autoreleasePoolPop(pool);

	return [timer autorelease];
}

+ scheduledTimerWithTimeInterval: (double)interval
			  target: (id)target
			selector: (SEL)selector
			  object: (id)object
			 repeats: (BOOL)repeats
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
					target: (id)target
				      selector: (SEL)selector
					object: (id)object
				       repeats: (BOOL)repeats
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					    target: target
					  selector: selector
					    object: object
					   repeats: repeats] autorelease];

	[[OFRunLoop currentRunLoop] addTimer: timer];

	[timer retain];
	objc_autoreleasePoolPop(pool);

	return [timer autorelease];
}

+ scheduledTimerWithTimeInterval: (double)interval
			  target: (id)target
			selector: (SEL)selector
			  object: (id)object1
			  object: (id)object2
			 repeats: (BOOL)repeats
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
					target: (id)target
				      selector: (SEL)selector
					object: (id)object1
					object: (id)object2
				       repeats: (BOOL)repeats
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					    target: target
					  selector: selector
					    object: object1
					    object: object2
					   repeats: repeats] autorelease];

	[[OFRunLoop currentRunLoop] addTimer: timer];

	[timer retain];
	objc_autoreleasePoolPop(pool);

	return [timer autorelease];
}

#ifdef OF_HAVE_BLOCKS
+ scheduledTimerWithTimeInterval: (double)interval
			 repeats: (BOOL)repeats
			   block: (of_timer_block_t)block
+ (instancetype)scheduledTimerWithTimeInterval: (double)interval
				       repeats: (BOOL)repeats
					 block: (of_timer_block_t)block
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					   repeats: repeats
					     block: block] autorelease];

	[[OFRunLoop currentRunLoop] addTimer: timer];

	[timer retain];
	objc_autoreleasePoolPop(pool);

	return [timer autorelease];
}
#endif

+ timerWithTimeInterval: (double)interval
		 target: (id)target
	       selector: (SEL)selector
		repeats: (BOOL)repeats
+ (instancetype)timerWithTimeInterval: (double)interval
			       target: (id)target
			     selector: (SEL)selector
			      repeats: (BOOL)repeats
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					    target: target
					  selector: selector
					   repeats: repeats] autorelease];

	[timer retain];
	objc_autoreleasePoolPop(pool);

	return [timer autorelease];
}

+ timerWithTimeInterval: (double)interval
		 target: (id)target
	       selector: (SEL)selector
		 object: (id)object
		repeats: (BOOL)repeats
+ (instancetype)timerWithTimeInterval: (double)interval
			       target: (id)target
			     selector: (SEL)selector
			       object: (id)object
			      repeats: (BOOL)repeats
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					    target: target
					  selector: selector
					    object: object
					   repeats: repeats] autorelease];

	[timer retain];
	objc_autoreleasePoolPop(pool);

	return [timer autorelease];
}

+ timerWithTimeInterval: (double)interval
		 target: (id)target
	       selector: (SEL)selector
		 object: (id)object1
		 object: (id)object2
		repeats: (BOOL)repeats
+ (instancetype)timerWithTimeInterval: (double)interval
			       target: (id)target
			     selector: (SEL)selector
			       object: (id)object1
			       object: (id)object2
			      repeats: (BOOL)repeats
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					    target: target
					  selector: selector
					    object: object1
					    object: object2
					   repeats: repeats] autorelease];

	[timer retain];
	objc_autoreleasePoolPop(pool);

	return [timer autorelease];
}

#ifdef OF_HAVE_BLOCKS
+ timerWithTimeInterval: (double)interval
		repeats: (BOOL)repeats
		  block: (of_timer_block_t)block
+ (instancetype)timerWithTimeInterval: (double)interval
			      repeats: (BOOL)repeats
				block: (of_timer_block_t)block
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: interval];
	id timer = [[[self alloc] initWithFireDate: fireDate
					  interval: interval
					   repeats: repeats
					     block: block] autorelease];

Modified src/OFURL.h from [b99e18b61d] to [23c8849a02].

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







-
+








-
-
+
+








/**
 * Creates a new URL with the specified string.
 *
 * \param string A string describing a URL
 * \return A new, autoreleased OFURL
 */
+ URLWithString: (OFString*)string;
+ (instancetype)URLWithString: (OFString*)string;

/**
 * Creates a new URL with the specified string relative to the specified URL.
 *
 * \param string A string describing a URL
 * \param URL An URL to which the string is relative
 * \return A new, autoreleased OFURL
 */
+ URLWithString: (OFString*)string
  relativeToURL: (OFURL*)URL;
+ (instancetype)URLWithString: (OFString*)string
		relativeToURL: (OFURL*)URL;

/**
 * \brief Initializes an already allocated OFURL with the specified string.
 *
 * \param string A string describing a URL
 * \return An initialized OFURL
 */

Modified src/OFURL.m from [4eed3ec6f3] to [7c53691cc2].

74
75
76
77
78
79
80
81

82
83
84
85
86
87


88
89
90
91
92
93
94
74
75
76
77
78
79
80

81
82
83
84
85


86
87
88
89
90
91
92
93
94







-
+




-
-
+
+








	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

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

+ URLWithString: (OFString*)string
  relativeToURL: (OFURL*)URL
+ (instancetype)URLWithString: (OFString*)string
		relativeToURL: (OFURL*)URL
{
	return [[[self alloc] initWithString: string
			       relativeToURL: URL] autorelease];
}

- initWithString: (OFString*)string
{

Modified src/OFXMLAttribute.h from [c21ecb5897] to [f0bb79b5f0].

39
40
41
42
43
44
45
46
47
48



49
50
51
52
53
54
55
39
40
41
42
43
44
45



46
47
48
49
50
51
52
53
54
55







-
-
-
+
+
+







 * \brief Creates a new XML attribute.
 *
 * \param name The name of the attribute
 * \param ns The namespace of the attribute
 * \param value The string value of the attribute
 * \return A new autoreleased OFXMLAttribute with the specified parameters
 */
+ attributeWithName: (OFString*)name
	  namespace: (OFString*)ns
	stringValue: (OFString*)value;
+ (instancetype)attributeWithName: (OFString*)name
			namespace: (OFString*)ns
		      stringValue: (OFString*)value;

/**
 * \brief Initializes an already allocated OFXMLAttribute.
 *
 * \param name The name of the attribute
 * \param ns The namespace of the attribute
 * \param value The string value of the attribute

Modified src/OFXMLAttribute.m from [3e96efbf3c] to [cc7877f544].

23
24
25
26
27
28
29
30
31
32



33
34
35
36
37
38
39
23
24
25
26
27
28
29



30
31
32
33
34
35
36
37
38
39







-
-
-
+
+
+








#import "OFInvalidArgumentException.h"

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

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

- initWithName: (OFString*)name_

Modified src/OFXMLCDATA.h from [3e523a6a67] to [f8c9c1d9fa].

26
27
28
29
30
31
32
33

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

33
34
35
36
37
38
39
40
41
42







-
+










/**
 * \brief Creates a new OFXMLCDATA with the specified string.
 *
 * \param string The string value for the CDATA
 * \return A new OFXMLCDATA
 */
+ CDATAWithString: (OFString*)string;
+ (instancetype)CDATAWithString: (OFString*)string;

/**
 * \brief Initializes an alredy allocated OFXMLCDATA with the specified string.
 *
 * \param string The string value for the CDATA
 * \return An initialized OFXMLCDATA
 */
- initWithString: (OFString*)string;
@end

Modified src/OFXMLCDATA.m from [65a1f72f30] to [ee012736ca].

21
22
23
24
25
26
27
28

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

28
29
30
31
32
33
34
35







-
+







#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

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

- initWithString: (OFString*)string
{
	self = [super init];

Modified src/OFXMLCharacters.h from [f4ce363920] to [88de715286].

26
27
28
29
30
31
32
33

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

33
34
35
36
37
38
39
40
41
42
43







-
+











/**
 * \brief Creates a new OFXMLCharacters with the specified string.
 *
 * \param string The string value for the characters
 * \return A new OFXMLCharacters
 */
+ charactersWithString: (OFString*)string;
+ (instancetype)charactersWithString: (OFString*)string;

/**
 * \brief Initializes an already allocated OFXMLCharacters with the specified
 *	  string.
 *
 * \param string The string value for the characters
 * \return An initialized OFXMLCharacters
 */
- initWithString: (OFString*)string;
@end

Modified src/OFXMLCharacters.m from [c037bb1a71] to [ae50e60984].

21
22
23
24
25
26
27
28

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

28
29
30
31
32
33
34
35







-
+







#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

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

- initWithString: (OFString*)string
{
	self = [super init];

Modified src/OFXMLComment.h from [8f073bc8a9] to [22d9c30afb].

26
27
28
29
30
31
32
33

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

33
34
35
36
37
38
39
40
41
42
43







-
+











/**
 * \brief Creates a new OFXMLComment with the specified string.
 *
 * \param string The string for the comment
 * \return A new OFXMLComment
 */
+ commentWithString: (OFString*)string;
+ (instancetype)commentWithString: (OFString*)string;

/**
 * \brief Initializes an already allocated OFXMLComment with the specified
 *	  string.
 *
 * \param string The string for the comment
 * \return An initialized OFXMLComment
 */
- initWithString: (OFString*)string;
@end

Modified src/OFXMLComment.m from [b39210532d] to [6961a2ec1b].

23
24
25
26
27
28
29
30

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

30
31
32
33
34
35
36
37







-
+







#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

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

- initWithString: (OFString*)string
{
	self = [super init];

Modified src/OFXMLElement.h from [753262f044] to [15d1784604].

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







-
+









-
-
+
+









-
-
+
+











-
-
-
+
+
+








-
+







-
+








-
+








/**
 * \brief Creates a new XML element with the specified name.
 *
 * \param name The name for the element
 * \return A new autoreleased OFXMLElement with the specified element name
 */
+ elementWithName: (OFString*)name;
+ (instancetype)elementWithName: (OFString*)name;

/**
 * \brief Creates a new XML element with the specified name and string value.
 *
 * \param name The name for the element
 * \param stringValue The value for the element
 * \return A new autoreleased OFXMLElement with the specified element name and
 *	   value
 */
+ elementWithName: (OFString*)name
      stringValue: (OFString*)stringValue;
+ (instancetype)elementWithName: (OFString*)name
		    stringValue: (OFString*)stringValue;

/**
 * \brief Creates a new XML element with the specified name and namespace.
 *
 * \param name The name for the element
 * \param ns The namespace for the element
 * \return A new autoreleased OFXMLElement with the specified element name and
 *	   namespace
 */
+ elementWithName: (OFString*)name
	namespace: (OFString*)ns;
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)ns;

/**
 * \brief Creates a new XML element with the specified name, namespace and
 * 	  string value.
 *
 * \param name The name for the element
 * \param ns The namespace for the element
 * \param stringValue The value for the element
 * \return A new autoreleased OFXMLElement with the specified element name,
 *	   namespace and value
 */
+ elementWithName: (OFString*)name
	namespace: (OFString*)ns
      stringValue: (OFString*)stringValue;
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)ns
		    stringValue: (OFString*)stringValue;

/**
 * \brief Creates a new element with the specified element.
 *
 * \param element An OFXMLElement to initialize the OFXMLElement with
 * \return A new autoreleased OFXMLElement with the contents of the specified
 *	   element
 */
+ elementWithElement: (OFXMLElement*)element;
+ (instancetype)elementWithElement: (OFXMLElement*)element;

/**
 * \brief Parses the string and returns an OFXMLElement for it.
 *
 * \param string The string to parse
 * \return A new autoreleased OFXMLElement with the contents of the string
 */
+ elementWithXMLString: (OFString*)string;
+ (instancetype)elementWithXMLString: (OFString*)string;

/**
 * \brief Parses the specified file and returns an OFXMLElement for it.
 *
 * \param path The path to the file
 * \return A new autoreleased OFXMLElement with the contents of the specified
 *	   file
 */
+ elementWithFile: (OFString*)path;
+ (instancetype)elementWithFile: (OFString*)path;

/**
 * \brief Initializes an already allocated OFXMLElement with the specified name.
 *
 * \param name The name for the element
 * \return An initialized OFXMLElement with the specified element name
 */

Modified src/OFXMLElement.m from [914801392e] to [b32bd298a6].

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







-
+




-
-
+
+





-
-
+
+





-
-
-
+
+
+






-
+




-
+




-
+







{
	if (self == [OFXMLElement class]) {
		charactersClass = [OFXMLCharacters class];
		CDATAClass = [OFXMLCDATA class];
	}
}

+ elementWithName: (OFString*)name
+ (instancetype)elementWithName: (OFString*)name
{
	return [[[self alloc] initWithName: name] autorelease];
}

+ elementWithName: (OFString*)name
      stringValue: (OFString*)stringValue
+ (instancetype)elementWithName: (OFString*)name
		    stringValue: (OFString*)stringValue
{
	return [[[self alloc] initWithName: name
			       stringValue: stringValue] autorelease];
}

+ elementWithName: (OFString*)name
	namespace: (OFString*)ns
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)ns
{
	return [[[self alloc] initWithName: name
				 namespace: ns] autorelease];
}

+ elementWithName: (OFString*)name
	namespace: (OFString*)ns
      stringValue: (OFString*)stringValue
+ (instancetype)elementWithName: (OFString*)name
		      namespace: (OFString*)ns
		    stringValue: (OFString*)stringValue
{
	return [[[self alloc] initWithName: name
				 namespace: ns
			       stringValue: stringValue] autorelease];
}

+ elementWithElement: (OFXMLElement*)element
+ (instancetype)elementWithElement: (OFXMLElement*)element
{
	return [[[self alloc] initWithElement: element] autorelease];
}

+ elementWithXMLString: (OFString*)string
+ (instancetype)elementWithXMLString: (OFString*)string
{
	return [[[self alloc] initWithXMLString: string] autorelease];
}

+ elementWithFile: (OFString*)path
+ (instancetype)elementWithFile: (OFString*)path
{
	return [[[self alloc] initWithFile: path] autorelease];
}

- init
{
	Class c = [self class];

Modified src/OFXMLElementBuilder.h from [4afd0a1239] to [a3fee8ab7a].

113
114
115
116
117
118
119
120

121
122
123
124
125
126
127
113
114
115
116
117
118
119

120
121
122
123
124
125
126
127







-
+







#endif

/**
 * \brief Creates a new element builder.
 *
 * \return A new, autoreleased OFXMLElementBuilder
 */
+ elementBuilder;
+ (instancetype)elementBuilder;

/**
 * \brief Returns the delegate for the OFXMLElementBuilder.
 *
 * \return The delegate for the OFXMLElementBuilder
 */
- (id <OFXMLElementBuilderDelegate>)delegate;

Modified src/OFXMLElementBuilder.m from [13948b0a6c] to [2a5d5697ce].

29
30
31
32
33
34
35
36

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

36
37
38
39
40
41
42
43







-
+







#import "OFMutableArray.h"

#import "OFMalformedXMLException.h"

#import "macros.h"

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

- init
{
	self = [super init];

Modified src/OFXMLParser.h from [81cc682f41] to [72fe93e8ed].

174
175
176
177
178
179
180
181

182
183
184
185
186
187
188
174
175
176
177
178
179
180

181
182
183
184
185
186
187
188







-
+







#endif

/**
 * \brief Creates a new XML parser.
 *
 * \return A new, autoreleased OFXMLParser
 */
+ parser;
+ (instancetype)parser;

/**
 * \brief Returns the delegate that is used by the XML parser.
 *
 * \return The delegate that is used by the XML parser
 */
- (id <OFXMLParserDelegate>)delegate;

Modified src/OFXMLParser.m from [2183cd8116] to [ca01c9a5ad].

171
172
173
174
175
176
177
178

179
180
181
182
183
184
185
171
172
173
174
175
176
177

178
179
180
181
182
183
184
185







-
+







			    exceptionWithClass: self];

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

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

- init
{
	self = [super init];

Modified src/OFXMLProcessingInstructions.h from [6399909259] to [c338c4eeff].

26
27
28
29
30
31
32
33

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

33
34
35
36
37
38
39
40
41
42
43







-
+











/**
 * \brief Creates a new OFXMLProcessingInstructions with the specified string.
 *
 * \param string The string for the processing instructions
 * \return A new OFXMLProcessingInstructions
 */
+ processingInstructionsWithString: (OFString*)string;
+ (instancetype)processingInstructionsWithString: (OFString*)string;

/**
 * \brief Initializes an already allocated OFXMLProcessingInstructions with the
 *	  specified string.
 *
 * \param string The string for the processing instructions
 * \return An initialized OFXMLProcessingInstructions
 */
- initWithString: (OFString*)string;
@end

Modified src/OFXMLProcessingInstructions.m from [00953e389a] to [a5d7094212].

23
24
25
26
27
28
29
30

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

30
31
32
33
34
35
36
37







-
+







#import "OFXMLElement.h"

#import "OFInvalidArgumentException.h"

#import "autorelease.h"

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

- initWithString: (OFString*)string
{
	self = [super init];

Modified src/exceptions/OFAcceptFailedException.h from [5c60d8a388] to [ce6bf67244].

33
34
35
36
37
38
39
40
41


42
43
44
45
46
47
48
33
34
35
36
37
38
39


40
41
42
43
44
45
46
47
48







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not accept a connection
 * \return A new accept failed exception
 */
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket;
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket;

/**
 * Initializes an already allocated accept failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not accept a connection
 * \return An initialized accept failed exception

Modified src/exceptions/OFAcceptFailedException.m from [6fe3a15731] to [c457c058f0].

21
22
23
24
25
26
27
28
29


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


28
29
30
31
32
33
34
35
36







-
-
+
+







#import "OFTCPSocket.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFAcceptFailedException
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
{
	return [[[self alloc] initWithClass: class_
				     socket: socket] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFAddressTranslationFailedException.h from [ee7d1ec412] to [51fe7c2bc9].

36
37
38
39
40
41
42
43
44
45



46
47
48
49
50
51
52
36
37
38
39
40
41
42



43
44
45
46
47
48
49
50
51
52







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not translate the address
 * \param host The host for which translation was requested
 * \return A new address translation failed exception
 */
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
		host: (OFString*)host;
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			      host: (OFString*)host;

/**
 * Initializes an already allocated address translation failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not translate the address
 * \param host The host for which translation was requested

Modified src/exceptions/OFAddressTranslationFailedException.m from [37a25d4426] to [34c9824ce1].

19
20
21
22
23
24
25
26
27
28



29
30
31
32
33
34
35
19
20
21
22
23
24
25



26
27
28
29
30
31
32
33
34
35







-
-
-
+
+
+







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

#import "common.h"

@implementation OFAddressTranslationFailedException
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
		host: (OFString*)host
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			      host: (OFString*)host
{
	return [[[self alloc] initWithClass: class_
				     socket: socket
				       host: host] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFAlreadyConnectedException.h from [215f2f15e9] to [f0f3a732ca].

32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
32
33
34
35
36
37
38


39
40
41
42
43
44
45
46
47







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which is already connected
 * \return A new already connected exception
 */
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket;
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket;

/**
 * Initializes an already allocated already connected exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which is already connected
 * \return An initialized already connected exception

Modified src/exceptions/OFAlreadyConnectedException.m from [71611b6537] to [5e1a345877].

21
22
23
24
25
26
27
28
29


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


28
29
30
31
32
33
34
35
36







-
-
+
+







#import "OFTCPSocket.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFAlreadyConnectedException
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
{
	return [[[self alloc] initWithClass: class_
				     socket: socket] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFBindFailedException.h from [b557cc926c] to [de9573017a].

39
40
41
42
43
44
45
46
47
48
49




50
51
52
53
54
55
56
39
40
41
42
43
44
45




46
47
48
49
50
51
52
53
54
55
56







-
-
-
-
+
+
+
+







/**
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not be bound
 * \param host The host on which binding failed
 * \param port The port on which binding failed
 * \return A new bind failed exception
 */
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
		host: (OFString*)host
		port: (uint16_t)port;
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			      host: (OFString*)host
			      port: (uint16_t)port;

/**
 * Initializes an already allocated bind failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not be bound
 * \param host The host on which binding failed

Modified src/exceptions/OFBindFailedException.m from [75170f8362] to [e975d14a09].

21
22
23
24
25
26
27
28
29
30
31




32
33
34
35
36
37
38
21
22
23
24
25
26
27




28
29
30
31
32
33
34
35
36
37
38







-
-
-
-
+
+
+
+







#import "OFTCPSocket.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFBindFailedException
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
		host: (OFString*)host
		port: (uint16_t)port
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			      host: (OFString*)host
			      port: (uint16_t)port
{
	return [[[self alloc] initWithClass: class_
				     socket: socket
				       host: host
				       port: port] autorelease];
}

Modified src/exceptions/OFChangeDirectoryFailedException.h from [27731d5573] to [3beb130497].

32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
32
33
34
35
36
37
38


39
40
41
42
43
44
45
46
47







-
-
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param path A string with the path of the directory to which couldn't be
 *	       changed
 * \return A new change directory failed exception
 */
+ exceptionWithClass: (Class)class_
		path: (OFString*)path;
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path;

/**
 * Initializes an already allocated change directory failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path A string with the path of the directory to which couldn't be
 *	       changed

Modified src/exceptions/OFChangeDirectoryFailedException.m from [8119d48fc6] to [061077ad6c].

20
21
22
23
24
25
26
27
28


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


27
28
29
30
31
32
33
34
35







-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFChangeDirectoryFailedException
+ exceptionWithClass: (Class)class_
		path: (OFString*)path_
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path_
{
	return [[[self alloc] initWithClass: class_
				       path: path_] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFChangeFileModeFailedException.h from [b4e0e345ec] to [affc9d01dd].

36
37
38
39
40
41
42
43
44
45



46
47
48
49
50
51
52
36
37
38
39
40
41
42



43
44
45
46
47
48
49
50
51
52







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \param mode The new mode for the file
 * \return An initialized change file mode failed exception
 */
+ exceptionWithClass: (Class)class_
		path: (OFString*)path
		mode: (mode_t)mode;
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path
			      mode: (mode_t)mode;

/**
 * Initializes an already allocated change file mode failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \param mode The new mode for the file

Modified src/exceptions/OFChangeFileModeFailedException.m from [2fb214a922] to [84e028f2f5].

20
21
22
23
24
25
26
27
28
29



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



27
28
29
30
31
32
33
34
35
36







-
-
-
+
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFChangeFileModeFailedException
+ exceptionWithClass: (Class)class_
		path: (OFString*)path
		mode: (mode_t)mode
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path
			      mode: (mode_t)mode
{
	return [[[self alloc] initWithClass: class_
				       path: path
				       mode: mode] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFChangeFileOwnerFailedException.h from [4b9ac50bd0] to [9421a3246c].

38
39
40
41
42
43
44
45
46
47
48




49
50
51
52
53
54
55
38
39
40
41
42
43
44




45
46
47
48
49
50
51
52
53
54
55







-
-
-
-
+
+
+
+







/**
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \param owner The new owner for the file
 * \param group The new group for the file
 * \return An initialized change file owner failed exception
 */
+ exceptionWithClass: (Class)class_
		path: (OFString*)path
	       owner: (OFString*)owner
	       group: (OFString*)group;
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path
			     owner: (OFString*)owner
			     group: (OFString*)group;

/**
 * Initializes an already allocated change file owner failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \param owner The new owner for the file

Modified src/exceptions/OFChangeFileOwnerFailedException.m from [691dcbaf92] to [e07fdc2eff].

21
22
23
24
25
26
27
28
29
30
31




32
33
34
35
36
37
38
21
22
23
24
25
26
27




28
29
30
31
32
33
34
35
36
37
38







-
-
-
-
+
+
+
+








#import "OFNotImplementedException.h"

#import "common.h"

#ifndef _WIN32
@implementation OFChangeFileOwnerFailedException
+ exceptionWithClass: (Class)class_
		path: (OFString*)path
	 owner: (OFString*)owner
	 group: (OFString*)group
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path
			     owner: (OFString*)owner
			     group: (OFString*)group
{
	return [[[self alloc] initWithClass: class_
				       path: path
				      owner: owner
				      group: group] autorelease];
}

Modified src/exceptions/OFConditionBroadcastFailedException.h from [2f576e67d8] to [12a3b4f9af].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param condition The condition which could not be broadcasted
 * \return A new condition broadcast failed exception
 */
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition;
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition;

/**
 * Initializes an already allocated condition broadcast failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param condition The condition which could not be broadcasted
 * \return An initialized condition broadcast failed exception

Modified src/exceptions/OFConditionBroadcastFailedException.m from [77983dd397] to [faca705211].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFConditionBroadcastFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFConditionBroadcastFailedException
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition
{
	return [[[self alloc] initWithClass: class_
				  condition: condition] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFConditionSignalFailedException.h from [26c6f07ab6] to [ccc6986d00].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param condition The condition which could not be signaled
 * \return A new condition signal failed exception
 */
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition;
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition;

/**
 * Initializes an already allocated condition signal failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param condition The condition which could not be signaled
 * \return An initialized condition signal failed exception

Modified src/exceptions/OFConditionSignalFailedException.m from [d759170854] to [eac6850397].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFConditionSignalFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFConditionSignalFailedException
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition
{
	return [[[self alloc] initWithClass: class_
				  condition: condition] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFConditionStillWaitingException.h from [8e4fa3434d] to [fca0f6e639].

32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
32
33
34
35
36
37
38


39
40
41
42
43
44
45
46
47







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param condition The condition for which is still being waited
 * \return A new condition still waiting exception
 */
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition;
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition;

/**
 * Initializes an already allocated condition still waiting exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param condition The condition for which is still being waited
 * \return An initialized condition still waiting exception

Modified src/exceptions/OFConditionStillWaitingException.m from [06d2bcc4b0] to [36d7085370].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFConditionStillWaitingException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFConditionStillWaitingException
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition
{
	return [[[self alloc] initWithClass: class_
				  condition: condition] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFConditionWaitFailedException.h from [f11d17f51e] to [a05792c7b8].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param condition The condition for which could not be waited
 * \return A new condition wait failed exception
 */
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition;
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition;

/**
 * Initializes an already allocated condition wait failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param condition The condition for which could not be waited
 * \return An initialized condition wait failed exception

Modified src/exceptions/OFConditionWaitFailedException.m from [3cdc6fcdf0] to [e651da53f2].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFConditionWaitFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFConditionWaitFailedException
+ exceptionWithClass: (Class)class_
	   condition: (OFCondition*)condition
+ (instancetype)exceptionWithClass: (Class)class_
			 condition: (OFCondition*)condition
{
	return [[[self alloc] initWithClass: class_
				  condition: condition] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFConnectionFailedException.h from [1ba7298c8e] to [cf16965ef3].

39
40
41
42
43
44
45
46
47
48
49




50
51
52
53
54
55
56
39
40
41
42
43
44
45




46
47
48
49
50
51
52
53
54
55
56







-
-
-
-
+
+
+
+







/**
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not connect
 * \param host The host to which the connection failed
 * \param port The port on the host to which the connection failed
 * \return A new connection failed exception
 */
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
		host: (OFString*)host
		port: (uint16_t)port;
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			      host: (OFString*)host
			      port: (uint16_t)port;

/**
 * Initializes an already allocated connection failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which could not connect
 * \param host The host to which the connection failed

Modified src/exceptions/OFConnectionFailedException.m from [96c7efdf5e] to [c39e733948].

21
22
23
24
25
26
27
28
29
30
31




32
33
34
35
36
37
38
21
22
23
24
25
26
27




28
29
30
31
32
33
34
35
36
37
38







-
-
-
-
+
+
+
+







#import "OFTCPSocket.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFConnectionFailedException
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
		host: (OFString*)host
		port: (uint16_t)port
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			      host: (OFString*)host
			      port: (uint16_t)port
{
	return [[[self alloc] initWithClass: class_
				     socket: socket
				       host: host
				       port: port] autorelease];
}

Modified src/exceptions/OFCopyFileFailedException.h from [1914cc8f7e] to [2ecd97f65f].

34
35
36
37
38
39
40
41
42
43



44
45
46
47
48
49
50
34
35
36
37
38
39
40



41
42
43
44
45
46
47
48
49
50







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param source The original path
 * \param destination The new path
 * \return A new copy file failed exception
 */
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination;
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination;

/**
 * Initializes an already allocated copy file failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param source The original path
 * \param destination The new path

Modified src/exceptions/OFCopyFileFailedException.m from [e12978b387] to [0092226d0a].

20
21
22
23
24
25
26
27
28
29



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



27
28
29
30
31
32
33
34
35
36







-
-
-
+
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFCopyFileFailedException
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination
{
	return [[[self alloc] initWithClass: class_
				 sourcePath: source
			    destinationPath: destination] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFCreateDirectoryFailedException.h from [b1e4762c7a] to [04b508ef4d].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param path A string with the path of the directory which couldn't be created
 * \return A new create directory failed exception
 */
+ exceptionWithClass: (Class)class_
		path: (OFString*)path;
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path;

/**
 * Initializes an already allocated create directory failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path A string with the path of the directory which couldn't be created
 * \return An initialized create directory failed exception

Modified src/exceptions/OFCreateDirectoryFailedException.m from [ae344fd788] to [49460e3e5d].

20
21
22
23
24
25
26
27
28


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


27
28
29
30
31
32
33
34
35







-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFCreateDirectoryFailedException
+ exceptionWithClass: (Class)class_
		path: (OFString*)path_
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path_
{
	return [[[self alloc] initWithClass: class_
				       path: path_] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFDeleteDirectoryFailedException.h from [c01a1cc456] to [d3f645608a].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param path The path of the directory
 * \return A new delete directory failed exception
 */
+ exceptionWithClass: (Class)class_
		path: (OFString*)path;
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path;

/**
 * Initializes an already allocated delete directory failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path The path of the directory
 * \return An initialized delete directory failed exception

Modified src/exceptions/OFDeleteDirectoryFailedException.m from [6a79dd025d] to [d0a7435971].

20
21
22
23
24
25
26
27
28


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


27
28
29
30
31
32
33
34
35







-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFDeleteDirectoryFailedException
+ exceptionWithClass: (Class)class_
		path: (OFString*)path_
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path_
{
	return [[[self alloc] initWithClass: class_
				       path: path_] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFDeleteFileFailedException.h from [6a2aaca49b] to [0bc79ded9a].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \return A new delete file failed exception
 */
+ exceptionWithClass: (Class)class_
		path: (OFString*)path;
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path;

/**
 * Initializes an already allocated delete file failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \return An initialized delete file failed exception

Modified src/exceptions/OFDeleteFileFailedException.m from [52e4abd616] to [b0c2776292].

20
21
22
23
24
25
26
27
28


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


27
28
29
30
31
32
33
34
35







-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFDeleteFileFailedException
+ exceptionWithClass: (Class)class_
		path: (OFString*)path_
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path_
{
	return [[[self alloc] initWithClass: class_
				       path: path_] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFEnumerationMutationException.h from [711baf405e] to [df642fbe51].

30
31
32
33
34
35
36
37
38


39
40
41
42
43
44
45
30
31
32
33
34
35
36


37
38
39
40
41
42
43
44
45







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param object The object which was mutated during enumeration
 * \return A new enumeration mutation exception
 */
+ exceptionWithClass: (Class)class_
	      object: (id)object;
+ (instancetype)exceptionWithClass: (Class)class_
			    object: (id)object;

/**
 * Initializes an already allocated enumeration mutation exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param object The object which was mutated during enumeration
 * \return An initialized enumeration mutation exception

Modified src/exceptions/OFEnumerationMutationException.m from [83a60bc830] to [15571f572b].

20
21
22
23
24
25
26
27
28


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


27
28
29
30
31
32
33
34
35







-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFEnumerationMutationException
+ exceptionWithClass: (Class)class_
	      object: (id)object
+ (instancetype)exceptionWithClass: (Class)class_
			    object: (id)object
{
	return [[[self alloc] initWithClass: class_
				     object: object] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFException.h from [e7f26ea989] to [1070cfb5a4].

36
37
38
39
40
41
42
43

44
45
46
47
48
49
50
36
37
38
39
40
41
42

43
44
45
46
47
48
49
50







-
+








/**
 * Creates a new exception.
 *
 * \param class_ The class of the object which caused the exception
 * \return A new exception
 */
+ exceptionWithClass: (Class)class_;
+ (instancetype)exceptionWithClass: (Class)class_;

/**
 * Initializes an already allocated OFException.
 *
 * \param class_ The class of the object which caused the exception
 * \return An initialized OFException
 */

Modified src/exceptions/OFException.m from [32b20ebef7] to [2112dc5f17].

18
19
20
21
22
23
24
25

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

25
26
27
28
29
30
31
32







-
+








#import "OFException.h"
#import "OFString.h"

#import "OFNotImplementedException.h"

@implementation OFException
+ exceptionWithClass: (Class)class_
+ (instancetype)exceptionWithClass: (Class)class_
{
	return [[[self alloc] initWithClass: class_] autorelease];
}

- init
{
	Class c = [self class];

Modified src/exceptions/OFHTTPRequestFailedException.h from [3e49458f2b] to [cfa7c8cc6b].

35
36
37
38
39
40
41
42
43
44



45
46
47
48
49
50
51
35
36
37
38
39
40
41



42
43
44
45
46
47
48
49
50
51







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param request The HTTP request which failed
 * \param result The result of the failed HTTP request
 * \return A new HTTP request failed exception
 */
+ exceptionWithClass: (Class)class_
	     request: (OFHTTPRequest*)request
	      result: (OFHTTPRequestResult*)result;
+ (instancetype)exceptionWithClass: (Class)class_
			   request: (OFHTTPRequest*)request
			    result: (OFHTTPRequestResult*)result;

/**
 * Initializes an already allocated HTTP request failed exception
 *
 * \param class_ The class of the object which caused the exception
 * \param request The HTTP request which failed
 * \param result The result of the failed HTTP request

Modified src/exceptions/OFHTTPRequestFailedException.m from [3fcf583711] to [f3f841e094].

22
23
24
25
26
27
28
29
30
31



32
33
34
35
36
37
38
22
23
24
25
26
27
28



29
30
31
32
33
34
35
36
37
38







-
-
-
+
+
+








#import "OFNotImplementedException.h"

#import "autorelease.h"
#import "common.h"

@implementation OFHTTPRequestFailedException
+ exceptionWithClass: (Class)class_
	     request: (OFHTTPRequest*)request
	      result: (OFHTTPRequestResult*)result
+ (instancetype)exceptionWithClass: (Class)class_
			   request: (OFHTTPRequest*)request
			    result: (OFHTTPRequestResult*)result
{
	return [[[self alloc] initWithClass: class_
				    request: request
				     result: result] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFHashAlreadyCalculatedException.h from [515ff1319f] to [bffa480758].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param hash The hash which has already been calculated
 * \return A new hash already calculated exception
 */
+ exceptionWithClass: (Class)class_
		hash: (OFHash*)hash;
+ (instancetype)exceptionWithClass: (Class)class_
			      hash: (OFHash*)hash;

/**
 * Initializes an already allocated hash already calculated exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param hash The hash which has already been calculated
 * \return An initialized hash already calculated exception

Modified src/exceptions/OFHashAlreadyCalculatedException.m from [5cc304779c] to [483aecd301].

21
22
23
24
25
26
27
28
29


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


28
29
30
31
32
33
34
35
36







-
-
+
+







#import "OFHash.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFHashAlreadyCalculatedException
+ exceptionWithClass: (Class)class_
		hash: (OFHash*)hash
+ (instancetype)exceptionWithClass: (Class)class_
			      hash: (OFHash*)hash
{
	return [[[self alloc] initWithClass: class_
				       hash: hash] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFInvalidArgumentException.h from [e90b8bb577] to [9262afb54a].

29
30
31
32
33
34
35
36
37


38
39
40
41
42
43
44
29
30
31
32
33
34
35


36
37
38
39
40
41
42
43
44







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param selector The selector which doesn't accept the argument
 * \return A new invalid argument exception
 */
+ exceptionWithClass: (Class)class_
	    selector: (SEL)selector;
+ (instancetype)exceptionWithClass: (Class)class_
			  selector: (SEL)selector;

/**
 * Initializes an already allocated invalid argument exception
 *
 * \param class_ The class of the object which caused the exception
 * \param selector The selector which doesn't accept the argument
 * \return An initialized invalid argument exception

Modified src/exceptions/OFInvalidArgumentException.m from [a6a662ba80] to [18afe7f030].

20
21
22
23
24
25
26
27
28


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


27
28
29
30
31
32
33
34
35







-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFInvalidArgumentException
+ exceptionWithClass: (Class)class_
	    selector: (SEL)selector_
+ (instancetype)exceptionWithClass: (Class)class_
			  selector: (SEL)selector_
{
	return [[[self alloc] initWithClass: class_
				   selector: selector_] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFInvalidJSONException.h from [28abef2a60] to [dd69569b81].

29
30
31
32
33
34
35
36
37


38
39
40
41
42
43
44
29
30
31
32
33
34
35


36
37
38
39
40
41
42
43
44







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param line The line in which the parsing error encountered
 * \return A new invalid JSON exception
 */
+ exceptionWithClass: (Class)class_
		line: (size_t)line;
+ (instancetype)exceptionWithClass: (Class)class_
			      line: (size_t)line;

/**
 * Initializes an already allocated invalid JSON exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param line The line in which the parsing error encountered
 * \return An initialized invalid JSON exception

Modified src/exceptions/OFInvalidJSONException.m from [7120552858] to [b02bc86218].

18
19
20
21
22
23
24
25
26


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


25
26
27
28
29
30
31
32
33







-
-
+
+








#import "OFInvalidJSONException.h"
#import "OFString.h"

#import "OFNotImplementedException.h"

@implementation OFInvalidJSONException
+ exceptionWithClass: (Class)class_
		line: (size_t)line
+ (instancetype)exceptionWithClass: (Class)class_
			      line: (size_t)line
{
	return [[[self alloc] initWithClass: class_
				       line: line] autorelease];
}

- init
{

Modified src/exceptions/OFLinkFailedException.h from [21a1b60e3c] to [f106ab4027].

35
36
37
38
39
40
41
42
43
44



45
46
47
48
49
50
51
35
36
37
38
39
40
41



42
43
44
45
46
47
48
49
50
51







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param source The source for the link
 * \param destination The destination for the link
 * \return A new link failed exception
 */
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination;
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination;

/**
 * Initializes an already allocated link failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param source The source for the link
 * \param destination The destination for the link

Modified src/exceptions/OFLinkFailedException.m from [24670c67fb] to [9f6ed4a020].

21
22
23
24
25
26
27
28
29
30



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



28
29
30
31
32
33
34
35
36
37







-
-
-
+
+
+








#import "OFNotImplementedException.h"

#import "common.h"

#ifndef _WIN32
@implementation OFLinkFailedException
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination
{
	return [[[self alloc] initWithClass: class_
				 sourcePath: source
			    destinationPath: destination] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFListenFailedException.h from [e276f97633] to [0ed7c6fb04].

36
37
38
39
40
41
42
43
44
45



46
47
48
49
50
51
52
36
37
38
39
40
41
42



43
44
45
46
47
48
49
50
51
52







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which failed to listen
 * \param backlog The requested size of the back log
 * \return A new listen failed exception
 */
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
	     backLog: (int)backlog;
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			   backLog: (int)backlog;

/**
 * Initializes an already allocated listen failed exception
 *
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which failed to listen
 * \param backlog The requested size of the back log

Modified src/exceptions/OFListenFailedException.m from [a7f597b93d] to [038815ba73].

21
22
23
24
25
26
27
28
29
30



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



28
29
30
31
32
33
34
35
36
37







-
-
-
+
+
+







#import "OFTCPSocket.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFListenFailedException
+ exceptionWithClass: (Class)class_
	      socket: (OFTCPSocket*)socket
	     backLog: (int)backlog
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFTCPSocket*)socket
			   backLog: (int)backlog
{
	return [[[self alloc] initWithClass: class_
				     socket: socket
				    backLog: backlog] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFMalformedXMLException.h from [fba0179b9b] to [afc4e720c1].

30
31
32
33
34
35
36
37
38


39
40
41
42
43
44
45
30
31
32
33
34
35
36


37
38
39
40
41
42
43
44
45







-
-
+
+







@property (readonly, retain, nonatomic) OFXMLParser *parser;
#endif

/**
 * \param parser The parser which encountered malformed XML
 * \return A new malformed XML exception
 */
+ exceptionWithClass: (Class)class_
	      parser: (OFXMLParser*)parser;
+ (instancetype)exceptionWithClass: (Class)class_
			    parser: (OFXMLParser*)parser;

/**
 * Initializes an already allocated malformed XML exception.
 *
 * \param parser The parser which encountered malformed XML
 * \return An initialized malformed XML exception
 */

Modified src/exceptions/OFMalformedXMLException.m from [188cd280eb] to [b3e0941446].

21
22
23
24
25
26
27
28
29


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


28
29
30
31
32
33
34
35
36







-
-
+
+







#import "OFXMLParser.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFMalformedXMLException
+ exceptionWithClass: (Class)class_
	      parser: (OFXMLParser*)parser
+ (instancetype)exceptionWithClass: (Class)class_
			    parser: (OFXMLParser*)parser
{
	return [[[self alloc] initWithClass: class_
				     parser: parser] autorelease];
}

- initWithClass: (Class)class_
	 parser: (OFXMLParser*)parser_

Modified src/exceptions/OFMemoryNotPartOfObjectException.h from [7f5a4ad968] to [da2c12c442].

29
30
31
32
33
34
35
36
37


38
39
40
41
42
43
44
29
30
31
32
33
34
35


36
37
38
39
40
41
42
43
44







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param ptr A pointer to the memory that is not part of the object
 * \return A new memory not part of object exception
 */
+ exceptionWithClass: (Class)class_
	     pointer: (void*)ptr;
+ (instancetype)exceptionWithClass: (Class)class_
			   pointer: (void*)ptr;

/**
 * Initializes an already allocated memory not part of object exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param ptr A pointer to the memory that is not part of the object
 * \return An initialized memory not part of object exception

Modified src/exceptions/OFMemoryNotPartOfObjectException.m from [795b07ac4b] to [cbc504825f].

18
19
20
21
22
23
24
25
26


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


25
26
27
28
29
30
31
32
33







-
-
+
+








#import "OFMemoryNotPartOfObjectException.h"
#import "OFString.h"

#import "OFNotImplementedException.h"

@implementation OFMemoryNotPartOfObjectException
+ exceptionWithClass: (Class)class_
	     pointer: (void*)ptr
+ (instancetype)exceptionWithClass: (Class)class_
			   pointer: (void*)ptr
{
	return [[[self alloc] initWithClass: class_
				    pointer: ptr] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFMutexLockFailedException.h from [bbc20b35d1] to [2b5e9d9241].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param mutex The mutex which is could not be locked
 * \return A new mutex lock failed exception
 */
+ exceptionWithClass: (Class)class_
	       mutex: (OFMutex*)mutex;
+ (instancetype)exceptionWithClass: (Class)class_
			     mutex: (OFMutex*)mutex;

/**
 * Initializes an already allocated mutex lock failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param mutex The mutex which is could not be locked
 * \return An initialized mutex lock failed exception

Modified src/exceptions/OFMutexLockFailedException.m from [d6f9329fe7] to [addab7c263].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFMutexLockFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFMutexLockFailedException
+ exceptionWithClass: (Class)class_
	       mutex: (OFMutex*)mutex
+ (instancetype)exceptionWithClass: (Class)class_
			     mutex: (OFMutex*)mutex
{
	return [[[self alloc] initWithClass: class_
				      mutex: mutex] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFMutexStillLockedException.h from [0ff3264cf0] to [ae45a21493].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param mutex The mutex which is still locked
 * \return A new mutex still locked exception
 */
+ exceptionWithClass: (Class)class_
	       mutex: (OFMutex*)mutex;
+ (instancetype)exceptionWithClass: (Class)class_
			     mutex: (OFMutex*)mutex;

/**
 * Initializes an already allocated mutex still locked exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param mutex The mutex which is still locked
 * \return An initialized mutex still locked exception

Modified src/exceptions/OFMutexStillLockedException.m from [a03e941bbe] to [e4ecfab482].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFMutexStillLockedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFMutexStillLockedException
+ exceptionWithClass: (Class)class_
	       mutex: (OFMutex*)mutex
+ (instancetype)exceptionWithClass: (Class)class_
			     mutex: (OFMutex*)mutex
{
	return [[[self alloc] initWithClass: class_
				      mutex: mutex] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFMutexUnlockFailedException.h from [5ec4027c40] to [e315fb187a].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param mutex The mutex which could not be unlocked
 * \return A new mutex unlock failed exception
 */
+ exceptionWithClass: (Class)class_
	       mutex: (OFMutex*)mutex;
+ (instancetype)exceptionWithClass: (Class)class_
			     mutex: (OFMutex*)mutex;

/**
 * Initializes an already allocated mutex unlock failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param mutex The mutex which could not be unlocked
 * \return An initialized mutex unlock failed exception

Modified src/exceptions/OFMutexUnlockFailedException.m from [2d67d8d8e3] to [ada6abbbc1].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFMutexUnlockFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFMutexUnlockFailedException
+ exceptionWithClass: (Class)class_
	       mutex: (OFMutex*)mutex
+ (instancetype)exceptionWithClass: (Class)class_
			     mutex: (OFMutex*)mutex
{
	return [[[self alloc] initWithClass: class_
				      mutex: mutex] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFNotConnectedException.h from [0e29467b60] to [b592f8f4ca].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which is not connected
 * \return A new not connected exception
 */
+ exceptionWithClass: (Class)class_
	      socket: (OFStreamSocket*)socket;
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFStreamSocket*)socket;

/**
 * Initializes an already allocated not connected exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param socket The socket which is not connected
 * \return An initialized not connected exception

Modified src/exceptions/OFNotConnectedException.m from [497115d130] to [24094739a0].

21
22
23
24
25
26
27
28
29


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


28
29
30
31
32
33
34
35
36







-
-
+
+







#import "OFTCPSocket.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFNotConnectedException
+ exceptionWithClass: (Class)class_
	      socket: (OFStreamSocket*)socket
+ (instancetype)exceptionWithClass: (Class)class_
			    socket: (OFStreamSocket*)socket
{
	return [[[self alloc] initWithClass: class_
				     socket: socket] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFNotImplementedException.h from [e9a4ccc33e] to [8dd8831751].

30
31
32
33
34
35
36
37
38


39
40
41
42
43
44
45
30
31
32
33
34
35
36


37
38
39
40
41
42
43
44
45







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param selector The selector which is not or not fully implemented
 * \return A new not implemented exception
 */
+ exceptionWithClass: (Class)class_
	    selector: (SEL)selector;
+ (instancetype)exceptionWithClass: (Class)class_
			  selector: (SEL)selector;

/**
 * Initializes an already allocated not implemented exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param selector The selector which is not or not fully implemented
 * \return An initialized not implemented exception

Modified src/exceptions/OFNotImplementedException.m from [9940be49c7] to [5283a9e0e5].

18
19
20
21
22
23
24
25
26


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


25
26
27
28
29
30
31
32
33







-
-
+
+








#import "OFNotImplementedException.h"
#import "OFString.h"

#import "common.h"

@implementation OFNotImplementedException
+ exceptionWithClass: (Class)class_
	    selector: (SEL)selector
+ (instancetype)exceptionWithClass: (Class)class_
			  selector: (SEL)selector
{
	return [[[self alloc] initWithClass: class_
				   selector: selector] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFOpenFileFailedException.h from [1e05aad332] to [bbb3cac915].

34
35
36
37
38
39
40
41
42
43



44
45
46
47
48
49
50
34
35
36
37
38
39
40



41
42
43
44
45
46
47
48
49
50







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param path A string with the path of the file tried to open
 * \param mode A string with the mode in which the file should have been opened
 * \return A new open file failed exception
 */
+ exceptionWithClass: (Class)class_
		path: (OFString*)path
		mode: (OFString*)mode;
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path
			      mode: (OFString*)mode;

/**
 * Initializes an already allocated open file failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path A string with the path of the file which couldn't be opened
 * \param mode A string with the mode in which the file should have been opened

Modified src/exceptions/OFOpenFileFailedException.m from [748612e960] to [a32dab7ab4].

20
21
22
23
24
25
26
27
28
29



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



27
28
29
30
31
32
33
34
35
36







-
-
-
+
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFOpenFileFailedException
+ exceptionWithClass: (Class)class_
		path: (OFString*)path
	  mode: (OFString*)mode
+ (instancetype)exceptionWithClass: (Class)class_
			      path: (OFString*)path
			      mode: (OFString*)mode
{
	return [[[self alloc] initWithClass: class_
				       path: path
				       mode: mode] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFOutOfMemoryException.h from [21ad410e73] to [3b65a6153f].

29
30
31
32
33
34
35
36
37


38
39
40
41
42
43
44
29
30
31
32
33
34
35


36
37
38
39
40
41
42
43
44







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param size The size of the memory that couldn't be allocated
 * \return A new no memory exception
 */
+ exceptionWithClass: (Class)class_
       requestedSize: (size_t)size;
+ (instancetype)exceptionWithClass: (Class)class_
		     requestedSize: (size_t)size;

/**
 * Initializes an already allocated no memory exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param size The size of the memory that couldn't be allocated
 * \return An initialized no memory exception

Modified src/exceptions/OFOutOfMemoryException.m from [552b6d52bc] to [c6c9405930].

16
17
18
19
20
21
22
23
24


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


23
24
25
26
27
28
29
30
31







-
-
+
+








#include "config.h"

#import "OFOutOfMemoryException.h"
#import "OFString.h"

@implementation OFOutOfMemoryException
+ exceptionWithClass: (Class)class_
       requestedSize: (size_t)size
+ (instancetype)exceptionWithClass: (Class)class_
		     requestedSize: (size_t)size
{
	return [[[self alloc] initWithClass: class_
			      requestedSize: size] autorelease];
}

- initWithClass: (Class)class_
  requestedSize: (size_t)size

Modified src/exceptions/OFReadOrWriteFailedException.h from [80dcbfd102] to [f9eb7c2c4f].

38
39
40
41
42
43
44
45
46
47



48
49
50
51
52
53
54
38
39
40
41
42
43
44



45
46
47
48
49
50
51
52
53
54







-
-
-
+
+
+







/**
 * \param class_ The class of the object which caused the exception
 * \param stream The stream which caused the read or write failed exception
 * \param length The requested length of the data that couldn't be read /
 *		 written
 * \return A new open file failed exception
 */
+ exceptionWithClass: (Class)class_
	      stream: (OFStream*)stream
     requestedLength: (size_t)length;
+ (instancetype)exceptionWithClass: (Class)class_
			    stream: (OFStream*)stream
		   requestedLength: (size_t)length;

/**
 * Initializes an already allocated read or write failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param stream The stream which caused the read or write failed exception
 * \param length The requested length of the data that couldn't be read /

Modified src/exceptions/OFReadOrWriteFailedException.m from [7f4654462a] to [af417a70ea].

21
22
23
24
25
26
27
28
29
30



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



28
29
30
31
32
33
34
35
36
37







-
-
-
+
+
+







#import "OFStreamSocket.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFReadOrWriteFailedException
+ exceptionWithClass: (Class)class_
	      stream: (OFStream*)stream
     requestedLength: (size_t)length
+ (instancetype)exceptionWithClass: (Class)class_
			    stream: (OFStream*)stream
		   requestedLength: (size_t)length
{
	return [[[self alloc] initWithClass: class_
				     stream: stream
			    requestedLength: length] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFRenameFileFailedException.h from [0d79c8bd46] to [d9ec20488f].

34
35
36
37
38
39
40
41
42
43



44
45
46
47
48
49
50
34
35
36
37
38
39
40



41
42
43
44
45
46
47
48
49
50







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param source The original path
 * \param destination The new path
 * \return A new rename file failed exception
 */
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination;
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination;

/**
 * Initializes an already allocated rename failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param source The original path
 * \param destination The new path

Modified src/exceptions/OFRenameFileFailedException.m from [bcc9736c02] to [2f687e8aec].

20
21
22
23
24
25
26
27
28
29



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



27
28
29
30
31
32
33
34
35
36







-
-
-
+
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFRenameFileFailedException
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination
{
	return [[[self alloc] initWithClass: class_
				 sourcePath: source
			    destinationPath: destination] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFSeekFailedException.h from [db28bc5410] to [a7860b2a1b].

40
41
42
43
44
45
46
47
48
49
50




51
52
53
54
55
56
57
40
41
42
43
44
45
46




47
48
49
50
51
52
53
54
55
56
57







-
-
-
-
+
+
+
+








/**
 * \param stream The stream for which seeking failed
 * \param offset The offset to which seeking failed
 * \param whence To what the offset is relative
 * \return A new seek failed exception
 */
+ exceptionWithClass: (Class)class_
	      stream: (OFSeekableStream*)stream
	      offset: (off_t)offset
	      whence: (int)whence;
+ (instancetype)exceptionWithClass: (Class)class_
			    stream: (OFSeekableStream*)stream
			    offset: (off_t)offset
			    whence: (int)whence;

/**
 * Initializes an already allocated seek failed exception.
 *
 * \param stream The stream for which seeking failed
 * \param offset The offset to which seeking failed
 * \param whence To what the offset is relative

Modified src/exceptions/OFSeekFailedException.m from [93bf3837d6] to [d1cecd4b8a].

21
22
23
24
25
26
27
28
29
30
31




32
33
34
35
36
37
38
21
22
23
24
25
26
27




28
29
30
31
32
33
34
35
36
37
38







-
-
-
-
+
+
+
+







#import "OFSeekableStream.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFSeekFailedException
+ exceptionWithClass: (Class)class_
	      stream: (OFSeekableStream*)stream
	      offset: (off_t)offset
	      whence: (int)whence
+ (instancetype)exceptionWithClass: (Class)class_
			    stream: (OFSeekableStream*)stream
			    offset: (off_t)offset
			    whence: (int)whence
{
	return [[[self alloc] initWithClass: class_
				     stream: stream
				     offset: offset
				     whence: whence] autorelease];
}

Modified src/exceptions/OFSetOptionFailedException.h from [f511e39b74] to [3b6762b0cd].

30
31
32
33
34
35
36
37
38


39
40
41
42
43
44
45
30
31
32
33
34
35
36


37
38
39
40
41
42
43
44
45







-
-
+
+







@property (readonly, retain, nonatomic) OFStream *stream;
#endif

/**
 * \param stream The stream for which the option could not be set
 * \return A new set option failed exception
 */
+ exceptionWithClass: (Class)class_
	      stream: (OFStream*)stream;
+ (instancetype)exceptionWithClass: (Class)class_
			    stream: (OFStream*)stream;

/**
 * Initializes an already allocated set option failed exception.
 *
 * \param stream The stream for which the option could not be set
 * \return An initialized set option failed exception
 */

Modified src/exceptions/OFSetOptionFailedException.m from [c014ab807a] to [df261401f3].

21
22
23
24
25
26
27
28
29


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


28
29
30
31
32
33
34
35
36







-
-
+
+







#import "OFStream.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFSetOptionFailedException
+ exceptionWithClass: (Class)class_
	      stream: (OFStream*)stream
+ (instancetype)exceptionWithClass: (Class)class_
			    stream: (OFStream*)stream
{
	return [[[self alloc] initWithClass: class_
				     stream: stream] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFSymlinkFailedException.h from [5ed68fbba4] to [2ddabcad84].

35
36
37
38
39
40
41
42
43
44



45
46
47
48
49
50
51
35
36
37
38
39
40
41



42
43
44
45
46
47
48
49
50
51







-
-
-
+
+
+








/**
 * \param class_ The class of the object which caused the exception
 * \param source The source for the symlink
 * \param destination The destination for the symlink
 * \return A new symlink failed exception
 */
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination;
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination;

/**
 * Initializes an already allocated symlink failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param source The source for the symlink
 * \param destination The destination for the symlink

Modified src/exceptions/OFSymlinkFailedException.m from [f6b7c833ab] to [9c1b009edc].

21
22
23
24
25
26
27
28
29
30



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



28
29
30
31
32
33
34
35
36
37







-
-
-
+
+
+








#import "OFNotImplementedException.h"

#import "common.h"

#ifndef _WIN32
@implementation OFSymlinkFailedException
+ exceptionWithClass: (Class)class_
	  sourcePath: (OFString*)source
     destinationPath: (OFString*)destination
+ (instancetype)exceptionWithClass: (Class)class_
			sourcePath: (OFString*)source
		   destinationPath: (OFString*)destination
{
	return [[[self alloc] initWithClass: class_
				 sourcePath: source
			    destinationPath: destination] autorelease];
}

- initWithClass: (Class)class_

Modified src/exceptions/OFThreadJoinFailedException.h from [049bf7b544] to [cf2dc40e40].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param thread The thread which could not be joined
 * \return A new thread join failed exception
 */
+ exceptionWithClass: (Class)class_
	      thread: (OFThread*)thread;
+ (instancetype)exceptionWithClass: (Class)class_
			    thread: (OFThread*)thread;

/**
 * Initializes an already allocated thread join failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param thread The thread which could not be joined
 * \return An initialized thread join failed exception

Modified src/exceptions/OFThreadJoinFailedException.m from [e93325ff06] to [dcbbd27d07].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFThreadJoinFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFThreadJoinFailedException
+ exceptionWithClass: (Class)class_
	      thread: (OFThread*)thread
+ (instancetype)exceptionWithClass: (Class)class_
			    thread: (OFThread*)thread
{
	return [[[self alloc] initWithClass: class_
				     thread: thread] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFThreadStartFailedException.h from [b40a0d50e7] to [fdad7cfed9].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param thread The thread which could not be started
 * \return An initialized thread start failed exception
 */
+ exceptionWithClass: (Class)class_
	      thread: (OFThread*)thread;
+ (instancetype)exceptionWithClass: (Class)class_
			    thread: (OFThread*)thread;

/**
 * Initializes an already allocated thread start failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param thread The thread which could not be started
 * \return An initialized thread start failed exception

Modified src/exceptions/OFThreadStartFailedException.m from [ec03cdbdb4] to [b64a1ff539].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFThreadStartFailedException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFThreadStartFailedException
+ exceptionWithClass: (Class)class_
	      thread: (OFThread*)thread
+ (instancetype)exceptionWithClass: (Class)class_
			    thread: (OFThread*)thread
{
	return [[[self alloc] initWithClass: class_
				     thread: thread] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFThreadStillRunningException.h from [aa0d9c74d9] to [306bedb437].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param thread The thread which is still running
 * \return A new thread still running exception
 */
+ exceptionWithClass: (Class)class_
	      thread: (OFThread*)thread;
+ (instancetype)exceptionWithClass: (Class)class_
			    thread: (OFThread*)thread;

/**
 * Initializes an already allocated thread still running exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param thread The thread which is still running
 * \return An initialized thread still running exception

Modified src/exceptions/OFThreadStillRunningException.m from [8cc2391325] to [f3a233791c].

19
20
21
22
23
24
25
26
27


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


26
27
28
29
30
31
32
33
34







-
-
+
+







#import "OFThreadStillRunningException.h"
#import "OFString.h"
#import "OFThread.h"

#import "OFNotImplementedException.h"

@implementation OFThreadStillRunningException
+ exceptionWithClass: (Class)class_
	      thread: (OFThread*)thread
+ (instancetype)exceptionWithClass: (Class)class_
			    thread: (OFThread*)thread
{
	return [[[self alloc] initWithClass: class_
				     thread: thread] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFUnboundNamespaceException.h from [16f58d7cd7] to [d127c108c6].

31
32
33
34
35
36
37
38
39


40
41
42
43
44
45
46
47


48
49
50
51
52
53
54
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45


46
47
48
49
50
51
52
53
54







-
-
+
+






-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param ns The namespace which is unbound
 * \return A new unbound namespace exception
 */
+ exceptionWithClass: (Class)class_
	   namespace: (OFString*)ns;
+ (instancetype)exceptionWithClass: (Class)class_
			 namespace: (OFString*)ns;

/**
 * \param class_ The class of the object which caused the exception
 * \param prefix The prefix which is unbound
 * \return A new unbound namespace exception
 */
+ exceptionWithClass: (Class)class_
	      prefix: (OFString*)prefix;
+ (instancetype)exceptionWithClass: (Class)class_
			    prefix: (OFString*)prefix;

/**
 * Initializes an already allocated unbound namespace exception
 *
 * \param class_ The class of the object which caused the exception
 * \param ns The namespace which is unbound
 * \return An initialized unbound namespace exception

Modified src/exceptions/OFUnboundNamespaceException.m from [0ff95d0b7b] to [611f4c170e].

20
21
22
23
24
25
26
27
28


29
30
31
32
33
34
35


36
37
38
39
40
41
42
20
21
22
23
24
25
26


27
28
29
30
31
32
33


34
35
36
37
38
39
40
41
42







-
-
+
+





-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFUnboundNamespaceException
+ exceptionWithClass: (Class)class_
	   namespace: (OFString*)ns
+ (instancetype)exceptionWithClass: (Class)class_
			 namespace: (OFString*)ns
{
	return [[[self alloc] initWithClass: class_
				  namespace: ns] autorelease];
}

+ exceptionWithClass: (Class)class_
	      prefix: (OFString*)prefix
+ (instancetype)exceptionWithClass: (Class)class_
			    prefix: (OFString*)prefix
{
	return [[[self alloc] initWithClass: class_
				     prefix: prefix] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFUnsupportedProtocolException.h from [3917168b18] to [6c4ace59cb].

32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
32
33
34
35
36
37
38


39
40
41
42
43
44
45
46
47







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param url The URL whose protocol is unsupported
 * \return A new unsupported protocol exception
 */
+ exceptionWithClass: (Class)class_
		 URL: (OFURL*)url;
+ (instancetype)exceptionWithClass: (Class)class_
			       URL: (OFURL*)url;

/**
 * Initializes an already allocated unsupported protocol exception
 *
 * \param class_ The class of the object which caused the exception
 * \param url The URL whose protocol is unsupported
 * \return An initialized unsupported protocol exception

Modified src/exceptions/OFUnsupportedProtocolException.m from [54d143c6c3] to [be041cf8f8].

21
22
23
24
25
26
27
28
29


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


28
29
30
31
32
33
34
35
36







-
-
+
+







#import "OFURL.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFUnsupportedProtocolException
+ exceptionWithClass: (Class)class_
		 URL: (OFURL*)url
+ (instancetype)exceptionWithClass: (Class)class_
			       URL: (OFURL*)url
{
	return [[[self alloc] initWithClass: class_
					URL: url] autorelease];
}

- initWithClass: (Class)class_
{

Modified src/exceptions/OFUnsupportedVersionException.h from [8d9f871b1a] to [1c4d087ca0].

30
31
32
33
34
35
36
37
38


39
40
41
42
43
44
45
30
31
32
33
34
35
36


37
38
39
40
41
42
43
44
45







-
-
+
+







#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param version The version which is unsupported
 * \return A new unsupported version exception
 */
+ exceptionWithClass: (Class)class_
	     version: (OFString*)version;
+ (instancetype)exceptionWithClass: (Class)class_
			   version: (OFString*)version;

/**
 * Initializes an already allocated unsupported protocol exception
 *
 * \param class_ The class of the object which caused the exception
 * \param version The version which is unsupported
 * \return An initialized unsupported version exception

Modified src/exceptions/OFUnsupportedVersionException.m from [bf02225514] to [b93e7d43cd].

20
21
22
23
24
25
26
27
28


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


27
28
29
30
31
32
33
34
35







-
-
+
+







#import "OFString.h"

#import "OFNotImplementedException.h"

#import "common.h"

@implementation OFUnsupportedVersionException
+ exceptionWithClass: (Class)class_
	     version: (OFString*)version
+ (instancetype)exceptionWithClass: (Class)class_
			   version: (OFString*)version
{
	return [[[self alloc] initWithClass: class_
				    version: version] autorelease];
}

- initWithClass: (Class)class_
{

Modified tests/OFDictionaryTests.m from [0987dcb8fa] to [aba58d7db0].

35
36
37
38
39
40
41
42


43
44
45
46
47
48
49
35
36
37
38
39
40
41

42
43
44
45
46
47
48
49
50







-
+
+







	@"value2"
};

@implementation TestsAppDelegate (OFDictionaryTests)
- (void)dictionaryTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFMutableDictionary *dict = [OFMutableDictionary dictionary], *dict2;
	OFMutableDictionary *dict = [OFMutableDictionary dictionary];
	OFDictionary *idict;
	OFEnumerator *key_enum, *obj_enum;
	OFArray *akeys, *avalues;

	[dict setObject: values[0]
		 forKey: keys[0]];
	[dict setObject: values[1]
		 forKey: keys[1]];
188
189
190
191
192
193
194
195
196
197
198
199





200
201
202
203
204



205
206
207
208
209
210
211
212




213
214
215
216
217



218
219
220
221
222


223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

240
241

242
243
244

245
246
247
248
189
190
191
192
193
194
195





196
197
198
199
200
201
202



203
204
205
206
207
208
209




210
211
212
213
214
215



216
217
218
219

220


221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238

239
240

241
242
243

244
245
246
247
248







-
-
-
-
-
+
+
+
+
+


-
-
-
+
+
+




-
-
-
-
+
+
+
+


-
-
-
+
+
+

-

-
-
+
+
















-
+

-
+


-
+




		return ([key isEqual: keys[0]] ?  YES : NO);
	    }] description] isEqual: @"{\n\tkey1 = value_1;\n}"])
#endif

	TEST(@"-[count]", [dict count] == 2)

	TEST(@"+[dictionaryWithKeysAndObjects:]",
	    (dict = [OFDictionary dictionaryWithKeysAndObjects: @"foo", @"bar",
								@"baz", @"qux",
								nil]) &&
	    [[dict objectForKey: @"foo"] isEqual: @"bar"] &&
	    [[dict objectForKey: @"baz"] isEqual: @"qux"])
	    (idict = [OFDictionary dictionaryWithKeysAndObjects: @"foo", @"bar",
								 @"baz", @"qux",
								 nil]) &&
	    [[idict objectForKey: @"foo"] isEqual: @"bar"] &&
	    [[idict objectForKey: @"baz"] isEqual: @"qux"])

	TEST(@"+[dictionaryWithObject:forKey:]",
	    (dict = [OFDictionary dictionaryWithObject: @"bar"
						forKey: @"foo"]) &&
	    [[dict objectForKey: @"foo"] isEqual: @"bar"])
	    (idict = [OFDictionary dictionaryWithObject: @"bar"
						 forKey: @"foo"]) &&
	    [[idict objectForKey: @"foo"] isEqual: @"bar"])

	akeys = [OFArray arrayWithObjects: keys[0], keys[1], nil];
	avalues = [OFArray arrayWithObjects: values[0], values[1], nil];
	TEST(@"+[dictionaryWithObjects:forKeys:]",
	    (dict = [OFDictionary dictionaryWithObjects: avalues
						forKeys: akeys]) &&
	    [[dict objectForKey: keys[0]] isEqual: values[0]] &&
	    [[dict objectForKey: keys[1]] isEqual: values[1]])
	    (idict = [OFDictionary dictionaryWithObjects: avalues
						 forKeys: akeys]) &&
	    [[idict objectForKey: keys[0]] isEqual: values[0]] &&
	    [[idict objectForKey: keys[1]] isEqual: values[1]])

	TEST(@"-[copy]",
	    (dict = [[dict copy] autorelease]) &&
	    [[dict objectForKey: keys[0]] isEqual: values[0]] &&
	    [[dict objectForKey: keys[1]] isEqual: values[1]])
	    (idict = [[idict copy] autorelease]) &&
	    [[idict objectForKey: keys[0]] isEqual: values[0]] &&
	    [[idict objectForKey: keys[1]] isEqual: values[1]])

	dict2 = dict;
	TEST(@"-[mutableCopy]",
	    (dict = [[dict mutableCopy] autorelease]) &&
	    [dict count] == [dict2 count] &&
	    (dict = [[idict mutableCopy] autorelease]) &&
	    [dict count] == [idict count] &&
	    [[dict objectForKey: keys[0]] isEqual: values[0]] &&
	    [[dict objectForKey: keys[1]] isEqual: values[1]] &&
	    R([dict setObject: @"value3"
		       forKey: @"key3"]) &&
	    [[dict objectForKey: @"key3"] isEqual: @"value3"] &&
	    [[dict objectForKey: keys[0]] isEqual: values[0]] &&
	    R([dict setObject: @"foo"
		       forKey: keys[0]]) &&
	    [[dict objectForKey: keys[0]] isEqual: @"foo"])

	TEST(@"-[removeObjectForKey:]",
	    R([dict removeObjectForKey: keys[0]]) &&
	    [dict objectForKey: keys[0]] == nil)

	[dict setObject: @"foo"
		 forKey: keys[0]];
	TEST(@"-[isEqual:]", ![dict isEqual: dict2] &&
	TEST(@"-[isEqual:]", ![dict isEqual: idict] &&
	    R([dict removeObjectForKey: @"key3"]) &&
	    ![dict isEqual: dict2] &&
	    ![dict isEqual: idict] &&
	    R([dict setObject: values[0]
		       forKey: keys[0]]) &&
	    [dict isEqual: dict2])
	    [dict isEqual: idict])

	[pool drain];
}
@end

Modified tests/OFStringTests.m from [bea59f49f7] to [ea0a5564ab].

69
70
71
72
73
74
75

76
77
78
79
80
81
82
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83







+







@end

@implementation TestsAppDelegate (OFStringTests)
- (void)stringTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFMutableString *s[3];
	OFString *is;
	OFArray *a;
	int i;
	const of_unichar_t *ua;
	const uint16_t *u16a;
	EntityHandler *h;
#ifdef OF_HAVE_BLOCKS
	__block BOOL ok;
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
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







-
-
-
-
+
+
+
+


-
-
-
-
+
+
+
+

-
+


-
+

-
+



-
+







	TEST(@"+[stringWithUTF8String:length:]",
	    (s[0] = [OFMutableString stringWithUTF8String: "\xEF\xBB\xBF"
							   "foobar"
						   length: 6]) &&
	    [s[0] isEqual: @"foo"])

	TEST(@"+[stringWithUnicodeString:]",
	    (s[1] = [OFString stringWithUnicodeString: ucstr]) &&
	    [s[1] isEqual: @"fööbär🀺"] &&
	    (s[1] = [OFString stringWithUnicodeString: sucstr]) &&
	    [s[1] isEqual: @"fööbär🀺"])
	    (is = [OFString stringWithUnicodeString: ucstr]) &&
	    [is isEqual: @"fööbär🀺"] &&
	    (is = [OFString stringWithUnicodeString: sucstr]) &&
	    [is isEqual: @"fööbär🀺"])

	TEST(@"+[stringWithUTF16String:]",
	    (s[1] = [OFString stringWithUTF16String: utf16str]) &&
	    [s[1] isEqual: @"fööbär🀺"] &&
	    (s[1] = [OFString stringWithUTF16String: sutf16str]) &&
	    [s[1] isEqual: @"fööbär🀺"])
	    (is = [OFString stringWithUTF16String: utf16str]) &&
	    [is isEqual: @"fööbär🀺"] &&
	    (is = [OFString stringWithUTF16String: sutf16str]) &&
	    [is isEqual: @"fööbär🀺"])

	TEST(@"+[stringWithContentsOfFile:encoding]", (s[1] = [OFString
	TEST(@"+[stringWithContentsOfFile:encoding]", (is = [OFString
	    stringWithContentsOfFile: @"testfile.txt"
			    encoding: OF_STRING_ENCODING_ISO_8859_1]) &&
	    [s[1] isEqual: @"testäöü"])
	    [is isEqual: @"testäöü"])

	TEST(@"+[stringWithContentsOfURL:encoding]", (s[1] = [OFString
	TEST(@"+[stringWithContentsOfURL:encoding]", (is = [OFString
	    stringWithContentsOfURL: [OFURL URLWithString:
					 @"file://testfile.txt"]
			   encoding: OF_STRING_ENCODING_ISO_8859_1]) &&
	    [s[1] isEqual: @"testäöü"])
	    [is isEqual: @"testäöü"])

	TEST(@"-[appendUTFString:withLength:]",
	    R([s[0] appendUTF8String: "foo\xEF\xBB\xBF" "barqux" + 3
			  withLength: 6]) && [s[0] isEqual: @"foobar"])

	EXPECT_EXCEPTION(@"Detection of invalid UTF-8 encoding #1",
	    OFInvalidEncodingException,
270
271
272
273
274
275
276
277

278
279

280
281

282
283
284


285
286
287
288
289
290
291
271
272
273
274
275
276
277

278
279

280
281

282
283


284
285
286
287
288
289
290
291
292







-
+

-
+

-
+

-
-
+
+







							   skipEmpty: YES]) &&
	    [a count] == 3 &&
	    [[a objectAtIndex: i++] isEqual: @"foo"] &&
	    [[a objectAtIndex: i++] isEqual: @"bar"] &&
	    [[a objectAtIndex: i++] isEqual: @"baz"])

	TEST(@"+[stringWithPath:]",
	    (s[0] = [OFString stringWithPath: @"foo", @"bar", @"baz", nil]) &&
	    (is = [OFString stringWithPath: @"foo", @"bar", @"baz", nil]) &&
#ifndef _WIN32
	    [s[0] isEqual: @"foo/bar/baz"] &&
	    [is isEqual: @"foo/bar/baz"] &&
#else
	    [s[0] isEqual: @"foo\\bar\\baz"] &&
	    [is isEqual: @"foo\\bar\\baz"] &&
#endif
	    (s[0] = [OFString stringWithPath: @"foo", nil]) &&
	    [s[0] isEqual: @"foo"])
	    (is = [OFString stringWithPath: @"foo", nil]) &&
	    [is isEqual: @"foo"])

	TEST(@"-[pathComponents]",
	    /* /tmp */
	    (a = [@"/tmp" pathComponents]) && [a count] == 2 &&
	    [[a objectAtIndex: 0] isEqual: @""] &&
	    [[a objectAtIndex: 1] isEqual: @"tmp"] &&
	    /* /tmp/ */