Comment: | Add OFSystemInfo. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
4b637f851634d1975f7fc226cd085f63 |
User & Date: | js on 2012-12-26 14:10:34 |
Other Links: | manifest | tags |
2012-12-26
| ||
14:10 | OFProcess: Add a parameter for the environment. check-in: 891c0faad4 user: js tags: trunk | |
14:10 | Add OFSystemInfo. check-in: 4b637f8516 user: js tags: trunk | |
2012-12-22
| ||
15:37 | Xcode project: Set deployment target to default. check-in: 57a82682ae user: js tags: trunk | |
Modified ObjFW.xcodeproj/project.pbxproj from [1c5bab7363] to [acdd41e87d].
︙ | |||
284 285 286 287 288 289 290 291 292 293 294 295 296 297 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | + + | 4B674402163C395900EB1E59 /* OFLocking.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6743F9163C395900EB1E59 /* OFLocking.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B674403163C395900EB1E59 /* OFMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6743FA163C395900EB1E59 /* OFMutex.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B674404163C395900EB1E59 /* OFMutex.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6743FB163C395900EB1E59 /* OFMutex.m */; }; 4B674405163C395900EB1E59 /* OFRecursiveMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6743FC163C395900EB1E59 /* OFRecursiveMutex.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B674406163C395900EB1E59 /* OFRecursiveMutex.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6743FD163C395900EB1E59 /* OFRecursiveMutex.m */; }; 4B674407163C395900EB1E59 /* OFTLSKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6743FE163C395900EB1E59 /* OFTLSKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B674408163C395900EB1E59 /* OFTLSKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6743FF163C395900EB1E59 /* OFTLSKey.m */; }; 4B745BA5168B25E600A6C20E /* OFSystemInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B745BA3168B25E600A6C20E /* OFSystemInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B745BA6168B25E600A6C20E /* OFSystemInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B745BA4168B25E600A6C20E /* OFSystemInfo.m */; }; 4B7FF3B4133CED6200000324 /* OFConditionStillWaitingException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B7FF3B2133CED6100000324 /* OFConditionStillWaitingException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B7FF3B5133CED6200000324 /* OFConditionStillWaitingException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7FF3B3133CED6100000324 /* OFConditionStillWaitingException.m */; }; 4B837D7916829C5F007A3E83 /* block.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B837D7716829C5F007A3E83 /* block.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B837D7A16829C5F007A3E83 /* instance.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B837D7816829C5F007A3E83 /* instance.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B83F0F4142FDEFD00E4A821 /* OFStreamObserver_kqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B83F0F2142FDEFD00E4A821 /* OFStreamObserver_kqueue.h */; }; 4B83F0F5142FDEFD00E4A821 /* OFStreamObserver_kqueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B83F0F3142FDEFD00E4A821 /* OFStreamObserver_kqueue.m */; }; 4B8B16FE133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B16FC133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
︙ | |||
685 686 687 688 689 690 691 692 693 694 695 696 697 698 | 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | + + | 4B6EF67C1235358D0076B512 /* OFXMLElementBuilderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLElementBuilderTests.m; path = tests/OFXMLElementBuilderTests.m; sourceTree = SOURCE_ROOT; }; 4B6EF67E1235358D0076B512 /* OFXMLParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLParserTests.m; path = tests/OFXMLParserTests.m; sourceTree = SOURCE_ROOT; }; 4B6EF67F1235358D0076B512 /* PropertiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PropertiesTests.m; path = tests/PropertiesTests.m; sourceTree = SOURCE_ROOT; }; 4B6EF6801235358D0076B512 /* TestsAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestsAppDelegate.h; path = tests/TestsAppDelegate.h; sourceTree = SOURCE_ROOT; }; 4B6EF6811235358D0076B512 /* TestsAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestsAppDelegate.m; path = tests/TestsAppDelegate.m; sourceTree = SOURCE_ROOT; }; 4B6EF684123535B60076B512 /* TestPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestPlugin.m; path = tests/plugin/TestPlugin.m; sourceTree = SOURCE_ROOT; }; 4B6EF685123535C80076B512 /* test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = test.m; path = tests/objc_sync/test.m; sourceTree = SOURCE_ROOT; }; 4B745BA3168B25E600A6C20E /* OFSystemInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFSystemInfo.h; path = src/OFSystemInfo.h; sourceTree = "<group>"; }; 4B745BA4168B25E600A6C20E /* OFSystemInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSystemInfo.m; path = src/OFSystemInfo.m; sourceTree = "<group>"; }; 4B7FF3B2133CED6100000324 /* OFConditionStillWaitingException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFConditionStillWaitingException.h; path = src/exceptions/OFConditionStillWaitingException.h; sourceTree = "<group>"; }; 4B7FF3B3133CED6100000324 /* OFConditionStillWaitingException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFConditionStillWaitingException.m; path = src/exceptions/OFConditionStillWaitingException.m; sourceTree = "<group>"; }; 4B837D7716829C5F007A3E83 /* block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = block.h; path = src/block.h; sourceTree = "<group>"; }; 4B837D7816829C5F007A3E83 /* instance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = instance.h; path = src/instance.h; sourceTree = "<group>"; }; 4B83F0F2142FDEFD00E4A821 /* OFStreamObserver_kqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamObserver_kqueue.h; path = src/OFStreamObserver_kqueue.h; sourceTree = "<group>"; }; 4B83F0F3142FDEFD00E4A821 /* OFStreamObserver_kqueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamObserver_kqueue.m; path = src/OFStreamObserver_kqueue.m; sourceTree = "<group>"; }; 4B8B16FC133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHashAlreadyCalculatedException.h; path = src/exceptions/OFHashAlreadyCalculatedException.h; sourceTree = "<group>"; }; |
︙ | |||
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 | 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 | + + | 4BF1BCC911C9663F0025511F /* OFString+URLEncoding.m */, 4BF1BCCA11C9663F0025511F /* OFString+XMLEscaping.h */, 4BF1BCCB11C9663F0025511F /* OFString+XMLEscaping.m */, 4BF1BCCC11C9663F0025511F /* OFString+XMLUnescaping.h */, 4BF1BCCD11C9663F0025511F /* OFString+XMLUnescaping.m */, 4B552550147AA5DB0003BF47 /* OFString_UTF8.h */, 4B552551147AA5DB0003BF47 /* OFString_UTF8.m */, 4B745BA3168B25E600A6C20E /* OFSystemInfo.h */, 4B745BA4168B25E600A6C20E /* OFSystemInfo.m */, 4B6799811099E7C50041064A /* OFTCPSocket.h */, 4B6799821099E7C50041064A /* OFTCPSocket.m */, 4BD653C3143B8489006182F0 /* OFTCPSocket+SOCKS5.h */, 4BD653C4143B8489006182F0 /* OFTCPSocket+SOCKS5.m */, 4B6799831099E7C50041064A /* OFThread.h */, 4B6799841099E7C50041064A /* OFThread.m */, 4B9361A61511000C00DCD16B /* OFThreadPool.h */, |
︙ | |||
1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 | 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 | + | 4B3D23D81337FCB000DD29B8 /* OFString.h in Headers */, 4B3D23D91337FCB000DD29B8 /* OFString+Hashing.h in Headers */, 4B5CF8F914940BD2007AA324 /* OFString+JSONValue.h in Headers */, 4BB25E8A139C388A00F574EA /* OFString+Serialization.h in Headers */, 4B3D23DA1337FCB000DD29B8 /* OFString+URLEncoding.h in Headers */, 4B3D23DB1337FCB000DD29B8 /* OFString+XMLEscaping.h in Headers */, 4B3D23DC1337FCB000DD29B8 /* OFString+XMLUnescaping.h in Headers */, 4B745BA5168B25E600A6C20E /* OFSystemInfo.h in Headers */, 4B3D23DD1337FCB000DD29B8 /* OFTCPSocket.h in Headers */, 4B3D23DE1337FCB000DD29B8 /* OFThread.h in Headers */, 4B9361A81511000C00DCD16B /* OFThreadPool.h in Headers */, 4B325EDF1605F3A0007836CA /* OFTimer.h in Headers */, 4B674407163C395900EB1E59 /* OFTLSKey.h in Headers */, 4BA02BA215041F5900002F84 /* OFTLSSocket.h in Headers */, 4B3D23DF1337FCB000DD29B8 /* OFURL.h in Headers */, |
︙ | |||
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 | 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 | + | 4B3D23A71337FC0D00DD29B8 /* OFString+Hashing.m in Sources */, 4B5CF8FA14940BD2007AA324 /* OFString+JSONValue.m in Sources */, 4BB25E8B139C388A00F574EA /* OFString+Serialization.m in Sources */, 4B3D23A81337FC0D00DD29B8 /* OFString+URLEncoding.m in Sources */, 4B3D23A91337FC0D00DD29B8 /* OFString+XMLEscaping.m in Sources */, 4B3D23AA1337FC0D00DD29B8 /* OFString+XMLUnescaping.m in Sources */, 4B552555147AA5DB0003BF47 /* OFString_UTF8.m in Sources */, 4B745BA6168B25E600A6C20E /* OFSystemInfo.m in Sources */, 4B3D23AB1337FC0D00DD29B8 /* OFTCPSocket.m in Sources */, 4BD653C6143B8489006182F0 /* OFTCPSocket+SOCKS5.m in Sources */, 4B3D23AC1337FC0D00DD29B8 /* OFThread.m in Sources */, 4B9361A91511000C00DCD16B /* OFThreadPool.m in Sources */, 4B325EE01605F3A0007836CA /* OFTimer.m in Sources */, 4B674408163C395900EB1E59 /* OFTLSKey.m in Sources */, 4B3D23AD1337FC0D00DD29B8 /* OFURL.m in Sources */, |
︙ |
Modified src/Makefile from [d6b3564105] to [c09179d8ec].
︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + | OFString.m \ OFString+Hashing.m \ OFString+JSONValue.m \ OFString+Serialization.m \ OFString+URLEncoding.m \ OFString+XMLEscaping.m \ OFString+XMLUnescaping.m \ OFSystemInfo.m \ OFTCPSocket.m \ OFTimer.m \ OFURL.m \ OFXMLAttribute.m \ OFXMLCDATA.m \ OFXMLCharacters.m \ OFXMLComment.m \ |
︙ |
Modified src/OFDataArray.m from [b9544608cd] to [15f68d4242].
︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + | #import "OFDataArray.h" #import "OFString.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFXMLElement.h" #import "OFSystemInfo.h" #import "OFHTTPRequestFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" |
︙ | |||
108 109 110 111 112 113 114 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | + - + - + | @try { OFFile *file = [[OFFile alloc] initWithPath: path mode: @"rb"]; itemSize = 1; @try { size_t pageSize = [OFSystemInfo pageSize]; |
︙ | |||
579 580 581 582 583 584 585 | 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | - + - + | - (void)addItem: (const void*)item { size_t newSize, lastPageByte; if (SIZE_MAX - count < 1 || count + 1 > SIZE_MAX / itemSize) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; |
︙ | |||
623 624 625 626 627 628 629 | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | - + | { size_t newSize, lastPageByte; if (count_ > SIZE_MAX - count || index > count || count + count_ > SIZE_MAX / itemSize) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; |
︙ | |||
651 652 653 654 655 656 657 | 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | - + - + | @throw [OFOutOfRangeException exceptionWithClass: [self class]]; memmove(items + range.location * itemSize, items + (range.location + range.length) * itemSize, (count - range.location - range.length) * itemSize); count -= range.length; |
︙ |
Modified src/OFDate.m from [2efbaabb9c] to [7d0fdfaed1].
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + | #import "OFDate.h" #import "OFString.h" #import "OFDictionary.h" #import "OFXMLElement.h" #ifdef OF_THREADS # import "OFMutex.h" #endif #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" #import "autorelease.h" |
︙ | |||
510 511 512 513 514 515 516 517 518 519 520 521 522 523 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | + | } - (OFString*)dateStringWithFormat: (OFConstantString*)format { OFString *ret; time_t seconds_ = (time_t)seconds; struct tm tm; size_t pageSize; char *buffer; if (seconds_ != floor(seconds)) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; #ifdef HAVE_GMTIME_R if (gmtime_r(&seconds_, &tm) == NULL) |
︙ | |||
538 539 540 541 542 543 544 | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 | + - + - + + | # ifdef OF_THREADS } @finally { [mutex unlock]; } # endif #endif pageSize = [OFSystemInfo pageSize]; |
︙ | |||
586 587 588 589 590 591 592 | 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | + - + - + | # ifdef OF_THREADS } @finally { [mutex unlock]; } # endif #endif pageSize = [OFSystemInfo pageSize]; |
︙ |
Modified src/OFFile.m from [b3c8f30967] to [61775ac9b0].
︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + | #import "OFString.h" #import "OFArray.h" #ifdef OF_THREADS # import "threading.h" #endif #import "OFDate.h" #import "OFApplication.h" #import "OFSystemInfo.h" #import "OFChangeDirectoryFailedException.h" #import "OFChangeFileModeFailedException.h" #import "OFChangeFileOwnerFailedException.h" #import "OFCreateDirectoryFailedException.h" #import "OFDeleteDirectoryFailedException.h" #import "OFDeleteFileFailedException.h" |
︙ | |||
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | + + - + - + - + | toPath: (OFString*)destination { void *pool = objc_autoreleasePoolPush(); BOOL override; OFFile *sourceFile = nil; OFFile *destinationFile = nil; char *buffer; size_t pageSize; if ([self directoryExistsAtPath: destination]) { OFString *filename = [source lastPathComponent]; destination = [OFString stringWithPath: destination, filename, nil]; } override = [self fileExistsAtPath: destination]; pageSize = [OFSystemInfo pageSize]; |
︙ |
Modified src/OFHTTPClient.m from [993fb03183] to [f5ea4dfab5].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + | #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFString.h" #import "OFURL.h" #import "OFTCPSocket.h" #import "OFDictionary.h" #import "OFDataArray.h" #import "OFSystemInfo.h" #import "OFHTTPRequestFailedException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFInvalidServerReplyException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" |
︙ | |||
127 128 129 130 131 132 133 134 135 136 137 138 139 140 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | + | OFDataArray *data; OFEnumerator *keyEnumerator, *objectEnumerator; OFString *key, *object, *contentLengthHeader; int status; const char *type = NULL; size_t contentLength = 0; BOOL chunked; size_t pageSize; char *buffer; size_t bytesReceived; if (![scheme isEqual: @"http"] && ![scheme isEqual: @"https"]) @throw [OFUnsupportedProtocolException exceptionWithClass: [self class] URL: URL]; |
︙ | |||
357 358 359 360 361 362 363 | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | + - + | contentLength = (size_t)[contentLengthHeader decimalValue]; if (contentLength > SIZE_MAX) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; } pageSize = [OFSystemInfo pageSize]; |
︙ | |||
392 393 394 395 396 397 398 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | - - + + | if (toRead == 0 || (contentLengthHeader != nil && contentLength >= bytesReceived)) break; while (toRead > 0) { |
︙ | |||
436 437 438 439 440 441 442 | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | - + | } else { size_t length; while (![sock isAtEndOfStream]) { void *pool2; length = [sock readIntoBuffer: buffer |
︙ |
Modified src/OFObject.h from [fdedfa544a] to [24db658a1c].
︙ | |||
883 884 885 886 887 888 889 | 883 884 885 886 887 888 889 890 891 892 893 | - - | #import "OFObject+Serialization.h" #ifdef __cplusplus extern "C" { #endif extern id of_alloc_object(Class class_, size_t extraSize, size_t extraAlignment, void **extra); |
Modified src/OFObject.m from [23e21a638e] to [6afd10fb87].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - - - - - - - | * 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" |
︙ | |||
95 96 97 98 99 100 101 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - - | (__BIGGEST_ALIGNMENT__ - 1)) & ~(__BIGGEST_ALIGNMENT__ - 1)) #define PRE_MEM(mem) ((struct pre_mem*)(void*)((char*)mem - PRE_MEM_ALIGN)) static struct { Class isa; } alloc_failed_exception; |
︙ | |||
258 259 260 261 262 263 264 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - - - - - - - - - - - - - - - - - - - - | objc_setForwardHandler(of_forward, of_forward_stret); #endif #ifdef HAVE_OBJC_ENUMERATIONMUTATION objc_setEnumerationMutationHandler(enumeration_mutation_handler); #endif |
︙ |
Modified src/OFStream.m from [31e482b9ed] to [17a340fbd1].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | #ifndef _WIN32 # include <signal.h> #endif #import "OFStream.h" #import "OFString.h" #import "OFDataArray.h" #import "OFSystemInfo.h" #import "OFRunLoop.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFSetOptionFailedException.h" #import "macros.h" |
︙ | |||
510 511 512 513 514 515 516 517 518 519 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | + + - + - + | return dataArray; } - (OFDataArray*)readDataArrayTillEndOfStream { OFDataArray *dataArray; size_t pageSize; char *buffer; dataArray = [OFDataArray dataArray]; pageSize = [OFSystemInfo pageSize]; |
︙ | |||
559 560 561 562 563 564 565 | 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | - + | } return ret; } - (OFString*)tryReadLineWithEncoding: (of_string_encoding_t)encoding { |
︙ | |||
592 593 594 595 596 597 598 | 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | - - + + + | waitingForDelimiter = NO; return ret; } } } |
︙ | |||
620 621 622 623 624 625 626 | 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | - + | cacheLength = 0; waitingForDelimiter = NO; return ret; } bufferLength = [self lowlevelReadIntoBuffer: buffer |
︙ | |||
761 762 763 764 765 766 767 | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | - + | return [self tryReadLineWithEncoding: OF_STRING_ENCODING_UTF_8]; } - (OFString*)tryReadTillDelimiter: (OFString*)delimiter encoding: (of_string_encoding_t)encoding { const char *delimiterCString; |
︙ | |||
805 806 807 808 809 810 811 | 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 | - - + + + | waitingForDelimiter = NO; return ret; } } } |
︙ | |||
828 829 830 831 832 833 834 | 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | - + | cacheLength = 0; waitingForDelimiter = NO; return ret; } bufferLength = [self lowlevelReadIntoBuffer: buffer |
︙ |
Added src/OFSystemInfo.h version [bc0281aac5].
|
Added src/OFSystemInfo.m version [aa3fde574a].
|
Modified src/OFThreadPool.m from [5b323e884d] to [588dc64cd5].
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + | #include "config.h" #import "OFThreadPool.h" #import "OFArray.h" #import "OFList.h" #import "OFThread.h" #import "OFCondition.h" #import "OFSystemInfo.h" #import "autorelease.h" @interface OFThreadPoolJob: OFObject { id target; SEL selector; |
︙ | |||
250 251 252 253 254 255 256 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | - + | + (instancetype)threadPoolWithSize: (size_t)size { return [[[self alloc] initWithSize: size] autorelease]; } - init { |
︙ |
Modified src/OFXMLParser.m from [6b0673d037] to [e91c2714f2].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + | #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFDataArray.h" #import "OFXMLAttribute.h" #import "OFStream.h" #import "OFFile.h" #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" #import "OFMalformedXMLException.h" #import "OFUnboundNamespaceException.h" #import "autorelease.h" #import "macros.h" |
︙ | |||
275 276 277 278 279 280 281 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | + - + - + | { [self parseBuffer: [string UTF8String] length: [string UTF8StringLength]]; } - (void)parseStream: (OFStream*)stream { size_t pageSize = [OFSystemInfo pageSize]; |
︙ |
Modified src/autorelease.m from [54e2ae018c] to [b7a742a674].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + | #include "config.h" #include <stdio.h> #include <stdlib.h> #import "OFObject.h" #import "OFSystemInfo.h" #ifndef OF_COMPILER_TLS # import "threading.h" #endif #import "macros.h" #import "autorelease.h" |
︙ | |||
90 91 92 93 94 95 96 | 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 | + + - + - - + | #ifndef OF_COMPILER_TLS id *top = of_tlskey_get(topKey); id *objects = of_tlskey_get(objectsKey); size_t size = (size_t)(uintptr_t)of_tlskey_get(sizeKey); #endif if (objects == NULL) { size = [OFSystemInfo pageSize]; |
︙ |
Modified tests/OFStreamTests.m from [6be1a5b957] to [e6328e2572].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + | #include "config.h" #include <string.h> #import "OFStream.h" #import "OFString.h" #import "OFSystemInfo.h" #import "OFAutoreleasePool.h" #import "TestsAppDelegate.h" static OFString *module = @"OFStream"; @interface StreamTester: OFStream |
︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 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 | + + - + - + - + + - - - + + + - + | { return (state > 1 ? YES : NO); } - (size_t)lowlevelReadIntoBuffer: (void*)buffer length: (size_t)size { size_t pageSize = [OFSystemInfo pageSize]; switch (state) { case 0: if (size < 1) return 0; memcpy(buffer, "f", 1); state++; return 1; case 1: |