Comment: | Merge trunk into branch "amiga-library" |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | amiga-library |
Files: | files | file ages | folders |
SHA3-256: |
3c13b1575178631ca2267ada0380422b |
User & Date: | js on 2022-11-16 01:31:11 |
Other Links: | branch diff | manifest | tags |
2022-11-17
| ||
13:57 | objfw-new: Link against Amiga .library check-in: 3b8e28c328 user: js tags: amiga-library | |
2022-11-16
| ||
01:31 | Merge trunk into branch "amiga-library" check-in: 3c13b15751 user: js tags: amiga-library | |
01:27 | Add OFAssert() check-in: c86b8f10f0 user: js tags: trunk | |
2022-11-15
| ||
23:18 | Pass setjmp/longjmp from the linklib on MorphOS check-in: c05772e186 user: js tags: amiga-library | |
Modified src/OFArray.m from [c89de989b4] to [26b9b812f3].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - - | */ #include "config.h" #include <stdarg.h> #include <stdlib.h> |
︙ | |||
685 686 687 688 689 690 691 | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | - + | child = [object messagePackRepresentation]; [data addItems: child.items count: child.count]; objc_autoreleasePoolPop(pool2); } |
︙ |
Modified src/OFDictionary.m from [9689ae0f89] to [cbf5abac37].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - | * file. */ #include "config.h" #include <stdlib.h> |
︙ | |||
822 823 824 825 826 827 828 | 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | - + | child = object.messagePackRepresentation; [data addItems: child.items count: child.count]; objc_autoreleasePoolPop(pool2); } |
︙ |
Modified src/OFEpollKernelEventObserver.m from [a510ac5746] to [68ed1a2421].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ |
Modified src/OFFile.m from [57c941bba1] to [c784d31e2e].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - | * file. */ #include "config.h" #define _LARGEFILE64_SOURCE |
︙ |
Modified src/OFInflateStream.m from [28d4702177] to [a61e69ad62].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - - | */ #include "config.h" #include <stdlib.h> #include <string.h> |
︙ | |||
103 104 105 106 107 108 109 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - + | @implementation OFInflateStream static OF_INLINE bool tryReadBits(OFInflateStream *stream, uint16_t *bits, uint8_t count) { uint16_t ret = stream->_savedBits; |
︙ |
Modified src/OFKqueueKernelEventObserver.m from [ef6117c8da] to [12f411060e].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
184 185 186 187 188 189 190 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + | @throw [OFObserveKernelEventsFailedException exceptionWithObserver: self errNo: (int)eventList[i].data]; if (eventList[i].ident == (uintptr_t)_cancelFD[0]) { char buffer; |
︙ | |||
206 207 208 209 210 211 212 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + | case EVFILT_WRITE: if ([_delegate respondsToSelector: @selector(objectIsReadyForWriting:)]) [_delegate objectIsReadyForWriting: (id)eventList[i].udata]; break; default: |
Modified src/OFLHADecompressingStream.m from [1c43fdd671] to [c9a31f2d2f].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
46 47 48 49 50 51 52 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + | @synthesize bytesConsumed = _bytesConsumed; static OF_INLINE bool tryReadBits(OFLHADecompressingStream *stream, uint16_t *bits, uint8_t count) { uint16_t ret = stream->_savedBits; |
︙ |
Modified src/OFList.m from [18864abbc2] to [f4144af409].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #include <string.h> |
︙ | |||
252 253 254 255 256 257 258 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | - + | for (iter = _firstListItem, iter2 = list.firstListItem; iter != NULL && iter2 != NULL; iter = iter->next, iter2 = iter2->next) if (![iter->object isEqual: iter2->object]) return false; /* One is bigger than the other even though we checked the count */ |
︙ |
Modified src/OFMapTable.m from [61602c79fe] to [2885d27493].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - | #define OF_MAP_TABLE_M #include "config.h" #include <stdlib.h> #include <string.h> |
︙ |
Modified src/OFMapTableDictionary.m from [3e7005d616] to [509fe49186].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
342 343 344 345 346 347 348 | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | - + | OFMapTableEnumerator *enumerator; void **keyPtr; size_t i; i = 0; enumerator = [_mapTable keyEnumerator]; while ((keyPtr = [enumerator nextObject]) != NULL) { |
︙ | |||
375 376 377 378 379 380 381 | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | - + | OFMapTableEnumerator *enumerator; void **objectPtr; size_t i; i = 0; enumerator = [_mapTable objectEnumerator]; while ((objectPtr = [enumerator nextObject]) != NULL) { |
︙ |
Modified src/OFMethodSignature.m from [9c702fcecb] to [90c71645ee].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - + | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | alignmentOfStruct(const char **type, size_t *length) { size_t alignment = 0; #if defined(OF_POWERPC) && defined(OF_MACOS) bool first = true; #endif |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + | } static size_t alignmentOfUnion(const char **type, size_t *length) { size_t alignment = 0; |
︙ | |||
288 289 290 291 292 293 294 | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | - + | static size_t sizeOfArray(const char **type, size_t *length) { size_t count = 0; size_t size; |
︙ | |||
328 329 330 331 332 333 334 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | - + | const char *typeCopy = *type; size_t lengthCopy = *length; size_t alignment = alignmentOfStruct(&typeCopy, &lengthCopy); #if defined(OF_POWERPC) && defined(OF_MACOS) bool first = true; #endif |
︙ | |||
401 402 403 404 405 406 407 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - + | } static size_t sizeOfUnion(const char **type, size_t *length) { size_t size = 0; |
︙ |
Modified src/OFMutableArray.m from [ba1c079bde] to [e0ede1483b].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - - | */ #include "config.h" #include <stdlib.h> #include <string.h> |
︙ |
Modified src/OFMutableSet.m from [b126234b89] to [1675014936].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - + | * file. */ #include "config.h" #include <stdlib.h> |
︙ | |||
170 171 172 173 174 175 176 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | - + | cArray = OFAllocMemory(count, sizeof(id)); @try { size_t i; i = 0; for (id object in self) { |
︙ |
Modified src/OFMutableUTF8String.m from [57e4df0b5d] to [5369441523].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - | */ #include "config.h" #include <stdarg.h> #include <stdlib.h> #include <string.h> |
︙ | |||
75 76 77 78 79 80 81 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + | char *newCString; bool isStart = true; if (!_s->isUTF8) { uint8_t t; const OFUnichar *const *table; |
︙ | |||
169 170 171 172 173 174 175 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + | OFFreeMemory(unicodeString); OFFreeMemory(newCString); @throw [OFInvalidEncodingException exception]; } j += d; } |
︙ |
Modified src/OFObject.m from [58ac8c00a9] to [fa1a2c06ef].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - | #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include "unistd_wrapper.h" |
︙ | |||
1174 1175 1176 1177 1178 1179 1180 | 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 | - + | #endif return self; } - (unsigned int)retainCount { |
︙ |
Modified src/OFPollKernelEventObserver.m from [e4119778c6] to [2e609d444b].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - | * file. */ #define __NO_EXT_QNX #include "config.h" |
︙ | |||
188 189 190 191 192 193 194 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - + | if (events < 0) @throw [OFObserveKernelEventsFailedException exceptionWithObserver: self errNo: errno]; for (size_t i = 0; i < nFDs; i++) { |
︙ |
Modified src/OFRunLoop.m from [ccade11e78] to [1ed3a4a609].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
270 271 272 273 274 275 276 | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + | /* * Retain the queue so that it doesn't disappear from us because the * handler called -[cancelAsyncRequests]. */ OFList OF_GENERIC(OF_KINDOF(OFRunLoopReadQueueItem *)) *queue = [[_readQueues objectForKey: object] retain]; |
︙ | |||
314 315 316 317 318 319 320 | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | - + | { /* * Retain the queue so that it doesn't disappear from us because the * handler called -[cancelAsyncRequests]. */ OFList *queue = [[_writeQueues objectForKey: object] retain]; |
︙ | |||
1324 1325 1326 1327 1328 1329 1330 | 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 | - + - + | OFRunLoopState *state = stateForMode(runLoop, mode, false); OFList *queue; if (state == nil) return; if ((queue = [state->_writeQueues objectForKey: object]) != nil) { |
︙ |
Modified src/OFSequencedPacketSocket.m from [0b38781929] to [8882acf9d8].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - | #include "config.h" #ifndef _XOPEN_SOURCE_EXTENDED # define _XOPEN_SOURCE_EXTENDED #endif #define _HPUX_ALT_XOPEN_SOCKET_API |
︙ | |||
358 359 360 361 362 363 364 | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | - + | # if defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(client->_socket, F_GETFD, 0)) != -1) fcntl(client->_socket, F_SETFD, flags | FD_CLOEXEC); # endif #endif |
︙ |
Modified src/OFStream.m from [e660892e5a] to [5428225ee7].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - | * file. */ #define __NO_EXT_QNX #include "config.h" |
︙ |
Modified src/OFStreamSocket.m from [efe4f02a49] to [21ea0af8b5].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - | #ifndef _XOPEN_SOURCE_EXTENDED # define _XOPEN_SOURCE_EXTENDED #endif #define __NO_EXT_QNX #define _HPUX_ALT_XOPEN_SOCKET_API |
︙ | |||
279 280 281 282 283 284 285 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | - + | # if defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(client->_socket, F_GETFD, 0)) != -1) fcntl(client->_socket, F_SETFD, flags | FD_CLOEXEC); # endif #endif |
︙ |
Modified src/OFString+JSONParsing.m from [5489126d7d] to [4b9a43cc0d].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - | #include "config.h" #include <stdlib.h> #include <string.h> #include <math.h> |
︙ | |||
649 650 651 652 653 654 655 | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 | - - - - | { void *pool = objc_autoreleasePoolPush(); const char *pointer = self.UTF8String; const char *stop = pointer + self.UTF8StringLength; id object; size_t line = 1; |
︙ |
Modified src/OFString+XMLEscaping.m from [417a4985be] to [32ead971e3].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
84 85 86 87 88 89 90 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + | retLength += appendLen - 1; memcpy(retCString + j, append, appendLen); j += appendLen; } else retCString[j++] = string[i]; } |
Modified src/OFTCPSocketSOCKS5Connector.m from [f6cfb53e62] to [53af52e1d6].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
264 265 266 267 268 269 270 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | - + | _SOCKS5State = stateReadAddress; [_socket asyncReadIntoBuffer: _buffer exactLength: addressLength[0] + 2 runLoopMode: runLoopMode]; return false; default: |
︙ | |||
301 302 303 304 305 306 307 | 300 301 302 303 304 305 306 307 308 309 310 311 | - + | _SOCKS5State = stateReadResponse; [_socket asyncReadIntoBuffer: _buffer exactLength: 4 runLoopMode: runLoopMode]; return nil; default: |
Modified src/OFTimer.m from [6b846b58a6] to [bfe36ca5fb].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - | * file. */ #include "config.h" #include <stdlib.h> |
︙ | |||
483 484 485 486 487 488 489 | 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | - - + + | - (void)dealloc { /* * The run loop references the timer, so it should never be deallocated * if it is still in a run loop. */ |
︙ |
Modified src/OFXMLElement.m from [ada192cadd] to [f2bc65b077].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - | #include "config.h" #define OF_XML_ELEMENT_M #include <stdlib.h> #include <string.h> |
︙ | |||
629 630 631 632 633 634 635 | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 | - + | memcpy(cString + i, _name.UTF8String, _name.UTF8StringLength); i += _name.UTF8StringLength; } else cString[i++] = '/'; cString[i++] = '>'; |
︙ |
Modified src/macros.h from [f91adbff97] to [20d23907ce].
︙ | |||
372 373 374 375 376 377 378 379 380 381 382 383 384 385 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | + + + + + + | if OF_UNLIKELY (!(cond)) { \ OFLog(@"Failed to ensure condition in " \ @__FILE__ ":%d: " @#cond, __LINE__); \ abort(); \ } \ } while (0) #endif #ifndef NDEBUG # define OFAssert(...) OFEnsure(__VA_ARGS__) #else # define OFAssert(...) #endif #define OF_UNRECOGNIZED_SELECTOR OFMethodNotFound(self, _cmd); #if __has_feature(objc_arc) # define OF_INVALID_INIT_METHOD OFMethodNotFound(self, _cmd); #else # define OF_INVALID_INIT_METHOD \ @try { \ |
︙ |
Modified src/platform/AmigaOS/OFPlainThread.m from [c57285f4e8] to [b331f7b6f5].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
190 191 192 193 194 195 196 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | - + | } @finally { ReleaseSemaphore(&thread->semaphore); } Wait(1ul << thread->joinSigBit); FreeSignal(thread->joinSigBit); |
︙ |
Modified src/platform/Windows/OFWin32ConsoleStdIOStream.m from [8c3f9ce8af] to [0e3a4cbb4c].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - | * In order to not do this when redirecting input / output to a file (as the * file would then be read / written in the wrong encoding and break reading / * writing binary), it checks that the handle is indeed a console. */ #include "config.h" |
︙ | |||
291 292 293 294 295 296 297 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | - + | if (_incompleteUTF8SurrogateLen < (size_t)UTF8Len) return 0; UTF8Len = OFUTF8StringDecode( _incompleteUTF8Surrogate, _incompleteUTF8SurrogateLen, &c); if (UTF8Len <= 0 || c > 0x10FFFF) { |
︙ |
Modified tests/OFInvocationTests.m from [bb91b5d725] to [3c3f2f66f1].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" |
︙ | |||
55 56 57 58 59 60 61 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - - - - | memset(&st, '\xFF', sizeof(st)); st.c = 0x55; st.i = 0xAAAAAAAA; TEST(@"+[invocationWithMethodSignature:]", (invocation = [OFInvocation invocationWithMethodSignature: sig])) |
︙ |