Comment: | Rename all remaining enums |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | new-naming-convention |
Files: | files | file ages | folders |
SHA3-256: |
aa74e852201ff139cc74b00600fceccd |
User & Date: | js on 2021-04-17 18:36:18 |
Other Links: | branch diff | manifest | tags |
2021-04-17
| ||
20:47 | Rename atomic operations check-in: dfaf287249 user: js tags: new-naming-convention | |
18:36 | Rename all remaining enums check-in: aa74e85220 user: js tags: new-naming-convention | |
17:49 | Rename JSON representation options check-in: 5ce8c7cca7 user: js tags: new-naming-convention | |
Modified src/OFGZIPStream.h from [5d6697a8b2] to [dc70b7b057].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | OFGZIPStreamOperatingSystemVMS = 2, OFGZIPStreamOperatingSystemUNIX = 3, OFGZIPStreamOperatingSystemVM_CMS = 4, OFGZIPStreamOperatingSystemAtariTOS = 5, OFGZIPStreamOperatingSystemHPFS = 6, OFGZIPStreamOperatingSystemMacintosh = 7, OFGZIPStreamOperatingSystemZSystem = 8, |
︙ |
Modified src/OFLHAArchive.h from [8b3e09cc61] to [4b0e86f56f].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - - + + + | * @brief A class for accessing and manipulating LHA files. */ OF_SUBCLASSING_RESTRICTED @interface OFLHAArchive: OFObject { OFStream *_stream; enum { |
︙ |
Modified src/OFLHAArchive.m from [ad2e9808eb] to [53cd493a82].
︙ | |||
91 92 93 94 95 96 97 | 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 | - + - + - + - - + + - + | { self = [super init]; @try { _stream = [stream retain]; if ([mode isEqual: @"r"]) |
︙ | |||
151 152 153 154 155 156 157 | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - + | - (OFLHAArchiveEntry *)nextEntry { OFLHAArchiveEntry *entry; char header[21]; size_t headerLen; |
︙ | |||
192 193 194 195 196 197 198 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - + - + - | entry: entry]; return entry; } - (OFStream *)streamForReadingCurrentEntry { |
︙ |
Modified src/OFLHADecompressingStream.h from [8c1fbf6c83] to [22e7ad21f5].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + - + | * file. */ #import "OFStream.h" OF_ASSUME_NONNULL_BEGIN |
︙ |
Modified src/OFLHADecompressingStream.m from [50a6bfc7bc] to [d371e2f82d].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | if OF_UNLIKELY (stream->_bitIndex == 8) { if OF_LIKELY (stream->_bufferIndex < stream->_bufferLength) stream->_byte = stream->_buffer[stream->_bufferIndex++]; else { const size_t bufferLength = |
︙ |
Modified src/OFMutableZIPArchiveEntry.h from [0cb20b81d1] to [bd5d60ef28].
︙ | |||
48 49 50 51 52 53 54 | 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 | - + - + + - + - + + - - - - - + + + + + - + + | @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFData *extraField; /** * @brief The version which made the entry. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. |
︙ |
Modified src/OFMutableZIPArchiveEntry.m from [0b4e9c4fc9] to [fe9804e5f1].
︙ | |||
81 82 83 84 85 86 87 | 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 | - + + - + + - + + | old = _extraField; _extraField = [extraField copy]; [old release]; objc_autoreleasePoolPop(pool); } |
︙ |
Modified src/OFTCPSocketSOCKS5Connector.h from [2e0767356b] to [444395c847].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - - - - - - + + + + + + | uint16_t _port; id <OFTCPSocketDelegate> _Nullable _delegate; #ifdef OF_HAVE_BLOCKS OFTCPSocketAsyncConnectBlock _Nullable _block; #endif id _Nullable _exception; enum { |
︙ |
Modified src/OFTCPSocketSOCKS5Connector.m from [e22943df87] to [e52c5629f6].
︙ | |||
102 103 104 105 106 107 108 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + | _exception = [exception retain]; [self didConnect]; return; } data = [OFData dataWithItems: "\x05\x01\x00" count: 3]; |
︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + | [self didConnect]; return false; } runLoopMode = [OFRunLoop currentRunLoop].currentMode; switch (_SOCKS5State) { |
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + - + | [_request addItem: &hostLength]; [_request addItems: _host.UTF8String count: hostLength]; port[0] = _port >> 8; port[1] = _port & 0xFF; [_request addItems: port count: 2]; |
︙ | |||
215 216 217 218 219 220 221 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | - + - + - + - + - + - + | [self didConnect]; return false; } /* Skip the rest of the response */ switch (response[3]) { case 1: /* IPv4 */ |
︙ | |||
276 277 278 279 280 281 282 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | - - + + - + - + | [self didConnect]; return nil; } runLoopMode = [OFRunLoop currentRunLoop].currentMode; switch (_SOCKS5State) { |
Modified src/OFXMLParser.h from [88a3556818] to [1fb96ae9fc].
︙ | |||
126 127 128 129 130 131 132 | 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 | - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + | * OFXMLParser is an event-based XML parser which calls the delegate's callbacks * as soon as it finds something, thus suitable for streams as well. */ OF_SUBCLASSING_RESTRICTED @interface OFXMLParser: OFObject { id <OFXMLParserDelegate> _Nullable _delegate; |
︙ |
Modified src/OFXMLParser.m from [d9e7407eb2] to [d255848201].
︙ | |||
61 62 63 64 65 66 67 | 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 | - - - - - - - - + + + + + + + + + - + - + - - - - - - - - - - + + + + + + + + + + | static void inCDATAState(OFXMLParser *); static void inCommentOpeningState(OFXMLParser *); static void inCommentState1(OFXMLParser *); static void inCommentState2(OFXMLParser *); static void inDOCTYPEState(OFXMLParser *); typedef void (*state_function_t)(OFXMLParser *); static state_function_t lookupTable[] = { |
︙ | |||
253 254 255 256 257 258 259 | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - - + + | if (_data[_i] == '\r' || (_data[_i] == '\n' && !_lastCarriageReturn)) _lineNumber++; _lastCarriageReturn = (_data[_i] == '\r'); } |
︙ | |||
285 286 287 288 289 290 291 | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - + - + | } static void inByteOrderMarkState(OFXMLParser *self) { if (self->_data[self->_i] != "\xEF\xBB\xBF"[self->_level]) { if (self->_level == 0) { |
︙ | |||
334 335 336 337 338 339 340 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - + - + - + - + - + | objc_autoreleasePoolPop(pool); } [self->_buffer removeAllItems]; self->_last = self->_i + 1; |
︙ | |||
511 512 513 514 515 516 517 | 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | - + | data: data]; objc_autoreleasePoolPop(pool); [self->_buffer removeAllItems]; self->_last = self->_i + 1; |
︙ | |||
589 590 591 592 593 594 595 | 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - - + + - + | [self->_previous addObject: bufferString]; [self->_name release]; [self->_prefix release]; self->_name = self->_prefix = nil; self->_state = (self->_data[self->_i] == '/' |
︙ | |||
670 671 672 673 674 675 676 | 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 | - - + + - + | [self->_namespaces removeLastObject]; [self->_name release]; [self->_prefix release]; self->_name = self->_prefix = nil; self->_last = self->_i + 1; self->_state = (self->_data[self->_i] == '>' |
︙ | |||
751 752 753 754 755 756 757 | 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | - + - | [self->_name release]; [self->_prefix release]; [self->_attributes removeAllObjects]; self->_name = self->_prefix = nil; self->_last = self->_i + 1; self->_state = (self->_data[self->_i] == '/' |
︙ | |||
800 801 802 803 804 805 806 | 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | - - + + - + | objc_autoreleasePoolPop(pool); [self->_buffer removeAllItems]; self->_last = self->_i + 1; self->_state = (self->_data[self->_i] == '=' |
︙ | |||
833 834 835 836 837 838 839 | 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | - + | self->_data[self->_i] == '\n' || self->_data[self->_i] == '\r') return; if (self->_data[self->_i] != '\'' && self->_data[self->_i] != '"') @throw [OFMalformedXMLException exceptionWithParser: self]; self->_delimiter = self->_data[self->_i]; |
︙ | |||
877 878 879 880 881 882 883 | 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 | - + - + - + - + - + - + - + | [self->_buffer removeAllItems]; [self->_attributeName release]; [self->_attributePrefix release]; self->_attributeName = self->_attributePrefix = nil; self->_last = self->_i + 1; |
︙ | |||
962 963 964 965 966 967 968 | 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 | - + - + - + | [self->_delegate parser: self foundCDATA: CDATA]; objc_autoreleasePoolPop(pool); [self->_buffer removeAllItems]; self->_last = self->_i + 1; |
︙ | |||
1015 1016 1017 1018 1019 1020 1021 | 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | - + - + | [self->_delegate parser: self foundComment: comment]; objc_autoreleasePoolPop(pool); [self->_buffer removeAllItems]; self->_last = self->_i + 1; |
︙ |
Modified src/OFZIPArchive.h from [6e903727fb] to [12eebcf96b].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - - - + + + | */ OF_SUBCLASSING_RESTRICTED @interface OFZIPArchive: OFObject { OFStream *_stream; int64_t _offset; enum { |
︙ |
Modified src/OFZIPArchive.m from [e83455a311] to [b583ae2e67].
︙ | |||
99 100 101 102 103 104 105 | 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 | - + - + | } - (instancetype)initWithStream: (OFStream *)stream entry: (OFMutableZIPArchiveEntry *)entry; @end uint32_t |
︙ | |||
172 173 174 175 176 177 178 | 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 | - + - + - + - - + + - + | - (instancetype)initWithStream: (OFStream *)stream mode: (OFString *)mode { self = [super init]; @try { if ([mode isEqual: @"r"]) |
︙ | |||
397 398 399 400 401 402 403 | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | - - + + | { @try { [_lastReturnedStream close]; } @catch (OFNotOpenException *e) { /* Might have already been closed by the user - that's fine. */ } |
︙ | |||
427 428 429 430 431 432 433 | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | - + | - (OFStream *)streamForReadingFile: (OFString *)path { void *pool = objc_autoreleasePoolPush(); OFZIPArchiveEntry *entry; OFZIPArchiveLocalFileHeader *localFileHeader; int64_t offset64; |
︙ | |||
477 478 479 480 481 482 483 | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | - + - - + - | int64_t offsetAdd = 0; void *pool; OFMutableZIPArchiveEntry *entry; OFString *fileName; OFData *extraField; uint16_t fileNameLength, extraFieldLength; |
︙ | |||
531 532 533 534 535 536 537 | 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | - + - | [_stream writeLittleEndianInt16: fileNameLength]; [_stream writeLittleEndianInt16: extraFieldLength + 20]; offsetAdd += 4 + (5 * 2) + (3 * 4) + (2 * 2); [_stream writeString: fileName]; offsetAdd += fileNameLength; |
︙ | |||
613 614 615 616 617 618 619 | 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | - + - | - (void)close { if (_stream == nil) @throw [OFNotOpenException exceptionWithObject: self]; [self of_closeLastReturnedStream]; |
︙ | |||
657 658 659 660 661 662 663 | 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 | - - + + - + - + | _fileName = [[stream readStringWithLength: fileNameLength encoding: encoding] copy]; if (extraFieldLength > 0) extraField = [[[stream readDataWithCount: extraFieldLength] mutableCopy] autorelease]; |
︙ | |||
731 732 733 734 735 736 737 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | - + - + - + | { self = [super init]; @try { _stream = [stream retain]; switch (entry.compressionMethod) { |
︙ |
Modified src/OFZIPArchiveEntry.h from [3bbdaa40a9] to [79b0008ba2].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 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 | - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + - - + + + - + + + - - + + | #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN /** @file */ |
︙ | |||
132 133 134 135 136 137 138 | 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 | - + - + + - + - + + - - - - - + + + + + - + + | @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFData *extraField; /** * @brief The version which made the entry. * * The lower 8 bits are the ZIP specification version.@n * The upper 8 bits are the attribute compatibility. |
︙ | |||
225 226 227 228 229 230 231 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + - - + + - - + + | #endif /** * @brief Converts the ZIP entry version to a string. * * @param version The ZIP entry version to convert to a string * @return The ZIP entry version as a string */ |
Modified src/OFZIPArchiveEntry.m from [4136550749] to [4408bc6ea7].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 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 | - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + | #import "OFStream.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" |
︙ | |||
246 247 248 249 250 251 252 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | - - + + - + - + - - + - + | extraField = [[[stream readDataWithCount: extraFieldLength] mutableCopy] autorelease]; if (fileCommentLength > 0) _fileComment = [[stream readStringWithLength: fileCommentLength encoding: encoding] copy]; |
︙ | |||
347 348 349 350 351 352 353 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | - + - + | } - (OFData *)extraField { return _extraField; } |
︙ | |||
381 382 383 384 385 386 387 | 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | - + | format: @"%Y-%m-%d %H:%M:%S"]; objc_autoreleasePoolPop(pool); return [date autorelease]; } |
︙ | |||
430 431 432 433 434 435 436 | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - - + | return _localFileHeaderOffset; } - (OFString *)description { void *pool = objc_autoreleasePoolPush(); OFString *compressionMethod = |
︙ | |||
486 487 488 489 490 491 492 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | - + | [stream writeLittleEndianInt32: _versionSpecificAttributes]; [stream writeLittleEndianInt32: 0xFFFFFFFF]; size += (4 + (6 * 2) + (3 * 4) + (5 * 2) + (2 * 4)); [stream writeString: _fileName]; size += (uint64_t)_fileName.UTF8StringLength; |
︙ |
Modified utils/ofarc/ZIPArchive.m from [20066e086c] to [2b6d39166d].
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - + | static OFArc *app; static void setPermissions(OFString *path, OFZIPArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS if ((entry.versionMadeBy >> 8) == |
︙ | |||
121 122 123 124 125 126 127 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + | OFString *compressedSize = [OFString stringWithFormat: @"%" PRIu64, entry.compressedSize]; OFString *uncompressedSize = [OFString stringWithFormat: @"%" PRIu64, entry.uncompressedSize]; OFString *compressionMethod = |
︙ | |||
167 168 169 170 171 172 173 174 175 176 177 178 179 | 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 | + + - + - + - + - | [of_stdout writeLine: OF_LOCALIZED( @"list_modification_date", @"Modification date: %[date]", @"date", modificationDate)]; if (app->_outputLevel >= 2) { uint16_t versionMadeBy = entry.versionMadeBy; OFZIPArchiveEntryAttributeCompatibility UNIX = OFZIPArchiveEntryAttributeCompatibilityUNIX; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( @"list_version_made_by", @"Version made by: %[version]", @"version", |
︙ | |||
441 442 443 444 445 446 447 | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | - + | if (size > INT64_MAX) @throw [OFOutOfRangeException exception]; entry.compressedSize = (int64_t)size; entry.uncompressedSize = (int64_t)size; entry.compressionMethod = |
︙ |