Comment: | Make properties a requirement and clean up code
This increases the required GCC version from 4.0 to 4.6 (exception: |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
48980f2297b6946b5555d10b2c586684 |
User & Date: | js on 2015-11-29 11:43:05 |
Other Links: | manifest | tags |
2015-11-29
| ||
14:02 | Make use of fast enumeration check-in: 6b13727ce0 user: js tags: trunk | |
11:43 | Make properties a requirement and clean up code check-in: 48980f2297 user: js tags: trunk | |
2015-11-28
| ||
19:47 | Minor documentation improvements check-in: 650b4be224 user: js tags: trunk | |
Modified src/OFApplication.h from [5756d4c723] to [91ca5aaec7].
︙ | ︙ | |||
126 127 128 129 130 131 132 | #ifndef OF_WINDOWS void (*_SIGHUPHandler)(id, SEL); void (*_SIGUSR1Handler)(id, SEL); void (*_SIGUSR2Handler)(id, SEL); #endif } | < > > > | > > > > | > > > > | < < | 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 | #ifndef OF_WINDOWS void (*_SIGHUPHandler)(id, SEL); void (*_SIGUSR1Handler)(id, SEL); void (*_SIGUSR2Handler)(id, SEL); #endif } /*! * The name of the program (argv[0]). */ @property (readonly, assign) OFString *programName; /*! * The arguments passed to the application. */ @property (readonly, assign) OFArray OF_GENERIC(OFString*) *arguments; /*! * The environment of the application. */ @property (readonly, assign) OFDictionary OF_GENERIC(OFString*, OFString*) *environment; /*! * @brief Returns the only OFApplication instance in the application. * * @return The only OFApplication instance in the application */ + (OFApplication*)sharedApplication; |
︙ | ︙ | |||
183 184 185 186 187 188 189 | * * @param argc A pointer where a pointer to argc should be stored * @param argv A pointer where a pointer to argv should be stored */ - (void)getArgumentCount: (int *_Nonnull *_Nonnull)argc andArgumentValues: (char *_Nonnull *_Nonnull *_Nonnull[])argv; | < < < < < < < < < < < < < < < < < < < < < | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | * * @param argc A pointer where a pointer to argc should be stored * @param argv A pointer where a pointer to argv should be stored */ - (void)getArgumentCount: (int *_Nonnull *_Nonnull)argc andArgumentValues: (char *_Nonnull *_Nonnull *_Nonnull[])argv; /*! * @brief Returns the delegate of the application. * * @return The delegate of the application */ - (nullable id <OFApplicationDelegate>)delegate; |
︙ | ︙ |
Modified src/OFApplication.m from [a553adbdf6] to [faff25c759].
︙ | ︙ | |||
129 130 131 132 133 134 135 136 137 138 139 140 141 142 | [delegate release]; return 0; } @implementation OFApplication + (OFApplication*)sharedApplication { return app; } + (OFString*)programName { | > > > | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | [delegate release]; return 0; } @implementation OFApplication @synthesize programName = _programName, arguments = _arguments; @synthesize environment = _environment; + (OFApplication*)sharedApplication { return app; } + (OFString*)programName { |
︙ | ︙ | |||
393 394 395 396 397 398 399 | - (void)getArgumentCount: (int**)argc andArgumentValues: (char****)argv { *argc = _argc; *argv = _argv; } | < < < < < < < < < < < < < < < | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | - (void)getArgumentCount: (int**)argc andArgumentValues: (char****)argv { *argc = _argc; *argv = _argv; } - (id <OFApplicationDelegate>)delegate { return _delegate; } - (void)setDelegate: (id <OFApplicationDelegate>)delegate { |
︙ | ︙ |
Modified src/OFArray.h from [fdfb08cf0d] to [87f8ae6119].
︙ | ︙ | |||
92 93 94 95 96 97 98 | # ifndef DOXYGEN # define ObjectType id # endif @interface OFArray: #endif OFObject <OFCopying, OFMutableCopying, OFCollection, OFSerialization, OFJSONRepresentation, OFMessagePackRepresentation> | < < < < | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | # ifndef DOXYGEN # define ObjectType id # endif @interface OFArray: #endif OFObject <OFCopying, OFMutableCopying, OFCollection, OFSerialization, OFJSONRepresentation, OFMessagePackRepresentation> /*! * @brief Creates a new OFArray. * * @return A new autoreleased OFArray */ + (instancetype)array; |
︙ | ︙ |
Modified src/OFCollection.h from [ca64037e5a] to [d0606515a9].
︙ | ︙ | |||
20 21 22 23 24 25 26 | /*! * @protocol OFCollection OFCollection.h ObjFW/OFCollection.h * * @brief A protocol with methods common for all collections. */ @protocol OFCollection <OFEnumerating, OFFastEnumeration> | < < < < | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /*! * @protocol OFCollection OFCollection.h ObjFW/OFCollection.h * * @brief A protocol with methods common for all collections. */ @protocol OFCollection <OFEnumerating, OFFastEnumeration> /*! * @brief Returns the number of objects in the collection. * * @return The number of objects in the collection */ - (size_t)count; |
︙ | ︙ |
Modified src/OFDataArray.h from [dbaf155683] to [f2fca692ea].
︙ | ︙ | |||
37 38 39 40 41 42 43 | @interface OFDataArray: OFObject <OFCopying, OFComparing, OFSerialization, OFMessagePackRepresentation> { uint8_t *_items; size_t _count, _itemSize, _capacity; } | < > | < > < | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | @interface OFDataArray: OFObject <OFCopying, OFComparing, OFSerialization, OFMessagePackRepresentation> { uint8_t *_items; size_t _count, _itemSize, _capacity; } /*! * The size of a single item in the OFDataArray in bytes. */ @property (readonly) size_t itemSize; /*! * @brief Creates a new OFDataArray with an item size of 1. * * @return A new autoreleased OFDataArray */ + (instancetype)dataArray; |
︙ | ︙ | |||
196 197 198 199 200 201 202 | /*! * @brief Returns the number of items in the OFDataArray. * * @return The number of items in the OFDataArray */ - (size_t)count; | < < < < < < < | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | /*! * @brief Returns the number of items in the OFDataArray. * * @return The number of items in the OFDataArray */ - (size_t)count; /*! * @brief Returns all items of the OFDataArray as a C array. * * @warning The pointer is only valid until the OFDataArray is changed! * * Modifying the returned array directly is allowed and will change the contents * of the data array. |
︙ | ︙ |
Modified src/OFDataArray.m from [ca5d4f1f51] to [a87aa9a19e].
︙ | ︙ | |||
52 53 54 55 56 57 58 59 60 61 62 63 64 65 | void _references_to_categories_of_OFDataArray(void) { _OFDataArray_MessagePackValue_reference = 1; _OFDataArray_Hashing_reference = 1; } @implementation OFDataArray + (instancetype)dataArray { return [[[self alloc] init] autorelease]; } + (instancetype)dataArrayWithItemSize: (size_t)itemSize { | > > | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | void _references_to_categories_of_OFDataArray(void) { _OFDataArray_MessagePackValue_reference = 1; _OFDataArray_Hashing_reference = 1; } @implementation OFDataArray @synthesize itemSize = _itemSize; + (instancetype)dataArray { return [[[self alloc] init] autorelease]; } + (instancetype)dataArrayWithItemSize: (size_t)itemSize { |
︙ | ︙ | |||
357 358 359 360 361 362 363 | } - (size_t)count { return _count; } | < < < < < | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | } - (size_t)count { return _count; } - (void*)items { return _items; } - (void*)itemAtIndex: (size_t)index { |
︙ | ︙ |
Modified src/OFHTTPClient.h from [1d478e9a98] to [ed0609a453].
︙ | ︙ | |||
105 106 107 108 109 110 111 | bool _insecureRedirectsAllowed; OFTCPSocket *_socket; OFURL *_lastURL; bool _lastWasHEAD; OFHTTPResponse *_lastResponse; } | < > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | bool _insecureRedirectsAllowed; OFTCPSocket *_socket; OFURL *_lastURL; bool _lastWasHEAD; OFHTTPResponse *_lastResponse; } /*! * The delegate of the HTTP request. */ @property OF_NULLABLE_PROPERTY (assign) id <OFHTTPClientDelegate> delegate; /*! * Whether redirects from HTTPS to HTTP will be allowed. */ @property bool insecureRedirectsAllowed; /*! * @brief Creates a new OFHTTPClient. * * @return A new, autoreleased OFHTTPClient */ + (instancetype)client; /*! * @brief Performs the specified HTTP request and returns an OFHTTPResponse. * * @return An OFHTTPResponse with the response for the HTTP request */ - (OFHTTPResponse*)performRequest: (OFHTTPRequest*)request; |
︙ | ︙ |
Modified src/OFHTTPClient.m from [824a74cbab] to [9951bb361f].
︙ | ︙ | |||
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | { [_socket release]; _socket = nil; } @end @implementation OFHTTPClient + (instancetype)client { return [[[self alloc] init] autorelease]; } - (void)dealloc { [self close]; [super dealloc]; } | > > > < < < < < < < < < < < < < < < < < < < < | 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 | { [_socket release]; _socket = nil; } @end @implementation OFHTTPClient @synthesize delegate = _delegate; @synthesize insecureRedirectsAllowed = _insecureRedirectsAllowed; + (instancetype)client { return [[[self alloc] init] autorelease]; } - (void)dealloc { [self close]; [super dealloc]; } - (OFHTTPResponse*)performRequest: (OFHTTPRequest*)request { return [self performRequest: request redirects: 10]; } - (OFTCPSocket*)OF_closeAndCreateSocketForRequest: (OFHTTPRequest*)request |
︙ | ︙ |
Modified src/OFHTTPRequest.h from [cc2cdac436] to [0d537b984c].
︙ | ︙ | |||
76 77 78 79 80 81 82 | of_http_request_method_t _method; of_http_request_protocol_version_t _protocolVersion; OFDictionary OF_GENERIC(OFString*, OFString*) *_headers; OFDataArray *_body; OFString *_remoteAddress; } | < > > > > > > > | > > > > > > > > > > > < | 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 | of_http_request_method_t _method; of_http_request_protocol_version_t _protocolVersion; OFDictionary OF_GENERIC(OFString*, OFString*) *_headers; OFDataArray *_body; OFString *_remoteAddress; } /*! * The URL of the HTTP request. */ @property (copy) OFURL *URL; /*! * The request method of the HTTP request. */ @property of_http_request_method_t method; /*! * The headers for the HTTP request. */ @property OF_NULLABLE_PROPERTY (copy) OFDictionary OF_GENERIC(OFString*, OFString*) *headers; /*! * The entity body of the HTTP request. */ @property OF_NULLABLE_PROPERTY (retain) OFDataArray *body; /*! * The remote address from which the request originates. */ @property OF_NULLABLE_PROPERTY (copy) OFString *remoteAddress; /*! * @brief Creates a new OFHTTPRequest. * * @return A new, autoreleased OFHTTPRequest */ + (instancetype)request; |
︙ | ︙ | |||
109 110 111 112 113 114 115 | * @brief Initializes an already allocated OFHTTPRequest with the specified URL. * * @param URL The URL for the request * @return An initialized OFHTTPRequest */ - initWithURL: (OFURL*)URL; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | * @brief Initializes an already allocated OFHTTPRequest with the specified URL. * * @param URL The URL for the request * @return An initialized OFHTTPRequest */ - initWithURL: (OFURL*)URL; /*! * @brief Sets the protocol version of the HTTP request. * * @param protocolVersion The protocol version of the HTTP request */ - (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion; |
︙ | ︙ | |||
166 167 168 169 170 171 172 | /*! * @brief Returns the protocol version of the HTTP request as a string. * * @return The protocol version of the HTTP request as a string */ - (OFString*)protocolVersionString; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | /*! * @brief Returns the protocol version of the HTTP request as a string. * * @return The protocol version of the HTTP request as a string */ - (OFString*)protocolVersionString; /*! * @brief Sets the entity body of the HTTP request to the specified string * encoded in UTF-8. * * @param string The string to use for the entity body */ - (void)setBodyFromString: (nullable OFString*)string; /*! * @brief Sets the entity body of the HTTP request to the specified string * encoded in the specified encoding. * * @param string The string to use for the entity body * @param encoding The encoding to encode the string with */ - (void)setBodyFromString: (nullable OFString*)string encoding: (of_string_encoding_t)encoding; @end #ifdef __cplusplus extern "C" { #endif /*! * @brief Returns a C string describing the specified request method. |
︙ | ︙ |
Modified src/OFHTTPRequest.m from [e92c282719] to [7383d317b4].
︙ | ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 | if (strcmp(string, "CONNECT") == 0) return OF_HTTP_REQUEST_METHOD_CONNECT; @throw [OFInvalidFormatException exception]; } @implementation OFHTTPRequest + (instancetype)request { return [[[self alloc] init] autorelease]; } + (instancetype)requestWithURL: (OFURL*)URL { | > > > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | if (strcmp(string, "CONNECT") == 0) return OF_HTTP_REQUEST_METHOD_CONNECT; @throw [OFInvalidFormatException exception]; } @implementation OFHTTPRequest @synthesize URL = _URL, method = _method, headers = _headers, body = _body; @synthesize remoteAddress = _remoteAddress; + (instancetype)request { return [[[self alloc] init] autorelease]; } + (instancetype)requestWithURL: (OFURL*)URL { |
︙ | ︙ | |||
178 179 180 181 182 183 184 | OF_HASH_ADD_HASH(hash, [_remoteAddress hash]); OF_HASH_FINALIZE(hash); return hash; } | < < < < < < < < < < < < < < < < < < < < | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | OF_HASH_ADD_HASH(hash, [_remoteAddress hash]); OF_HASH_FINALIZE(hash); return hash; } - (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion { if (protocolVersion.major != 1 || protocolVersion.minor > 1) @throw [OFUnsupportedVersionException exceptionWithVersion: [OFString stringWithFormat: @"%u.%u", protocolVersion.major, protocolVersion.minor]]; |
︙ | ︙ | |||
244 245 246 247 248 249 250 | - (OFString*)protocolVersionString { return [OFString stringWithFormat: @"%u.%u", _protocolVersion.major, _protocolVersion.minor]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | - (OFString*)protocolVersionString { return [OFString stringWithFormat: @"%u.%u", _protocolVersion.major, _protocolVersion.minor]; } - (void)setBodyFromString: (OFString*)string { [self setBodyFromString: string encoding: OF_STRING_ENCODING_UTF_8]; } - (void)setBodyFromString: (OFString*)string encoding: (of_string_encoding_t)encoding { void *pool = objc_autoreleasePoolPush(); OFDataArray *body = [OFDataArray dataArray]; [body addItems: [string cStringWithEncoding: encoding] count: [string cStringLengthWithEncoding: encoding]]; [self setBody: body]; objc_autoreleasePoolPop(pool); } - (OFString*)description { void *pool = objc_autoreleasePoolPush(); const char *method = of_http_request_method_to_string(_method); OFString *indentedHeaders, *indentedBody, *ret; indentedHeaders = [[_headers description] |
︙ | ︙ |
Modified src/OFHTTPResponse.h from [127c6d8f9d] to [064c58fb15].
︙ | ︙ | |||
29 30 31 32 33 34 35 | @interface OFHTTPResponse: OFStream { of_http_request_protocol_version_t _protocolVersion; short _statusCode; OFDictionary OF_GENERIC(OFString*, OFString*) *_headers; } | < > | > > > > > < | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | @interface OFHTTPResponse: OFStream { of_http_request_protocol_version_t _protocolVersion; short _statusCode; OFDictionary OF_GENERIC(OFString*, OFString*) *_headers; } /*! * The status code of the reply to the HTTP request. */ @property short statusCode; /*! * The headers of the reply to the HTTP request. */ @property OF_NULLABLE_PROPERTY (copy) OFDictionary OF_GENERIC(OFString*, OFString*) *headers; /*! * @brief Sets the protocol version of the HTTP request reply. * * @param protocolVersion The protocol version of the HTTP request reply */ - (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion; |
︙ | ︙ | |||
65 66 67 68 69 70 71 | /*! * @brief Returns the protocol version of the HTTP request reply as a string. * * @return The protocol version of the HTTP request reply as a string */ - (OFString*)protocolVersionString; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | /*! * @brief Returns the protocol version of the HTTP request reply as a string. * * @return The protocol version of the HTTP request reply as a string */ - (OFString*)protocolVersionString; /*! * @brief Returns the reply as a string, trying to detect the encoding. * * @return The reply as a string */ - (OFString*)string; |
︙ | ︙ |
Modified src/OFHTTPResponse.m from [e1187050b5] to [4d16069cfb].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFUnsupportedVersionException.h" @implementation OFHTTPResponse - init { self = [super init]; _protocolVersion.major = 1; _protocolVersion.minor = 1; | > > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFUnsupportedVersionException.h" @implementation OFHTTPResponse @synthesize statusCode = _statusCode, headers = _headers; - init { self = [super init]; _protocolVersion.major = 1; _protocolVersion.minor = 1; |
︙ | ︙ | |||
87 88 89 90 91 92 93 | - (OFString*)protocolVersionString { return [OFString stringWithFormat: @"%u.%u", _protocolVersion.major, _protocolVersion.minor]; } | < < < < < < < < < < < < < < < < < < < < | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - (OFString*)protocolVersionString { return [OFString stringWithFormat: @"%u.%u", _protocolVersion.major, _protocolVersion.minor]; } - (OFString*)string { return [self stringWithEncoding: OF_STRING_ENCODING_AUTODETECT]; } - (OFString*)stringWithEncoding: (of_string_encoding_t)encoding { |
︙ | ︙ |
Modified src/OFHTTPServer.h from [0b4b52c4cd] to [c2a9a2ca01].
︙ | ︙ | |||
74 75 76 77 78 79 80 | OFString *_host; uint16_t _port; id <OFHTTPServerDelegate> _delegate; OFString *_name; OFTCPSocket *_listeningSocket; } | < > > > | > > > > > > > > > > > > | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | OFString *_host; uint16_t _port; id <OFHTTPServerDelegate> _delegate; OFString *_name; OFTCPSocket *_listeningSocket; } /*! * The host on which the HTTP server will listen. */ @property OF_NULLABLE_PROPERTY (copy) OFString* host; /*! * The port on which the HTTP server will listen. */ @property uint16_t port; /*! * The delegate for the HTTP server. */ @property OF_NULLABLE_PROPERTY (assign) id <OFHTTPServerDelegate> delegate; /*! * The server name the server presents to clients. */ @property (copy) OFString *name; /*! * @brief Creates a new HTTP server. * * @return A new HTTP server */ + (instancetype)server; /*! * @brief Starts the HTTP server in the current thread's runloop. */ - (void)start; /*! * @brief Stops the HTTP server, meaning it will not accept any new incoming |
︙ | ︙ |
Modified src/OFHTTPServer.m from [c9577b3169] to [c7dbee91dc].
︙ | ︙ | |||
385 386 387 388 389 390 391 | default: return false; } } @catch (OFWriteFailedException *e) { return false; } | | | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | default: return false; } } @catch (OFWriteFailedException *e) { return false; } OF_ENSURE(0); } - (bool)parseProlog: (OFString*)line { OFString *method; OFMutableString *path; size_t pos; |
︙ | ︙ | |||
642 643 644 645 646 647 648 649 650 651 652 653 654 655 | [[_server delegate] server: _server didReceiveRequest: request response: response]; } @end @implementation OFHTTPServer + (instancetype)server { return [[[self alloc] init] autorelease]; } - init { | > > | 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 | [[_server delegate] server: _server didReceiveRequest: request response: response]; } @end @implementation OFHTTPServer @synthesize host = _host, port = _port, delegate = _delegate, name = _name; + (instancetype)server { return [[[self alloc] init] autorelease]; } - init { |
︙ | ︙ | |||
666 667 668 669 670 671 672 | [_host release]; [_listeningSocket release]; [_name release]; [super dealloc]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 | [_host release]; [_listeningSocket release]; [_name release]; [super dealloc]; } - (void)start { if (_host == nil) @throw [OFInvalidArgumentException exception]; if (_listeningSocket != nil) @throw [OFAlreadyConnectedException exception]; |
︙ | ︙ |
Modified src/OFHash.h from [3d6ceb79ea] to [c1bb376104].
︙ | ︙ | |||
20 21 22 23 24 25 26 | /*! * @protocol OFHash OFHash.h ObjFW/OFHash.h * * @brief A protocol for classes providing hash functions. */ @protocol OFHash <OFObject> | < < | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /*! * @protocol OFHash OFHash.h ObjFW/OFHash.h * * @brief A protocol for classes providing hash functions. */ @protocol OFHash <OFObject> @property (readonly, getter=isCalculated) bool calculated; /*! * @brief Creates a new hash. * * @return A new autoreleased OFHash */ + (instancetype)hash; |
︙ | ︙ |
Modified src/OFINICategory.h from [b816d84214] to [9f2008ee0c].
︙ | ︙ | |||
31 32 33 34 35 36 37 | */ @interface OFINICategory: OFObject { OFString *_name; OFMutableArray *_lines; } | < < < < < < < < < < < < < | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | */ @interface OFINICategory: OFObject { OFString *_name; OFMutableArray *_lines; } /*! * The name of the INI category */ @property (copy) OFString *name; /*! * @brief Returns the string value for the specified key, or `nil` if it does * not exist. * * If the specified key is a multi-key (see @ref arrayForKey:), the value of * the first key/value pair found is returned. |
︙ | ︙ |
Modified src/OFINICategory.m from [54b832fdf6] to [db5fef86d0].
︙ | ︙ | |||
115 116 117 118 119 120 121 122 123 124 125 126 127 128 | [_comment release]; [super dealloc]; } @end @implementation OFINICategory - (instancetype)OF_init { self = [super init]; @try { _lines = [[OFMutableArray alloc] init]; } @catch (id e) { | > > | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | [_comment release]; [super dealloc]; } @end @implementation OFINICategory @synthesize name = _name; - (instancetype)OF_init { self = [super init]; @try { _lines = [[OFMutableArray alloc] init]; } @catch (id e) { |
︙ | ︙ | |||
142 143 144 145 146 147 148 | { [_name release]; [_lines release]; [super dealloc]; } | < < < < < < < < < < | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | { [_name release]; [_lines release]; [super dealloc]; } - (void)OF_parseLine: (OFString*)line { if (![line hasPrefix: @";"]) { OFINICategory_Pair *pair = [[[OFINICategory_Pair alloc] init] autorelease]; OFString *key, *value; size_t pos; |
︙ | ︙ |
Modified src/OFIntrospection.h from [061b43fb0e] to [afc6aa5a2f].
︙ | ︙ | |||
45 46 47 48 49 50 51 | @interface OFMethod: OFObject { SEL _selector; OFString *_name; const char *_typeEncoding; } | < < < < < < < < | | < < | | < < | | < < < < < < < < | | | < < | < < | | < < | | < < < < < < < < | | < < | | < < | | < < < < < < < < < < < < < < < < < < < < < < < | < < | | < < | | | > | > > > | > > | | > | > > > | < > > > | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | @interface OFMethod: OFObject { SEL _selector; OFString *_name; const char *_typeEncoding; } /*! * The selector of the method. */ @property (readonly) SEL selector; /*! * The name of the method. */ @property (readonly, copy) OFString *name; /*! * The type encoding for the method. */ @property OF_NULLABLE_PROPERTY (readonly) const char *typeEncoding; @end /*! * @class OFProperty OFIntrospection.h ObjFW/OFIntrospection.h * * @brief A class for describing a property. */ @interface OFProperty: OFObject { OFString *_name; unsigned _attributes; OFString *_getter, *_setter; } /*! * The name of the property. */ @property (readonly, copy) OFString *name; /*! * The attributes of the property. * * The attributes are a bitmask with the following possible flags:@n * Flag | Description * ------------------------------|------------------------------------- * OF_PROPERTY_READONLY | The property is declared `readonly` * OF_PROPERTY_READWRITE | The property is declared `readwrite` * OF_PROPERTY_ASSIGN | The property is declared `assign` * OF_PROPERTY_RETAIN | The property is declared `retain` * OF_PROPERTY_COPY | The property is declared `copy` * OF_PROPERTY_NONATOMIC | The property is declared `nonatomic` * OF_PROPERTY_ATOMIC | The property is declared `atomic` * OF_PROPERTY_WEAK | The property is declared `weak` * OF_PROPERTY_SYNTHESIZED | The property is synthesized * OF_PROPERTY_DYNAMIC | The property is dynamic */ @property (readonly) unsigned attributes; /*! * The name of the getter. */ @property OF_NULLABLE_PROPERTY (readonly, copy) OFString *getter; /*! * @return The name of the setter. */ @property OF_NULLABLE_PROPERTY (readonly, copy) OFString *setter; @end /*! * @class OFInstanceVariable OFIntrospection.h ObjFW/OFIntrospection.h * * @brief A class for describing an instance variable. */ @interface OFInstanceVariable: OFObject { OFString *_name; const char *_typeEncoding; ptrdiff_t _offset; } /*! * The name of the instance variable. */ @property (readonly, copy) OFString *name; /*! * The offset of the instance variable. */ @property (readonly) ptrdiff_t offset; /*! * The type encoding for the instance variable. */ @property OF_NULLABLE_PROPERTY (readonly) const char *typeEncoding; @end /*! * @class OFIntrospection OFIntrospection.h ObjFW/OFIntrospection.h * * @brief A class for introspecting classes. */ @interface OFIntrospection: OFObject { OFMutableArray OF_GENERIC(OFMethod*) *_classMethods; OFMutableArray OF_GENERIC(OFMethod*) *_instanceMethods; OFMutableArray OF_GENERIC(OFProperty*) *_properties; OFMutableArray OF_GENERIC(OFInstanceVariable*) *_instanceVariables; } /*! * The class methods of the class. */ @property (readonly, copy) OFArray OF_GENERIC(OFMethod*) *classMethods; /*! * The instance methods of the class. */ @property (readonly, copy) OFArray OF_GENERIC(OFMethod*) *instanceMethods; /*! * The properties of the class. * * @warning **Do not rely on this, as this behaves differently depending on the * compiler and ABI used!** * * @warning For the ObjFW ABI, Clang only emits data for property introspection * if `@``synthesize` or `@``dynamic` has been used on the property, * not if the property has only been implemented by methods. Using * `@``synthesize` and manually implementing the methods works, * though. * * @warning For the Apple ABI, Clang and GCC both emit data for property * introspection for every property that has been declared using * `@``property`, even if no `@``synchronize` or `@``dynamic` has been * used. * * @warning GCC does not emit any data for property introspection for the GNU * ABI. */ @property (readonly, copy) OFArray OF_GENERIC(OFProperty*) *properties; /*! * The instance variables of the class. */ @property (readonly, copy) OFArray OF_GENERIC(OFInstanceVariable*) *instanceVariables; /* TODO: protocols */ /*! * @brief Creates a new introspection for the specified class. * * @return A new, autoreleased introspection for the specified class */ + (instancetype)introspectionWithClass: (Class)class_; /*! * @brief Initializes an already allocated OFIntrospection with the specified * class. * * @return An initialized OFIntrospection */ - initWithClass: (Class)class_; @end OF_ASSUME_NONNULL_END |
Modified src/OFIntrospection.m from [28d5671231] to [521053ff4d].
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #import "OFIntrospection.h" #import "OFString.h" #import "OFArray.h" #import "OFInitializationFailedException.h" @implementation OFMethod #if defined(OF_OBJFW_RUNTIME) - (instancetype)OF_initWithMethod: (struct objc_method*)method { self = [super init]; @try { _selector = (SEL)&method->sel; | > > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFIntrospection.h" #import "OFString.h" #import "OFArray.h" #import "OFInitializationFailedException.h" @implementation OFMethod @synthesize selector = _selector, name = _name, typeEncoding = _typeEncoding; #if defined(OF_OBJFW_RUNTIME) - (instancetype)OF_initWithMethod: (struct objc_method*)method { self = [super init]; @try { _selector = (SEL)&method->sel; |
︙ | ︙ | |||
72 73 74 75 76 77 78 | - (void)dealloc { [_name release]; [super dealloc]; } | < < < < < < < < < < < < < < < | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - (void)dealloc { [_name release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"<%@: %@ [%s]>", [self class], _name, _typeEncoding]; } - (bool)isEqual: (id)object |
︙ | ︙ | |||
142 143 144 145 146 147 148 149 150 151 152 153 154 155 | OF_HASH_FINALIZE(hash); return hash; } @end @implementation OFProperty #if defined(OF_OBJFW_RUNTIME) - (instancetype)OF_initWithProperty: (struct objc_property*)property { self = [super init]; @try { _name = [[OFString alloc] initWithUTF8String: property->name]; | > > > | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | OF_HASH_FINALIZE(hash); return hash; } @end @implementation OFProperty @synthesize name = _name, attributes = _attributes; @synthesize getter = _getter, setter = _setter; #if defined(OF_OBJFW_RUNTIME) - (instancetype)OF_initWithProperty: (struct objc_property*)property { self = [super init]; @try { _name = [[OFString alloc] initWithUTF8String: property->name]; |
︙ | ︙ | |||
312 313 314 315 316 317 318 | [_name release]; [_getter release]; [_setter release]; [super dealloc]; } | < < < < < < < < < < < < < < < < < < < < | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | [_name release]; [_getter release]; [_setter release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"<%@: %@\n" @"\tAttributes = 0x%03X\n" @"\tGetter = %@\n" @"\tSetter = %@\n" |
︙ | ︙ | |||
384 385 386 387 388 389 390 391 392 393 394 395 396 397 | OF_HASH_FINALIZE(hash); return hash; } @end @implementation OFInstanceVariable #if defined(OF_OBJFW_RUNTIME) - (instancetype)OF_initWithIvar: (struct objc_ivar*)ivar { self = [super init]; @try { _name = [[OFString alloc] initWithUTF8String: ivar->name]; | > > | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | OF_HASH_FINALIZE(hash); return hash; } @end @implementation OFInstanceVariable @synthesize name = _name, offset = _offset, typeEncoding = _typeEncoding; #if defined(OF_OBJFW_RUNTIME) - (instancetype)OF_initWithIvar: (struct objc_ivar*)ivar { self = [super init]; @try { _name = [[OFString alloc] initWithUTF8String: ivar->name]; |
︙ | ︙ | |||
433 434 435 436 437 438 439 | - (void)dealloc { [_name release]; [super dealloc]; } | < < < < < < < < < < < < < < < > > > | 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 | - (void)dealloc { [_name release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"<OFInstanceVariable: %@ [%s] @ 0x%tx>", _name, _typeEncoding, _offset]; } @end @implementation OFIntrospection @synthesize classMethods = _classMethods, instanceMethods = _instanceMethods; @synthesize properties = _properties, instanceVariables = _instanceVariables; + (instancetype)introspectionWithClass: (Class)class { return [[[self alloc] initWithClass: class] autorelease]; } - initWithClass: (Class)class { |
︙ | ︙ | |||
618 619 620 621 622 623 624 | { [_classMethods release]; [_instanceMethods release]; [_instanceVariables release]; [super dealloc]; } | < < < < < < < < < < < < < < < < < < < < | 578 579 580 581 582 583 584 585 | { [_classMethods release]; [_instanceMethods release]; [_instanceVariables release]; [super dealloc]; } @end |
Modified src/OFKernelEventObserver.h from [dd8f6e2345] to [9901acfc70].
︙ | ︙ | |||
124 125 126 127 128 129 130 | struct sockaddr_in _cancelAddr; #endif #ifdef OF_HAVE_THREADS OFMutex *_mutex; #endif } | < > > > < < < < < < < < < < < < < < < | 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 | struct sockaddr_in _cancelAddr; #endif #ifdef OF_HAVE_THREADS OFMutex *_mutex; #endif } /*! * The delegate for the OFKernelEventObserver. */ @property OF_NULLABLE_PROPERTY (assign) id <OFKernelEventObserverDelegate> delegate; /*! * @brief Creates a new OFKernelEventObserver. * * @return A new, autoreleased OFKernelEventObserver */ + (instancetype)observer; /*! * @brief Adds an object to observe for reading. * * This is also used to observe a listening socket for incoming connections, * which then triggers a read event for the observed object. * * If there is an @ref observe call blocking, it will be canceled. The reason |
︙ | ︙ |
Modified src/OFKernelEventObserver.m from [6ae3a0050f] to [d6c5a9d524].
︙ | ︙ | |||
60 61 62 63 64 65 66 67 68 69 70 71 72 73 | QUEUE_REMOVE = 1, QUEUE_READ = 0, QUEUE_WRITE = 2 }; #define QUEUE_ACTION (QUEUE_ADD | QUEUE_REMOVE) @implementation OFKernelEventObserver + (void)initialize { if (self != [OFKernelEventObserver class]) return; if (!of_socket_init()) @throw [OFInitializationFailedException | > > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | QUEUE_REMOVE = 1, QUEUE_READ = 0, QUEUE_WRITE = 2 }; #define QUEUE_ACTION (QUEUE_ADD | QUEUE_REMOVE) @implementation OFKernelEventObserver @synthesize delegate = _delegate; + (void)initialize { if (self != [OFKernelEventObserver class]) return; if (!of_socket_init()) @throw [OFInitializationFailedException |
︙ | ︙ | |||
175 176 177 178 179 180 181 | #ifdef OF_HAVE_THREADS [_mutex release]; #endif [super dealloc]; } | < < < < < < < < < < | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | #ifdef OF_HAVE_THREADS [_mutex release]; #endif [super dealloc]; } - (void)addObjectForReading: (id <OFReadyForReadingObserving>)object { #ifdef OF_HAVE_THREADS [_mutex lock]; #endif @try { int qi = QUEUE_ADD | QUEUE_READ; |
︙ | ︙ |
Modified src/OFList.h from [1c84feb5eb] to [1f21a78f7e].
︙ | ︙ | |||
56 57 58 59 60 61 62 | { of_list_object_t *_firstListObject; of_list_object_t *_lastListObject; size_t _count; unsigned long _mutations; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | { of_list_object_t *_firstListObject; of_list_object_t *_lastListObject; size_t _count; unsigned long _mutations; } /*! * The first list object of the list. */ @property OF_NULLABLE_PROPERTY (readonly) of_list_object_t *firstListObject; /*! * The last list object of the list. */ @property OF_NULLABLE_PROPERTY (readonly) of_list_object_t *lastListObject; /*! * @brief Creates a new OFList. * * @return A new autoreleased OFList */ + (instancetype)list; /*! * @brief Appends an object to the list. * * @param object The object to append * @return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. |
︙ | ︙ |
Modified src/OFList.m from [ea98df2a92] to [a0868f6c97].
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #import "OFXMLElement.h" #import "OFArray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" @implementation OFList + (instancetype)list { return [[[self alloc] init] autorelease]; } - initWithSerialization: (OFXMLElement*)element { | > > > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import "OFXMLElement.h" #import "OFArray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" @implementation OFList @synthesize firstListObject = _firstListObject; @synthesize lastListObject = _lastListObject; + (instancetype)list { return [[[self alloc] init] autorelease]; } - initWithSerialization: (OFXMLElement*)element { |
︙ | ︙ | |||
71 72 73 74 75 76 77 | for (iter = _firstListObject; iter != NULL; iter = iter->next) [iter->object release]; [super dealloc]; } | < < < < < < < < < < | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | for (iter = _firstListObject; iter != NULL; iter = iter->next) [iter->object release]; [super dealloc]; } - (of_list_object_t*)appendObject: (id)object { of_list_object_t *listObject; listObject = [self allocMemoryWithSize: sizeof(of_list_object_t)]; listObject->object = [object retain]; listObject->next = NULL; |
︙ | ︙ |
Modified src/OFLocking.h from [5d56441827] to [47131bbb4d].
︙ | ︙ | |||
20 21 22 23 24 25 26 | /*! * @protocol OFLocking OFLocking.h ObjFW/OFLocking.h * * @brief A protocol for locks. */ @protocol OFLocking <OFObject> | < > > > < | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | /*! * @protocol OFLocking OFLocking.h ObjFW/OFLocking.h * * @brief A protocol for locks. */ @protocol OFLocking <OFObject> /*! * The name of the lock. */ @property OF_NULLABLE_PROPERTY (copy) OFString *name; /*! * @brief Locks the lock. */ - (void)lock; /*! |
︙ | ︙ |
Modified src/OFMD5Hash.m from [3333d71ead] to [353f7b18b1].
︙ | ︙ | |||
111 112 113 114 115 116 117 118 119 120 121 122 123 124 | state[0] += new[0]; state[1] += new[1]; state[2] += new[2]; state[3] += new[3]; } @implementation OFMD5Hash + (size_t)digestSize { return 16; } + (size_t)blockSize { | > > | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | state[0] += new[0]; state[1] += new[1]; state[2] += new[2]; state[3] += new[3]; } @implementation OFMD5Hash @synthesize calculated = _calculated; + (size_t)digestSize { return 16; } + (size_t)blockSize { |
︙ | ︙ | |||
197 198 199 200 201 202 203 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfBE(_state, 4); _calculated = true; return (const uint8_t*)_state; } | < < < < < | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfBE(_state, 4); _calculated = true; return (const uint8_t*)_state; } - (void)reset { [self OF_resetState]; _bits = 0; memset(&_buffer, 0, sizeof(_buffer)); _bufferLength = 0; _calculated = false; } @end |
Modified src/OFMapTable.h from [fa70b8daed] to [761c1c436d].
︙ | ︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 85 | of_map_table_functions_t _keyFunctions, _valueFunctions; struct of_map_table_bucket **_buckets; uint32_t _count, _capacity; uint8_t _rotate; unsigned long _mutations; } /*! * @brief Creates a new OFMapTable with the specified key and value functions. * * @param keyFunctions A structure of functions for handling keys * @param valueFunctions A structure of functions for handling values * @return A new autoreleased OFMapTable */ | > > > > > > > > > > | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | of_map_table_functions_t _keyFunctions, _valueFunctions; struct of_map_table_bucket **_buckets; uint32_t _count, _capacity; uint8_t _rotate; unsigned long _mutations; } /*! * The key functions used by the map table. */ @property (readonly) of_map_table_functions_t keyFunctions; /*! * The value functions used by the map table. */ @property (readonly) of_map_table_functions_t valueFunctions; /*! * @brief Creates a new OFMapTable with the specified key and value functions. * * @param keyFunctions A structure of functions for handling keys * @param valueFunctions A structure of functions for handling values * @return A new autoreleased OFMapTable */ |
︙ | ︙ | |||
210 211 212 213 214 215 216 | /*! * @brief Replaces each value with the value returned by the block. * * @param block The block which returns a new value for each value */ - (void)replaceValuesUsingBlock: (of_map_table_replace_block_t)block; #endif | < < < < < < < < < < < < < < | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | /*! * @brief Replaces each value with the value returned by the block. * * @param block The block which returns a new value for each value */ - (void)replaceValuesUsingBlock: (of_map_table_replace_block_t)block; #endif @end /*! * @class OFMapTableEnumerator OFMapTable.h ObjFW/OFMapTable.h * * @brief A class which provides methods to enumerate through an OFMapTable's * keys or values. |
︙ | ︙ |
Modified src/OFMapTable.m from [ccd71cdedf] to [1fa0a57947].
︙ | ︙ | |||
76 77 78 79 80 81 82 83 84 85 86 87 88 89 | @interface OFMapTableKeyEnumerator: OFMapTableEnumerator @end @interface OFMapTableValueEnumerator: OFMapTableEnumerator @end @implementation OFMapTable + (instancetype)mapTableWithKeyFunctions: (of_map_table_functions_t)keyFunctions valueFunctions: (of_map_table_functions_t) valueFunctions { return [[[self alloc] initWithKeyFunctions: keyFunctions valueFunctions: valueFunctions] autorelease]; | > > | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | @interface OFMapTableKeyEnumerator: OFMapTableEnumerator @end @interface OFMapTableValueEnumerator: OFMapTableEnumerator @end @implementation OFMapTable @synthesize keyFunctions = _keyFunctions, valueFunctions = _valueFunctions; + (instancetype)mapTableWithKeyFunctions: (of_map_table_functions_t)keyFunctions valueFunctions: (of_map_table_functions_t) valueFunctions { return [[[self alloc] initWithKeyFunctions: keyFunctions valueFunctions: valueFunctions] autorelease]; |
︙ | ︙ | |||
662 663 664 665 666 667 668 | _buckets[i]->value = _valueFunctions.retain(new); } } } } #endif | < < < < < < < < < < | 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | _buckets[i]->value = _valueFunctions.retain(new); } } } } #endif @end @implementation OFMapTableEnumerator - init { OF_INVALID_INIT_METHOD } |
︙ | ︙ |
Modified src/OFMessagePackExtension.h from [62dc4c8908] to [27e2b5097b].
︙ | ︙ | |||
30 31 32 33 34 35 36 | @interface OFMessagePackExtension: OFObject <OFMessagePackRepresentation, OFCopying> { int8_t _type; OFDataArray *_data; } | < > > > > > > > < | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | @interface OFMessagePackExtension: OFObject <OFMessagePackRepresentation, OFCopying> { int8_t _type; OFDataArray *_data; } /*! * The MessagePack extension type. */ @property (readonly) int8_t type; /*! * @return The data of the extension. */ @property (readonly, retain) OFDataArray *data; /*! * @brief Creates a new OFMessagePackRepresentation with the specified type and * data. * * @param type The MessagePack extension type * @param data The data for the extension |
︙ | ︙ | |||
56 57 58 59 60 61 62 | * * @param type The MessagePack extension type * @param data The data for the extension * @return An initialized OFMessagePackRepresentation */ - initWithType: (int8_t)type data: (OFDataArray*)data; | < < < < < < < < < < < < < < | 61 62 63 64 65 66 67 68 69 70 | * * @param type The MessagePack extension type * @param data The data for the extension * @return An initialized OFMessagePackRepresentation */ - initWithType: (int8_t)type data: (OFDataArray*)data; @end OF_ASSUME_NONNULL_END |
Modified src/OFMessagePackExtension.m from [d842f74a96] to [063aef4644].
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import "OFMessagePackExtension.h" #import "OFDataArray.h" #import "OFString.h" #import "OFInvalidArgumentException.h" @implementation OFMessagePackExtension + (instancetype)extensionWithType: (int8_t)type data: (OFDataArray*)data { return [[[self alloc] initWithType: type data: data] autorelease]; } | > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "OFMessagePackExtension.h" #import "OFDataArray.h" #import "OFString.h" #import "OFInvalidArgumentException.h" @implementation OFMessagePackExtension @synthesize type = _type, data = _data; + (instancetype)extensionWithType: (int8_t)type data: (OFDataArray*)data { return [[[self alloc] initWithType: type data: data] autorelease]; } |
︙ | ︙ | |||
57 58 59 60 61 62 63 | - (void)dealloc { [_data release]; [super dealloc]; } | < < < < < < < < < < | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - (void)dealloc { [_data release]; [super dealloc]; } - (OFDataArray*)messagePackRepresentation { OFDataArray *ret; uint8_t prefix; size_t count = [_data count]; if (count == 1) { |
︙ | ︙ |
Modified src/OFMutex.m from [37a9b75801] to [b8634db568].
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | #import "OFInitializationFailedException.h" #import "OFLockFailedException.h" #import "OFStillLockedException.h" #import "OFUnlockFailedException.h" @implementation OFMutex + (instancetype)mutex { return [[[self alloc] init] autorelease]; } - init { self = [super init]; if (!of_mutex_new(&_mutex)) { Class c = [self class]; [self release]; @throw [OFInitializationFailedException exceptionWithClass: c]; } _initialized = true; return self; } - (void)lock { if (!of_mutex_lock(&_mutex)) @throw [OFLockFailedException exceptionWithLock: self]; } - (bool)tryLock { return of_mutex_trylock(&_mutex); } - (void)unlock { if (!of_mutex_unlock(&_mutex)) @throw [OFUnlockFailedException exceptionWithLock: self]; } | > > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | #import "OFInitializationFailedException.h" #import "OFLockFailedException.h" #import "OFStillLockedException.h" #import "OFUnlockFailedException.h" @implementation OFMutex @synthesize name = _name; + (instancetype)mutex { return [[[self alloc] init] autorelease]; } - init { self = [super init]; if (!of_mutex_new(&_mutex)) { Class c = [self class]; [self release]; @throw [OFInitializationFailedException exceptionWithClass: c]; } _initialized = true; return self; } - (void)dealloc { if (_initialized) if (!of_mutex_free(&_mutex)) @throw [OFStillLockedException exceptionWithLock: self]; [_name release]; [super dealloc]; } - (void)lock { if (!of_mutex_lock(&_mutex)) @throw [OFLockFailedException exceptionWithLock: self]; } - (bool)tryLock { return of_mutex_trylock(&_mutex); } - (void)unlock { if (!of_mutex_unlock(&_mutex)) @throw [OFUnlockFailedException exceptionWithLock: self]; } - (OFString*)description { if (_name == nil) return [super description]; return [OFString stringWithFormat: @"<%@: %@>", [self className], _name]; } @end |
Modified src/OFNumber.h from [d6e03f82de] to [d5e0f4a58d].
︙ | ︙ | |||
143 144 145 146 147 148 149 | uintptr_t uintptr; float float_; double double_; } _value; of_number_type_t _type; } | < > > > < | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | uintptr_t uintptr; float float_; double double_; } _value; of_number_type_t _type; } /*! * The type of the number. */ @property (readonly) of_number_type_t type; /*! * @brief Creates a new OFNumber with the specified bool. * * @param bool_ A bool which the OFNumber should contain * @return A new autoreleased OFNumber */ |
︙ | ︙ | |||
608 609 610 611 612 613 614 | * @brief Initializes an already allocated OFNumber with the specified double. * * @param double_ A double which the OFNumber should contain * @return An initialized OFNumber */ - initWithDouble: (double)double_; | < < < < < < < | 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | * @brief Initializes an already allocated OFNumber with the specified double. * * @param double_ A double which the OFNumber should contain * @return An initialized OFNumber */ - initWithDouble: (double)double_; /*! * @brief Returns the OFNumber as a bool. * * @return The OFNumber as a bool */ - (bool)boolValue; |
︙ | ︙ |
Modified src/OFNumber.m from [e5c84f2d31] to [6960976b0a].
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 | @interface OFNumber (OF_PRIVATE_CATEGORY) - (OFString*)OF_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end @implementation OFNumber + (instancetype)numberWithBool: (bool)bool_ { return [[[self alloc] initWithBool: bool_] autorelease]; } + (instancetype)numberWithChar: (signed char)schar { | > > | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | @interface OFNumber (OF_PRIVATE_CATEGORY) - (OFString*)OF_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end @implementation OFNumber @synthesize type = _type; + (instancetype)numberWithBool: (bool)bool_ { return [[[self alloc] initWithBool: bool_] autorelease]; } + (instancetype)numberWithChar: (signed char)schar { |
︙ | ︙ | |||
582 583 584 585 586 587 588 | [self release]; @throw e; } return self; } | < < < < < | 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | [self release]; @throw e; } return self; } - (bool)boolValue { RETURN_AS(bool) } - (signed char)charValue { |
︙ | ︙ |
Modified src/OFOptionsParser.h from [b395fe2709] to [5b6e0b9788].
︙ | ︙ | |||
72 73 74 75 76 77 78 | OFArray OF_GENERIC(OFString*) *_arguments; size_t _index, _subIndex; of_unichar_t _lastOption; OFString *_lastLongOption, *_argument; bool _done; } | > > > > > > | > > > > > > > > > > > > > > > > > | > > > > > | < < | 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 | OFArray OF_GENERIC(OFString*) *_arguments; size_t _index, _subIndex; of_unichar_t _lastOption; OFString *_lastLongOption, *_argument; bool _done; } /*! * The last parsed option. * * If @ref nextOption returned `?` or `:`, this returns the option which was * unknown or for which the argument was missing.@n * If this returns `-`, the last option is only available as a long option (see * @ref lastLongOption). */ @property (readonly) of_unichar_t lastOption; /*! * The long option for the last parsed option, or `nil` if the last parsed * option was not passed as a long option by the user. * * In case @ref nextOption returned `?`, this contains the unknown long * option.@n * In case it returned `:`, this contains the long option which is missing an * argument.@n * In case it returned `=`, this contains the long option for which an * argument was specified even though the option takes no argument. * * @warning Unlike @ref lastOption, which returns the short option even if the * user specified a long option, this only returns the long option if * it was actually specified as a long option by the user. */ @property OF_NULLABLE_PROPERTY (readonly, copy) OFString *lastLongOption; /*! * The argument for the last parsed option, or `nil` if the last parsed option * takes no argument. */ @property OF_NULLABLE_PROPERTY (readonly, copy) OFString *argument; /*! * @brief Creates a new OFOptionsParser which accepts the specified options. * * @param options An array of @ref of_options_parser_option_t specifying all * accepted options, terminated with an option whose short * option is `\0` and long option is `nil`. |
︙ | ︙ | |||
122 123 124 125 126 127 128 | * make sure all options have been parsed, even if you only rely on the * optional pointers specified and don't do any parsing yourself. * * @return The next option */ - (of_unichar_t)nextOption; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | * make sure all options have been parsed, even if you only rely on the * optional pointers specified and don't do any parsing yourself. * * @return The next option */ - (of_unichar_t)nextOption; /*! * @brief Returns the arguments following the last option. * * @return The arguments following the last option */ - (OFArray OF_GENERIC(OFString*)*)remainingArguments; @end OF_ASSUME_NONNULL_END |
Modified src/OFOptionsParser.m from [b5a7737ef1] to [a330fd8ef3].
︙ | ︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 44 45 | static bool stringEqual(void *value1, void *value2) { return [(OFString*)value1 isEqual: (OFString*)value2]; } @implementation OFOptionsParser + (instancetype)parserWithOptions: (const of_options_parser_option_t*)options { return [[[self alloc] initWithOptions: options] autorelease]; } - init { | > > > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | static bool stringEqual(void *value1, void *value2) { return [(OFString*)value1 isEqual: (OFString*)value2]; } @implementation OFOptionsParser @synthesize lastOption = _lastOption, lastLongOption = _lastLongOption; @synthesize argument = _argument; + (instancetype)parserWithOptions: (const of_options_parser_option_t*)options { return [[[self alloc] initWithOptions: options] autorelease]; } - init { |
︙ | ︙ | |||
257 258 259 260 261 262 263 | return _lastOption; } } return '?'; } | < < < < < < < < < < < < < < < | 260 261 262 263 264 265 266 267 268 269 270 271 272 | return _lastOption; } } return '?'; } - (OFArray*)remainingArguments { return [_arguments objectsInRange: of_range(_index, [_arguments count] - _index)]; } @end |
Modified src/OFRIPEMD160Hash.m from [0df0a4dfec] to [8302ffabae].
︙ | ︙ | |||
125 126 127 128 129 130 131 132 133 134 135 136 137 138 | state[2] = state[3] + new[4] + new2[0]; state[3] = state[4] + new[0] + new2[1]; state[4] = state[0] + new[1] + new2[2]; state[0] = new2[3]; } @implementation OFRIPEMD160Hash + (size_t)digestSize { return 20; } + (size_t)blockSize { | > > | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | state[2] = state[3] + new[4] + new2[0]; state[3] = state[4] + new[0] + new2[1]; state[4] = state[0] + new[1] + new2[2]; state[0] = new2[3]; } @implementation OFRIPEMD160Hash @synthesize calculated = _calculated; + (size_t)digestSize { return 20; } + (size_t)blockSize { |
︙ | ︙ | |||
212 213 214 215 216 217 218 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfBE(_state, 5); _calculated = true; return (const uint8_t*)_state; } | < < < < < | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfBE(_state, 5); _calculated = true; return (const uint8_t*)_state; } - (void)reset { [self OF_resetState]; _bits = 0; memset(&_buffer, 0, sizeof(_buffer)); _bufferLength = 0; _calculated = false; } @end |
Modified src/OFRecursiveMutex.m from [68e0559f83] to [32aeed25c0].
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | #import "OFInitializationFailedException.h" #import "OFLockFailedException.h" #import "OFStillLockedException.h" #import "OFUnlockFailedException.h" @implementation OFRecursiveMutex + (instancetype)mutex { return [[[self alloc] init] autorelease]; } - init { self = [super init]; if (!of_rmutex_new(&_rmutex)) { Class c = [self class]; [self release]; @throw [OFInitializationFailedException exceptionWithClass: c]; } _initialized = true; return self; } - (void)lock { if (!of_rmutex_lock(&_rmutex)) @throw [OFLockFailedException exceptionWithLock: self]; } - (bool)tryLock { return of_rmutex_trylock(&_rmutex); } - (void)unlock { if (!of_rmutex_unlock(&_rmutex)) @throw [OFUnlockFailedException exceptionWithLock: self]; } | > > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | #import "OFInitializationFailedException.h" #import "OFLockFailedException.h" #import "OFStillLockedException.h" #import "OFUnlockFailedException.h" @implementation OFRecursiveMutex @synthesize name = _name; + (instancetype)mutex { return [[[self alloc] init] autorelease]; } - init { self = [super init]; if (!of_rmutex_new(&_rmutex)) { Class c = [self class]; [self release]; @throw [OFInitializationFailedException exceptionWithClass: c]; } _initialized = true; return self; } - (void)dealloc { if (_initialized) if (!of_rmutex_free(&_rmutex)) @throw [OFStillLockedException exceptionWithLock: self]; [_name release]; [super dealloc]; } - (void)lock { if (!of_rmutex_lock(&_rmutex)) @throw [OFLockFailedException exceptionWithLock: self]; } - (bool)tryLock { return of_rmutex_trylock(&_rmutex); } - (void)unlock { if (!of_rmutex_unlock(&_rmutex)) @throw [OFUnlockFailedException exceptionWithLock: self]; } - (OFString*)description { if (_name == nil) return [super description]; return [OFString stringWithFormat: @"<%@: %@>", [self className], _name]; } @end |
Modified src/OFSHA1Hash.m from [b45fb37713] to [7f1c25fede].
︙ | ︙ | |||
85 86 87 88 89 90 91 92 93 94 95 96 97 98 | state[1] += new[1]; state[2] += new[2]; state[3] += new[3]; state[4] += new[4]; } @implementation OFSHA1Hash + (size_t)digestSize { return 20; } + (size_t)blockSize { | > > | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | state[1] += new[1]; state[2] += new[2]; state[3] += new[3]; state[4] += new[4]; } @implementation OFSHA1Hash @synthesize calculated = _calculated; + (size_t)digestSize { return 20; } + (size_t)blockSize { |
︙ | ︙ | |||
172 173 174 175 176 177 178 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfLE(_state, 5); _calculated = true; return (const uint8_t*)_state; } | < < < < < | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfLE(_state, 5); _calculated = true; return (const uint8_t*)_state; } - (void)reset { [self OF_resetState]; _bits = 0; memset(&_buffer, 0, sizeof(_buffer)); _bufferLength = 0; _calculated = false; } @end |
Modified src/OFSHA224Or256Hash.m from [d23742f855] to [f2934a633d].
︙ | ︙ | |||
106 107 108 109 110 111 112 113 114 115 116 117 118 119 | state[4] += new[4]; state[5] += new[5]; state[6] += new[6]; state[7] += new[7]; } @implementation OFSHA224Or256Hash + (size_t)digestSize { OF_UNRECOGNIZED_SELECTOR } + (size_t)blockSize { | > > | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | state[4] += new[4]; state[5] += new[5]; state[6] += new[6]; state[7] += new[7]; } @implementation OFSHA224Or256Hash @synthesize calculated = _calculated; + (size_t)digestSize { OF_UNRECOGNIZED_SELECTOR } + (size_t)blockSize { |
︙ | ︙ | |||
184 185 186 187 188 189 190 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfLE(_state, 8); _calculated = true; return (const uint8_t*)_state; } | < < < < < | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfLE(_state, 8); _calculated = true; return (const uint8_t*)_state; } - (void)reset { [self OF_resetState]; _bits = 0; memset(&_buffer, 0, sizeof(_buffer)); _bufferLength = 0; _calculated = false; |
︙ | ︙ |
Modified src/OFSHA384Or512Hash.m from [aff18d378f] to [4224bef66b].
︙ | ︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 129 130 | state[4] += new[4]; state[5] += new[5]; state[6] += new[6]; state[7] += new[7]; } @implementation OFSHA384Or512Hash + (size_t)digestSize { OF_UNRECOGNIZED_SELECTOR } + (size_t)blockSize { | > > | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | state[4] += new[4]; state[5] += new[5]; state[6] += new[6]; state[7] += new[7]; } @implementation OFSHA384Or512Hash @synthesize calculated = _calculated; + (size_t)digestSize { OF_UNRECOGNIZED_SELECTOR } + (size_t)blockSize { |
︙ | ︙ | |||
197 198 199 200 201 202 203 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfLE(_state, 8); _calculated = true; return (const uint8_t*)_state; } | < < < < < | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | memset(&_buffer, 0, sizeof(_buffer)); byteSwapVectorIfLE(_state, 8); _calculated = true; return (const uint8_t*)_state; } - (void)reset { [self OF_resetState]; memset(&_bits, 0, sizeof(_bits)); memset(&_buffer, 0, sizeof(_buffer)); _bufferLength = 0; _calculated = false; |
︙ | ︙ |
Modified src/OFSettings.h from [2c3ccb9e45] to [d197df9354].
︙ | ︙ | |||
33 34 35 36 37 38 39 | * @brief A class for storing and retrieving settings */ @interface OFSettings: OFObject { OFString *_applicationName; } | < > > > < | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | * @brief A class for storing and retrieving settings */ @interface OFSettings: OFObject { OFString *_applicationName; } /*! * The name of the application whose settings are accessed by the instance. */ @property (readonly, copy) OFString *applicationName; /*! * @brief Create a new OFSettings instance for the application with the * specified name. * * @param applicationName The name of the application whose settings should be * accessed |
︙ | ︙ | |||
57 58 59 60 61 62 63 | * * @param applicationName The name of the application whose settings should be * accessed * @return An initialized OFSettings instance */ - initWithApplicationName: (OFString*)applicationName; | < < < < < < < < < | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | * * @param applicationName The name of the application whose settings should be * accessed * @return An initialized OFSettings instance */ - initWithApplicationName: (OFString*)applicationName; /*! * @brief Sets the specified path to the specified string. * * @param string The string to set * @param path The path to store the string at */ - (void)setString: (OFString*)string |
︙ | ︙ |
Modified src/OFSettings.m from [d9a2808cef] to [1c08bd71db].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFSettings.h" #import "OFSettings_INIFile.h" #import "OFString.h" @implementation OFSettings + alloc { if (self == [OFSettings class]) return [OFSettings_INIFile alloc]; return [super alloc]; } | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFSettings.h" #import "OFSettings_INIFile.h" #import "OFString.h" @implementation OFSettings @synthesize applicationName = _applicationName; + alloc { if (self == [OFSettings class]) return [OFSettings_INIFile alloc]; return [super alloc]; } |
︙ | ︙ | |||
57 58 59 60 61 62 63 | - (void)dealloc { [_applicationName release]; [super dealloc]; } | < < < < < | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - (void)dealloc { [_applicationName release]; [super dealloc]; } - (void)setString: (OFString*)string forPath: (OFString*)path { OF_UNRECOGNIZED_SELECTOR } - (void)setInteger: (intmax_t)integer |
︙ | ︙ |
Modified src/OFStream+Private.h from [374d14d5bd] to [cd0edecb76].
︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStream (OF_PRIVATE_CATEGORY) | | | 15 16 17 18 19 20 21 22 23 24 25 | */ #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStream (OF_PRIVATE_CATEGORY) @property (readonly) bool OF_isWaitingForDelimiter; @end OF_ASSUME_NONNULL_END |
Modified src/OFStream.h from [eaef7f1c66] to [ceee33b1c7].
︙ | ︙ | |||
97 98 99 100 101 102 103 | char *_readBuffer, *_writeBuffer; size_t _readBufferLength, _writeBufferLength; bool _writeBuffered, _waitingForDelimiter; @protected bool _blocking; } | < < < < < < | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | char *_readBuffer, *_writeBuffer; size_t _readBufferLength, _writeBufferLength; bool _writeBuffered, _waitingForDelimiter; @protected bool _blocking; } /*! * @brief Returns a boolean whether the end of the stream has been reached. * * @return A boolean whether the end of the stream has been reached */ - (bool)isAtEndOfStream; |
︙ | ︙ |
Modified src/OFStream.m from [17ac0272c3] to [dd5879d93a].
︙ | ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #import "OFNotImplementedException.h" #import "OFOutOfRangeException.h" #import "OFSetOptionFailedException.h" #import "of_asprintf.h" @implementation OFStream #ifndef OF_WINDOWS + (void)initialize { if (self == [OFStream class]) signal(SIGPIPE, SIG_IGN); } #endif | > > | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #import "OFNotImplementedException.h" #import "OFOutOfRangeException.h" #import "OFSetOptionFailedException.h" #import "of_asprintf.h" @implementation OFStream @synthesize OF_isWaitingForDelimiter = _waitingForDelimiter; #ifndef OF_WINDOWS + (void)initialize { if (self == [OFStream class]) signal(SIGPIPE, SIG_IGN); } #endif |
︙ | ︙ | |||
1571 1572 1573 1574 1575 1576 1577 | _readBufferLength += length; } - (void)close { OF_UNRECOGNIZED_SELECTOR } | < < < < < | 1573 1574 1575 1576 1577 1578 1579 1580 | _readBufferLength += length; } - (void)close { OF_UNRECOGNIZED_SELECTOR } @end |
Modified src/OFString.h from [a26c914c0c] to [df4375ca6f].
︙ | ︙ | |||
86 87 88 89 90 91 92 | /*! * @class OFString OFString.h ObjFW/OFString.h * * @brief A class for handling strings. */ @interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing, OFSerialization, OFJSONRepresentation, OFMessagePackRepresentation> | < < < < | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | /*! * @class OFString OFString.h ObjFW/OFString.h * * @brief A class for handling strings. */ @interface OFString: OFObject <OFCopying, OFMutableCopying, OFComparing, OFSerialization, OFJSONRepresentation, OFMessagePackRepresentation> /*! * @brief Creates a new OFString. * * @return A new, autoreleased OFString */ + (instancetype)string; |
︙ | ︙ |
Modified src/OFTCPSocket.h from [236b9a919c] to [694cce421a].
︙ | ︙ | |||
67 68 69 70 71 72 73 | uint16_t _SOCKS5Port; #ifdef OF_WII uint16_t _port; bool _keepAliveEnabled, _TCPNoDelayEnabled; #endif } | < > | > > > > > < < < | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | uint16_t _SOCKS5Port; #ifdef OF_WII uint16_t _port; bool _keepAliveEnabled, _TCPNoDelayEnabled; #endif } /*! * The host to use as a SOCKS5 proxy. */ @property OF_NULLABLE_PROPERTY (copy) OFString *SOCKS5Host; /*! * The port to use on the SOCKS5 proxy. */ @property uint16_t SOCKS5Port; /*! * @brief Sets the global SOCKS5 proxy host to use when creating a new socket * * @param SOCKS5Host The host to use as a SOCKS5 proxy when creating a new * socket */ |
︙ | ︙ | |||
104 105 106 107 108 109 110 | /*! * @brief Returns the port to use as a SOCKS5 proxy when creating a new socket * * @return The port to use as a SOCKS5 proxy when creating a new socket */ + (uint16_t)SOCKS5Port; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | /*! * @brief Returns the port to use as a SOCKS5 proxy when creating a new socket * * @return The port to use as a SOCKS5 proxy when creating a new socket */ + (uint16_t)SOCKS5Port; /*! * @brief Connect the OFTCPSocket to the specified destination. * * @param host The host to connect to * @param port The port on the host to connect to */ - (void)connectToHost: (OFString*)host |
︙ | ︙ |
Modified src/OFTCPSocket.m from [7248d669cd] to [0119b6524b].
︙ | ︙ | |||
193 194 195 196 197 198 199 200 201 202 203 204 205 206 | return nil; } @end #endif @implementation OFTCPSocket + (void)setSOCKS5Host: (OFString*)host { id old = defaultSOCKS5Host; defaultSOCKS5Host = [host copy]; [old release]; } | > > | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | return nil; } @end #endif @implementation OFTCPSocket @synthesize SOCKS5Host = _SOCKS5Host, SOCKS5Port = _SOCKS5Port; + (void)setSOCKS5Host: (OFString*)host { id old = defaultSOCKS5Host; defaultSOCKS5Host = [host copy]; [old release]; } |
︙ | ︙ | |||
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | } @catch (id e) { [self release]; @throw e; } return self; } - (void)close { [super close]; #ifdef OF_WII if (_port > 0) { of_socket_port_free(_port, SOCK_STREAM); _port = 0; } #endif } | > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_SOCKS5Host release]; [super dealloc]; } - (void)close { [super close]; #ifdef OF_WII if (_port > 0) { of_socket_port_free(_port, SOCK_STREAM); _port = 0; } #endif } - (void)connectToHost: (OFString*)host port: (uint16_t)port { OFString *destinationHost = host; uint16_t destinationPort = port; of_resolver_result_t **results, **iter; int errNo = 0; |
︙ | ︙ |
Modified src/OFTLSSocket.h from [cc8fcde285] to [991f7cbecd].
︙ | ︙ | |||
52 53 54 55 56 57 58 | /*! * @protocol OFTLSSocket OFTLSSocket.h ObjFW/OFTLSSocket.h * * @brief A protocol that should be implemented by 3rd-party libraries * implementing TLS. */ @protocol OFTLSSocket | < < < < < < < < < | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | /*! * @protocol OFTLSSocket OFTLSSocket.h ObjFW/OFTLSSocket.h * * @brief A protocol that should be implemented by 3rd-party libraries * implementing TLS. */ @protocol OFTLSSocket /*! * @brief Initializes the TLS socket with the specified TCP socket as its * underlying socket. * * @param socket The TCP socket to use as underlying socket */ - initWithSocket: (OFTCPSocket*)socket; |
︙ | ︙ |
Modified src/OFThread.h from [c270f45fee] to [cd0fc73b17].
︙ | ︙ | |||
73 74 75 76 77 78 79 | id _returnValue; OFRunLoop *_runLoop; OFMutableDictionary *_threadDictionary; @private OFString *_name; } | < | > > > | < < < < | | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | id _returnValue; OFRunLoop *_runLoop; OFMutableDictionary *_threadDictionary; @private OFString *_name; } #ifdef OF_HAVE_BLOCKS /*! * The block to execute in the thread. */ @property (readonly, copy) of_thread_block_t threadBlock; #endif /*! * @brief Creates a new thread. * * @return A new, autoreleased thread */ + (instancetype)thread; |
︙ | ︙ |
Modified src/OFThread.m from [89cb894f3a] to [ed37db867b].
︙ | ︙ | |||
122 123 124 125 126 127 128 | [thread release]; } #endif @implementation OFThread #ifdef OF_HAVE_THREADS | | | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | [thread release]; } #endif @implementation OFThread #ifdef OF_HAVE_THREADS # ifdef OF_HAVE_BLOCKS @synthesize threadBlock = _threadBlock; # endif + (void)initialize { if (self != [OFThread class]) return; |
︙ | ︙ | |||
376 377 378 379 380 381 382 | # endif return [[_runLoop retain] autorelease]; } - (OFString*)name { | | > | > | < | < < | < | 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 | # endif return [[_runLoop retain] autorelease]; } - (OFString*)name { return [[_name copy] autorelease]; } - (void)setName: (OFString*)name { OFString *old = name; _name = [name copy]; [old release]; if (_running == OF_THREAD_RUNNING) of_thread_set_name(_thread, (_name != nil ? [_name UTF8String] : class_getName([self class]))); } - (float)priority { return _attr.priority; } |
︙ | ︙ |
Modified src/OFTimer+Private.h from [27d3b82c84] to [a5998b0d21].
︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #import "OFTimer.h" OF_ASSUME_NONNULL_BEGIN @interface OFTimer (OF_PRIVATE_CATEGORY) | > | | 15 16 17 18 19 20 21 22 23 24 25 26 | */ #import "OFTimer.h" OF_ASSUME_NONNULL_BEGIN @interface OFTimer (OF_PRIVATE_CATEGORY) @property OF_NULLABLE_PROPERTY (retain, setter=OF_setInRunLoop:) OFRunLoop *OF_inRunLoop; @end OF_ASSUME_NONNULL_END |
Modified src/OFTimer.h from [46ec059844] to [2977ef816d].
︙ | ︙ | |||
56 57 58 59 60 61 62 | #ifdef OF_HAVE_THREADS OFCondition *_condition; bool _done; #endif OFRunLoop *_inRunLoop; } | < > > > | | > > > > > | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | #ifdef OF_HAVE_THREADS OFCondition *_condition; bool _done; #endif OFRunLoop *_inRunLoop; } /*! * Whether the timer is valid. */ @property (readonly) bool isValid; /*! * The time interval in which the timer will repeat, if it is a repeating * timer. */ @property (readonly) of_time_interval_t timeInterval; /*! * @brief Creates and schedules a new timer with the specified time interval. * * @param timeInterval The time interval after which the timer should be fired * @param target The target on which to call the selector * @param selector The selector to call on the target |
︙ | ︙ | |||
298 299 300 301 302 303 304 | - (void)setFireDate: (OFDate*)fireDate; /*! * @brief Invalidates the timer, preventing it from firing. */ - (void)invalidate; | < < < < < < < < < < < < < < < < | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | - (void)setFireDate: (OFDate*)fireDate; /*! * @brief Invalidates the timer, preventing it from firing. */ - (void)invalidate; #ifdef OF_HAVE_THREADS /*! * @brief Waits until the timer fired. */ - (void)waitUntilDone; #endif @end OF_ASSUME_NONNULL_END |
Modified src/OFTimer.m from [7f6b2774f2] to [a47bada402].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #ifdef OF_HAVE_THREADS # import "OFCondition.h" #endif #import "OFInvalidArgumentException.h" @implementation OFTimer + (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector repeats: (bool)repeats { void *pool = objc_autoreleasePoolPush(); OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: timeInterval]; | > > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #ifdef OF_HAVE_THREADS # import "OFCondition.h" #endif #import "OFInvalidArgumentException.h" @implementation OFTimer @synthesize timeInterval = _interval, isValid = _valid; @synthesize OF_inRunLoop = _inRunLoop; + (instancetype)scheduledTimerWithTimeInterval: (of_time_interval_t)timeInterval target: (id)target selector: (SEL)selector repeats: (bool)repeats { void *pool = objc_autoreleasePoolPush(); OFDate *fireDate = [OFDate dateWithTimeIntervalSinceNow: timeInterval]; |
︙ | ︙ | |||
405 406 407 408 409 410 411 | #endif objc_autoreleasePoolPop(pool); } - (OFDate*)fireDate { | | > > | > > < < < < < < < < < < < < < < < | 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 454 455 456 457 458 459 460 461 462 463 464 465 466 | #endif objc_autoreleasePoolPop(pool); } - (OFDate*)fireDate { return [[_fireDate copy] autorelease]; } - (void)setFireDate: (OFDate*)fireDate { [self retain]; @try { @synchronized (self) { OFDate *old; [_inRunLoop OF_removeTimer: self]; old = _fireDate; _fireDate = [fireDate copy]; [old release]; [_inRunLoop addTimer: self]; } } @finally { [self release]; } } - (void)invalidate { _valid = false; [_target release]; [_object1 release]; [_object2 release]; _target = nil; _object1 = nil; _object2 = nil; } #ifdef OF_HAVE_THREADS - (void)waitUntilDone { [_condition lock]; @try { if (_done) { _done = false; return; } [_condition wait]; } @finally { [_condition unlock]; } } #endif @end |
Modified src/OFURL.h from [f7f23cc369] to [3cbefbabba].
︙ | ︙ | |||
29 30 31 32 33 34 35 | @interface OFURL: OFObject <OFCopying, OFSerialization> { OFString *_scheme, *_host; uint16_t _port; OFString *_user, *_password, *_path, *_parameters, *_query, *_fragment; } | > > > > | > > > | > > > > > > > > | > > > > > > > > > > > > > | | > > > > > > > > > | 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 | @interface OFURL: OFObject <OFCopying, OFSerialization> { OFString *_scheme, *_host; uint16_t _port; OFString *_user, *_password, *_path, *_parameters, *_query, *_fragment; } /*! * The scheme part of the URL. */ @property (copy) OFString *scheme; /*! * The host part of the URL. */ @property (copy) OFString *host; /*! * The port part of the URL. */ @property uint16_t port; /*! * The user part of the URL. */ @property OF_NULLABLE_PROPERTY (copy) OFString *user; /*! * The password part of the URL. */ @property OF_NULLABLE_PROPERTY (copy) OFString *password; /*! * The path part of the URL. */ @property (copy) OFString *path; /*! * The parameters part of the URL. */ @property OF_NULLABLE_PROPERTY (copy) OFString *parameters; /*! * The query part of the URL. */ @property OF_NULLABLE_PROPERTY (copy) OFString *query; /*! * The fragment part of the URL. */ @property OF_NULLABLE_PROPERTY (copy) OFString *fragment; /*! * Creates a new URL. * * @return A new, autoreleased OFURL */ + (instancetype)URL; |
︙ | ︙ | |||
81 82 83 84 85 86 87 88 | * @param string A string describing a URL * @param URL A URL to which the string is relative * @return An initialized OFURL */ - initWithString: (OFString*)string relativeToURL: (OFURL*)URL; /*! | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | * @param string A string describing a URL * @param URL A URL to which the string is relative * @return An initialized OFURL */ - initWithString: (OFString*)string relativeToURL: (OFURL*)URL; /*! * @brief Returns the URL as a string. * * @return The URL as a string */ - (OFString*)string; @end OF_ASSUME_NONNULL_END |
Modified src/OFURL.m from [bd2f6100f7] to [23f0ea8813].
︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #import "OFXMLElement.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" @implementation OFURL + (instancetype)URL { return [[[self alloc] init] autorelease]; } + (instancetype)URLWithString: (OFString*)string { | > > > > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #import "OFXMLElement.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" @implementation OFURL @synthesize scheme = _scheme, host = _host, port = _port, user = _user; @synthesize password = _password, path = _path, parameters = _parameters; @synthesize query = _query, fragment = _fragment; + (instancetype)URL { return [[[self alloc] init] autorelease]; } + (instancetype)URLWithString: (OFString*)string { |
︙ | ︙ | |||
362 363 364 365 366 367 368 | [copy release]; @throw e; } return copy; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | [copy release]; @throw e; } return copy; } - (OFString*)string { OFMutableString *ret = [OFMutableString string]; void *pool = objc_autoreleasePoolPush(); [ret appendFormat: @"%@://", [_scheme stringByURLEncoding]]; |
︙ | ︙ |
Modified src/OFXMLAttribute.h from [bddff10d67] to [5607843c79].
︙ | ︙ | |||
27 28 29 30 31 32 33 | */ @interface OFXMLAttribute: OFXMLNode { @public OFString *_name, *_namespace, *_stringValue; } | < > > > | < > | < > < < | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | */ @interface OFXMLAttribute: OFXMLNode { @public OFString *_name, *_namespace, *_stringValue; } /*! * The name of the attribute. */ @property (readonly, copy) OFString *name; /*! * The namespace of the attribute. */ @property OF_NULLABLE_PROPERTY (readonly, copy) OFString *namespace; /*! * @brief Creates a new XML attribute. * * @param name The name of the attribute * @param stringValue The string value of the attribute * @return A new autoreleased OFXMLAttribute with the specified parameters |
︙ | ︙ | |||
80 81 82 83 84 85 86 | * @param namespace_ The namespace of the attribute * @param stringValue The string value of the attribute * @return An initialized OFXMLAttribute with the specified parameters */ - initWithName: (OFString*)name namespace: (nullable OFString*)namespace_ stringValue: (OFString*)stringValue; | < < < < < < < < < < < < < < | 80 81 82 83 84 85 86 87 88 89 | * @param namespace_ The namespace of the attribute * @param stringValue The string value of the attribute * @return An initialized OFXMLAttribute with the specified parameters */ - initWithName: (OFString*)name namespace: (nullable OFString*)namespace_ stringValue: (OFString*)stringValue; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLAttribute.m from [37b2f68d9a] to [b71bf6d4d2].
︙ | ︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #import "OFString.h" #import "OFDictionary.h" #import "OFXMLElement.h" #import "OFInvalidArgumentException.h" @implementation OFXMLAttribute + (instancetype)attributeWithName: (OFString*)name namespace: (OFString*)namespace stringValue: (OFString*)stringValue { return [[[self alloc] initWithName: name namespace: namespace stringValue: stringValue] autorelease]; | > > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #import "OFString.h" #import "OFDictionary.h" #import "OFXMLElement.h" #import "OFInvalidArgumentException.h" @implementation OFXMLAttribute @synthesize name = _name, namespace = _namespace; + (instancetype)attributeWithName: (OFString*)name namespace: (OFString*)namespace stringValue: (OFString*)stringValue { return [[[self alloc] initWithName: name namespace: namespace stringValue: stringValue] autorelease]; |
︙ | ︙ | |||
98 99 100 101 102 103 104 | [_name release]; [_namespace release]; [_stringValue release]; [super dealloc]; } | < < < < < < < < < < | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | [_name release]; [_namespace release]; [_stringValue release]; [super dealloc]; } - (OFString*)stringValue { return [[_stringValue copy] autorelease]; } - (void)setStringValue: (OFString*)stringValue { |
︙ | ︙ |
Modified src/OFXMLElement.h from [f0a48e322d] to [a01f4b45ec].
︙ | ︙ | |||
36 37 38 39 40 41 42 | { OFString *_name, *_namespace, *_defaultNamespace; OFMutableArray OF_GENERIC(OFXMLAttribute*) *_attributes; OFMutableDictionary OF_GENERIC(OFString*, OFString*) *_namespaces; OFMutableArray OF_GENERIC(OFXMLNode*) *_children; } | < > > > | < > | < > | > | > | < < < | 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 | { OFString *_name, *_namespace, *_defaultNamespace; OFMutableArray OF_GENERIC(OFXMLAttribute*) *_attributes; OFMutableDictionary OF_GENERIC(OFString*, OFString*) *_namespaces; OFMutableArray OF_GENERIC(OFXMLNode*) *_children; } /*! * The name of the element. */ @property (copy) OFString *name; /*! * The namespace of the element. */ @property OF_NULLABLE_PROPERTY (copy) OFString *namespace; /*! * The default namespace for the element to be used if there is no parent. */ @property OF_NULLABLE_PROPERTY (copy) OFString *defaultNamespace; /*! * @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 */ |
︙ | ︙ | |||
198 199 200 201 202 203 204 | * * @param path The path to the file * @return An initialized OFXMLElement with the contents of the specified file */ - initWithFile: (OFString*)path; #endif | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | * * @param path The path to the file * @return An initialized OFXMLElement with the contents of the specified file */ - initWithFile: (OFString*)path; #endif /*! * @brief Sets a prefix for a namespace. * * @param prefix The prefix for the namespace * @param namespace_ The namespace for which the prefix is set */ - (void)setPrefix: (OFString*)prefix forNamespace: (OFString*)namespace_; /*! * @brief Binds a prefix for a namespace. * * @param prefix The prefix for the namespace * @param namespace_ The namespace for which the prefix is bound */ - (void)bindPrefix: (OFString*)prefix forNamespace: (OFString*)namespace_; /*! * @brief Returns an OFArray with the attributes of the element. * * @return An OFArray with the attributes of the element */ - (nullable OFArray OF_GENERIC(OFXMLAttribute*)*)attributes; |
︙ | ︙ |
Modified src/OFXMLElement.m from [b449554094] to [1f70933951].
︙ | ︙ | |||
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | [_element release]; [super dealloc]; } @end @implementation OFXMLElement + (void)initialize { if (self == [OFXMLElement class]) { charactersClass = [OFXMLCharacters class]; CDATAClass = [OFXMLCDATA class]; } } | > > > | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | [_element release]; [super dealloc]; } @end @implementation OFXMLElement @synthesize name = _name, namespace = _namespace; @synthesize defaultNamespace = _defaultNamespace; + (void)initialize { if (self == [OFXMLElement class]) { charactersClass = [OFXMLCharacters class]; CDATAClass = [OFXMLCDATA class]; } } |
︙ | ︙ | |||
221 222 223 224 225 226 227 | autorelease]; [parser setDelegate: builder]; [builder setDelegate: delegate]; [parser parseString: string]; | | | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | autorelease]; [parser setDelegate: builder]; [builder setDelegate: delegate]; [parser parseString: string]; if (![parser hasFinishedParsing]) @throw [OFMalformedXMLException exceptionWithParser: parser]; self = [delegate->_element retain]; objc_autoreleasePoolPop(pool); return self; |
︙ | ︙ | |||
253 254 255 256 257 258 259 | autorelease]; [parser setDelegate: builder]; [builder setDelegate: delegate]; [parser parseFile: path]; | | | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | autorelease]; [parser setDelegate: builder]; [builder setDelegate: delegate]; [parser parseFile: path]; if (![parser hasFinishedParsing]) @throw [OFMalformedXMLException exceptionWithParser: parser]; self = [delegate->_element retain]; objc_autoreleasePoolPop(pool); return self; |
︙ | ︙ | |||
365 366 367 368 369 370 371 | [_attributes release]; [_namespaces release]; [_children release]; [super dealloc]; } | < < < < < < < < < < < < < < < < < < < < < < < | | > > | | 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 | [_attributes release]; [_namespaces release]; [_children release]; [super dealloc]; } - (OFArray*)attributes { return [[_attributes copy] autorelease]; } - (void)setChildren: (OFArray*)children { OFArray *old = _children; _children = [children copy]; [old release]; } - (OFArray*)children { return [[_children copy] autorelease]; } - (void)setStringValue: (OFString*)stringValue { void *pool = objc_autoreleasePoolPush(); [self setChildren: [OFArray arrayWithObject: |
︙ | ︙ | |||
907 908 909 910 911 912 913 | [self setPrefix: prefix forNamespace: namespace]; [self addAttributeWithName: prefix namespace: @"http://www.w3.org/2000/xmlns/" stringValue: namespace]; } | < < < < < < < < < < | 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | [self setPrefix: prefix forNamespace: namespace]; [self addAttributeWithName: prefix namespace: @"http://www.w3.org/2000/xmlns/" stringValue: namespace]; } - (void)addChild: (OFXMLNode*)child { if ([child isKindOfClass: [OFXMLAttribute class]]) @throw [OFInvalidArgumentException exception]; if (_children == nil) _children = [[OFMutableArray alloc] init]; |
︙ | ︙ |
Modified src/OFXMLElementBuilder.h from [4ca47d4bb3] to [697471ead5].
︙ | ︙ | |||
108 109 110 111 112 113 114 | */ @interface OFXMLElementBuilder: OFObject <OFXMLParserDelegate> { OFMutableArray OF_GENERIC(OFXMLElement*) *_stack; id <OFXMLElementBuilderDelegate> _delegate; } | < > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFXMLElementBuilder: OFObject <OFXMLParserDelegate> { OFMutableArray OF_GENERIC(OFXMLElement*) *_stack; id <OFXMLElementBuilderDelegate> _delegate; } /*! * The delegate for the OFXMLElementBuilder. */ @property OF_NULLABLE_PROPERTY (assign) id <OFXMLElementBuilderDelegate> delegate; /*! * @brief Creates a new element builder. * * @return A new, autoreleased OFXMLElementBuilder */ + (instancetype)elementBuilder; @end @interface OFObject (OFXMLElementBuilderDelegate) <OFXMLElementBuilderDelegate> @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLElementBuilder.m from [30389fad51] to [9ccc35fa21].
︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #import "OFXMLProcessingInstructions.h" #import "OFXMLParser.h" #import "OFArray.h" #import "OFMalformedXMLException.h" @implementation OFXMLElementBuilder + (instancetype)elementBuilder { return [[[self alloc] init] autorelease]; } - init { | > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import "OFXMLProcessingInstructions.h" #import "OFXMLParser.h" #import "OFArray.h" #import "OFMalformedXMLException.h" @implementation OFXMLElementBuilder @synthesize delegate = _delegate; + (instancetype)elementBuilder { return [[[self alloc] init] autorelease]; } - init { |
︙ | ︙ | |||
51 52 53 54 55 56 57 | - (void)dealloc { [_stack release]; [super dealloc]; } | < < < < < < < < < < | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - (void)dealloc { [_stack release]; [super dealloc]; } - (void)parser: (OFXMLParser*)parser foundProcessingInstructions: (OFString*)pi { OFXMLProcessingInstructions *node = [OFXMLProcessingInstructions processingInstructionsWithString: pi]; OFXMLElement *parent = [_stack lastObject]; |
︙ | ︙ |
Modified src/OFXMLParser.h from [98bb225fb1] to [2c5b933e84].
︙ | ︙ | |||
173 174 175 176 177 178 179 | bool _acceptProlog; size_t _lineNumber; bool _lastCarriageReturn, _finishedParsing; of_string_encoding_t _encoding; size_t _depthLimit; } | < > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | bool _acceptProlog; size_t _lineNumber; bool _lastCarriageReturn, _finishedParsing; of_string_encoding_t _encoding; size_t _depthLimit; } /*! * The delegate that is used by the XML parser. */ @property OF_NULLABLE_PROPERTY (assign) id <OFXMLParserDelegate> delegate; /*! * The depth limit for the XML parser. * * If the depth limit is exceeded, an OFMalformedXMLException is thrown. * * The default is 32. 0 means unlimited (insecure!). */ @property size_t depthLimit; /*! * @brief Creates a new XML parser. * * @return A new, autoreleased OFXMLParser */ + (instancetype)parser; /*! * @brief Parses the specified buffer with the specified size. * * @param buffer The buffer to parse * @param length The length of the buffer */ - (void)parseBuffer: (const char*)buffer |
︙ | ︙ | |||
261 262 263 264 265 266 267 | - (size_t)lineNumber; /*! * @brief Returns whether the XML parser has finished parsing. * * @return Whether the XML parser has finished parsing */ | | | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | - (size_t)lineNumber; /*! * @brief Returns whether the XML parser has finished parsing. * * @return Whether the XML parser has finished parsing */ - (bool)hasFinishedParsing; @end @interface OFObject (OFXMLParserDelegate) <OFXMLParserDelegate> @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLParser.m from [3e706b5d43] to [6625a4f5d5].
︙ | ︙ | |||
142 143 144 145 146 147 148 149 150 151 152 153 154 155 | parser: self]; [attribute->_namespace release]; attribute->_namespace = [attributeNS retain]; } @implementation OFXMLParser + (void)initialize { size_t i; const SEL selectors_[OF_XMLPARSER_NUM_STATES] = { @selector(OF_inByteOrderMarkState), @selector(OF_outsideTagState), | > > | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | parser: self]; [attribute->_namespace release]; attribute->_namespace = [attributeNS retain]; } @implementation OFXMLParser @synthesize delegate = _delegate, depthLimit = _depthLimit; + (void)initialize { size_t i; const SEL selectors_[OF_XMLPARSER_NUM_STATES] = { @selector(OF_inByteOrderMarkState), @selector(OF_outsideTagState), |
︙ | ︙ | |||
232 233 234 235 236 237 238 | [_attributeName release]; [_attributePrefix release]; [_previous release]; [super dealloc]; } | < < < < < < < < < < < < < < < < < < < < | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | [_attributeName release]; [_attributePrefix release]; [_previous release]; [super dealloc]; } - (void)parseBuffer: (const char*)buffer length: (size_t)length { _data = buffer; for (_i = _last = 0; _i < length; _i++) { size_t j = _i; |
︙ | ︙ | |||
1039 1040 1041 1042 1043 1044 1045 | } - (size_t)lineNumber { return _lineNumber; } | | | 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | } - (size_t)lineNumber { return _lineNumber; } - (bool)hasFinishedParsing { return _finishedParsing; } - (OFString*)string: (OFString*)string containsUnknownEntityNamed: (OFString*)entity { |
︙ | ︙ |
Modified src/OFZIPArchive.h from [d2c0dfdef8] to [7e5e23797a].
︙ | ︙ | |||
42 43 44 45 46 47 48 | OFString *_archiveComment; OFMutableArray OF_GENERIC(OFZIPArchiveEntry*) *_entries; OFMutableDictionary OF_GENERIC(OFString*, OFZIPArchiveEntry*) *_pathToEntryMap; OFStream *_lastReturnedStream; } | < > > > < < | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | OFString *_archiveComment; OFMutableArray OF_GENERIC(OFZIPArchiveEntry*) *_entries; OFMutableDictionary OF_GENERIC(OFString*, OFZIPArchiveEntry*) *_pathToEntryMap; OFStream *_lastReturnedStream; } /*! * The archive comment. */ @property (readonly, copy) OFString *archiveComment; /*! * @brief Creates a new OFZIPArchive object with the specified seekable stream. * * @param stream A seekable stream from which the ZIP archive will be read * @return A new, autoreleased OFZIPArchive */ |
︙ | ︙ | |||
93 94 95 96 97 98 99 | * directory, which does not need to be the order in which the actual files are * stored. * * @return The entries of the central directory of the archive as an array */ - (OFArray OF_GENERIC(OFZIPArchiveEntry*)*)entries; | < < < < < < < | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | * directory, which does not need to be the order in which the actual files are * stored. * * @return The entries of the central directory of the archive as an array */ - (OFArray OF_GENERIC(OFZIPArchiveEntry*)*)entries; /*! * @brief Returns a stream for reading the specified file from the archive. * * @warning Calling @ref streamForReadingFile: will invalidate all streams * previously returned by @ref streamForReadingFile:! Reading from an * invalidated stream will throw an @ref OFReadFailedException! * |
︙ | ︙ |
Modified src/OFZIPArchive.m from [a813c350e7] to [e3768699d3].
︙ | ︙ | |||
147 148 149 150 151 152 153 154 155 156 157 158 159 160 | @throw [OFInvalidFormatException exception]; @throw e; } } @implementation OFZIPArchive + (instancetype)archiveWithSeekableStream: (OFSeekableStream*)stream { return [[[self alloc] initWithSeekableStream: stream] autorelease]; } + (instancetype)archiveWithPath: (OFString*)path { | > > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | @throw [OFInvalidFormatException exception]; @throw e; } } @implementation OFZIPArchive @synthesize archiveComment = _archiveComment; + (instancetype)archiveWithSeekableStream: (OFSeekableStream*)stream { return [[[self alloc] initWithSeekableStream: stream] autorelease]; } + (instancetype)archiveWithPath: (OFString*)path { |
︙ | ︙ | |||
329 330 331 332 333 334 335 | [_pathToEntryMap makeImmutable]; objc_autoreleasePoolPop(pool); } - (OFArray*)entries { | < < | < < < | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | [_pathToEntryMap makeImmutable]; objc_autoreleasePoolPop(pool); } - (OFArray*)entries { return [[_entries copy] autorelease]; } - (OFStream*)streamForReadingFile: (OFString*)path { void *pool = objc_autoreleasePoolPush(); OFZIPArchiveEntry *entry = [_pathToEntryMap objectForKey: path]; OFZIPArchive_LocalFileHeader *localFileHeader; |
︙ | ︙ |
Modified src/OFZIPArchiveEntry+Private.h from [ae322a52c9] to [bc7d037fee].
︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #import "OFZIPArchive.h" OF_ASSUME_NONNULL_BEGIN @interface OFZIPArchiveEntry (OF_PRIVATE_CATEGORY) | < | < | | > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | */ #import "OFZIPArchive.h" OF_ASSUME_NONNULL_BEGIN @interface OFZIPArchiveEntry (OF_PRIVATE_CATEGORY) @property (readonly) uint16_t OF_generalPurposeBitFlag, OF_lastModifiedFileTime; @property (readonly) uint16_t OF_lastModifiedFileDate; @property (readonly) uint64_t OF_localFileHeaderOffset; - (instancetype)OF_initWithStream: (OFStream*)stream; @end OF_ASSUME_NONNULL_END |
Modified src/OFZIPArchiveEntry.h from [c2340c1919] to [91d72f60e8].
︙ | ︙ | |||
99 100 101 102 103 104 105 | OFString *_fileComment; uint32_t _startDiskNumber; uint16_t _internalAttributes; uint32_t _versionSpecificAttributes; uint64_t _localFileHeaderOffset; } | < < < < < < < < < < < < < | | | | > | | < > | < < < < < | | < < | | < < | | > > | > | | | | > | > > > > > | < < < < < < < < < < < < < < < < < | 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 | OFString *_fileComment; uint32_t _startDiskNumber; uint16_t _internalAttributes; uint32_t _versionSpecificAttributes; uint64_t _localFileHeaderOffset; } /*! * The file name of the entry. */ @property (readonly, copy) OFString *fileName; /*! * The comment of the entry's file. */ @property (readonly, copy) OFString *fileComment; /*! * The version which made the entry. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. * See @ref of_zip_archive_entry_attribute_compatibility. */ @property (readonly) uint16_t versionMadeBy; /*! * The minimum version required to extract the file. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. * See @ref of_zip_archive_entry_attribute_compatibility. */ @property (readonly) uint16_t minVersionNeeded; /*! * The compression method of the entry. * * Supported values are: * Value | Description * --------------------------------------------------|--------------- * OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_NONE | No compression * OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_DEFLATE | Deflate * OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_DEFLATE64 | Deflate64 * * Other values may be returned, but the file cannot be extracted then. */ @property (readonly) uint16_t compressionMethod; /*! * The compressed size of the entry's file. */ @property (readonly) uint64_t compressedSize; /*! * The uncompressed size of the entry's file. */ @property (readonly) uint64_t uncompressedSize; /*! * The CRC32 checksum of the entry's file. */ @property (readonly) uint32_t CRC32; /*! * The version specific attributes. * * The meaning of the version specific attributes depends on the attribute * compatibility part of the version that made the entry. */ @property (readonly) uint32_t versionSpecificAttributes; /*! * @brief Returns the last modification date of the entry's file. * * @return The last modification date of the entry's file */ - (OFDate*)modificationDate; /*! * @brief Returns the extra field of the entry. * * @return The extra field of the entry */ - (OFDataArray*)extraField; @end |
︙ | ︙ |
Modified src/OFZIPArchiveEntry.m from [f9630635cf] to [d3ecafe11e].
︙ | ︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | } *data = NULL; *size = 0; } @implementation OFZIPArchiveEntry - (instancetype)OF_initWithStream: (OFStream*)stream { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); uint16_t fileNameLength, extraFieldLength, fileCommentLength; | > > > > > > > > > > > > > | 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 | } *data = NULL; *size = 0; } @implementation OFZIPArchiveEntry @synthesize fileName = _fileName, fileComment = _fileComment; @synthesize versionMadeBy = _versionMadeBy; @synthesize minVersionNeeded = _minVersionNeeded; @synthesize compressionMethod = _compressionMethod; @synthesize compressedSize = _compressedSize; @synthesize uncompressedSize = _uncompressedSize; @synthesize CRC32 = _CRC32; @synthesize versionSpecificAttributes = _versionSpecificAttributes; @synthesize OF_generalPurposeBitFlag = _generalPurposeBitFlag; @synthesize OF_lastModifiedFileTime = _lastModifiedFileTime; @synthesize OF_lastModifiedFileDate = _lastModifiedFileDate; @synthesize OF_localFileHeaderOffset = _localFileHeaderOffset; - (instancetype)OF_initWithStream: (OFStream*)stream { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); uint16_t fileNameLength, extraFieldLength, fileCommentLength; |
︙ | ︙ | |||
221 222 223 224 225 226 227 | [_fileName release]; [_extraField release]; [_fileComment release]; [super dealloc]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | [_fileName release]; [_extraField release]; [_fileComment release]; [super dealloc]; } - (OFDate*)modificationDate { void *pool = objc_autoreleasePoolPush(); uint_fast16_t year = ((_lastModifiedFileDate & 0xFE00) >> 9) + 1980; uint_fast8_t month = (_lastModifiedFileDate & 0x1E0) >> 5; uint_fast8_t day = (_lastModifiedFileDate & 0x1F); uint_fast8_t hour = (_lastModifiedFileTime & 0xF800) >> 11; |
︙ | ︙ | |||
280 281 282 283 284 285 286 | format: @"%Y-%m-%d %H:%M:%S"]; objc_autoreleasePoolPop(pool); return [date autorelease]; } | < < < < < < < < < < | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | format: @"%Y-%m-%d %H:%M:%S"]; objc_autoreleasePoolPop(pool); return [date autorelease]; } - (OFDataArray*)extraField { return [[_extraField copy] autorelease]; } - (OFString*)description { |
︙ | ︙ | |||
320 321 322 323 324 325 326 | _compressionMethod, (intmax_t)_compressedSize, (intmax_t)_uncompressedSize, modificationDate, _CRC32, _extraField]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } | < < < < < < < < < < < < < < < < < < < < | 288 289 290 291 292 293 294 295 | _compressionMethod, (intmax_t)_compressedSize, (intmax_t)_uncompressedSize, modificationDate, _CRC32, _extraField]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } @end |
Modified src/exceptions/OFAcceptFailedException.h from [8ed051874b] to [c5c13e7b24].
︙ | ︙ | |||
28 29 30 31 32 33 34 | */ @interface OFAcceptFailedException: OFException { id _socket; int _errNo; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFAcceptFailedException: OFException { id _socket; int _errNo; } /*! * The socket which could not accept a connection. */ @property (readonly, retain) id socket; /*! * @return The errno from when the exception was created. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased accept failed exception. * * @param socket The socket which could not accept a connection * @param errNo The errno for the error * @return A new, autoreleased accept failed exception */ + (instancetype)exceptionWithSocket: (id)socket errNo: (int)errNo; /*! * @brief Initializes an already allocated accept failed exception. * * @param socket The socket which could not accept a connection * @param errNo The errno for the error * @return An initialized accept failed exception */ - initWithSocket: (id)socket errNo: (int)errNo; @end |
Modified src/exceptions/OFAcceptFailedException.m from [8e3daf4a3e] to [e7020185d8].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFAcceptFailedException.h" #import "OFString.h" @implementation OFAcceptFailedException + (instancetype)exceptionWithSocket: (id)socket errNo: (int)errNo { return [[[self alloc] initWithSocket: socket errNo: errNo] autorelease]; } | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFAcceptFailedException.h" #import "OFString.h" @implementation OFAcceptFailedException @synthesize socket = _socket, errNo = _errNo; + (instancetype)exceptionWithSocket: (id)socket errNo: (int)errNo { return [[[self alloc] initWithSocket: socket errNo: errNo] autorelease]; } |
︙ | ︙ | |||
52 53 54 55 56 57 58 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to accept connection in socket of class %@: %@", [_socket class], of_strerror(_errNo)]; } | < < < < < < < < < < | 54 55 56 57 58 59 60 61 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to accept connection in socket of class %@: %@", [_socket class], of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFAddressTranslationFailedException.h from [10dbec0388] to [15ab5f0e8e].
︙ | ︙ | |||
29 30 31 32 33 34 35 | */ @interface OFAddressTranslationFailedException: OFException { OFString *_host; int _error; } | < > > > < | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | */ @interface OFAddressTranslationFailedException: OFException { OFString *_host; int _error; } /*! * The host for which the address translation was requested. */ @property (readonly, copy) OFString *host; /*! * @brief Creates a new, autoreleased address translation failed exception. * * @param host The host for which translation was requested * @return A new, autoreleased address translation failed exception */ |
︙ | ︙ | |||
53 54 55 56 57 58 59 | * @brief Initializes an already allocated address translation failed exception. * * @param host The host for which translation was requested * @return An initialized address translation failed exception */ - initWithHost: (OFString*)host; | | | | < < < < < < < | 54 55 56 57 58 59 60 61 62 63 64 | * @brief Initializes an already allocated address translation failed exception. * * @param host The host for which translation was requested * @return An initialized address translation failed exception */ - initWithHost: (OFString*)host; - (instancetype)initWithHost: (OFString*)host error: (int)error; - (instancetype)initWithError: (int)error; @end |
Modified src/exceptions/OFAddressTranslationFailedException.m from [5232ed313d] to [55432953fa].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS) # include "threading.h" static of_mutex_t mutex; #endif @implementation OFAddressTranslationFailedException #if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS) + (void)initialize { if (self != [OFAddressTranslationFailedException class]) return; if (!of_mutex_new(&mutex)) | > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS) # include "threading.h" static of_mutex_t mutex; #endif @implementation OFAddressTranslationFailedException @synthesize host = _host; #if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS) + (void)initialize { if (self != [OFAddressTranslationFailedException class]) return; if (!of_mutex_new(&mutex)) |
︙ | ︙ | |||
70 71 72 73 74 75 76 | [self release]; @throw e; } return self; } | | | | | 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 | [self release]; @throw e; } return self; } - (instancetype)initWithHost: (OFString*)host error: (int)error { self = [super init]; @try { _host = [host copy]; _error = error; } @catch (id e) { [self release]; @throw e; } return self; } - (instancetype)initWithError: (int)error { self = [super init]; _error = error; return self; } |
︙ | ︙ | |||
165 166 167 168 169 170 171 | if (!of_mutex_unlock(&mutex)) @throw [OFUnlockFailedException exception]; } # endif # endif #endif } | < < < < < | 167 168 169 170 171 172 173 174 | if (!of_mutex_unlock(&mutex)) @throw [OFUnlockFailedException exception]; } # endif # endif #endif } @end |
Modified src/exceptions/OFAlreadyConnectedException.h from [377d0fe684] to [a8fbf7cf43].
︙ | ︙ | |||
28 29 30 31 32 33 34 | * connected or bound socket. */ @interface OFAlreadyConnectedException: OFException { id _socket; } | < > > > < < < < < < < < | 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 | * connected or bound socket. */ @interface OFAlreadyConnectedException: OFException { id _socket; } /*! * The socket which is already connected. */ @property (readonly, retain) id socket; /*! * @brief Creates a new, autoreleased already connected exception. * * @param socket The socket which is already connected * @return A new, autoreleased already connected exception */ + (instancetype)exceptionWithSocket: (id)socket; /*! * @brief Initializes an already allocated already connected exception. * * @param socket The socket which is already connected * @return An initialized already connected exception */ - initWithSocket: (id)socket; @end |
Modified src/exceptions/OFAlreadyConnectedException.m from [bf8b387998] to [2261faa4d5].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFAlreadyConnectedException.h" #import "OFString.h" @implementation OFAlreadyConnectedException + (instancetype)exceptionWithSocket: (id)socket { return [[[self alloc] initWithSocket: socket] autorelease]; } - initWithSocket: (id)socket { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFAlreadyConnectedException.h" #import "OFString.h" @implementation OFAlreadyConnectedException @synthesize socket = _socket; + (instancetype)exceptionWithSocket: (id)socket { return [[[self alloc] initWithSocket: socket] autorelease]; } - initWithSocket: (id)socket { |
︙ | ︙ | |||
47 48 49 50 51 52 53 | return [OFString stringWithFormat: @"The socket of type %@ is already connected or bound and " @"thus can't be connected or bound again!", [_socket class]]; else return @"A connection has already been established!"; } | < < < < < | 49 50 51 52 53 54 55 56 | return [OFString stringWithFormat: @"The socket of type %@ is already connected or bound and " @"thus can't be connected or bound again!", [_socket class]]; else return @"A connection has already been established!"; } @end |
Modified src/exceptions/OFBindFailedException.h from [f284afc77a] to [3bc37aa6da].
︙ | ︙ | |||
30 31 32 33 34 35 36 | { id _socket; OFString *_host; uint16_t _port; int _errNo; } | < > > > > > > > > > > > > > > > < | 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 | { id _socket; OFString *_host; uint16_t _port; int _errNo; } /*! * The host on which binding failed. */ @property (readonly, copy) OFString *host; /*! * The port on which binding failed. */ @property (readonly) uint16_t port; /*! * The socket which could not be bound. */ @property (readonly, retain) id socket; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased bind failed exception. * * @param host The host on which binding failed * @param port The port on which binding failed * @param socket The socket which could not be bound |
︙ | ︙ | |||
64 65 66 67 68 69 70 | * @param errNo The errno of the error that occurred * @return An initialized bind failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 77 78 79 80 81 82 83 84 | * @param errNo The errno of the error that occurred * @return An initialized bind failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; @end |
Modified src/exceptions/OFBindFailedException.m from [eae71b417b] to [c0ecd059b3].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFBindFailedException.h" #import "OFString.h" @implementation OFBindFailedException + (instancetype)exceptionWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo { return [[[self alloc] initWithHost: host port: port | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFBindFailedException.h" #import "OFString.h" @implementation OFBindFailedException @synthesize host = _host, port = _port, socket = _socket, errNo = _errNo; + (instancetype)exceptionWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo { return [[[self alloc] initWithHost: host port: port |
︙ | ︙ | |||
67 68 69 70 71 72 73 | - (OFString*)description { return [OFString stringWithFormat: @"Binding to port %" @PRIu16 @" on host %@ failed in socket of " @"type %@: %@", _port, _host, [_socket class], of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < < < < < < | 69 70 71 72 73 74 75 76 | - (OFString*)description { return [OFString stringWithFormat: @"Binding to port %" @PRIu16 @" on host %@ failed in socket of " @"type %@: %@", _port, _host, [_socket class], of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.h from [9e863b788a] to [d6d0467bf0].
︙ | ︙ | |||
26 27 28 29 30 31 32 | */ @interface OFChangeCurrentDirectoryPathFailedException: OFException { OFString *_path; int _errNo; } | < > > > > > > > < | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | */ @interface OFChangeCurrentDirectoryPathFailedException: OFException { OFString *_path; int _errNo; } /*! * The path of the directory to which the current path could not be changed. */ @property (readonly, copy) OFString *path; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased change current directory path failed * exception. * * @param path The path of the directory to which the current path could not be * changed |
︙ | ︙ | |||
53 54 55 56 57 58 59 | * @param path The path of the directory to which the current path could not be * changed * @param errNo The errno of the error that occurred * @return An initialized change current directory path failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; | < < < < < < < < < < < < < < < < | 58 59 60 61 62 63 64 65 | * @param path The path of the directory to which the current path could not be * changed * @param errNo The errno of the error that occurred * @return An initialized change current directory path failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end |
Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.m from [1fb33d2cc1] to [983604469b].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFChangeCurrentDirectoryPathFailedException.h" #import "OFString.h" @implementation OFChangeCurrentDirectoryPathFailedException + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo { return [[[self alloc] initWithPath: path errNo: errNo] autorelease]; } | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFChangeCurrentDirectoryPathFailedException.h" #import "OFString.h" @implementation OFChangeCurrentDirectoryPathFailedException @synthesize path = _path, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo { return [[[self alloc] initWithPath: path errNo: errNo] autorelease]; } |
︙ | ︙ | |||
57 58 59 60 61 62 63 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to change the current directory path to %@: %@", _path, of_strerror(_errNo)]; } | < < < < < < < < < < | 59 60 61 62 63 64 65 66 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to change the current directory path to %@: %@", _path, of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFChangeOwnerFailedException.h from [b0d9ffe84f] to [fdbd8703a0].
︙ | ︙ | |||
25 26 27 28 29 30 31 | */ @interface OFChangeOwnerFailedException: OFException { OFString *_path, *_owner, *_group; int _errNo; } | > > > > | > > > | > > > > | | > > > > | 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 | */ @interface OFChangeOwnerFailedException: OFException { OFString *_path, *_owner, *_group; int _errNo; } /*! * The path of the item. */ @property (readonly, copy) OFString *path; /*! * The new owner for the item. */ @property (readonly, copy) OFString *owner; /*! * The new group for the item. */ @property (readonly, copy) OFString *group; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased change owner failed exception. * * @param path The path of the item * @param owner The new owner for the item * @param group The new group for the item |
︙ | ︙ | |||
57 58 59 60 61 62 63 | * @param errNo The errno of the error that occurred * @return An initialized change owner failed exception */ - initWithPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 72 73 74 75 76 77 78 79 80 | * @param errNo The errno of the error that occurred * @return An initialized change owner failed exception */ - initWithPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group errNo: (int)errNo; @end #endif |
Modified src/exceptions/OFChangeOwnerFailedException.m from [5e180f7511] to [b02c826fde].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFChangeOwnerFailedException.h" #import "OFString.h" #ifdef OF_HAVE_CHOWN @implementation OFChangeOwnerFailedException + (instancetype)exceptionWithPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group errNo: (int)errNo { return [[[self alloc] initWithPath: path owner: owner | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFChangeOwnerFailedException.h" #import "OFString.h" #ifdef OF_HAVE_CHOWN @implementation OFChangeOwnerFailedException @synthesize path = _path, owner = _owner, group = _group, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group errNo: (int)errNo { return [[[self alloc] initWithPath: path owner: owner |
︙ | ︙ | |||
77 78 79 80 81 82 83 | @"Failed to change group of item at path %@ to %@: %@", _path, _group, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to change owner of item at path %@ to %@:%@: %@", _path, _owner, _group, of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < < < < < < | 79 80 81 82 83 84 85 86 87 | @"Failed to change group of item at path %@ to %@: %@", _path, _group, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to change owner of item at path %@ to %@:%@: %@", _path, _owner, _group, of_strerror(_errNo)]; } @end #endif |
Modified src/exceptions/OFChangePermissionsFailedException.h from [daea9724a5] to [e24ce64656].
︙ | ︙ | |||
29 30 31 32 33 34 35 | @interface OFChangePermissionsFailedException: OFException { OFString *_path; mode_t _permissions; int _errNo; } | < > > > > > > > > > > > < | 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 | @interface OFChangePermissionsFailedException: OFException { OFString *_path; mode_t _permissions; int _errNo; } /*! * The path of the item. */ @property (readonly, copy) OFString *path; /*! * The new permissions for the item. */ @property (readonly) mode_t permissions; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased change permissions failed exception. * * @param path The path of the item * @param permissions The new permissions for the item * @param errNo The errno of the error that occurred |
︙ | ︙ | |||
58 59 60 61 62 63 64 | * @param permissions The new permissions for the item * @param errNo The errno of the error that occurred * @return An initialized change permissions failed exception */ - initWithPath: (OFString*)path permissions: (mode_t)permissions errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < | 67 68 69 70 71 72 73 74 | * @param permissions The new permissions for the item * @param errNo The errno of the error that occurred * @return An initialized change permissions failed exception */ - initWithPath: (OFString*)path permissions: (mode_t)permissions errNo: (int)errNo; @end |
Modified src/exceptions/OFChangePermissionsFailedException.m from [ee8d14e7c5] to [379cfe25d8].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFChangePermissionsFailedException.h" #import "OFString.h" @implementation OFChangePermissionsFailedException + (instancetype)exceptionWithPath: (OFString*)path permissions: (mode_t)permissions errNo: (int)errNo { return [[[self alloc] initWithPath: path permissions: permissions errNo: errNo] autorelease]; | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFChangePermissionsFailedException.h" #import "OFString.h" @implementation OFChangePermissionsFailedException @synthesize path = _path, permissions = _permissions, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path permissions: (mode_t)permissions errNo: (int)errNo { return [[[self alloc] initWithPath: path permissions: permissions errNo: errNo] autorelease]; |
︙ | ︙ | |||
61 62 63 64 65 66 67 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to change permissions of item at path %@ to %d: %@", _path, _permissions, of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < | 63 64 65 66 67 68 69 70 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to change permissions of item at path %@ to %d: %@", _path, _permissions, of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFConditionBroadcastFailedException.h from [68bdb037de] to [f3828c8a1b].
︙ | ︙ | |||
30 31 32 33 34 35 36 | * @brief An exception indicating broadcasting a condition failed. */ @interface OFConditionBroadcastFailedException: OFException { OFCondition *_condition; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating broadcasting a condition failed. */ @interface OFConditionBroadcastFailedException: OFException { OFCondition *_condition; } /*! * The condition which could not be broadcasted. */ @property (readonly, retain) OFCondition *condition; /*! * @brief Returns a new, autoreleased condition broadcast failed exception. * * @param condition The condition which could not be broadcasted * @return A new, autoreleased condition broadcast failed exception */ + (instancetype)exceptionWithCondition: (OFCondition*)condition; /*! * @brief Initializes an already allocated condition broadcast failed exception. * * @param condition The condition which could not be broadcasted * @return An initialized condition broadcast failed exception */ - initWithCondition: (OFCondition*)condition; @end |
Modified src/exceptions/OFConditionBroadcastFailedException.m from [ceb6fa41ef] to [b283053aed].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFConditionBroadcastFailedException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionBroadcastFailedException + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFConditionBroadcastFailedException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionBroadcastFailedException @synthesize condition = _condition; + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | } - (OFString*)description { return [OFString stringWithFormat: @"Broadcasting a condition of type %@ failed!", [_condition class]]; } | < < < < < | 50 51 52 53 54 55 56 57 | } - (OFString*)description { return [OFString stringWithFormat: @"Broadcasting a condition of type %@ failed!", [_condition class]]; } @end |
Modified src/exceptions/OFConditionSignalFailedException.h from [182d487d03] to [83b5f71c1c].
︙ | ︙ | |||
30 31 32 33 34 35 36 | * @brief An exception indicating signaling a condition failed. */ @interface OFConditionSignalFailedException: OFException { OFCondition *_condition; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating signaling a condition failed. */ @interface OFConditionSignalFailedException: OFException { OFCondition *_condition; } /*! * The condition which could not be signaled. */ @property (readonly, retain) OFCondition *condition; /*! * @brief Creates a new, autoreleased condition signal failed exception. * * @param condition The condition which could not be signaled * @return A new, autoreleased condition signal failed exception */ + (instancetype)exceptionWithCondition: (OFCondition*)condition; /*! * @brief Initializes an already allocated condition signal failed exception. * * @param condition The condition which could not be signaled * @return An initialized condition signal failed exception */ - initWithCondition: (OFCondition*)condition; @end |
Modified src/exceptions/OFConditionSignalFailedException.m from [b3541a6568] to [0d4cff9625].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFConditionSignalFailedException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionSignalFailedException + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFConditionSignalFailedException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionSignalFailedException @synthesize condition = _condition; + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | } - (OFString*)description { return [OFString stringWithFormat: @"Signaling a condition of type %@ failed!", [_condition class]]; } | < < < < < | 50 51 52 53 54 55 56 57 | } - (OFString*)description { return [OFString stringWithFormat: @"Signaling a condition of type %@ failed!", [_condition class]]; } @end |
Modified src/exceptions/OFConditionStillWaitingException.h from [7d39245f82] to [9d3d830199].
︙ | ︙ | |||
31 32 33 34 35 36 37 | * condition. */ @interface OFConditionStillWaitingException: OFException { OFCondition *_condition; } | < > > > < < < < < < < < | 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 | * condition. */ @interface OFConditionStillWaitingException: OFException { OFCondition *_condition; } /*! * The condition for which is still being waited. */ @property (readonly, retain) OFCondition *condition; /*! * @brief Creates a new, autoreleased condition still waiting exception. * * @param condition The condition for which is still being waited * @return A new, autoreleased condition still waiting exception */ + (instancetype)exceptionWithCondition: (OFCondition*)condition; /*! * @brief Initializes an already allocated condition still waiting exception. * * @param condition The condition for which is still being waited * @return An initialized condition still waiting exception */ - initWithCondition: (OFCondition*)condition; @end |
Modified src/exceptions/OFConditionStillWaitingException.m from [223b9125cf] to [2ae971a40c].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFConditionStillWaitingException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionStillWaitingException + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFConditionStillWaitingException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionStillWaitingException @synthesize condition = _condition; + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { |
︙ | ︙ | |||
49 50 51 52 53 54 55 | - (OFString*)description { return [OFString stringWithFormat: @"Deallocation of a condition of type %@ was tried, even though a " @"thread was still waiting for it!", [_condition class]]; } | < < < < < | 51 52 53 54 55 56 57 58 | - (OFString*)description { return [OFString stringWithFormat: @"Deallocation of a condition of type %@ was tried, even though a " @"thread was still waiting for it!", [_condition class]]; } @end |
Modified src/exceptions/OFConditionWaitFailedException.h from [f86bd407e0] to [1b24718f39].
︙ | ︙ | |||
30 31 32 33 34 35 36 | * @brief An exception indicating waiting for a condition failed. */ @interface OFConditionWaitFailedException: OFException { OFCondition *_condition; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating waiting for a condition failed. */ @interface OFConditionWaitFailedException: OFException { OFCondition *_condition; } /*! * The condition for which could not be waited. */ @property (readonly, retain) OFCondition *condition; /*! * @brief Creates a new, autoreleased condition wait failed exception. * * @param condition The condition for which could not be waited * @return A new, autoreleased condition wait failed exception */ + (instancetype)exceptionWithCondition: (OFCondition*)condition; /*! * @brief Initializes an already allocated condition wait failed exception. * * @param condition The condition for which could not be waited * @return An initialized condition wait failed exception */ - initWithCondition: (OFCondition*)condition; @end |
Modified src/exceptions/OFConditionWaitFailedException.m from [4373801af5] to [774111b215].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFConditionWaitFailedException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionWaitFailedException + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFConditionWaitFailedException.h" #import "OFString.h" #import "OFCondition.h" @implementation OFConditionWaitFailedException @synthesize condition = _condition; + (instancetype)exceptionWithCondition: (OFCondition*)condition { return [[[self alloc] initWithCondition: condition] autorelease]; } - init { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | } - (OFString*)description { return [OFString stringWithFormat: @"Waiting for a condition of type %@ failed!", [_condition class]]; } | < < < < < | 50 51 52 53 54 55 56 57 | } - (OFString*)description { return [OFString stringWithFormat: @"Waiting for a condition of type %@ failed!", [_condition class]]; } @end |
Modified src/exceptions/OFConnectionFailedException.h from [60f2feca02] to [70c5877ad2].
︙ | ︙ | |||
30 31 32 33 34 35 36 | { id _socket; OFString *_host; uint16_t _port; int _errNo; } | < > > > > > > > > > > > > > > > < | 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 | { id _socket; OFString *_host; uint16_t _port; int _errNo; } /*! * The socket which could not connect. */ @property (readonly, retain) id socket; /*! * The host to which the connection failed. */ @property (readonly, copy) OFString *host; /*! * The port on the host to which the connection failed. */ @property (readonly) uint16_t port; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased connection failed exception. * * @param host The host to which the connection failed * @param port The port on the host to which the connection failed * @param socket The socket which could not connect |
︙ | ︙ | |||
88 89 90 91 92 93 94 | * @param errNo The errno of the error that occurred * @return An initialized connection failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 101 102 103 104 105 106 107 108 | * @param errNo The errno of the error that occurred * @return An initialized connection failed exception */ - initWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket errNo: (int)errNo; @end |
Modified src/exceptions/OFConnectionFailedException.m from [77019ce3e4] to [9f4d9145c0].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFConnectionFailedException.h" #import "OFString.h" @implementation OFConnectionFailedException + (instancetype)exceptionWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket { return [[[self alloc] initWithHost: host port: port socket: socket] autorelease]; | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFConnectionFailedException.h" #import "OFString.h" @implementation OFConnectionFailedException @synthesize host = _host, port = _port, socket = _socket, errNo = _errNo; + (instancetype)exceptionWithHost: (OFString*)host port: (uint16_t)port socket: (id)socket { return [[[self alloc] initWithHost: host port: port socket: socket] autorelease]; |
︙ | ︙ | |||
100 101 102 103 104 105 106 | _host, _port, [_socket class], of_strerror(_errNo)]; else return [OFString stringWithFormat: @"A connection to %@ on port %" @PRIu16 @" could not be " @"established in socket of type %@!", _host, _port, [_socket class]]; } | < < < < < < < < < < < < < < < < < < < < | 102 103 104 105 106 107 108 109 | _host, _port, [_socket class], of_strerror(_errNo)]; else return [OFString stringWithFormat: @"A connection to %@ on port %" @PRIu16 @" could not be " @"established in socket of type %@!", _host, _port, [_socket class]]; } @end |
Modified src/exceptions/OFCopyItemFailedException.h from [fb08ee9d57] to [dbe8cb9bf7].
︙ | ︙ | |||
24 25 26 27 28 29 30 | */ @interface OFCopyItemFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } | < > > > > > > > > > > > < | 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 | */ @interface OFCopyItemFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } /*! * The path of the source item. */ @property (readonly, copy) OFString *sourcePath; /*! * The destination path. */ @property (readonly, copy) OFString *destinationPath; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased copy item failed exception. * * @param sourcePath The original path * @param destinationPath The new path * @param errNo The errno of the error that occurred |
︙ | ︙ | |||
53 54 55 56 57 58 59 | * @param destinationPath The new path * @param errNo The errno of the error that occurred * @return An initialized copy item failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 | * @param destinationPath The new path * @param errNo The errno of the error that occurred * @return An initialized copy item failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; @end |
Modified src/exceptions/OFCopyItemFailedException.m from [dcfb3bb51c] to [2ff802323e].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFCopyItemFailedException.h" #import "OFString.h" @implementation OFCopyItemFailedException + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; | > > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFCopyItemFailedException.h" #import "OFString.h" @implementation OFCopyItemFailedException @synthesize sourcePath = _sourcePath, destinationPath = _destinationPath; @synthesize errNo = _errNo; + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; |
︙ | ︙ | |||
61 62 63 64 65 66 67 | } - (OFString*)description { return [OFString stringWithFormat: @"Failed to copy item %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < | 64 65 66 67 68 69 70 71 | } - (OFString*)description { return [OFString stringWithFormat: @"Failed to copy item %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFCreateDirectoryFailedException.h from [59831537ca] to [ba84ff8b59].
︙ | ︙ | |||
25 26 27 28 29 30 31 | */ @interface OFCreateDirectoryFailedException: OFException { OFString *_path; int _errNo; } | < > > > > > > > < | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | */ @interface OFCreateDirectoryFailedException: OFException { OFString *_path; int _errNo; } /*! * The path of the directory which couldn't be created. */ @property (readonly, copy) OFString *path; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased create directory failed exception. * * @param path A string with the path of the directory which could not be * created * @param errNo The errno of the error that occurred |
︙ | ︙ | |||
51 52 53 54 55 56 57 | * @param path A string with the path of the directory which could not be * created * @param errNo The errno of the error that occurred * @return An initialized create directory failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; | < < < < < < < < < < < < < < < | 56 57 58 59 60 61 62 63 | * @param path A string with the path of the directory which could not be * created * @param errNo The errno of the error that occurred * @return An initialized create directory failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end |
Modified src/exceptions/OFCreateDirectoryFailedException.m from [7442d8e670] to [a7bf9a4299].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFCreateDirectoryFailedException.h" #import "OFString.h" @implementation OFCreateDirectoryFailedException + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo { return [[[self alloc] initWithPath: path errNo: errNo] autorelease]; } | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFCreateDirectoryFailedException.h" #import "OFString.h" @implementation OFCreateDirectoryFailedException @synthesize path = _path, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo { return [[[self alloc] initWithPath: path errNo: errNo] autorelease]; } |
︙ | ︙ | |||
57 58 59 60 61 62 63 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to create directory %@: %@", _path, of_strerror(_errNo)]; } | < < < < < < < < < < | 59 60 61 62 63 64 65 66 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to create directory %@: %@", _path, of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFCreateSymbolicLinkFailedException.h from [b50a4d8944] to [d0b9f418e9].
︙ | ︙ | |||
26 27 28 29 30 31 32 | */ @interface OFCreateSymbolicLinkFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } | > > > > | > > > | > > > > < | 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 | */ @interface OFCreateSymbolicLinkFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } /*! * The source for the symlink. */ @property (readonly, copy) OFString *sourcePath; /*! * The destination for the symlink. */ @property (readonly, copy) OFString *destinationPath; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased create symbolic link failed exception. * * @param sourcePath The source for the symbolic link * @param destinationPath The destination for the symbolic link * @param errNo The errno of the error that occurred |
︙ | ︙ | |||
55 56 57 58 59 60 61 | * @param destinationPath The destination for the symbolic link * @param errNo The errno of the error that occurred * @return An initialized create symbolic link failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < | 65 66 67 68 69 70 71 72 73 | * @param destinationPath The destination for the symbolic link * @param errNo The errno of the error that occurred * @return An initialized create symbolic link failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; @end #endif |
Modified src/exceptions/OFCreateSymbolicLinkFailedException.m from [e23d5c4909] to [eb015e221b].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFCreateSymbolicLinkFailedException.h" #import "OFString.h" #ifdef OF_HAVE_SYMLINK @implementation OFCreateSymbolicLinkFailedException + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; | > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include "config.h" #import "OFCreateSymbolicLinkFailedException.h" #import "OFString.h" #ifdef OF_HAVE_SYMLINK @implementation OFCreateSymbolicLinkFailedException @synthesize sourcePath = _sourcePath, destinationPath = _destinationPath; @synthesize errNo = _errNo; + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; |
︙ | ︙ | |||
63 64 65 66 67 68 69 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to symlink file %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < | 66 67 68 69 70 71 72 73 74 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to symlink file %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } @end #endif |
Modified src/exceptions/OFEnumerationMutationException.h from [abd9b0a87f] to [d8302c7944].
︙ | ︙ | |||
25 26 27 28 29 30 31 | * enumeration. */ @interface OFEnumerationMutationException: OFException { id _object; } | < > > > < < < < < < < < | 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 | * enumeration. */ @interface OFEnumerationMutationException: OFException { id _object; } /*! * The object which was mutated during enumeration. */ @property (readonly, retain) id object; /*! * @brief Creates a new, autoreleased enumeration mutation exception. * * @param object The object which was mutated during enumeration * @return A new, autoreleased enumeration mutation exception */ + (instancetype)exceptionWithObject: (id)object; /*! * @brief Initializes an already allocated enumeration mutation exception. * * @param object The object which was mutated during enumeration * @return An initialized enumeration mutation exception */ - initWithObject: (id)object; @end |
Modified src/exceptions/OFEnumerationMutationException.m from [d96cb108f1] to [55a5442529].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFEnumerationMutationException.h" #import "OFString.h" @implementation OFEnumerationMutationException + (instancetype)exceptionWithObject: (id)object { return [[[self alloc] initWithObject: object] autorelease]; } - init { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFEnumerationMutationException.h" #import "OFString.h" @implementation OFEnumerationMutationException @synthesize object = _object; + (instancetype)exceptionWithObject: (id)object { return [[[self alloc] initWithObject: object] autorelease]; } - init { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | - (OFString*)description { return [OFString stringWithFormat: @"Object of class %@ was mutated during enumeration!", [_object class]]; } | < < < < < | 50 51 52 53 54 55 56 57 | - (OFString*)description { return [OFString stringWithFormat: @"Object of class %@ was mutated during enumeration!", [_object class]]; } @end |
Modified src/exceptions/OFGetOptionFailedException.h from [2663a78065] to [402bfa8493].
︙ | ︙ | |||
26 27 28 29 30 31 32 | */ @interface OFGetOptionFailedException: OFException { OFStream *_stream; int _errNo; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFGetOptionFailedException: OFException { OFStream *_stream; int _errNo; } /*! * The stream for which the option could not be retrieved. */ @property (readonly, retain) OFStream *stream; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased get option failed exception. * * @param stream The stream for which the option could not be gotten * @param errNo The errno of the error that occurred * @return A new, autoreleased get option failed exception */ + (instancetype)exceptionWithStream: (OFStream*)stream errNo: (int)errNo; /*! * @brief Initializes an already allocated get option failed exception. * * @param stream The stream for which the option could not be gotten * @param errNo The errno of the error that occurred * @return An initialized get option failed exception */ - initWithStream: (OFStream*)stream errNo: (int)errNo; @end |
Modified src/exceptions/OFGetOptionFailedException.m from [16f7ecbd09] to [4ae4fe7d7c].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFGetOptionFailedException.h" #import "OFString.h" #import "OFStream.h" @implementation OFGetOptionFailedException + (instancetype)exceptionWithStream: (OFStream*)stream errNo: (int)errNo { return [[[self alloc] initWithStream: stream errNo: errNo] autorelease]; } | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFGetOptionFailedException.h" #import "OFString.h" #import "OFStream.h" @implementation OFGetOptionFailedException @synthesize stream = _stream, errNo = _errNo; + (instancetype)exceptionWithStream: (OFStream*)stream errNo: (int)errNo { return [[[self alloc] initWithStream: stream errNo: errNo] autorelease]; } |
︙ | ︙ | |||
53 54 55 56 57 58 59 | - (OFString*)description { return [OFString stringWithFormat: @"Getting an option in a stream of type %@ failed: %@", [_stream class], of_strerror(_errNo)]; } | < < < < < < < < < < | 55 56 57 58 59 60 61 62 | - (OFString*)description { return [OFString stringWithFormat: @"Getting an option in a stream of type %@ failed: %@", [_stream class], of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFHTTPRequestFailedException.h from [43850c4ca2] to [3b74115256].
︙ | ︙ | |||
32 33 34 35 36 37 38 | */ @interface OFHTTPRequestFailedException: OFException { OFHTTPRequest *_request; OFHTTPResponse *_response; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFHTTPRequestFailedException: OFException { OFHTTPRequest *_request; OFHTTPResponse *_response; } /*! * The HTTP request which failed. */ @property (readonly, retain) OFHTTPRequest *request; /*! * The response for the failed HTTP request. */ @property (readonly, retain) OFHTTPResponse *response; /*! * @brief Creates a new, autoreleased HTTP request failed exception. * * @param request The HTTP request which failed * @param response The response for the failed HTTP request * @return A new, autoreleased HTTP request failed exception */ + (instancetype)exceptionWithRequest: (OFHTTPRequest*)request response: (OFHTTPResponse*)response; /*! * @brief Initializes an already allocated HTTP request failed exception. * * @param request The HTTP request which failed * @param response The response for the failed HTTP request * @return A new HTTP request failed exception */ - initWithRequest: (OFHTTPRequest*)request response: (OFHTTPResponse*)response; @end |
Modified src/exceptions/OFHTTPRequestFailedException.m from [df276b3585] to [2c146d2c70].
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #import "OFHTTPRequestFailedException.h" #import "OFString.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" @implementation OFHTTPRequestFailedException + (instancetype)exceptionWithRequest: (OFHTTPRequest*)request response: (OFHTTPResponse*)response { return [[[self alloc] initWithRequest: request response: response] autorelease]; } | > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #import "OFHTTPRequestFailedException.h" #import "OFString.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" @implementation OFHTTPRequestFailedException @synthesize request = _request, response = _response; + (instancetype)exceptionWithRequest: (OFHTTPRequest*)request response: (OFHTTPResponse*)response { return [[[self alloc] initWithRequest: request response: response] autorelease]; } |
︙ | ︙ | |||
58 59 60 61 62 63 64 | const char *method = of_http_request_method_to_string([_request method]); return [OFString stringWithFormat: @"An HTTP %s request with URL %@ failed with code %d!", method, [_request URL], [_response statusCode]]; } | < < < < < < < < < < | 60 61 62 63 64 65 66 67 | const char *method = of_http_request_method_to_string([_request method]); return [OFString stringWithFormat: @"An HTTP %s request with URL %@ failed with code %d!", method, [_request URL], [_response statusCode]]; } @end |
Modified src/exceptions/OFHashAlreadyCalculatedException.h from [6c8a403a1a] to [b07a93de59].
︙ | ︙ | |||
25 26 27 28 29 30 31 | * @brief An exception indicating that the hash has already been calculated. */ @interface OFHashAlreadyCalculatedException: OFException { id <OFHash> _hashObject; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that the hash has already been calculated. */ @interface OFHashAlreadyCalculatedException: OFException { id <OFHash> _hashObject; } /*! * The hash which has already been calculated. */ @property (readonly, retain) id <OFHash> hashObject; /*! * @brief Creates a new, autoreleased hash already calculated exception. * * @param hash The hash which has already been calculated * @return A new, autoreleased hash already calculated exception */ + (instancetype)exceptionWithHash: (id <OFHash>)hash; /*! * @brief Initializes an already allocated hash already calculated exception. * * @param hash The hash which has already been calculated * @return An initialized hash already calculated exception */ - initWithHash: (id <OFHash>)hash; @end |
Modified src/exceptions/OFHashAlreadyCalculatedException.m from [9bf5548117] to [8ba26389b4].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFHashAlreadyCalculatedException.h" #import "OFString.h" @implementation OFHashAlreadyCalculatedException + (instancetype)exceptionWithHash: (id <OFHash>)hash { return [[[self alloc] initWithHash: hash] autorelease]; } - init { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFHashAlreadyCalculatedException.h" #import "OFString.h" @implementation OFHashAlreadyCalculatedException @synthesize hashObject = _hashObject; + (instancetype)exceptionWithHash: (id <OFHash>)hash { return [[[self alloc] initWithHash: hash] autorelease]; } - init { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | - (OFString*)description { return [OFString stringWithFormat: @"The hash of type %@ has already been calculated and thus no new " @"data can be added!", [_hashObject class]]; } | < < < < < | 50 51 52 53 54 55 56 57 | - (OFString*)description { return [OFString stringWithFormat: @"The hash of type %@ has already been calculated and thus no new " @"data can be added!", [_hashObject class]]; } @end |
Modified src/exceptions/OFInitializationFailedException.h from [31d35ba643] to [29bbf73564].
︙ | ︙ | |||
24 25 26 27 28 29 30 | * @brief An exception indicating that initializing something failed. */ @interface OFInitializationFailedException: OFException { Class _inClass; } | < > > > | < < < < < < < < | 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 | * @brief An exception indicating that initializing something failed. */ @interface OFInitializationFailedException: OFException { Class _inClass; } /*! * The class for which initialization failed. */ @property (readonly, assign) Class inClass; /*! * @brief Creates a new, autoreleased initialization failed exception. * * @param class_ The class for which initialization failed * @return A new, autoreleased initialization failed exception */ + (instancetype)exceptionWithClass: (Class)class_; /*! * @brief Initializes an already allocated initialization failed exception. * * @param class_ The class for which initialization failed * @return An initialized initialization failed exception */ - initWithClass: (Class)class_; @end |
Modified src/exceptions/OFInitializationFailedException.m from [80689772fb] to [1b367a3246].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFInitializationFailedException.h" #import "OFString.h" @implementation OFInitializationFailedException + (instancetype)exceptionWithClass: (Class)class { return [[[self alloc] initWithClass: class] autorelease]; } - init { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFInitializationFailedException.h" #import "OFString.h" @implementation OFInitializationFailedException @synthesize inClass = _inClass; + (instancetype)exceptionWithClass: (Class)class { return [[[self alloc] initWithClass: class] autorelease]; } - init { |
︙ | ︙ | |||
40 41 42 43 44 45 46 | } - (OFString*)description { return [OFString stringWithFormat: @"Initialization failed for or in class %@!", _inClass]; } | < < < < < | 42 43 44 45 46 47 48 49 | } - (OFString*)description { return [OFString stringWithFormat: @"Initialization failed for or in class %@!", _inClass]; } @end |
Modified src/exceptions/OFInvalidJSONException.h from [e9373f9cd4] to [862e0a26f1].
︙ | ︙ | |||
24 25 26 27 28 29 30 | */ @interface OFInvalidJSONException: OFException { OFString *_string; size_t _line; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFInvalidJSONException: OFException { OFString *_string; size_t _line; } /*! * The string containing the invalid JSON representation. */ @property (readonly, copy) OFString *string; /*! * The line in which parsing the JSON representation failed. */ @property (readonly) size_t line; /*! * @brief Creates a new, autoreleased invalid JSON exception. * * @param string The string containing the invalid JSON representation * @param line The line in which the parsing error encountered * @return A new, autoreleased invalid JSON exception */ + (instancetype)exceptionWithString: (OFString*)string line: (size_t)line; /*! * @brief Initializes an already allocated invalid JSON exception. * * @param string The string containing the invalid JSON representation * @param line The line in which the parsing error encountered * @return An initialized invalid JSON exception */ - initWithString: (OFString*)string line: (size_t)line; @end |
Modified src/exceptions/OFInvalidJSONException.m from [96980ecfc3] to [7f19f1cd30].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFInvalidJSONException.h" #import "OFString.h" @implementation OFInvalidJSONException + (instancetype)exceptionWithString: (OFString*)string line: (size_t)line { return [[[self alloc] initWithString: string line: line] autorelease]; } | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFInvalidJSONException.h" #import "OFString.h" @implementation OFInvalidJSONException @synthesize string = _string, line = _line; + (instancetype)exceptionWithString: (OFString*)string line: (size_t)line { return [[[self alloc] initWithString: string line: line] autorelease]; } |
︙ | ︙ | |||
56 57 58 59 60 61 62 | } - (OFString*)description { return [OFString stringWithFormat: @"The JSON representation is invalid in line %zu!", _line]; } | < < < < < < < < < < | 58 59 60 61 62 63 64 65 | } - (OFString*)description { return [OFString stringWithFormat: @"The JSON representation is invalid in line %zu!", _line]; } @end |
Modified src/exceptions/OFLinkFailedException.h from [2a9133ec4a] to [1e06f0a96b].
︙ | ︙ | |||
25 26 27 28 29 30 31 | */ @interface OFLinkFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } | > > > > | > > > | > > > > < | 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 | */ @interface OFLinkFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } /*! * A string with the source for the link. */ @property (readonly, copy) OFString *sourcePath; /*! * A string with the destination for the link. */ @property (readonly, copy) OFString *destinationPath; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased link failed exception. * * @param sourcePath The source for the link * @param destinationPath The destination for the link * @param errNo The errno of the error that occurred |
︙ | ︙ | |||
53 54 55 56 57 58 59 | * @param destinationPath The destination for the link * @param errNo The errno of the error that occurred * @return An initialized link failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < | 63 64 65 66 67 68 69 70 71 | * @param destinationPath The destination for the link * @param errNo The errno of the error that occurred * @return An initialized link failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; @end #endif |
Modified src/exceptions/OFLinkFailedException.m from [a0545e5899] to [0bcc65b6d7].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFLinkFailedException.h" #import "OFString.h" #ifdef OF_HAVE_LINK @implementation OFLinkFailedException + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; | > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include "config.h" #import "OFLinkFailedException.h" #import "OFString.h" #ifdef OF_HAVE_LINK @implementation OFLinkFailedException @synthesize sourcePath = _sourcePath, destinationPath = _destinationPath; @synthesize errNo = _errNo; + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; |
︙ | ︙ | |||
63 64 65 66 67 68 69 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to link file %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < | 66 67 68 69 70 71 72 73 74 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to link file %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } @end #endif |
Modified src/exceptions/OFListenFailedException.h from [4b9fad4653] to [ed9afbc4de].
︙ | ︙ | |||
28 29 30 31 32 33 34 | */ @interface OFListenFailedException: OFException { id _socket; int _backLog, _errNo; } | < > > > > > > > | | > > > > | 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 | */ @interface OFListenFailedException: OFException { id _socket; int _backLog, _errNo; } /*! * The socket which failed to listen. */ @property (readonly, retain) id socket; /*! * The requested back log. */ @property (readonly) int backLog; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased listen failed exception. * * @param socket The socket which failed to listen * @param backLog The requested size of the back log * @param errNo The errno of the error that occurred |
︙ | ︙ | |||
56 57 58 59 60 61 62 | * @param backLog The requested size of the back log * @param errNo The errno of the error that occurred * @return An initialized listen failed exception */ - initWithSocket: (id)socket backLog: (int)backLog errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < | 66 67 68 69 70 71 72 73 | * @param backLog The requested size of the back log * @param errNo The errno of the error that occurred * @return An initialized listen failed exception */ - initWithSocket: (id)socket backLog: (int)backLog errNo: (int)errNo; @end |
Modified src/exceptions/OFListenFailedException.m from [88817ed048] to [0f9059dbdf].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFListenFailedException.h" #import "OFString.h" @implementation OFListenFailedException + (instancetype)exceptionWithSocket: (id)socket backLog: (int)backLog errNo: (int)errNo { return [[[self alloc] initWithSocket: socket backLog: backLog errNo: errNo] autorelease]; | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFListenFailedException.h" #import "OFString.h" @implementation OFListenFailedException @synthesize socket = _socket, backLog = _backLog, errNo = _errNo; + (instancetype)exceptionWithSocket: (id)socket backLog: (int)backLog errNo: (int)errNo { return [[[self alloc] initWithSocket: socket backLog: backLog errNo: errNo] autorelease]; |
︙ | ︙ | |||
56 57 58 59 60 61 62 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to listen in socket of type %@ with a back log of %d: %@", [_socket class], _backLog, of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < | 58 59 60 61 62 63 64 65 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to listen in socket of type %@ with a back log of %d: %@", [_socket class], _backLog, of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFLockFailedException.h from [e22fb3be73] to [65a944e8a7].
︙ | ︙ | |||
24 25 26 27 28 29 30 | * @brief An exception indicating that locking a lock failed. */ @interface OFLockFailedException: OFException { id <OFLocking> _lock; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that locking a lock failed. */ @interface OFLockFailedException: OFException { id <OFLocking> _lock; } /*! * The lock which could not be locked. */ @property (readonly, retain) id <OFLocking> lock; /*! * @brief Creates a new, autoreleased lock failed exception. * * @param lock The lock which could not be locked * @return A new, autoreleased lock failed exception */ + (instancetype)exceptionWithLock: (id <OFLocking>)lock; /*! * @brief Initializes an already allocated lock failed exception. * * @param lock The lock which could not be locked * @return An initialized lock failed exception */ - initWithLock: (id <OFLocking>)lock; @end |
Modified src/exceptions/OFLockFailedException.m from [f674581484] to [d1e622e278].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFLockFailedException.h" #import "OFString.h" @implementation OFLockFailedException + (instancetype)exceptionWithLock: (id <OFLocking>)lock { return [[[self alloc] initWithLock: lock] autorelease]; } - initWithLock: (id <OFLocking>)lock { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFLockFailedException.h" #import "OFString.h" @implementation OFLockFailedException @synthesize lock = _lock; + (instancetype)exceptionWithLock: (id <OFLocking>)lock { return [[[self alloc] initWithLock: lock] autorelease]; } - initWithLock: (id <OFLocking>)lock { |
︙ | ︙ | |||
45 46 47 48 49 50 51 | { if (_lock != nil) return [OFString stringWithFormat: @"A lock of type %@ could not be locked!", [_lock class]]; else return @"A lock could not be locked!"; } | < < < < < | 47 48 49 50 51 52 53 54 | { if (_lock != nil) return [OFString stringWithFormat: @"A lock of type %@ could not be locked!", [_lock class]]; else return @"A lock could not be locked!"; } @end |
Modified src/exceptions/OFMalformedXMLException.h from [b4cafccb71] to [b4786effc5].
︙ | ︙ | |||
25 26 27 28 29 30 31 | * @brief An exception indicating that a parser encountered malformed XML. */ @interface OFMalformedXMLException: OFException { OFXMLParser *_parser; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that a parser encountered malformed XML. */ @interface OFMalformedXMLException: OFException { OFXMLParser *_parser; } /*! * The parser which encountered malformed XML. */ @property (readonly, retain) OFXMLParser *parser; /*! * @brief Creates a new, autoreleased malformed XML exception. * * @param parser The parser which encountered malformed XML * @return A new, autoreleased malformed XML exception */ + (instancetype)exceptionWithParser: (OFXMLParser*)parser; /*! * @brief Initializes an already allocated malformed XML exception. * * @param parser The parser which encountered malformed XML * @return An initialized malformed XML exception */ - initWithParser: (OFXMLParser*)parser; @end |
Modified src/exceptions/OFMalformedXMLException.m from [a2f194b17a] to [d8ca046204].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFMalformedXMLException.h" #import "OFString.h" #import "OFXMLParser.h" @implementation OFMalformedXMLException + (instancetype)exceptionWithParser: (OFXMLParser*)parser { return [[[self alloc] initWithParser: parser] autorelease]; } - initWithParser: (OFXMLParser*)parser { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFMalformedXMLException.h" #import "OFString.h" #import "OFXMLParser.h" @implementation OFMalformedXMLException @synthesize parser = _parser; + (instancetype)exceptionWithParser: (OFXMLParser*)parser { return [[[self alloc] initWithParser: parser] autorelease]; } - initWithParser: (OFXMLParser*)parser { |
︙ | ︙ | |||
47 48 49 50 51 52 53 | if (_parser != nil) return [OFString stringWithFormat: @"An XML parser of type %@ encountered malformed XML in " @"line %zu!", [_parser class], [_parser lineNumber]]; else return @"An XML parser encountered malformed XML!"; } | < < < < < | 49 50 51 52 53 54 55 56 | if (_parser != nil) return [OFString stringWithFormat: @"An XML parser of type %@ encountered malformed XML in " @"line %zu!", [_parser class], [_parser lineNumber]]; else return @"An XML parser encountered malformed XML!"; } @end |
Modified src/exceptions/OFMemoryNotPartOfObjectException.h from [27ef7f585f] to [087ccd43be].
︙ | ︙ | |||
25 26 27 28 29 30 31 | */ @interface OFMemoryNotPartOfObjectException: OFException { void *_pointer; id _object; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFMemoryNotPartOfObjectException: OFException { void *_pointer; id _object; } /*! * A pointer to the memory which is not part of the object. */ @property (readonly) void *pointer; /*! * The object which the memory is not part of. */ @property (readonly, retain) id object; /*! * @brief Creates a new, autoreleased memory not part of object exception. * * @param pointer A pointer to the memory that is not part of the object * @param object The object which the memory is not part of * @return A new, autoreleased memory not part of object exception */ + (instancetype)exceptionWithPointer: (void*)pointer object: (id)object; /*! * @brief Initializes an already allocated memory not part of object exception. * * @param pointer A pointer to the memory that is not part of the object * @param object The object which the memory is not part of * @return An initialized memory not part of object exception */ - initWithPointer: (void*)pointer object: (id)object; @end |
Modified src/exceptions/OFMemoryNotPartOfObjectException.m from [9e398da91d] to [5847748519].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFMemoryNotPartOfObjectException.h" #import "OFString.h" @implementation OFMemoryNotPartOfObjectException + (instancetype)exceptionWithPointer: (void*)pointer object: (id)object { return [[[self alloc] initWithPointer: pointer object: object] autorelease]; } | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFMemoryNotPartOfObjectException.h" #import "OFString.h" @implementation OFMemoryNotPartOfObjectException @synthesize pointer = _pointer, object = _object; + (instancetype)exceptionWithPointer: (void*)pointer object: (id)object { return [[[self alloc] initWithPointer: pointer object: object] autorelease]; } |
︙ | ︙ | |||
54 55 56 57 58 59 60 | { return [OFString stringWithFormat: @"Memory at %p was not allocated as part of object of type %@, " @"thus the memory allocation was not changed! It is also possible " @"that there was an attempt to free the same memory twice.", _pointer, [_object class]]; } | < < < < < < < < < < | 56 57 58 59 60 61 62 63 | { return [OFString stringWithFormat: @"Memory at %p was not allocated as part of object of type %@, " @"thus the memory allocation was not changed! It is also possible " @"that there was an attempt to free the same memory twice.", _pointer, [_object class]]; } @end |
Modified src/exceptions/OFMoveItemFailedException.h from [cb15e11718] to [2f98a6754a].
︙ | ︙ | |||
24 25 26 27 28 29 30 | */ @interface OFMoveItemFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } | > > > > | > > > | > > > > < | 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 | */ @interface OFMoveItemFailedException: OFException { OFString *_sourcePath, *_destinationPath; int _errNo; } /*! * The original path. */ @property (readonly, copy) OFString *sourcePath; /*! * The new path. */ @property (readonly, copy) OFString *destinationPath; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased move item failed exception. * * @param sourcePath The original path * @param destinationPath The new path * @param errNo The errno of the error that occurred |
︙ | ︙ | |||
52 53 54 55 56 57 58 | * @param destinationPath The new path * @param errNo The errno of the error that occurred * @return An initialized move item failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < | 62 63 64 65 66 67 68 69 | * @param destinationPath The new path * @param errNo The errno of the error that occurred * @return An initialized move item failed exception */ - initWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo; @end |
Modified src/exceptions/OFMoveItemFailedException.m from [aa0688f8e1] to [cc6ebc8aa3].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFMoveItemFailedException.h" #import "OFString.h" @implementation OFMoveItemFailedException + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; | > > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFMoveItemFailedException.h" #import "OFString.h" @implementation OFMoveItemFailedException @synthesize sourcePath = _sourcePath, destinationPath = _destinationPath; @synthesize errNo = _errNo; + (instancetype)exceptionWithSourcePath: (OFString*)sourcePath destinationPath: (OFString*)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; |
︙ | ︙ | |||
62 63 64 65 66 67 68 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to move item at path %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < | 65 66 67 68 69 70 71 72 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to move item at path %@ to %@: %@", _sourcePath, _destinationPath, of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFNotImplementedException.h from [10a99cf090] to [d2546bb355].
︙ | ︙ | |||
25 26 27 28 29 30 31 | */ @interface OFNotImplementedException: OFException { SEL _selector; id _object; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFNotImplementedException: OFException { SEL _selector; id _object; } /*! * The selector which is not or not fully implemented. */ @property (readonly) SEL selector; /*! * The object which does not (fully) implement the selector. */ @property (readonly, retain) id object; /*! * @brief Creates a new, autoreleased not implemented exception. * * @param selector The selector which is not or not fully implemented * @param object The object which does not (fully) implement the selector * @return A new, autoreleased not implemented exception */ + (instancetype)exceptionWithSelector: (SEL)selector object: (id)object; /*! * @brief Initializes an already allocated not implemented exception. * * @param selector The selector which is not or not fully implemented * @param object The object which does not (fully) implement the selector * @return An initialized not implemented exception */ - initWithSelector: (SEL)selector object: (id)object; @end |
Modified src/exceptions/OFNotImplementedException.m from [9a89086e6f] to [fb3c4784d0].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFNotImplementedException.h" #import "OFString.h" @implementation OFNotImplementedException + (instancetype)exceptionWithSelector: (SEL)selector object: (id)object { return [[[self alloc] initWithSelector: selector object: object] autorelease]; } | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFNotImplementedException.h" #import "OFString.h" @implementation OFNotImplementedException @synthesize selector = _selector, object = _object; + (instancetype)exceptionWithSelector: (SEL)selector object: (id)object { return [[[self alloc] initWithSelector: selector object: object] autorelease]; } |
︙ | ︙ | |||
52 53 54 55 56 57 58 | - (OFString*)description { return [OFString stringWithFormat: @"The selector %s is not understood by an object of type %@ or not " @"(fully) implemented!", sel_getName(_selector), [_object class]]; } | < < < < < < < < < < | 54 55 56 57 58 59 60 61 | - (OFString*)description { return [OFString stringWithFormat: @"The selector %s is not understood by an object of type %@ or not " @"(fully) implemented!", sel_getName(_selector), [_object class]]; } @end |
Modified src/exceptions/OFNotOpenException.h from [c891a4cd94] to [2abd2bd755].
︙ | ︙ | |||
22 23 24 25 26 27 28 | * @brief An exception indicating an object is not open, connected or bound. */ @interface OFNotOpenException: OFException { id _object; } | < > > > < < < < < < < < | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | * @brief An exception indicating an object is not open, connected or bound. */ @interface OFNotOpenException: OFException { id _object; } /*! * The object which is not open, connected or bound. */ @property (readonly, retain) id object; /*! * @brief Creates a new, autoreleased not open exception. * * @param object The object which is not open, connected or bound * @return A new, autoreleased not open exception */ + (instancetype)exceptionWithObject: (id)object; /*! * @brief Initializes an already allocated not open exception. * * @param object The object which is not open, connected or bound * @return An initialized not open exception */ - initWithObject: (id)object; @end |
Modified src/exceptions/OFNotOpenException.m from [8ece38b632] to [b40914ee6d].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFNotOpenException.h" #import "OFString.h" @implementation OFNotOpenException + (instancetype)exceptionWithObject: (id)object { return [[[self alloc] initWithObject: object] autorelease]; } - init { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFNotOpenException.h" #import "OFString.h" @implementation OFNotOpenException @synthesize object = _object; + (instancetype)exceptionWithObject: (id)object { return [[[self alloc] initWithObject: object] autorelease]; } - init { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | - (OFString*)description { return [OFString stringWithFormat: @"The object of type %@ is not open, connected or bound!", [_object class]]; } | < < < < < | 50 51 52 53 54 55 56 57 | - (OFString*)description { return [OFString stringWithFormat: @"The object of type %@ is not open, connected or bound!", [_object class]]; } @end |
Modified src/exceptions/OFObserveFailedException.h from [21d5718c78] to [38d40ea636].
︙ | ︙ | |||
26 27 28 29 30 31 32 | */ @interface OFObserveFailedException: OFException { OFKernelEventObserver *_observer; int _errNo; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFObserveFailedException: OFException { OFKernelEventObserver *_observer; int _errNo; } /*! * The observer which failed to observe. */ @property (readonly, retain) OFKernelEventObserver *observer; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased observe failed exception. * * @param observer The observer which failed to observe * @param errNo The errno of the error that occurred * @return A new, autoreleased observe failed exception */ + (instancetype)exceptionWithObserver: (OFKernelEventObserver*)observer errNo: (int)errNo; /*! * @brief Initializes an already allocated observe failed exception. * * @param observer The observer which failed to observe * @param errNo The errno of the error that occurred * @return An initialized observe failed exception */ - initWithObserver: (OFKernelEventObserver*)observer errNo: (int)errNo; @end |
Modified src/exceptions/OFObserveFailedException.m from [817573e001] to [e0a5af5463].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFObserveFailedException.h" #import "OFString.h" #import "OFKernelEventObserver.h" @implementation OFObserveFailedException + (instancetype)exceptionWithObserver: (OFKernelEventObserver*)observer errNo: (int)errNo { return [[[self alloc] initWithObserver: observer errNo: errNo] autorelease]; } | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFObserveFailedException.h" #import "OFString.h" #import "OFKernelEventObserver.h" @implementation OFObserveFailedException @synthesize observer = _observer, errNo = _errNo; + (instancetype)exceptionWithObserver: (OFKernelEventObserver*)observer errNo: (int)errNo { return [[[self alloc] initWithObserver: observer errNo: errNo] autorelease]; } |
︙ | ︙ | |||
58 59 60 61 62 63 64 | - (OFString*)description { return [OFString stringWithFormat: @"An observer of class %@ failed to observe: %@", [_observer className], of_strerror(_errNo)]; } | < < < < < < < < < < | 60 61 62 63 64 65 66 67 | - (OFString*)description { return [OFString stringWithFormat: @"An observer of class %@ failed to observe: %@", [_observer className], of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFOpenItemFailedException.h from [e531b2d124] to [5cdea7a5dc].
︙ | ︙ | |||
16 17 18 19 20 21 22 | #import "OFException.h" /*! * @class OFOpenItemFailedException \ * OFOpenItemFailedException.h ObjFW/OFOpenItemFailedException.h * | | > > > > | > > > | > > > > < | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #import "OFException.h" /*! * @class OFOpenItemFailedException \ * OFOpenItemFailedException.h ObjFW/OFOpenItemFailedException.h * * @brief An exception indicating an item could not be opened. */ @interface OFOpenItemFailedException: OFException { OFString *_path, *_mode; int _errNo; } /*! * The path of the item which could not be opened. */ @property (readonly, copy) OFString *path; /*! * The mode in which the item should have been opened. */ @property (readonly, copy) OFString *mode; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased open item failed exception. * * @param path A string with the path of the item tried to open * @return A new, autoreleased open item failed exception */ |
︙ | ︙ | |||
72 73 74 75 76 77 78 | + (instancetype)exceptionWithPath: (OFString*)path mode: (OFString*)mode errNo: (int)errNo; /*! * @brief Initializes an already allocated open item failed exception. * | | | | | < < < < < < < < < < < < < < < < < < < < < < | 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 | + (instancetype)exceptionWithPath: (OFString*)path mode: (OFString*)mode errNo: (int)errNo; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @return An initialized open item failed exception */ - initWithPath: (OFString*)path; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @param mode A string with the mode in which the item should have been opened * @return An initialized open item failed exception */ - initWithPath: (OFString*)path mode: (OFString*)mode; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @param errNo The errno of the error that occurred * @return An initialized open item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; /*! * @brief Initializes an already allocated open item failed exception. * * @param path A string with the path of the item which could not be opened * @param mode A string with the mode in which the item should have been opened * @param errNo The errno of the error that occurred * @return An initialized open item failed exception */ - initWithPath: (OFString*)path mode: (OFString*)mode errNo: (int)errNo; @end |
Modified src/exceptions/OFOpenItemFailedException.m from [24f9a913b6] to [d8e0829d88].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFOpenItemFailedException.h" #import "OFString.h" @implementation OFOpenItemFailedException + (instancetype)exceptionWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } + (instancetype)exceptionWithPath: (OFString*)path mode: (OFString*)mode | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFOpenItemFailedException.h" #import "OFString.h" @implementation OFOpenItemFailedException @synthesize path = _path, mode = _mode, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } + (instancetype)exceptionWithPath: (OFString*)path mode: (OFString*)mode |
︙ | ︙ | |||
142 143 144 145 146 147 148 | @"Failed to open item %@: %@", _path, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to open item %@!", _path]; } } | < < < < < < < < < < < < < < < | 144 145 146 147 148 149 150 151 | @"Failed to open item %@: %@", _path, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to open item %@!", _path]; } } @end |
Modified src/exceptions/OFOutOfMemoryException.h from [ef7ff8a5f7] to [6867f53b1c].
︙ | ︙ | |||
23 24 25 26 27 28 29 | * @brief An exception indicating there is not enough memory available. */ @interface OFOutOfMemoryException: OFException { size_t _requestedSize; } | < > > > < | | < < < < < < < | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | * @brief An exception indicating there is not enough memory available. */ @interface OFOutOfMemoryException: OFException { size_t _requestedSize; } /*! * The size of the memory that could not be allocated. */ @property (readonly) size_t requestedSize; /*! * @brief Creates a new, autoreleased no memory exception. * * @param requestedSize The size of the memory that could not be allocated * @return A new, autoreleased no memory exception */ + (instancetype)exceptionWithRequestedSize: (size_t)requestedSize; /*! * @brief Initializes an already allocated no memory exception. * * @param requestedSize The size of the memory that could not be allocated * @return An initialized no memory exception */ - initWithRequestedSize: (size_t)requestedSize; @end |
Modified src/exceptions/OFOutOfMemoryException.m from [bb679be803] to [0b20bb00cd].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFOutOfMemoryException.h" #import "OFString.h" @implementation OFOutOfMemoryException + (instancetype)exceptionWithRequestedSize: (size_t)requestedSize { return [[[self alloc] initWithRequestedSize: requestedSize] autorelease]; } - initWithRequestedSize: (size_t)requestedSize | > > | 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 @synthesize requestedSize = _requestedSize; + (instancetype)exceptionWithRequestedSize: (size_t)requestedSize { return [[[self alloc] initWithRequestedSize: requestedSize] autorelease]; } - initWithRequestedSize: (size_t)requestedSize |
︙ | ︙ | |||
39 40 41 42 43 44 45 | { if (_requestedSize != 0) return [OFString stringWithFormat: @"Could not allocate %zu bytes!", _requestedSize]; else return @"Could not allocate enough memory!"; } | < < < < < | 41 42 43 44 45 46 47 48 | { if (_requestedSize != 0) return [OFString stringWithFormat: @"Could not allocate %zu bytes!", _requestedSize]; else return @"Could not allocate enough memory!"; } @end |
Modified src/exceptions/OFReadOrWriteFailedException.h from [2b24d7d23e] to [c9ae548918].
︙ | ︙ | |||
26 27 28 29 30 31 32 | @interface OFReadOrWriteFailedException: OFException { id _object; size_t _requestedLength; int _errNo; } | < > > > > > > > > > > > < | | | | < < < < < < < < < < < < < < < < < < < < < < | 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 | @interface OFReadOrWriteFailedException: OFException { id _object; size_t _requestedLength; int _errNo; } /*! * The stream which caused the read or write failed exception. */ @property (readonly, retain) id object; /*! * The requested length of the data that could not be read / written. */ @property (readonly) size_t requestedLength; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased read or write failed exception. * * @param object The object from which reading or to which writing failed * @param requestedLength The requested length of the data that could not be * read / written * @return A new, autoreleased read or write failed exception */ + (instancetype)exceptionWithObject: (id)object requestedLength: (size_t)requestedLength; /*! * @brief Creates a new, autoreleased read or write failed exception. * * @param object The object from which reading or to which writing failed * @param requestedLength The requested length of the data that could not be * read / written * @param errNo The errno of the error that occurred * @return A new, autoreleased read or write failed exception */ + (instancetype)exceptionWithObject: (id)object requestedLength: (size_t)requestedLength errNo: (int)errNo; /*! * @brief Initializes an already allocated read or write failed exception. * * @param object The object from which reading or to which writing failed * @param requestedLength The requested length of the data that could not be * read / written * @return A new open file failed exception */ - initWithObject: (id)object requestedLength: (size_t)requestedLength; /*! * @brief Initializes an already allocated read or write failed exception. * * @param object The object from which reading or to which writing failed * @param requestedLength The requested length of the data that could not be * read / written * @param errNo The errno of the error that occurred * @return A new open file failed exception */ - initWithObject: (id)object requestedLength: (size_t)requestedLength errNo: (int)errNo; @end |
Modified src/exceptions/OFReadOrWriteFailedException.m from [545888cf6f] to [523d439238].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFReadOrWriteFailedException.h" #import "OFString.h" @implementation OFReadOrWriteFailedException + (instancetype)exceptionWithObject: (id)object requestedLength: (size_t)requestedLength { return [[[self alloc] initWithObject: object requestedLength: requestedLength] autorelease]; } | > > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFReadOrWriteFailedException.h" #import "OFString.h" @implementation OFReadOrWriteFailedException @synthesize object = _object, requestedLength = _requestedLength; @synthesize errNo = _errNo; + (instancetype)exceptionWithObject: (id)object requestedLength: (size_t)requestedLength { return [[[self alloc] initWithObject: object requestedLength: requestedLength] autorelease]; } |
︙ | ︙ | |||
81 82 83 84 85 86 87 | _requestedLength, [_object class], of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to read or write %zu bytes from / to an object of " @"type %@!", _requestedLength, [_object class]]; } | < < < < < < < < < < < < < < < | 84 85 86 87 88 89 90 91 | _requestedLength, [_object class], of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to read or write %zu bytes from / to an object of " @"type %@!", _requestedLength, [_object class]]; } @end |
Modified src/exceptions/OFRemoveItemFailedException.h from [4a0a749948] to [e1a6ac59e3].
︙ | ︙ | |||
24 25 26 27 28 29 30 | */ @interface OFRemoveItemFailedException: OFException { OFString *_path; int _errNo; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFRemoveItemFailedException: OFException { OFString *_path; int _errNo; } /*! * The path of the item which could not be removed. */ @property (readonly, copy) OFString *path; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased remove failed exception. * * @param path The path of the item which could not be removed * @param errNo The errno of the error that occurred * @return A new, autoreleased remove item failed exception */ + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo; /*! * @brief Initializes an already allocated remove failed exception. * * @param path The path of the item which could not be removed * @param errNo The errno of the error that occurred * @return An initialized remove item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end |
Modified src/exceptions/OFRemoveItemFailedException.m from [d1d562f2a2] to [5aed63271b].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFRemoveItemFailedException.h" #import "OFString.h" @implementation OFRemoveItemFailedException + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo { return [[[self alloc] initWithPath: path errNo: errNo] autorelease]; } | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFRemoveItemFailedException.h" #import "OFString.h" @implementation OFRemoveItemFailedException @synthesize path = _path, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo { return [[[self alloc] initWithPath: path errNo: errNo] autorelease]; } |
︙ | ︙ | |||
57 58 59 60 61 62 63 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to remove item at path %@: %@", _path, of_strerror(_errNo)]; } | < < < < < < < < < < | 59 60 61 62 63 64 65 66 | - (OFString*)description { return [OFString stringWithFormat: @"Failed to remove item at path %@: %@", _path, of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFSeekFailedException.h from [35b0593606] to [df44efa856].
︙ | ︙ | |||
26 27 28 29 30 31 32 | @interface OFSeekFailedException: OFException { OFSeekableStream *_stream; of_offset_t _offset; int _whence, _errNo; } | < > > > > > > > > > > > | | > > > > | 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 | @interface OFSeekFailedException: OFException { OFSeekableStream *_stream; of_offset_t _offset; int _whence, _errNo; } /*! * The stream for which seeking failed. */ @property (readonly, retain) OFSeekableStream *stream; /*! * The offset to which seeking failed. */ @property (readonly) of_offset_t offset; /*! * To what the offset is relative. */ @property (readonly) int whence; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased 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 |
︙ | ︙ | |||
59 60 61 62 63 64 65 | * @param errNo The errno of the error that occurred * @return An initialized seek failed exception */ - initWithStream: (OFSeekableStream*)stream offset: (of_offset_t)offset whence: (int)whence errNo: (int)errNo; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 73 74 75 76 77 78 79 80 | * @param errNo The errno of the error that occurred * @return An initialized seek failed exception */ - initWithStream: (OFSeekableStream*)stream offset: (of_offset_t)offset whence: (int)whence errNo: (int)errNo; @end |
Modified src/exceptions/OFSeekFailedException.m from [cf10b6e3aa] to [93222f0acf].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFSeekFailedException.h" #import "OFString.h" #import "OFSeekableStream.h" @implementation OFSeekFailedException + (instancetype)exceptionWithStream: (OFSeekableStream*)stream offset: (of_offset_t)offset whence: (int)whence errNo: (int)errNo { return [[[self alloc] initWithStream: stream offset: offset | > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include "config.h" #import "OFSeekFailedException.h" #import "OFString.h" #import "OFSeekableStream.h" @implementation OFSeekFailedException @synthesize stream = _stream, offset = _offset, whence = _whence; @synthesize errNo = _errNo; + (instancetype)exceptionWithStream: (OFSeekableStream*)stream offset: (of_offset_t)offset whence: (int)whence errNo: (int)errNo { return [[[self alloc] initWithStream: stream offset: offset |
︙ | ︙ | |||
61 62 63 64 65 66 67 | - (OFString*)description { return [OFString stringWithFormat: @"Seeking failed in stream of type %@: %@", [_stream class], of_strerror(_errNo)]; } | < < < < < < < < < < < < < < < < < < < < | 64 65 66 67 68 69 70 71 | - (OFString*)description { return [OFString stringWithFormat: @"Seeking failed in stream of type %@: %@", [_stream class], of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFSetOptionFailedException.h from [c1e9c61f43] to [a23a8720ed].
︙ | ︙ | |||
26 27 28 29 30 31 32 | */ @interface OFSetOptionFailedException: OFException { OFStream *_stream; int _errNo; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFSetOptionFailedException: OFException { OFStream *_stream; int _errNo; } /*! * The stream for which the option could not be set. */ @property (readonly, retain) OFStream *stream; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased set option failed exception. * * @param stream The stream for which the option could not be set * @param errNo The errno of the error that occurred * @return A new, autoreleased set option failed exception */ + (instancetype)exceptionWithStream: (OFStream*)stream errNo: (int)errNo; /*! * @brief Initializes an already allocated set option failed exception. * * @param stream The stream for which the option could not be set * @param errNo The errno of the error that occurred * @return An initialized set option failed exception */ - initWithStream: (OFStream*)stream errNo: (int)errNo; @end |
Modified src/exceptions/OFSetOptionFailedException.m from [3c40ebe6aa] to [04a49bdbbe].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFSetOptionFailedException.h" #import "OFString.h" #import "OFStream.h" @implementation OFSetOptionFailedException + (instancetype)exceptionWithStream: (OFStream*)stream errNo: (int)errNo { return [[[self alloc] initWithStream: stream errNo: errNo] autorelease]; } | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFSetOptionFailedException.h" #import "OFString.h" #import "OFStream.h" @implementation OFSetOptionFailedException @synthesize stream = _stream, errNo = _errNo; + (instancetype)exceptionWithStream: (OFStream*)stream errNo: (int)errNo { return [[[self alloc] initWithStream: stream errNo: errNo] autorelease]; } |
︙ | ︙ | |||
53 54 55 56 57 58 59 | - (OFString*)description { return [OFString stringWithFormat: @"Setting an option in a stream of type %@ failed: %@", [_stream class], of_strerror(_errNo)]; } | < < < < < < < < < < | 55 56 57 58 59 60 61 62 | - (OFString*)description { return [OFString stringWithFormat: @"Setting an option in a stream of type %@ failed: %@", [_stream class], of_strerror(_errNo)]; } @end |
Modified src/exceptions/OFStatItemFailedException.h from [8c32e48be1] to [7a8d590b8a].
︙ | ︙ | |||
24 25 26 27 28 29 30 | */ @interface OFStatItemFailedException: OFException { OFString *_path; int _errNo; } | < > > > > > > > < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | */ @interface OFStatItemFailedException: OFException { OFString *_path; int _errNo; } /*! * A string with the path of the item whose status could not be retrieved. */ @property (readonly, copy) OFString *path; /*! * The errno of the error that occurred. */ @property (readonly) int errNo; /*! * @brief Creates a new, autoreleased stat item failed exception. * * @param path A string with the path of the item whose status could not be * retrieved * @return A new, autoreleased stat item failed exception |
︙ | ︙ | |||
68 69 70 71 72 73 74 | * @param path A string with the path of the item whose status could not be * retrieved * @param errNo The errno of the error that occurred * @return An initialized stat item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; | < < < < < < < < < < < < < < < < | 73 74 75 76 77 78 79 80 | * @param path A string with the path of the item whose status could not be * retrieved * @param errNo The errno of the error that occurred * @return An initialized stat item failed exception */ - initWithPath: (OFString*)path errNo: (int)errNo; @end |
Modified src/exceptions/OFStatItemFailedException.m from [d257a2161d] to [ede869d861].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFStatItemFailedException.h" #import "OFString.h" @implementation OFStatItemFailedException + (instancetype)exceptionWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFStatItemFailedException.h" #import "OFString.h" @implementation OFStatItemFailedException @synthesize path = _path, errNo = _errNo; + (instancetype)exceptionWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } + (instancetype)exceptionWithPath: (OFString*)path errNo: (int)errNo |
︙ | ︙ | |||
79 80 81 82 83 84 85 | if (_errNo != 0) return [OFString stringWithFormat: @"Failed to stat item %@: %@", _path, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to stat item %@!", _path]; } | < < < < < < < < < < | 81 82 83 84 85 86 87 88 | if (_errNo != 0) return [OFString stringWithFormat: @"Failed to stat item %@: %@", _path, of_strerror(_errNo)]; else return [OFString stringWithFormat: @"Failed to stat item %@!", _path]; } @end |
Modified src/exceptions/OFStillLockedException.h from [8b0abb1930] to [efecb092e0].
︙ | ︙ | |||
24 25 26 27 28 29 30 | * @brief An exception indicating that a lock is still locked. */ @interface OFStillLockedException: OFException { id <OFLocking> _lock; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that a lock is still locked. */ @interface OFStillLockedException: OFException { id <OFLocking> _lock; } /*! * The lock which is still locked. */ @property (readonly, retain) id <OFLocking> lock; /*! * @brief Creates a new, autoreleased still locked exception. * * @param lock The lock which is still locked * @return A new, autoreleased still locked exception */ + (instancetype)exceptionWithLock: (id <OFLocking>)lock; /*! * @brief Initializes an already allocated still locked exception. * * @param lock The lock which is still locked * @return An initialized still locked exception */ - initWithLock: (id <OFLocking>)lock; @end |
Modified src/exceptions/OFStillLockedException.m from [a561eaaaf4] to [45d4689be4].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFStillLockedException.h" #import "OFString.h" @implementation OFStillLockedException + (instancetype)exceptionWithLock: (id <OFLocking>)lock { return [[[self alloc] initWithLock: lock] autorelease]; } - initWithLock: (id <OFLocking>)lock { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFStillLockedException.h" #import "OFString.h" @implementation OFStillLockedException @synthesize lock = _lock; + (instancetype)exceptionWithLock: (id <OFLocking>)lock { return [[[self alloc] initWithLock: lock] autorelease]; } - initWithLock: (id <OFLocking>)lock { |
︙ | ︙ | |||
47 48 49 50 51 52 53 | return [OFString stringWithFormat: @"Deallocation of a lock of type %@ even though it was " @"still locked!", [_lock class]]; else return @"Deallocation of a lock even though it was still " @"locked!"; } | < < < < < | 49 50 51 52 53 54 55 56 | return [OFString stringWithFormat: @"Deallocation of a lock of type %@ even though it was " @"still locked!", [_lock class]]; else return @"Deallocation of a lock even though it was still " @"locked!"; } @end |
Modified src/exceptions/OFThreadJoinFailedException.h from [34684866f9] to [8b0d869de1].
︙ | ︙ | |||
29 30 31 32 33 34 35 | * @brief An exception indicating that joining a thread failed. */ @interface OFThreadJoinFailedException: OFException { OFThread *_thread; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that joining a thread failed. */ @interface OFThreadJoinFailedException: OFException { OFThread *_thread; } /*! * The thread which could not be joined. */ @property (readonly, retain) OFThread *thread; /*! * @brief Creates a new, autoreleased thread join failed exception. * * @param thread The thread which could not be joined * @return A new, autoreleased thread join failed exception */ + (instancetype)exceptionWithThread: (OFThread*)thread; /*! * @brief Initializes an already allocated thread join failed exception. * * @param thread The thread which could not be joined * @return An initialized thread join failed exception */ - initWithThread: (OFThread*)thread; @end |
Modified src/exceptions/OFThreadJoinFailedException.m from [96d9b01635] to [749b073461].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFThreadJoinFailedException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadJoinFailedException + (instancetype)exceptionWithThread: (OFThread*)thread { return [[[self alloc] initWithThread: thread] autorelease]; } - init { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFThreadJoinFailedException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadJoinFailedException @synthesize thread = _thread; + (instancetype)exceptionWithThread: (OFThread*)thread { return [[[self alloc] initWithThread: thread] autorelease]; } - init { |
︙ | ︙ | |||
49 50 51 52 53 54 55 | - (OFString*)description { return [OFString stringWithFormat: @"Joining a thread of type %@ failed! Most likely, another thread " @"already waits for the thread to join.", [_thread class]]; } | < < < < < | 51 52 53 54 55 56 57 58 | - (OFString*)description { return [OFString stringWithFormat: @"Joining a thread of type %@ failed! Most likely, another thread " @"already waits for the thread to join.", [_thread class]]; } @end |
Modified src/exceptions/OFThreadStartFailedException.h from [0c85cb0a3f] to [ddc63eb5eb].
︙ | ︙ | |||
29 30 31 32 33 34 35 | * @brief An exception indicating that starting a thread failed. */ @interface OFThreadStartFailedException: OFException { OFThread *_thread; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that starting a thread failed. */ @interface OFThreadStartFailedException: OFException { OFThread *_thread; } /*! * The thread which could not be started. */ @property (readonly, retain) OFThread *thread; /*! * @brief Creates a new, autoreleased thread start failed exception. * * @param thread The thread which could not be started * @return A new, autoreleased thread start failed exception */ + (instancetype)exceptionWithThread: (OFThread*)thread; /*! * @brief Initializes an already allocated thread start failed exception. * * @param thread The thread which could not be started * @return An initialized thread start failed exception */ - initWithThread: (OFThread*)thread; @end |
Modified src/exceptions/OFThreadStartFailedException.m from [9950311f59] to [68805ae54e].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFThreadStartFailedException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadStartFailedException + (instancetype)exceptionWithThread: (OFThread*)thread { return [[[self alloc] initWithThread: thread] autorelease]; } - init { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFThreadStartFailedException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadStartFailedException @synthesize thread = _thread; + (instancetype)exceptionWithThread: (OFThread*)thread { return [[[self alloc] initWithThread: thread] autorelease]; } - init { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | } - (OFString*)description { return [OFString stringWithFormat: @"Starting a thread of type %@ failed!", [_thread class]]; } | < < < < < | 50 51 52 53 54 55 56 57 | } - (OFString*)description { return [OFString stringWithFormat: @"Starting a thread of type %@ failed!", [_thread class]]; } @end |
Modified src/exceptions/OFThreadStillRunningException.h from [ad5138cff6] to [521f50e1aa].
︙ | ︙ | |||
29 30 31 32 33 34 35 | * @brief An exception indicating that a thread is still running. */ @interface OFThreadStillRunningException: OFException { OFThread *_thread; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that a thread is still running. */ @interface OFThreadStillRunningException: OFException { OFThread *_thread; } /*! * The thread which is still running. */ @property (readonly, retain) OFThread *thread; /*! * @brief Creates a new, autoreleased thread still running exception. * * @param thread The thread which is still running * @return A new, autoreleased thread still running exception */ + (instancetype)exceptionWithThread: (OFThread*)thread; /*! * @brief Initializes an already allocated thread still running exception. * * @param thread The thread which is still running * @return An initialized thread still running exception */ - initWithThread: (OFThread*)thread; @end |
Modified src/exceptions/OFThreadStillRunningException.m from [e43c090fcc] to [ed7735f862].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFThreadStillRunningException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadStillRunningException + (instancetype)exceptionWithThread: (OFThread*)thread { return [[[self alloc] initWithThread: thread] autorelease]; } - init { | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFThreadStillRunningException.h" #import "OFString.h" #import "OFThread.h" @implementation OFThreadStillRunningException @synthesize thread = _thread; + (instancetype)exceptionWithThread: (OFThread*)thread { return [[[self alloc] initWithThread: thread] autorelease]; } - init { |
︙ | ︙ | |||
49 50 51 52 53 54 55 | - (OFString*)description { return [OFString stringWithFormat: @"Deallocation of a thread of type %@ was tried, even though it " @"was still running!", [_thread class]]; } | < < < < < | 51 52 53 54 55 56 57 58 | - (OFString*)description { return [OFString stringWithFormat: @"Deallocation of a thread of type %@ was tried, even though it " @"was still running!", [_thread class]]; } @end |
Modified src/exceptions/OFUnboundNamespaceException.h from [f0f1e61c6d] to [f0b8161cc5].
︙ | ︙ | |||
26 27 28 29 30 31 32 | */ @interface OFUnboundNamespaceException: OFException { OFString *_namespace; OFXMLElement *_element; } | < < > | < > | > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFUnboundNamespaceException: OFException { OFString *_namespace; OFXMLElement *_element; } /*! * The unbound namespace. */ @property (readonly, copy) OFString *namespace; /*! * The element in which the namespace was not bound. */ @property (readonly, retain) OFXMLElement *element; /*! * @brief Creates a new, autoreleased unbound namespace exception. * * @param namespace_ The namespace which is unbound * @param element The element in which the namespace was not bound * @return A new, autoreleased unbound namespace exception */ + (instancetype)exceptionWithNamespace: (OFString*)namespace_ element: (OFXMLElement*)element; /*! * @brief Initializes an already allocated unbound namespace exception. * * @param namespace_ The namespace which is unbound * @param element The element in which the namespace was not bound * @return An initialized unbound namespace exception */ - initWithNamespace: (OFString*)namespace_ element: (OFXMLElement*)element; @end |
Modified src/exceptions/OFUnboundNamespaceException.m from [a09ea2fd0c] to [46a467c62b].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFUnboundNamespaceException.h" #import "OFString.h" #import "OFXMLElement.h" @implementation OFUnboundNamespaceException + (instancetype)exceptionWithNamespace: (OFString*)namespace element: (OFXMLElement*)element { return [[[self alloc] initWithNamespace: namespace element: element] autorelease]; } | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFUnboundNamespaceException.h" #import "OFString.h" #import "OFXMLElement.h" @implementation OFUnboundNamespaceException @synthesize namespace = _namespace, element = _element; + (instancetype)exceptionWithNamespace: (OFString*)namespace element: (OFXMLElement*)element { return [[[self alloc] initWithNamespace: namespace element: element] autorelease]; } |
︙ | ︙ | |||
59 60 61 62 63 64 65 | - (OFString*)description { return [OFString stringWithFormat: @"The namespace %@ is not bound in an element of type %@!", _namespace, [_element class]]; } | < < < < < < < < < < | 61 62 63 64 65 66 67 68 | - (OFString*)description { return [OFString stringWithFormat: @"The namespace %@ is not bound in an element of type %@!", _namespace, [_element class]]; } @end |
Modified src/exceptions/OFUnboundPrefixException.h from [98d8f67d84] to [2a10d4ade6].
︙ | ︙ | |||
26 27 28 29 30 31 32 | */ @interface OFUnboundPrefixException: OFException { OFString *_prefix; OFXMLParser *_parser; } | < > > > > > > > < < < < < < < < < < < < < < < | 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 | */ @interface OFUnboundPrefixException: OFException { OFString *_prefix; OFXMLParser *_parser; } /*! * The unbound prefix. */ @property (readonly, copy) OFString *prefix; /*! * The parser which encountered the unbound prefix. */ @property (readonly, retain) OFXMLParser *parser; /*! * @brief Creates a new, autoreleased unbound prefix exception. * * @param prefix The prefix which is unbound * @param parser The parser which encountered the unbound prefix * @return A new, autoreleased unbound prefix exception */ + (instancetype)exceptionWithPrefix: (OFString*)prefix parser: (OFXMLParser*)parser; /*! * @brief Initializes an already allocated unbound prefix exception. * * @param prefix The prefix which is unbound * @param parser The parser which encountered the unbound prefix * @return An initialized unbound prefix exception */ - initWithPrefix: (OFString*)prefix parser: (OFXMLParser*)parser; @end |
Modified src/exceptions/OFUnboundPrefixException.m from [90e777145f] to [0f006e401f].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFUnboundPrefixException.h" #import "OFString.h" #import "OFXMLParser.h" @implementation OFUnboundPrefixException + (instancetype)exceptionWithPrefix: (OFString*)prefix parser: (OFXMLParser*)parser { return [[[self alloc] initWithPrefix: prefix parser: parser] autorelease]; } | > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFUnboundPrefixException.h" #import "OFString.h" #import "OFXMLParser.h" @implementation OFUnboundPrefixException @synthesize prefix = _prefix, parser = _parser; + (instancetype)exceptionWithPrefix: (OFString*)prefix parser: (OFXMLParser*)parser { return [[[self alloc] initWithPrefix: prefix parser: parser] autorelease]; } |
︙ | ︙ | |||
59 60 61 62 63 64 65 | - (OFString*)description { return [OFString stringWithFormat: @"An XML parser of type %@ encountered the unbound prefix %@ in " @"line %zu!", [_parser class], _prefix, [_parser lineNumber]]; } | < < < < < < < < < < | 61 62 63 64 65 66 67 68 | - (OFString*)description { return [OFString stringWithFormat: @"An XML parser of type %@ encountered the unbound prefix %@ in " @"line %zu!", [_parser class], _prefix, [_parser lineNumber]]; } @end |
Modified src/exceptions/OFUnknownXMLEntityException.h from [069dbbb784] to [299f1c861a].
︙ | ︙ | |||
24 25 26 27 28 29 30 | * entity. */ @interface OFUnknownXMLEntityException: OFException { OFString *_entityName; } | < > > > < < < < < < < < | 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 | * entity. */ @interface OFUnknownXMLEntityException: OFException { OFString *_entityName; } /*! * The name of the unknown XML entity. */ @property (readonly, copy) OFString *entityName; /*! * @brief Creates a new, autoreleased unknown XML entity exception. * * @param entityName The name of the unknown XML entity * @return A new, autoreleased unknown XML entity exception */ + (instancetype)exceptionWithEntityName: (OFString*)entityName; /*! * @brief Initializes an already allocated unknown XML entity exception. * * @param entityName The name of the unknown XML entity * @return An initialized unknown XML entity exception */ - initWithEntityName: (OFString*)entityName; @end |
Modified src/exceptions/OFUnknownXMLEntityException.m from [bc3518da16] to [5508cd2a7f].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFUnknownXMLEntityException.h" #import "OFString.h" @implementation OFUnknownXMLEntityException + (instancetype)exceptionWithEntityName: (OFString*)entityName { return [[[self alloc] initWithEntityName: entityName] autorelease]; } - initWithEntityName: (OFString*)entityName { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFUnknownXMLEntityException.h" #import "OFString.h" @implementation OFUnknownXMLEntityException @synthesize entityName = _entityName; + (instancetype)exceptionWithEntityName: (OFString*)entityName { return [[[self alloc] initWithEntityName: entityName] autorelease]; } - initWithEntityName: (OFString*)entityName { |
︙ | ︙ | |||
48 49 50 51 52 53 54 | - (OFString*)description { return [OFString stringWithFormat: @"A parser encountered an unknown XML entity named %@!", _entityName]; } | < < < < < | 50 51 52 53 54 55 56 57 | - (OFString*)description { return [OFString stringWithFormat: @"A parser encountered an unknown XML entity named %@!", _entityName]; } @end |
Modified src/exceptions/OFUnlockFailedException.h from [a58287b8df] to [6053279850].
︙ | ︙ | |||
24 25 26 27 28 29 30 | * @brief An exception indicating that unlocking a lock failed. */ @interface OFUnlockFailedException: OFException { id <OFLocking> _lock; } | < > > > < < < < < < < < | 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 | * @brief An exception indicating that unlocking a lock failed. */ @interface OFUnlockFailedException: OFException { id <OFLocking> _lock; } /*! * The lock which could not be unlocked. */ @property (readonly, retain) id <OFLocking> lock; /*! * @brief Creates a new, autoreleased unlock failed exception. * * @param lock The lock which could not be unlocked * @return A new, autoreleased unlock failed exception */ + (instancetype)exceptionWithLock: (id <OFLocking>)lock; /*! * @brief Initializes an already allocated unlock failed exception. * * @param lock The lock which could not be unlocked * @return An initialized unlock failed exception */ - initWithLock: (id <OFLocking>)lock; @end |
Modified src/exceptions/OFUnlockFailedException.m from [12e86a7ae4] to [38b63d4f47].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFUnlockFailedException.h" #import "OFString.h" @implementation OFUnlockFailedException + (instancetype)exceptionWithLock: (id <OFLocking>)lock { return [[[self alloc] initWithLock: lock] autorelease]; } - initWithLock: (id <OFLocking>)lock { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFUnlockFailedException.h" #import "OFString.h" @implementation OFUnlockFailedException @synthesize lock = _lock; + (instancetype)exceptionWithLock: (id <OFLocking>)lock { return [[[self alloc] initWithLock: lock] autorelease]; } - initWithLock: (id <OFLocking>)lock { |
︙ | ︙ | |||
45 46 47 48 49 50 51 | { if (_lock != nil) return [OFString stringWithFormat: @"A lock of type %@ could not be unlocked!", [_lock class]]; else return @"A lock could not be unlocked!"; } | < < < < < | 47 48 49 50 51 52 53 54 | { if (_lock != nil) return [OFString stringWithFormat: @"A lock of type %@ could not be unlocked!", [_lock class]]; else return @"A lock could not be unlocked!"; } @end |
Modified src/exceptions/OFUnsupportedProtocolException.h from [51bed1092d] to [2cddb7d9d8].
︙ | ︙ | |||
27 28 29 30 31 32 33 | * supported. */ @interface OFUnsupportedProtocolException: OFException { OFURL *_URL; } | < > > > < < < < < < < < | 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 | * supported. */ @interface OFUnsupportedProtocolException: OFException { OFURL *_URL; } /*! * The URL whose protocol is unsupported. */ @property (readonly, retain) OFURL *URL; /*! * @brief Creates a new, autoreleased unsupported protocol exception. * * @param URL The URL whose protocol is unsupported * @return A new, autoreleased unsupported protocol exception */ + (instancetype)exceptionWithURL: (OFURL*)URL; /*! * @brief Initializes an already allocated unsupported protocol exception * * @param URL The URL whose protocol is unsupported * @return An initialized unsupported protocol exception */ - initWithURL: (OFURL*)URL; @end |
Modified src/exceptions/OFUnsupportedProtocolException.m from [6fe6409dba] to [da63ca56ff].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include "config.h" #import "OFUnsupportedProtocolException.h" #import "OFString.h" #import "OFURL.h" @implementation OFUnsupportedProtocolException + (instancetype)exceptionWithURL: (OFURL*)url { return [[[self alloc] initWithURL: url] autorelease]; } - init { OF_INVALID_INIT_METHOD } - initWithURL: (OFURL*)URL { self = [super init]; | > > < | < < < < < < < < < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #include "config.h" #import "OFUnsupportedProtocolException.h" #import "OFString.h" #import "OFURL.h" @implementation OFUnsupportedProtocolException @synthesize URL = _URL; + (instancetype)exceptionWithURL: (OFURL*)url { return [[[self alloc] initWithURL: url] autorelease]; } - init { OF_INVALID_INIT_METHOD } - initWithURL: (OFURL*)URL { self = [super init]; _URL = [URL retain]; return self; } - (void)dealloc { [_URL release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"The protocol of URL %@ is not supported!", _URL]; } @end |
Modified src/exceptions/OFUnsupportedVersionException.h from [a7572f3a77] to [b8da257f46].
︙ | ︙ | |||
24 25 26 27 28 29 30 | * protocol is not supported. */ @interface OFUnsupportedVersionException: OFException { OFString *_version; } | < > > > < < < < < < < < | 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 | * protocol is not supported. */ @interface OFUnsupportedVersionException: OFException { OFString *_version; } /*! * The version which is unsupported. */ @property (readonly, copy) OFString *version; /*! * @brief Creates a new, autoreleased unsupported version exception. * * @param version The version which is unsupported * @return A new, autoreleased unsupported version exception */ + (instancetype)exceptionWithVersion: (OFString*)version; /*! * @brief Initializes an already allocated unsupported protocol exception. * * @param version The version which is unsupported * @return An initialized unsupported version exception */ - initWithVersion: (OFString*)version; @end |
Modified src/exceptions/OFUnsupportedVersionException.m from [11627bba68] to [6f4efd3fa1].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include "config.h" #import "OFUnsupportedVersionException.h" #import "OFString.h" @implementation OFUnsupportedVersionException + (instancetype)exceptionWithVersion: (OFString*)version { return [[[self alloc] initWithVersion: version] autorelease]; } - init { | > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFUnsupportedVersionException.h" #import "OFString.h" @implementation OFUnsupportedVersionException @synthesize version = _version; + (instancetype)exceptionWithVersion: (OFString*)version { return [[[self alloc] initWithVersion: version] autorelease]; } - init { |
︙ | ︙ | |||
53 54 55 56 57 58 59 | - (OFString*)description { return [OFString stringWithFormat: @"Version %@ of the format or protocol is not supported!", _version]; } | < < < < < | 55 56 57 58 59 60 61 62 | - (OFString*)description { return [OFString stringWithFormat: @"Version %@ of the format or protocol is not supported!", _version]; } @end |
Modified src/macros.h from [9c39f051f0] to [d6041f701d].
︙ | ︙ | |||
314 315 316 317 318 319 320 | #endif extern id objc_getProperty(id, SEL, ptrdiff_t, BOOL); extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, signed char); #ifdef __cplusplus } #endif | < < < < < < | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | #endif extern id objc_getProperty(id, SEL, ptrdiff_t, BOOL); extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, signed char); #ifdef __cplusplus } #endif static OF_INLINE uint16_t OF_CONST_FUNC OF_BSWAP16_CONST(uint16_t i) { return (i & UINT16_C(0xFF00)) >> 8 | (i & UINT16_C(0x00FF)) << 8; } |
︙ | ︙ |
Modified tests/OFXMLParserTests.m from [43a20e5a70] to [3a10c65b69].
︙ | ︙ | |||
344 345 346 347 348 349 350 | TEST(@"-[setDelegate:]", R([parser setDelegate: self])) /* Simulate a stream where we only get chunks */ len = strlen(str); for (j = 0; j < len; j+= 2) { | | | | 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 | TEST(@"-[setDelegate:]", R([parser setDelegate: self])) /* Simulate a stream where we only get chunks */ len = strlen(str); for (j = 0; j < len; j+= 2) { if ([parser hasFinishedParsing]) abort(); if (j + 2 > len) [parser parseBuffer: str + j length: 1]; else [parser parseBuffer: str + j length: 2]; } TEST(@"Checking if everything was parsed", i == 32 && [parser lineNumber] == 18) TEST(@"-[hasFinishedParsing]", [parser hasFinishedParsing]) TEST(@"Parsing whitespaces after the document", R([parser parseString: @" \t\r\n "])) TEST(@"Parsing comments after the document", R([parser parseString: @" \t<!-- foo -->\r<!--bar-->\n "])) |
︙ | ︙ |