Comment: | Merge trunk into branch "tagged-pointers" |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tagged-pointers |
Files: | files | file ages | folders |
SHA3-256: |
ff6eb7b6c3ea22ad9f8a70a362557346 |
User & Date: | js on 2020-08-30 15:40:33 |
Other Links: | branch diff | manifest | tags |
2020-08-30
| ||
16:22 | OFNumber: Never access ivars after init check-in: bc9998913a user: js tags: tagged-pointers | |
15:40 | Merge trunk into branch "tagged-pointers" check-in: ff6eb7b6c3 user: js tags: tagged-pointers | |
2020-08-29
| ||
23:17 | ofhttp: Translate "Error!" message check-in: f79f04f882 user: js tags: trunk | |
2020-07-26
| ||
21:09 | lookup-asm-x86_64-macho.S: Fix missing @GOTPCREL check-in: 4cf6858694 user: js tags: tagged-pointers | |
Modified .fossil-settings/clean-glob from [bcab2de1f3] to [8cc139c114].
︙ | |||
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 | + | configure docs extra.mk generators/gen_tables src/Info.plist src/bridge/Info.plist src/objfw-defs.h src/runtime/Info.plist src/runtime/amiga-library-functable.inc src/runtime/inline.h tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/objc_sync/objc_sync |
︙ |
Modified .fossil-settings/ignore-glob from [01fa00e105] to [9af6ddf1c8].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + | configure docs extra.mk generators/gen_tables src/Info.plist src/bridge/Info.plist src/objfw-defs.h src/runtime/Info.plist src/runtime/amiga-library-functable.inc src/runtime/inline.h tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser |
︙ |
Modified .gitignore from [65d8f91504] to [1a9a1a32ef].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + | configure docs extra.mk generators/gen_tables src/Info.plist src/bridge/Info.plist src/objfw-defs.h src/runtime/Info.plist src/runtime/amiga-library-functable.inc src/runtime/inline.h tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser |
︙ |
Modified README.md from [c7f0f5d8b7] to [08dca7b831].
︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | 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 | + + + + + + + | $ fossil ui It's also possible to open the same local repository multiple times, so that you have multiple working directories all backed by the same local repository. In order to verify the signature of the currently checked out checkin, you can use: $ fossil artifact current | gpg --verify <h2 id="cloning-git">Git</h2> To clone the Git repository, use the following: $ git clone https://github.com/ObjFW/ObjFW Git commits are not signed, so if you want to check the signature of an individual commit, branch head or tag, please use Fossil. <h1 id="installation">Installation</h1> To install ObjFW, just run the following commands: $ ./configure $ make |
︙ |
Modified configure.ac from [69c688a7b0] to [64037d8825].
︙ | |||
410 411 412 413 414 415 416 417 418 419 420 421 422 423 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | + | ]) AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins]) AS_IF([test x"$enable_files" != x"no" -a x"$PLUGIN_SUFFIX" != x""], [ AC_SUBST(USE_SRCS_PLUGINS, '${SRCS_PLUGINS}') AC_SUBST(TESTPLUGIN, "plugin") AC_DEFINE(OF_HAVE_PLUGINS, 1, [Whether we have plugin support]) AC_CONFIG_FILES(tests/plugin/Info.plist) AS_IF([test x"$build_framework" = x"yes"], [ TESTPLUGIN_LIBS="-F../../src -F../../src/runtime" TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS -framework ObjFW" TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS \${RUNTIME_FRAMEWORK_LIBS}" ], [ TESTPLUGIN_LIBS="-L../../src -L../../src/runtime" |
︙ | |||
520 521 522 523 524 525 526 527 528 529 530 531 532 533 | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | + | OBJCFLAGS="$old_OBJCFLAGS $flag" OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flag" AC_MSG_RESULT(no) old_compiler="yes" ]) AC_SUBST(RUNTIME, "runtime") AC_CONFIG_FILES(src/runtime/Info.plist) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFWRT_SHARED_LIB, "${LIB_PREFIX}objfwrt${LIB_SUFFIX}") ]) AS_IF([test x"$enable_static" = x"yes"], [ |
︙ | |||
1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 | 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 | + | AC_CHECK_FUNC(pledge, [ AC_DEFINE(OF_HAVE_PLEDGE, 1, [Whether we have pledge()]) ]) AS_IF([test x"$objc_runtime" = x"Apple runtime"], [ AC_CHECK_HEADER(Foundation/NSObject.h, [ AC_SUBST(BRIDGE, "bridge") AC_CONFIG_FILES(src/bridge/Info.plist) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFWBRIDGE_SHARED_LIB, "${LIB_PREFIX}objfwbridge${LIB_SUFFIX}") ]) AS_IF([test x"$enable_static" = x"yes" \ -o x"$enable_shared" = x"no"], [ |
︙ | |||
1905 1906 1907 1908 1909 1910 1911 | 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 | - - | AC_SUBST(TESTS_LIBS) AC_CONFIG_FILES([ buildsys.mk extra.mk src/Info.plist |
︙ |
Modified generators/TableGenerator.m from [8fbc15917b] to [ce006846a1].
︙ | |||
117 118 119 120 121 122 123 | 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 | - - + + - - - - - - + + + + + + - - + + | components = [line componentsSeparatedByString: @";"]; if (components.count != 15) { of_log(@"Invalid line: %@\n", line); [OFApplication terminateWithStatus: 1]; } |
︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - - + + - - + + | [OFApplication terminateWithStatus: 1]; } if (![[components objectAtIndex: 1] isEqual: @"S"] && ![[components objectAtIndex: 1] isEqual: @"C"]) continue; |
︙ | |||
263 264 265 266 267 268 269 270 271 272 273 274 275 276 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | + + | if (changed) { [table[i] release]; table[i] = [replacement copy]; done = false; } objc_autoreleasePoolPop(pool); } } while (!done); } - (void)writeFiles { OFURL *URL; |
︙ |
Modified src/Info.plist.in from [125685d722] to [4f293d51f7].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleExecutable</key> <string>ObjFW</string> <key>CFBundleName</key> <string>ObjFW</string> <key>CFBundleIdentifier</key> |
Modified src/Makefile from [34c348d2c8] to [02fc344718].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + - + | OFArray.m \ OFBlock.m \ OFCharacterSet.m \ OFColor.m \ OFConstantString.m \ OFCountedSet.m \ OFData.m \ |
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - - + + | OFSHA384Or512Hash.m \ OFSHA512Hash.m \ OFSortedList.m \ OFStdIOStream.m \ OFStream.m \ OFString.m \ OFString+CryptoHashing.m \ |
︙ |
Modified src/OFASN1Enumerated.h from [8d58cfdd70] to [b9ec14a4c3].
︙ | |||
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 | - + - + - + - + - + - - + | /*! * @brief An ASN.1 Enumerated. */ OF_SUBCLASSING_RESTRICTED @interface OFASN1Enumerated: OFObject { |
︙ |
Modified src/OFASN1Enumerated.m from [1b0ff0da1e] to [78253ff0bd].
︙ | |||
19 20 21 22 23 24 25 | 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 | - + - + - + - + - + - + - + - + - + - + - + - - + + | #import "OFASN1Enumerated.h" #import "OFData.h" #import "OFString.h" #import "OFInvalidArgumentException.h" |
Modified src/OFASN1Integer.h from [c737c6710d] to [ce3a4d009e].
︙ | |||
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 | - + - + - + - + - + - - + | /*! * @brief An ASN.1 Integer. */ OF_SUBCLASSING_RESTRICTED @interface OFASN1Integer: OFObject { |
︙ |
Modified src/OFASN1Integer.m from [d8bb9bcba6] to [39a371a7d5].
︙ | |||
21 22 23 24 25 26 27 | 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 116 117 118 119 120 121 122 123 124 125 126 | - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - + + | #import "OFData.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" |
Modified src/OFASN1ObjectIdentifier.m from [64757d3fa2] to [13ae15fdce].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | { self = [super init]; @try { if (subidentifiers.count < 1) @throw [OFInvalidFormatException exception]; |
︙ | |||
71 72 73 74 75 76 77 | 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 | - + - + - + - + - + - + | { void *pool = objc_autoreleasePoolPush(); OFMutableArray OF_GENERIC(OFNumber *) *subidentifiers; @try { const unsigned char *items = DEREncodedContents.items; size_t count = DEREncodedContents.count; |
︙ |
Modified src/OFConstantString.m from [1a9a1e4686] to [0761b10d3a].
︙ | |||
571 572 573 574 575 576 577 | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | + + + - + + + + + + + + + + + + - + - + - - - + - - - - - | - (OFString *)stringByDeletingLastPathComponent { [self finishInitialization]; return self.stringByDeletingLastPathComponent; } - (long long)longLongValue { [self finishInitialization]; |
︙ |
Modified src/OFCountedMapTableSet.m from [5ffa3e62ea] to [72e0c09af3].
︙ | |||
134 135 136 137 138 139 140 | 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 | - - + - + - - - - | for (OFXMLElement *objectElement in [element elementsForName: @"object" namespace: OF_SERIALIZATION_NS]) { void *pool2 = objc_autoreleasePoolPush(); OFXMLElement *object; OFXMLAttribute *countAttribute; |
︙ |
Modified src/OFDNSResolver.m from [6319b8ebc8] to [abd3a40827].
︙ | |||
489 490 491 492 493 494 495 | 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | - + | _settings = [settings copy]; _delegate = [delegate retain]; queryData = [OFMutableData dataWithCapacity: 512]; /* Header */ |
︙ | |||
810 811 812 813 814 815 816 | 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | - + | { void *pool = objc_autoreleasePoolPush(); OFNumber *ID; OFDNSResolverContext *context; /* Random, unused ID */ do { |
︙ | |||
909 910 911 912 913 914 915 | 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 | - + | OFNumber *ID; OFDNSResolverContext *context; if (length < 2) /* We can't get the ID to get the context. Ignore packet. */ return true; |
︙ |
Modified src/OFDNSResolverSettings.m from [995314850c] to [aa15389045].
︙ | |||
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 | + | #ifdef OF_WINDOWS # import "OFWindowsRegistryKey.h" #endif #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #ifdef OF_WINDOWS # define interface struct # include <iphlpapi.h> # undef interface #endif |
︙ | |||
234 235 236 237 238 239 240 241 242 243 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | + + + + + + - + - - + + + + + + + - + - + | } # if !defined(OF_WINDOWS) && !defined(OF_AMIGAOS4) - (void)parseResolvConfOption: (OFString *)option { @try { if ([option hasPrefix: @"ndots:"]) { unsigned long long number; option = [option substringWithRange: of_range(6, option.length - 6)]; number = option.unsignedLongLongValue; if (number > UINT_MAX) @throw [OFOutOfRangeException exception]; |
︙ |
Modified src/OFDNSResourceRecord.m from [054747ac72] to [08b68e10ee].
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + + | string = string.uppercaseString; if ([string isEqual: @"IN"]) DNSClass = OF_DNS_CLASS_IN; else { @try { |
︙ | |||
121 122 123 124 125 126 127 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - - + + | recordType = OF_DNS_RECORD_TYPE_AAAA; else if ([string isEqual: @"SRV"]) recordType = OF_DNS_RECORD_TYPE_SRV; else if ([string isEqual: @"ALL"]) recordType = OF_DNS_RECORD_TYPE_ALL; else { @try { |
︙ |
Renamed and modified src/OFData+ASN1DERValue.h [f3069736d2] to src/OFData+ASN1DERParsing.h [edd796e7d5].
︙ | |||
19 20 21 22 23 24 25 | 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 | - + - + - + - + | #import "OFASN1Value.h" OF_ASSUME_NONNULL_BEGIN #ifdef __cplusplus extern "C" { #endif |
Renamed and modified src/OFData+ASN1DERValue.m [e3b3051875] to src/OFData+ASN1DERParsing.m [31638813f3].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + | * 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" |
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + | #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" enum { ASN1_TAG_CONSTRUCTED_MASK = 0x20 }; |
︙ | |||
221 222 223 224 225 226 227 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | - - + + - + - + | initWithTagClass: tag >> 6 tagNumber: tag & 0x1F constructed: tag & ASN1_TAG_CONSTRUCTED_MASK DEREncodedContents: contents] autorelease]; return bytesConsumed; } |
︙ |
Renamed and modified src/OFData+MessagePackValue.h [2409c49524] to src/OFData+MessagePackParsing.h [6f2988f9a2].
︙ | |||
18 19 20 21 22 23 24 | 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 | - + - + - + - + | #import "OFData.h" OF_ASSUME_NONNULL_BEGIN #ifdef __cplusplus extern "C" { #endif |
Renamed and modified src/OFData+MessagePackValue.m [caaaf51219] to src/OFData+MessagePackParsing.m [464ca7dfaa].
︙ | |||
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 | - + - + | * file. */ #include "config.h" #include <string.h> |
︙ | |||
189 190 191 192 193 194 195 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - + - + | OFData *data; if (length < 1) @throw [OFTruncatedDataException exception]; /* positive fixint */ if ((buffer[0] & 0x80) == 0) { |
︙ | |||
229 230 231 232 233 234 235 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | - + - + + - + + - + + - + - + - + - + | /* Prefix byte */ switch (buffer[0]) { /* Unsigned integers */ case 0xCC: /* uint8 */ if (length < 2) @throw [OFTruncatedDataException exception]; |
︙ | |||
538 539 540 541 542 543 544 | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | - - + + - + - + | return parseTable(buffer + 5, length - 5, object, readUInt32(buffer + 1), depthLimit) + 5; default: @throw [OFInvalidFormatException exception]; } } |
︙ |
Modified src/OFData.h from [28777ad7ed] to [71ad4a3460].
︙ | |||
323 324 325 326 327 328 329 | 323 324 325 326 327 328 329 330 331 332 | - + - + | */ - (void)writeToURL: (OFURL *)URL; @end OF_ASSUME_NONNULL_END #import "OFMutableData.h" |
Modified src/OFData.m from [9637aa54ff] to [63de509839].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - + | #import "base64.h" /* References for static linking */ void _references_to_categories_of_OFData(void) { |
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + - + | return self; } #ifdef OF_HAVE_FILES - (instancetype)initWithContentsOfFile: (OFString *)path { char *buffer = NULL; |
︙ |
Modified src/OFDate.m from [8d4b356936] to [4f38b261b8].
︙ | |||
483 484 485 486 487 488 489 | 483 484 485 486 487 488 489 490 491 492 493 494 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 | + + + - - + + - - - + + + + + + + + - - + + - + + + + + | seconds = tmAndTzToTime(&tm, &tz); return [self initWithTimeIntervalSince1970: seconds]; } - (instancetype)initWithSerialization: (OFXMLElement *)element { of_time_interval_t seconds; @try { |
︙ |
Modified src/OFFileManager.h from [832085a76a] to [2be4d0719f].
︙ | |||
574 575 576 577 578 579 580 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | - + - + - + - + | @interface OFDictionary (FileAttributes) /*! * @brief The @ref of_file_attribute_key_size key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ |
︙ |
Modified src/OFFileManager.m from [c5306f3b5d] to [d64d08867d].
︙ | |||
934 935 936 937 938 939 940 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | - + - + - + - + - + - + - + - + | - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } @end @implementation OFDictionary (FileAttributes) |
︙ |
Modified src/OFFileURLHandler.m from [b404d9c716] to [987947edfd].
︙ | |||
407 408 409 410 411 412 413 | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | - + - + | } static void setOwnerAndGroupAttributes(of_mutable_file_attributes_t attributes, of_stat_t *s) { #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER |
︙ | |||
616 617 618 619 620 621 622 | 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | - + - + | @throw [OFRetrieveItemAttributesFailedException exceptionWithURL: URL errNo: errno]; if (s.st_size < 0) @throw [OFOutOfRangeException exception]; |
︙ | |||
756 757 758 759 760 761 762 | 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 | - + | } - (void)of_setPOSIXPermissions: (OFNumber *)permissions ofItemAtURL: (OFURL *)URL attributes: (of_file_attributes_t)attributes OF_DIRECT { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS |
︙ |
Modified src/OFHTTPClient.m from [8dda35db24] to [561ec71175].
︙ | |||
75 76 77 78 79 80 81 | 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 | - + - + | OF_DIRECT_MEMBERS @interface OFHTTPClientRequestBodyStream: OFStream <OFReadyForWritingObserving> { OFHTTPClientRequestHandler *_handler; OFTCPSocket *_socket; bool _chunked; |
︙ | |||
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 | 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 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | + + - + + + + + + | } @catch (id e) { [self raiseException: e]; } } - (bool)handleFirstLine: (OFString *)line { long long status; /* * It's possible that the write succeeds on a connection that is * keep-alive, but the connection has already been closed by the remote * end due to a timeout. In this case, we need to reconnect. */ if (line == nil) { [self closeAndReconnect]; return false; } if (![line hasPrefix: @"HTTP/"] || line.length < 9 || [line characterAtIndex: 8] != ' ') @throw [OFInvalidServerReplyException exception]; _version = [[line substringWithRange: of_range(5, 3)] copy]; if (![_version isEqual: @"1.0"] && ![_version isEqual: @"1.1"]) @throw [OFUnsupportedVersionException exceptionWithVersion: _version]; |
︙ | |||
709 710 711 712 713 714 715 | 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | - + - - - - - - + | } else { sock = [OFTCPSocket socket]; port = 80; } URLPort = URL.port; if (URLPort != nil) |
︙ | |||
891 892 893 894 895 896 897 | 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 | + - + - - - + + + + | if (contentLength != nil) { if (_chunked || contentLength.length == 0) @throw [OFInvalidServerReplyException exception]; _hasContentLength = true; @try { unsigned long long toRead = |
︙ | |||
922 923 924 925 926 927 928 | 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 | - + | if (_socket.atEndOfStream) @throw [OFTruncatedDataException exception]; /* Content-Length */ if (!_chunked) { size_t ret; |
︙ | |||
977 978 979 980 981 982 983 | 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 | - + | } if (_setAtEndOfStream && _toRead == 0) _atEndOfStream = true; return 0; } else if (_toRead > 0) { |
︙ | |||
1022 1023 1024 1025 1026 1027 1028 | 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | + + - + + + + | @throw [OFTruncatedDataException exception]; else @throw [OFInvalidServerReplyException exception]; } @try { unsigned long long toRead = [line unsignedLongLongValueWithBase: 16]; |
︙ |
Modified src/OFHTTPCookie.m from [1c4b9e560d] to [1fa52c5268].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + | if ([lowercaseName isEqual: @"expires"]) { OFDate *date = [OFDate dateWithDateString: value format: @"%a, %d %b %Y %H:%M:%S %z"]; cookie.expires = date; } else if ([lowercaseName isEqual: @"max-age"]) { OFDate *date = [OFDate dateWithTimeIntervalSinceNow: |
︙ |
Modified src/OFHTTPRequest.m from [2d1b69a80f] to [a65b94e9ae].
︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + - - + + - + | return _protocolVersion; } - (void)setProtocolVersionString: (OFString *)string { void *pool = objc_autoreleasePoolPush(); OFArray *components = [string componentsSeparatedByString: @"."]; |
︙ |
Modified src/OFHTTPResponse.m from [1abecd6ce8] to [b38122cc28].
︙ | |||
267 268 269 270 271 272 273 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + - - + + - + | return _protocolVersion; } - (void)setProtocolVersionString: (OFString *)string { void *pool = objc_autoreleasePoolPush(); OFArray *components = [string componentsSeparatedByString: @"."]; |
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + - - + + + + + + + + + + | { return [self stringWithEncoding: OF_STRING_ENCODING_AUTODETECT]; } - (OFString *)stringWithEncoding: (of_string_encoding_t)encoding { void *pool = objc_autoreleasePoolPush(); |
︙ |
Modified src/OFHTTPServer.m from [868929166e] to [abf9a790cd].
︙ | |||
101 102 103 104 105 106 107 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + - + | @end OF_DIRECT_MEMBERS @interface OFHTTPServerRequestBodyStream: OFStream <OFReadyForReadingObserving> { OFStreamSocket *_socket; bool _chunked; |
︙ | |||
411 412 413 414 415 416 417 | 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 | - + - + - - - | size_t pos; if (line.length == 0) { bool chunked = [[_headers objectForKey: @"Transfer-Encoding"] isEqual: @"chunked"]; OFString *contentLengthString = [_headers objectForKey: @"Content-Length"]; |
︙ | |||
478 479 480 481 482 483 484 | 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | - - + + + | [_host release]; _host = [[value substringWithRange: of_range(0, pos)] retain]; @try { of_range_t range = of_range(pos + 1, value.length - pos - 1); |
︙ | |||
541 542 543 544 545 546 547 | 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | - + | _port = [_server port]; } URL = [OFMutableURL URL]; URL.scheme = @"http"; URL.host = _host; if (_port != 80) |
︙ | |||
581 582 583 584 585 586 587 | 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | - + + + + - + | objc_autoreleasePoolPop(pool); } @end @implementation OFHTTPServerRequestBodyStream - (instancetype)initWithSocket: (OFStreamSocket *)sock chunked: (bool)chunked |
︙ | |||
629 630 631 632 633 634 635 | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | - + | if (_socket.atEndOfStream) @throw [OFTruncatedDataException exception]; /* Content-Length */ if (!_chunked) { size_t ret; |
︙ | |||
678 679 680 681 682 683 684 | 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 708 709 | - + + | } if (_setAtEndOfStream && _toRead == 0) _atEndOfStream = true; return 0; } else if (_toRead > 0) { |
︙ | |||
721 722 723 724 725 726 727 | 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 | + - + + | if (_socket.atEndOfStream && range.location == OF_NOT_FOUND) @throw [OFTruncatedDataException exception]; else @throw [OFInvalidFormatException exception]; } toRead = [line unsignedLongLongValueWithBase: 16]; |
︙ |
Modified src/OFINICategory.h from [fee5b6cdbd] to [b224331a40].
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - - + + | * the first key/value pair found is returned. * * @param key The key for which the integer value should be returned * @param defaultValue The value to return if the key does not exist * @return The integer value for the specified key or the specified default * value if it does not exist */ |
︙ | |||
159 160 161 162 163 164 165 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + | * * If the specified key is a multi-key (see @ref arrayForKey:), the value of * the first key/value pair found is changed. * * @param integer The integer to which the value of the key should be set * @param key The key for which the new value should be set */ |
︙ |
Modified src/OFINICategory.m from [6f7f003a8d] to [4145f33ae0].
︙ | |||
205 206 207 208 209 210 211 | 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 | - - + + - + - + - - - + + - - | if ([pair->_key isEqual: key]) return [[pair->_value copy] autorelease]; } return defaultValue; } |
︙ | |||
350 351 352 353 354 355 356 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | - + - + | @throw e; } objc_autoreleasePoolPop(pool); } |
︙ |
Modified src/OFINIFileSettings.m from [9d965e74da] to [c8fa651c4c].
︙ | |||
84 85 86 87 88 89 90 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + | [[_INIFile categoryForName: category] setString: string forKey: key]; objc_autoreleasePoolPop(pool); } |
︙ | |||
182 183 184 185 186 187 188 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - - + + - + | defaultValue: defaultValue]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } |
︙ |
Modified src/OFLHAArchiveEntry.m from [9cc455c13c] to [61acef2124].
︙ | |||
123 124 125 126 127 128 129 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - + | memcpy(&mode, (char *)extension.items + 1, 2); mode = OF_BSWAP16_IF_BE(mode); [entry->_mode release]; entry->_mode = nil; |
︙ | |||
147 148 149 150 151 152 153 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - - + + | [entry->_GID release]; entry->_GID = nil; [entry->_UID release]; entry->_UID = nil; |
︙ | |||
651 652 653 654 655 656 657 | 651 652 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 | - + - + - + | if (_mode != nil) { tmp16 = OF_BSWAP16_IF_BE(5); [data addItems: &tmp16 count: sizeof(tmp16)]; [data addItem: "\x50"]; |
︙ | |||
757 758 759 760 761 762 763 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | - + | objc_autoreleasePoolPop(pool); } - (OFString *)description { void *pool = objc_autoreleasePoolPush(); OFString *mode = (_mode == nil ? nil |
︙ |
Modified src/OFLocale.m from [2f0ab9defe] to [b6b16348ac].
︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - - + + + | else if ([token isEqual: @">="]) var = [OFNumber numberWithBool: [first compare: second] != OF_ORDERED_ASCENDING]; else if ([token isEqual: @"+"]) var = [OFNumber numberWithDouble: [first doubleValue] + [second doubleValue]]; else if ([token isEqual: @"%"]) |
︙ | |||
234 235 236 237 238 239 240 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | - + + | first = stack.lastObject; if ([token isEqual: @"!"]) var = [OFNumber numberWithBool: ![first boolValue]]; else if ([token isEqual: @"is_real"]) var = [OFNumber numberWithBool: |
︙ | |||
506 507 508 509 510 511 512 | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | - + + | if (_language == nil) return; pool = objc_autoreleasePoolPush(); mapPath = [path stringByAppendingPathComponent: @"languages.json"]; @try { |
︙ | |||
530 531 532 533 534 535 536 | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 | - - + + | objc_autoreleasePoolPop(pool); return; } languageFile = [path stringByAppendingPathComponent: [languageFile stringByAppendingString: @".json"]]; |
︙ |
Modified src/OFMutableTarArchiveEntry.h from [3fa49654d2] to [2a04d96f47].
︙ | |||
34 35 36 37 38 39 40 | 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 | - + - + - + - + | * @brief The file name of the entry. */ @property (readwrite, copy, nonatomic) OFString *fileName; /*! * @brief The mode of the entry. */ |
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + - + | * @brief The group of the file. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *group; /*! * @brief The device major (if the file is a device). */ |
Modified src/OFMutableTarArchiveEntry.m from [11e44c30db] to [1fdec748d1].
︙ | |||
37 38 39 40 41 42 43 | 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 | - + - + - + - + | - (void)setFileName: (OFString *)fileName { OFString *old = _fileName; _fileName = [fileName copy]; [old release]; } |
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + - + | - (void)setGroup: (OFString *)group { OFString *old = _group; _group = [group copy]; [old release]; } |
Modified src/OFNumber.h from [8668a7987f] to [5740ff4672].
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - - - + + + | #ifndef OF_NUMBER_M OF_SUBCLASSING_RESTRICTED #endif @interface OFNumber: OFValue <OFComparing, OFSerialization, OFJSONRepresentation, OFMessagePackRepresentation> { union of_number_value { |
︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | @property (readonly, nonatomic) unsigned long unsignedLongValue; /*! * @brief The OFNumber as an `unsigned long long`. */ @property (readonly, nonatomic) unsigned long long unsignedLongLongValue; |
︙ | |||
216 217 218 219 220 221 222 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + | + (instancetype)valueWithDimension: (of_dimension_t)dimension OF_UNAVAILABLE; + (instancetype)valueWithRectangle: (of_rectangle_t)rectangle OF_UNAVAILABLE; #endif /*! * @brief Creates a new OFNumber with the specified `bool`. * |
Modified src/OFNumber.m from [57186c2c7a] to [17a849254e].
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - - - - - - - - - + + + + + + + + + - - + - - + - - + - - + - - + + + - - + - - + - - + - - + - - + - - - + + + - - + - - - + + + - - + + - + - - - + - - - + - - - - - - - - - + + + - - - - - - - - + - - - - - - - - - + + + + + + + - - - - - - - - + - + - - + - - + + - - - - - + - - - - - - + + + - - - - - + - + - - - - + + + + - - - - - - + - + - + - - + - - - + - - - + - - + - - + - - - - - - - + - + - + - - - - - - + + + + - - - - - - - - + - - - - - - - - - - - + - - - + - - - - - - - + + + + - - - - - - + - + - - - + + + + + - - + - - - - - - - + - + - + - - - - - - + + + + - - - - - - - - + - - - - - + + - - - + + + + - - + - - - - - - - - - + - - + - - - - + - + - + - - - - - + + + - - + - - + - - - - - + - - - - - + - + - - - - - - + + + + - - - - - - - - - - + | @interface OFNumberSingleton: OFNumber @end static struct { Class isa; } placeholder; |
︙ | |||
406 407 408 409 410 411 412 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 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 504 505 506 507 508 509 510 511 512 513 | - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - + - + - + - + - + - - - - + - - - + - + - + - + - + - - - - - - - - - - - + - + - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + | { if (self == [OFNumber class]) return (id)&placeholder; return [super alloc]; } |
︙ | |||
881 882 883 884 885 886 887 | 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - + + + + + + + - + - - - + + - - - - - + + | OFString *stringValue = element.stringValue; if ([stringValue isEqual: @"true"]) self = [self initWithBool: true]; else if ([stringValue isEqual: @"false"]) self = [self initWithBool: false]; else @throw [OFInvalidArgumentException exception]; |
︙ | |||
1009 1010 1011 1012 1013 1014 1015 | 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } - (unsigned long long)unsignedLongLongValue { RETURN_AS(unsigned long long) } |
︙ | |||
1122 1123 1124 1125 1126 1127 1128 | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | - + - + | return false; return (value1 == value2); } if (_type == OF_NUMBER_TYPE_SIGNED || number->_type == OF_NUMBER_TYPE_SIGNED) |
︙ | |||
1149 1150 1151 1152 1153 1154 1155 | 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | - - + + - - + + | return OF_ORDERED_DESCENDING; if (double1 < double2) return OF_ORDERED_ASCENDING; return OF_ORDERED_SAME; } else if (_type == OF_NUMBER_TYPE_SIGNED || number->_type == OF_NUMBER_TYPE_SIGNED) { |
︙ | |||
1188 1189 1190 1191 1192 1193 1194 | 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | - + - - - - - - - - - - + + - - - + + + | if (isnan(self.doubleValue)) return 0; d = OF_BSWAP_DOUBLE_IF_BE(self.doubleValue); for (uint_fast8_t i = 0; i < sizeof(double); i++) OF_HASH_ADD(hash, ((char *)&d)[i]); |
︙ | |||
1229 1230 1231 1232 1233 1234 1235 | 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | - + - + | - (OFString *)stringValue { if (*_typeEncoding == 'B') return (_value.unsigned_ ? @"true" : @"false"); if (_type == OF_NUMBER_TYPE_FLOAT) return [OFString stringWithFormat: @"%g", _value.float_]; if (_type == OF_NUMBER_TYPE_SIGNED) |
︙ | |||
1335 1336 1337 1338 1339 1340 1341 | 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | - + | data = [OFMutableData dataWithItemSize: 1 capacity: 9]; [data addItem: &type]; [data addItems: &tmp count: sizeof(tmp)]; } else if (_type == OF_NUMBER_TYPE_SIGNED) { |
︙ | |||
1384 1385 1386 1387 1388 1389 1390 | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 | - + | [data addItem: &type]; [data addItems: &tmp count: sizeof(tmp)]; } else @throw [OFOutOfRangeException exception]; } else if (_type == OF_NUMBER_TYPE_UNSIGNED) { |
︙ |
Modified src/OFSettings.h from [2c70a1f69b] to [a4eaab9bfc].
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - + | /*! * @brief Sets the specified path to the specified integer. * * @param integer The integer to set * @param path The path to store the integer at */ |
︙ | |||
146 147 148 149 150 151 152 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - - + + | * @brief Returns the integer for the specified path, or the default value if * the path does not exist. * * @param path The path for which the integer value should be returned * @param defaultValue The default value to return if the path does not exist * @return The integer value of the specified path */ |
︙ |
Modified src/OFSettings.m from [760331490f] to [5da0b0a891].
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + | - (void)setString: (OFString *)string forPath: (OFString *)path { OF_UNRECOGNIZED_SELECTOR } |
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - - + + | - (OFString *)stringForPath: (OFString *)path defaultValue: (OFString *)defaultValue { OF_UNRECOGNIZED_SELECTOR } |
︙ |
Renamed and modified src/OFString+JSONValue.h [311031a35c] to src/OFString+JSONParsing.h [bc722e0fb3].
︙ | |||
18 19 20 21 22 23 24 | 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 | - + - + - + | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN #ifdef __cplusplus extern "C" { #endif |
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 | - + | * instead check the returned object using @ref isKindOfClass:. * * @param depthLimit The maximum depth the parser should accept (defaults to 32 * if not specified, 0 means no limit (insecure!)) * * @return An object */ |
Renamed and modified src/OFString+JSONValue.m [ac798fd712] to src/OFString+JSONParsing.m [706b49d04b].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - + | #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> |
︙ | |||
524 525 526 527 528 529 530 | 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | - + | return dictionary; } static inline OFNumber * parseNumber(const char **pointer, const char *stop, size_t *line) { |
︙ | |||
553 554 555 556 557 558 559 | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | - - - + + + - - + + | length: i]; *pointer += i; @try { if (hasDecimal) number = [OFNumber numberWithDouble: string.doubleValue]; |
︙ | |||
637 638 639 640 641 642 643 | 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 | - - + + - + - + | case 'I': return parseNumber(pointer, stop, line); default: return nil; } } |
︙ |
Renamed and modified src/OFString+PropertyListValue.h [6c64f3e60f] to src/OFString+PropertyListParsing.h [e83b475868].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + - + - + | #import "OFString.h" OF_ASSUME_NONNULL_BEGIN #ifdef __cplusplus extern "C" { #endif |
Renamed and modified src/OFString+PropertyListValue.m [30b7ec9161] to src/OFString+PropertyListParsing.m [3c0b0b5b63].
︙ | |||
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 35 36 37 38 39 | - + - + | * 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" |
︙ | |||
121 122 123 124 125 126 127 | 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 | + + + + + + + + + - + + + + + + + + | { return [OFNumber numberWithDouble: element.doubleValue]; } static OFNumber * parseIntegerElement(OFXMLElement *element) { void *pool = objc_autoreleasePoolPush(); OFString *stringValue; OFNumber *ret; stringValue = element.stringValue.stringByDeletingEnclosingWhitespaces; if ([stringValue hasPrefix: @"-"]) ret = [OFNumber numberWithLongLong: stringValue.longLongValue]; else |
︙ | |||
156 157 158 159 160 161 162 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | - - + + | return parseRealElement(element); else if ([elementName isEqual: @"integer"]) return parseIntegerElement(element); else @throw [OFInvalidFormatException exception]; } |
︙ |
Modified src/OFString+Serialization.m from [49a22d9861] to [0b468db6b6].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + | @throw [OFInvalidArgumentException exception]; } version = [root attributeForName: @"version"].stringValue; if (version == nil) @throw [OFInvalidArgumentException exception]; |
︙ |
Modified src/OFString.h from [18fc9bbd71] to [7689800b1d].
︙ | |||
167 168 169 170 171 172 173 | 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 | - + - + - + - + - + - - - - - - - - - - - - - - + | * @note This only considers spaces, tabs and newlines to be word delimiters! * Also note that this might change in the future to all word delimiters * specified by Unicode! */ @property (readonly, nonatomic) OFString *capitalizedString; /*! |
︙ | |||
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 | 1008 1009 1010 1011 1012 1013 1014 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 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * @brief Creates a substring with the specified range. * * @param range The range of the substring * @return The substring as a new autoreleased OFString */ - (OFString *)substringWithRange: (of_range_t)range; /*! * @brief The value of the string in the specified base as a `long long`. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * @ref OFInvalidFormatException is thrown. * * If the number is too big to fit into a `long long`, an * @ref OFOutOfRangeException is thrown. * * @param base The base to use. If the base is 0, base 16 is assumed if the * string starts with 0x (after stripping white spaces). If the * string starts with 0, base 8 is assumed. Otherwise, base 10 is * assumed. * @return The value of the string in the specified base */ - (long long)longLongValueWithBase: (int)base; /*! * @brief The value of the string in the specified base as an * `unsigned long long`. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * @ref OFInvalidFormatException is thrown. * * If the number is too big to fit into an `unsigned long long`, an * @ref OFOutOfRangeException is thrown. * * @param base The base to use. If the base is 0, base 16 is assumed if the * string starts with 0x (after stripping white spaces). If the * string starts with 0, base 8 is assumed. Otherwise, base 10 is * assumed. * @return The value of the string in the specified base */ - (unsigned long long)unsignedLongLongValueWithBase: (int)base; /*! * @brief Creates a new string by appending another string. * * @param string The string to append * @return A new, autoreleased OFString with the specified string appended */ - (OFString *)stringByAppendingString: (OFString *)string; |
︙ | |||
1250 1251 1252 1253 1254 1255 1256 | 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 | - + - + | OF_ASSUME_NONNULL_END #include "OFConstantString.h" #include "OFMutableString.h" #ifdef __OBJC__ # import "OFString+CryptoHashing.h" |
︙ |
Modified src/OFString.m from [e1b9c425c7] to [ed5bfcb060].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + | * 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" #include <ctype.h> #include <errno.h> #include <math.h> #include <stdarg.h> #include <stdlib.h> #include <string.h> #if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L) |
︙ | |||
122 123 124 125 126 127 128 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + - + | size_t, bool); /* References for static linking */ void _references_to_categories_of_OFString(void) { _OFString_CryptoHashing_reference = 1; |
︙ | |||
986 987 988 989 990 991 992 | 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 | - + - + | encoding: OF_STRING_ENCODING_UTF_8]; } - (instancetype)initWithContentsOfFile: (OFString *)path encoding: (of_string_encoding_t)encoding { char *tmp; |
︙ | |||
2309 2310 2311 2312 2313 2314 2315 | 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 | - + - - - - + - - + - - - - - + + + - - + - - - - + + - + - - - - - + + - - - + + - - - - + - - - + + + + + - - + - - - - - + - - - - + - - + - - - - - + + + - - + - - - + - - - - - + - - - + - - - - - - + - - - - - - - - - - - - - - - - + - - - + - - - + + - - - + - - - + - - + - - - - + - - + - - - - - + + - - - - - + - - - + - - - - + - - - + - - - - - - - + - - - - - - - - - - - - + + + + + - + - - - - - - + + + + + - + | [array makeImmutable]; objc_autoreleasePoolPop(pool); return array; } |
︙ |
Modified src/OFSystemInfo.m from [0f92abda7c] to [4e15025453].
︙ | |||
148 149 150 151 152 153 154 | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - + | #if defined(OF_IOS) || defined(OF_MACOS) # ifdef OF_HAVE_FILES void *pool = objc_autoreleasePoolPush(); @try { OFDictionary *propertyList = [OFString stringWithContentsOfFile: @"/System/Library/CoreServices/SystemVersion.plist"] |
︙ |
Modified src/OFTarArchiveEntry.h from [77a315dfd8] to [c15723d4d0].
︙ | |||
49 50 51 52 53 54 55 | 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 | - - - + + + - + - + - + - + - + | * @class OFTarArchiveEntry OFTarArchiveEntry.h ObjFW/OFTarArchiveEntry.h * * @brief A class which represents an entry of a tar archive. */ @interface OFTarArchiveEntry: OFObject <OFCopying, OFMutableCopying> { OFString *_fileName; |
︙ | |||
116 117 118 119 120 121 122 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + - + | * @brief The group of the file. */ @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *group; /*! * @brief The device major (if the file is a device). */ |
︙ |
Modified src/OFTarArchiveEntry.m from [aa73e544ea] to [5e09222260].
︙ | |||
49 50 51 52 53 54 55 | 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 | - - + + + - + - - + + | memcpy(buffer, [string cStringWithEncoding: encoding], cStringLength); for (size_t i = cStringLength; i < length; i++) buffer[i] = '\0'; } |
︙ | |||
91 92 93 94 95 96 97 | 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 | - - - - - - - - + + + + + + + + - + - - - - + + + + | self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); OFString *targetFileName; _fileName = [stringFromBuffer(header, 100, encoding) copy]; |
︙ | |||
204 205 206 207 208 209 210 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + - + - + - + | } - (OFString *)fileName { return _fileName; } |
︙ | |||
249 250 251 252 253 254 255 | 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + - + | } - (OFString *)group { return _group; } |
︙ | |||
290 291 292 293 294 295 296 | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - + - + | return [ret autorelease]; } - (void)of_writeToStream: (OFStream *)stream encoding: (of_string_encoding_t)encoding { unsigned char buffer[512]; |
︙ |
Modified src/OFURL.m from [2524e037d6] to [a6ef5631a2].
︙ | |||
484 485 486 487 488 489 490 | 484 485 486 487 488 489 490 491 492 493 494 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 | - + - - + + - + - - + + | } portString = [OFString stringWithUTF8String: tmp2 length: UTF8String - tmp2]; if (portString.length == 0 || |
︙ |
Modified src/OFXMLNode.h from [d1608da1d3] to [fb7dfbb539].
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + - + - + | * * For an @ref OFXMLElement, setting it removes all children and creates a * single child with the specified string value. */ @property (nonatomic, copy) OFString *stringValue; /*! |
︙ | |||
85 86 87 88 89 90 91 92 93 94 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + | * @param indentation The indentation for the XML string * @param level The level of indentation * @return An OFString representing the OFXMLNode as an XML string with * indentation */ - (OFString *)XMLStringWithIndentation: (unsigned int)indentation level: (unsigned int)level; /*! * @brief The contents of the receiver as a `long long` value in the specified * base. * * @param base The base to use. If the base is 0, base 16 is assumed if the * string starts with 0x (after stripping white spaces). If the * string starts with 0, base 8 is assumed. Otherwise, base 10 is * assumed. * @return The contents of the receiver as a `long long` value in the specified * base */ - (long long)longLongValueWithBase: (int)base; /*! * @brief The contents of the receiver as an `unsigned long long` value in the * specified base. * * @param base The base to use. If the base is 0, base 16 is assumed if the * string starts with 0x (after stripping white spaces). If the * string starts with 0, base 8 is assumed. Otherwise, base 10 is * assumed. * @return The contents of the receiver as an `unsigned long long` value in the * specified base */ - (unsigned long long)unsignedLongLongValueWithBase: (int)base; @end OF_ASSUME_NONNULL_END |
Modified src/OFXMLNode.m from [8f7acafb9c] to [089c365f8a].
︙ | |||
42 43 44 45 46 47 48 | 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 | - + - + + + + + - + + - + + + + + + | } - (void)setStringValue: (OFString *)stringValue { OF_UNRECOGNIZED_SELECTOR } |
︙ |
Modified src/bridge/Info.plist.in from [8dcff1a319] to [41c8e4dc54].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleExecutable</key> <string>ObjFWBridge</string> <key>CFBundleName</key> <string>ObjFWBridge</string> <key>CFBundleIdentifier</key> |
Added src/runtime/Info.plist.in version [0388a9733c].
|
Modified src/runtime/Makefile from [578f05e231] to [0941bab434].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + | include ../../extra.mk SUBDIRS = lookup-asm SUBDIRS_AFTER = ${LINKLIB} CLEAN = amiga-library-functable.inc inline.h DISTCLEAN = Info.plist SHARED_LIB = ${OBJFWRT_SHARED_LIB} STATIC_LIB = ${OBJFWRT_STATIC_LIB} FRAMEWORK = ${OBJFWRT_FRAMEWORK} AMIGA_LIB = ${OBJFWRT_AMIGA_LIB} LIB_MAJOR = ${OBJFWRT_LIB_MAJOR} LIB_MINOR = ${OBJFWRT_LIB_MINOR} |
︙ |
Modified src/socket.m from [fb89efec65] to [0757bca949].
︙ | |||
372 373 374 375 376 377 378 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | - + - + - + - + - + | if (components.count != 4) @throw [OFInvalidFormatException exception]; addr = 0; for (OFString *component in components) { |
︙ |
Modified tests/Info.plist.in from [f12e2c6ff1] to [90a9f008a2].
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + - + | <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleVersion</key> |
︙ |
Modified tests/Makefile from [5e05094c6b] to [198bd5cd10].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + - | include ../extra.mk SUBDIRS = ${TESTPLUGIN} CLEAN = EBOOT.PBP \ boot.dol \ ${PROG_NOINST}.arm9 \ ${PROG_NOINST}.nds DISTCLEAN = Info.plist PROG_NOINST = tests${PROG_SUFFIX} STATIC_LIB_NOINST = ${TESTS_STATIC_LIB} SRCS = ForwardingTests.m \ OFASN1DERParsingTests.m \ OFASN1DERRepresentationTests.m \ |
︙ |
Renamed and modified tests/OFASN1DERValueTests.m [668efc201f] to tests/OFASN1DERParsingTests.m [dd4c3da7d2].
︙ | |||
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 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + - - + + + - + - + - - + + + - - + + + - - + + + - - + + + + - + + - + + - + + - + + - - - - - + + + + + + - - + + + - - + + + - - + + + - + - - + + + - + - + - + - + - - + + + - - + + + - + - - + + + - - - + + + + - - - - + + + + - - + - + - - + + + + - + - - + + + - + - - + + - + - - + + - + - - + + - + - - - - - - - + + + + + + + - - + + + - - + + + - + - - + + + - + + - + + + - + - + + + - - - - - + + + + + + - - + + + - - + + + - - + + + - + - - + + + - - + + - - - - + + + + + - + - - + + + - - + + + - - + + + - + - + - + - + - - + + + - + - + - + - + - + - - + + + - + - - + + + - - - - + + + + - + - + - - + + + - - + + - - - - + + + + + - + - + - - + + + - - + + - - - - + + + + + - + - + - - + + + | * file. */ #include "config.h" #import "TestsAppDelegate.h" |
Modified tests/OFArrayTests.m from [52ca507d81] to [650205073d].
︙ | |||
418 419 420 421 422 423 424 | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | - - + + - + | return left; }]) #endif TEST(@"-[valueForKey:]", [[[arrayClass arrayWithObjects: @"foo", @"bar", @"quxqux", nil] valueForKey: @"length"] isEqual: |
︙ |
Modified tests/OFDictionaryTests.m from [f19c5b9455] to [a25483183f].
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | - + | [[mutDict objectForKey: keys[0]] isEqual: values[0]] && [[mutDict objectForKey: keys[1]] isEqual: values[1]] && [mutDict objectForKey: @"key3"] == nil) TEST(@"-[valueForKey:]", [[mutDict valueForKey: keys[0]] isEqual: values[0]] && [[mutDict valueForKey: @"@count"] isEqual: |
︙ |
Modified tests/OFJSONTests.m from [9395f43f69] to [dda895677f].
︙ | |||
34 35 36 37 38 39 40 | 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 | - + - - - - - - - - + + + + + + + + - + - + - + - + | [OFNumber numberWithInt: 0xF], [OFNull null], @"foo", [OFNumber numberWithBool: false], nil], nil]; |
Modified tests/OFNumberTests.m from [dde130d271] to [ccb8cb8682].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - + + - + | @implementation TestsAppDelegate (OFNumberTests) - (void)numberTests { void *pool = objc_autoreleasePoolPush(); OFNumber *num; |
Modified tests/OFPropertyListTests.m from [709f5222a8] to [0566a8c454].
︙ | |||
66 67 68 69 70 71 72 | 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 | - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + + - + - + + | [OFDate dateWithTimeIntervalSince1970: 1521030896], [OFNumber numberWithBool: true], [OFNumber numberWithBool: false], [OFNumber numberWithFloat: 12.25], [OFNumber numberWithInt: -10], nil]; |
Modified tests/OFSetTests.m from [5ad06a7715] to [1aa6d32b7b].
︙ | |||
274 275 276 277 278 279 280 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | - - + + - + | } TEST(@"Detection of mutation during Fast Enumeration", ok); TEST(@"-[valueForKey:]", [(set1 = [[setClass setWithObjects: @"a", @"ab", @"abc", @"b", nil] valueForKey: @"length"]) isEqual: [setClass setWithObjects: |
︙ |
Modified tests/OFStringTests.m from [bf0332c491] to [1ca0b0e0e8].
︙ | |||
1065 1066 1067 1068 1069 1070 1071 | 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 | - - - - - - + + + + + + + - - - - - - - + + + + + - - - - + + + + + + + + + + | [C(@"\\\\foo\\..\\bar\\qux").stringByStandardizingPath isEqual: @"\\\\bar\\qux"] && [C(@"c:\\..\\asd").stringByStandardizingPath isEqual: @"c:\\..\\asd"]) # endif #endif |
︙ | |||
1105 1106 1107 1108 1109 1110 1111 | 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | - + - - - - - - + + + + + + - - + - - - + - - - - + + + | #else /* Android, Solaris, DJGPP and AmigaOS3 do not accept 0x for strtod() */ # if (!defined(OF_SOLARIS) || !defined(OF_X86)) && !defined(OF_AMIGAOS_M68K) # define INPUT @"\t-0.123456789 " # define EXPECTED -0.123456789 # else /* |
︙ | |||
1162 1163 1164 1165 1166 1167 1168 | 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 | - + - + - + - + - + | * Only do this if we have strtod_l, as the locale might allow the * comma. */ EXPECT_EXCEPTION(@"Detect invalid chars in -[doubleValue] #3", OFInvalidFormatException, [C(@"0,0") doubleValue]) #endif |
︙ |
Modified tests/OFURLTests.m from [8b6c1d8b68] to [52cea266a3].
︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | - - + + - | TEST(@"-[user]", [u1.user isEqual: @"us:er"] && u4.user == nil) TEST(@"-[password]", [u1.password isEqual: @"p@w"] && u4.password == nil) TEST(@"-[host]", [u1.host isEqual: @"ho:st"] && [u6.host isEqual: @"12:34::56:abcd"] && [u7.host isEqual: @"12:34::56:abcd"]) |
︙ |
Modified tests/TestsAppDelegate.h from [9cb5b35481] to [0e4b40ac71].
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - - + + | inModule: (OFString *)module; - (void)outputSuccess: (OFString *)test inModule: (OFString *)module; - (void)outputFailure: (OFString *)test inModule: (OFString *)module; @end |
︙ |
Modified tests/TestsAppDelegate.m from [3cf677c3a1] to [6a1c29e396].
︙ | |||
376 377 378 379 380 381 382 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | - + | [self XMLNodeTests]; [self XMLElementBuilderTests]; #ifdef OF_HAVE_FILES [self serializationTests]; #endif [self JSONTests]; [self propertyListTests]; |
︙ |
Modified tests/iOS.xcodeproj/project.pbxproj from [f9b1054ae0] to [feb9f04764].
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - + - + | INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", ); OTHER_LDFLAGS = "-ObjC"; |
︙ |
Modified tests/plugin/Info.plist.in from [e94bac378f] to [bbe65d4bbd].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleExecutable</key> <string>TestPlugin</string> <key>CFBundleName</key> <string>TestPlugin</string> <key>CFBundleIdentifier</key> |
Modified tests/serialization.xml from [904cd48eb0] to [c1b84078b7].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + | <object> <OFString>data</OFString> </object> <key> <OFArray> <OFString>Qu"xbar test</OFString> |
︙ |
Modified utils/ofarc/LHAArchive.m from [b717d78c4a] to [da084987c7].
︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + + + | setPermissions(OFString *path, OFLHAArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS OFNumber *mode = entry.mode; if (mode == nil) return; mode = [OFNumber numberWithUnsignedShort: mode.unsignedShortValue & 0777]; of_file_attributes_t attributes = [OFDictionary dictionaryWithObject: mode forKey: of_file_attribute_key_posix_permissions]; [[OFFileManager defaultManager] setAttributes: attributes ofItemAtPath: path]; |
︙ | |||
141 142 143 144 145 146 147 | 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 | - - - - - - - + + + + + + + - - - - - - - + + + + + + + - + | @"%" PRIu32, entry.uncompressedSize]; OFString *CRC16 = [OFString stringWithFormat: @"%04" PRIX16, entry.CRC16]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( @"list_compressed_size", |
︙ | |||
465 466 467 468 469 470 471 | 468 469 470 471 472 473 474 475 476 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 | - + - + - + + - + | @"file", fileName)]; attributes = [fileManager attributesOfItemAtPath: fileName]; type = attributes.fileType; entry = [OFMutableLHAArchiveEntry entryWithFileName: fileName]; #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS |
︙ |
Modified utils/ofarc/TarArchive.m from [ed61f78528] to [3ca97fcaef].
︙ | |||
31 32 33 34 35 36 37 38 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + - + | static OFArc *app; static void setPermissions(OFString *path, OFTarArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS OFNumber *mode = [OFNumber numberWithUnsignedShort: entry.mode & 0777]; of_file_attributes_t attributes = [OFDictionary |
︙ | |||
122 123 124 125 126 127 128 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - - - - - - - + + + + + + + | OFString *UID = [OFString stringWithFormat: @"%u", entry.UID]; OFString *GID = [OFString stringWithFormat: @"%u", entry.GID]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED(@"list_size", |
︙ |
Modified utils/ofarc/ZIPArchive.m from [251b5d4973] to [4b4d3715d0].
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | + - + - + | static void setPermissions(OFString *path, OFZIPArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS if ((entry.versionMadeBy >> 8) == OF_ZIP_ARCHIVE_ENTRY_ATTR_COMPAT_UNIX) { OFNumber *mode = [OFNumber numberWithUnsignedShort: |
︙ | |||
134 135 136 137 138 139 140 | 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 | - - - - - - - + + + + + + + - - - - - - - + + + + + + + | stringWithFormat: @"%08" PRIX32, entry.CRC32]; OFString *modificationDate = [entry.modificationDate localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED( @"list_compressed_size", |
︙ | |||
417 418 419 420 421 422 423 | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | - + | for (OFString *localFileName in files) { void *pool = objc_autoreleasePoolPush(); OFArray OF_GENERIC (OFString *) *components; OFString *fileName; of_file_attributes_t attributes; bool isDirectory = false; OFMutableZIPArchiveEntry *entry; |
︙ | |||
454 455 456 457 458 459 460 | 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | - + | entry.modificationDate = attributes.fileModificationDate; [entry makeImmutable]; output = [_archive streamForWritingEntry: entry]; if (!isDirectory) { |
︙ |
Modified utils/ofhttp/OFHTTP.m from [da5c2f66e5] to [d4c7821db4].
︙ | |||
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 39 40 | + + + | #import "OFFile.h" #import "OFFileManager.h" #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFLocale.h" #import "OFOptionsParser.h" #ifdef OF_HAVE_PLUGINS # import "OFPlugin.h" #endif #import "OFSandbox.h" #import "OFStdIOStream.h" #import "OFSystemInfo.h" #import "OFTCPSocket.h" #import "OFTLSSocket.h" #import "OFURL.h" |
︙ | |||
65 66 67 68 69 70 71 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + | bool _detectedFileName, _quiet, _verbose, _insecure; OFStream *_body; of_http_request_method_t _method; OFMutableDictionary *_clientHeaders; OFHTTPClient *_HTTPClient; char *_buffer; OFStream *_output; |
︙ | |||
270 271 272 273 274 275 276 277 278 279 280 281 282 283 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | + + + + + + + + + + + | [fileName retain]; objc_autoreleasePoolPop(pool); return [fileName autorelease]; } @implementation OFHTTP #ifdef OF_HAVE_PLUGINS + (void)initialize { if (self != [OFHTTP class]) return; /* Opportunistically try loading ObjOpenSSL and ignore any errors. */ of_dlopen(@"objopenssl", OF_RTLD_LAZY); } #endif - (instancetype)init { self = [super init]; @try { _method = OF_HTTP_REQUEST_METHOD_GET; |
︙ | |||
330 331 332 333 334 335 336 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | + - + | if ([path isEqual: @"-"]) _body = [of_stdin copy]; else { _body = [[OFFile alloc] initWithPath: path mode: @"r"]; @try { unsigned long long fileSize = |
︙ | |||
372 373 374 375 376 377 378 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | - + - - + + | - (void)setProxy: (OFString *)proxy { @try { size_t pos = [proxy rangeOfString: @":" options: OF_STRING_SEARCH_BACKWARDS].location; OFString *host; |
︙ | |||
717 718 719 720 721 722 723 | 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | - - + + + + + | OFString *URL; [_progressBar stop]; [_progressBar draw]; [_progressBar release]; _progressBar = nil; |
︙ | |||
781 782 783 784 785 786 787 | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | - + | [of_stdout writeFormat: @" ➜ %d\n", statusCode]; if (type == nil) type = OF_LOCALIZED(@"type_unknown", @"unknown"); if (lengthString != nil) { |
︙ | |||
808 809 810 811 812 813 814 | 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 | - - - - - - + + + + + + | lengthString = OF_LOCALIZED(@"size_kib", @"%[num] KiB", @"num", lengthString); } else { lengthString = [OFString stringWithFormat: @"%jd", _resumedFrom + _length]; lengthString = OF_LOCALIZED(@"size_bytes", |
︙ | |||
1006 1007 1008 1009 1010 1011 1012 | 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | + - + - + - + | _currentFileName = [_outputPath copy]; if (_currentFileName == nil) _currentFileName = [URL.path.lastPathComponent copy]; if (_continue) { @try { unsigned long long size = |
︙ |
Modified utils/ofhttp/ProgressBar.h from [5832428778] to [187685081a].
︙ | |||
15 16 17 18 19 20 21 22 23 24 | 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 | + + - + + + - - - + + + | * file. */ #import "OFObject.h" @class OFDate; @class OFTimer; #define BPS_WINDOW_SIZE 10 @interface ProgressBar: OFObject { |
Modified utils/ofhttp/ProgressBar.m from [813833df71] to [814de8c246].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - + + | #define GIBIBYTE (1024 * 1024 * 1024) #define MEBIBYTE (1024 * 1024) #define KIBIBYTE (1024) #define UPDATE_INTERVAL 0.1 @implementation ProgressBar |
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + | [_lastReceivedDate release]; [_drawTimer release]; [_BPSTimer release]; [super dealloc]; } |
︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | - - - - - - + + + + + + | [of_stdout writeString: OF_LOCALIZED(@"progress_kib", @"%[num] KiB", @"num", num)]; } else { OFString *num = [OFString stringWithFormat: @"%jd", _resumedFrom + _received]; [of_stdout writeString: OF_LOCALIZED(@"progress_bytes", |
︙ | |||
252 253 254 255 256 257 258 | 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 | + - + + + + + + + + + + | [self _drawProgress]; else [self _drawReceived]; } - (void)calculateBPSAndETA { _BPSWindow[_BPSWindowIndex++ % BPS_WINDOW_SIZE] = |
︙ |
Modified utils/ofhttp/lang/de.json from [ef4298a3ca] to [ccf7a0ea89].
︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | + | "%[prog]: Fehler beim Download von <%[url]>!\n", " %[error]: %[exception]" ], "download_failed": [ "%[prog]: Fehler beim Download von <%[url]>!\n", " HTTP Status-Code: %[code]" ], "download_error": "Fehler!", "download_failed_exception": [ "%[prog]: Fehler beim Download von <%[url]>!\n", " %[exception]" ], "download_done": "Fertig!", "invalid_url": "%[prog]: Ungültige URL: <%[url]>!", "invalid_scheme": "%[prog]: Ungültiges Schema: <%[url]>!", |
︙ |
Modified utils/ofsock/OFSock.m from [0c75e9be8d] to [9ce3b460c5].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | if (URL.port == nil) { [of_stderr writeLine: @"Need a port!"]; [OFApplication terminateWithStatus: 1]; } [sock connectToHost: URL.host |
︙ |