Changes In Branch new-naming-convention Through [795618c69f] Excluding Merge-Ins
This is equivalent to a diff from 27002f2efe to 795618c69f
2021-04-25
| ||
11:29 | Change the naming convention check-in: 2b74ff13b0 user: js tags: trunk | |
2021-04-17
| ||
05:45 | Rename all types in OFList check-in: 5b57beeba6 user: js tags: new-naming-convention | |
05:28 | Rename all types in OFTarArchive(Entry).h check-in: 795618c69f user: js tags: new-naming-convention | |
05:22 | Rename of_options_parser_option_t check-in: 91daa42649 user: js tags: new-naming-convention | |
00:59 | Merge trunk into branch "new-naming-convention" check-in: b57126a21e user: js tags: new-naming-convention | |
00:57 | OFNumber: Remove useless OF_UNAVAILABLE check-in: 27002f2efe user: js tags: trunk | |
2021-04-13
| ||
21:43 | Simplify OFValue check-in: e41940c022 user: js tags: trunk | |
Modified generators/unicode/TableGenerator.h from [75d0d664b0] to [d50b4bdc88].
︙ | |||
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 | - - - - + + + + | @class OFString; @interface TableGenerator: OFObject <OFApplicationDelegate, OFHTTPClientDelegate> { OFHTTPClient *_HTTPClient; |
︙ |
Modified generators/unicode/TableGenerator.m from [4d33b76d8d] to [a801b746a9].
︙ | |||
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - + - + - + - + - + - + - + | OFHTTPRequest *request; [of_stdout writeString: @"Parsing UnicodeData.txt…"]; while ((line = [response readLine]) != nil) { void *pool2; OFArray OF_GENERIC(OFString *) *components; |
︙ | |||
178 179 180 181 182 183 184 | 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 | - + - + - + - + - + | OFString *line; [of_stdout writeString: @"Parsing CaseFolding.txt…"]; while ((line = [response readLine]) != nil) { void *pool2; OFArray OF_GENERIC(OFString *) *components; |
︙ | |||
291 292 293 294 295 296 297 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | OFFile *file = [OFFile fileWithPath: path mode: @"w"]; [file writeString: COPYRIGHT @"#include \"config.h\"\n" @"\n" @"#import \"OFString.h\"\n\n" |
︙ | |||
508 509 510 511 512 513 514 | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - + - + | [file writeString: @"};\n\n"]; objc_autoreleasePoolPop(pool2); } } /* Write decompCompatPage%u if it does NOT match decompositionPage%u */ |
︙ | |||
537 538 539 540 541 542 543 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | - + | if (!isEmpty) { void *pool2 = objc_autoreleasePoolPush(); [file writeFormat: @"static const char *const " @"decompCompatPage%u[0x100] = {\n", i >> 8]; |
︙ | |||
584 585 586 587 588 589 590 | 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 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | - + - + - + - + - + - + - + - + | _lowercaseTableSize++; _titlecaseTableSize++; _casefoldingTableSize++; _decompositionTableSize++; _decompositionCompatTableSize++; /* Write of_unicode_uppercase_table */ |
︙ | |||
676 677 678 679 680 681 682 | 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | - + | [file writeString: @"\n};\n\n"]; /* Write of_unicode_decomposition_table */ [file writeFormat: @"const char *const " @"*of_unicode_decomposition_table[0x%X] = {\n\t", _decompositionTableSize]; |
︙ | |||
698 699 700 701 702 703 704 | 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | - + | /* Write of_unicode_decomposition_compat_table */ [file writeFormat: @"const char *const " @"*of_unicode_decomposition_compat_table[0x%X] = {" @"\n\t", _decompositionCompatTableSize]; |
︙ | |||
743 744 745 746 747 748 749 | 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | - + - + - + - + | _casefoldingTableSize, _decompositionTableSize, _decompositionCompatTableSize]; [file writeString: @"#ifdef __cplusplus\n" @"extern \"C\" {\n" @"#endif\n" |
︙ |
Modified src/Makefile from [06838b11b3] to [45115139e9].
︙ | |||
177 178 179 180 181 182 183 | 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 | - - + + | ${USE_INCLUDES_ATOMIC} SRCS += OFAdjacentArray.m \ OFAdjacentSubarray.m \ OFBitSetCharacterSet.m \ OFBytesValue.m \ OFCountedMapTableSet.m \ |
︙ |
Modified src/OFAdjacentArray.m from [0ad6ceaf6f] to [6b135eb930].
︙ | |||
202 203 204 205 206 207 208 | 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 | - + - + - + - + - + - + | } - (id)objectAtIndexedSubscript: (size_t)idx { return *((id *)[_array itemAtIndex: idx]); } |
︙ | |||
312 313 314 315 316 317 318 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | - + | OF_HASH_ADD_HASH(hash, [objects[i] hash]); OF_HASH_FINALIZE(hash); return hash; } |
︙ | |||
338 339 340 341 342 343 344 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - + | state->itemsPtr = (id *)_array.items; state->mutationsPtr = (unsigned long *)self; return (int)count; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFAdjacentSubarray.m from [738b4fad30] to [188174c31a].
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + | if (![objects[i] isEqual: otherObjects[i]]) return false; return true; } #ifdef OF_HAVE_BLOCKS |
Modified src/OFApplication.m from [19384c303e] to [a312b9ee7c].
︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + | @try { _environment = [[OFMutableDictionary alloc] init]; atexit(atexitHandler); #if defined(OF_WINDOWS) if ([OFSystemInfo isWindowsNT]) { |
︙ | |||
243 244 245 246 247 248 249 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - + | */ if ([tmp hasPrefix: @"="]) { objc_autoreleasePoolPop(pool); continue; } pos = [tmp rangeOfString: @"="].location; |
︙ | |||
285 286 287 288 289 290 291 | 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 | - + - + | */ if ([tmp hasPrefix: @"="]) { objc_autoreleasePoolPop(pool); continue; } pos = [tmp rangeOfString: @"="].location; |
︙ | |||
372 373 374 375 376 377 378 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | - - + | # ifndef OF_MACOS char **env = environ; # else char **env = *_NSGetEnviron(); # endif if (env != NULL) { |
︙ | |||
464 465 466 467 468 469 470 | 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | - + | [super dealloc]; } - (void)of_setArgumentCount: (int *)argc andArgumentValues: (char ***)argv { void *pool = objc_autoreleasePoolPush(); OFMutableArray *arguments; |
︙ | |||
603 604 605 606 607 608 609 | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | - + | } #ifdef OF_HAVE_SANDBOX - (void)of_activateSandbox: (OFSandbox *)sandbox { # ifdef OF_HAVE_PLEDGE void *pool = objc_autoreleasePoolPush(); |
︙ |
Modified src/OFArray.h from [702817f9c0] to [091ccdd3f4].
︙ | |||
31 32 33 34 35 36 37 | 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 | + + + + + - - - + + + + + - + + + - + - - + - + - + | OF_ASSUME_NONNULL_BEGIN /** @file */ @class OFString; /** * @brief Options for joining the objects of an array. * * This is a bit mask. */ |
︙ | |||
266 267 268 269 270 271 272 | 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 | - + - + - + - + - + | /** * @brief Copies the objects at the specified range to the specified buffer. * * @param buffer The buffer to copy the objects to * @param range The range to copy */ - (void)getObjects: (ObjectType __unsafe_unretained _Nonnull *_Nonnull)buffer |
︙ | |||
313 314 315 316 317 318 319 | 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 | - + - + - - - - - + - + - - - - - + | /** * @brief Returns the objects in the specified range as a new OFArray. * * @param range The range for the subarray * @return The subarray as a new autoreleased OFArray */ |
︙ | |||
389 390 391 392 393 394 395 | 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 | - + - - - - - - + + + - + - - - - - - + + | /** * @brief Returns a copy of the array sorted using the specified selector and * options. * * @param selector The selector to use to sort the array. It's signature * should be the same as that of -[compare:]. |
︙ | |||
448 449 450 451 452 453 454 | 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 | - + - + - + - + | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each object. * * @param block The block to execute for each object */ |
︙ |
Modified src/OFArray.m from [f6ae42a2d9] to [6fa2c5536f].
︙ | |||
224 225 226 227 228 229 230 | 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 | - + - + | } - (size_t)count { OF_UNRECOGNIZED_SELECTOR } |
︙ | |||
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 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 | - + - + - + - + - + - + - + | } - (size_t)indexOfObject: (id)object { size_t i = 0; if (object == nil) |
︙ | |||
391 392 393 394 395 396 397 | 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 | - + - + | { return [self componentsJoinedByString: separator usingSelector: @selector(description) options: 0]; } - (OFString *)componentsJoinedByString: (OFString *)separator |
︙ | |||
430 431 432 433 434 435 436 | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - + | @throw [OFInvalidArgumentException exception]; return component; } ret = [OFMutableString string]; |
︙ | |||
710 711 712 713 714 715 716 | 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 | - + - - + + - + - + | OFMutableArray *new = [[self mutableCopy] autorelease]; [new sort]; [new makeImmutable]; return new; } - (OFArray *)sortedArrayUsingSelector: (SEL)selector |
︙ | |||
768 769 770 771 772 773 774 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | - + | - (OFEnumerator *)objectEnumerator { return [[[OFArrayEnumerator alloc] initWithArray: self mutationsPtr: NULL] autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
814 815 816 817 818 819 820 | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 | - + - + | OFMutableArray *ret = [[self mutableCopy] autorelease]; [ret removeObject: object]; [ret makeImmutable]; return ret; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
857 858 859 860 861 862 863 | 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 | - + | } @finally { free(tmp); } return ret; } |
︙ |
Modified src/OFBitSetCharacterSet.m from [54df15f988] to [7f7124f1b9].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - + | - (instancetype)initWithCharactersInString: (OFString *)string { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + | - (void)dealloc { free(_bitset); [super dealloc]; } |
Modified src/OFCharacterSet.h from [213677c26a] to [718ebc3831].
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + | /** * @brief Creates a new character set containing the characters in the specified * range. * * @param range The range of characters for the character set * @return A new OFCharacterSet */ |
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - + - + | /** * @brief Initializes an already allocated character set with the characters in * the specified range. * * @param range The range of characters for the character set * @return An initialized OFCharacterSet */ |
Modified src/OFCharacterSet.m from [e06618edef] to [caa2e9d748].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + | - (instancetype)initWithCharactersInString: (OFString *)characters { return (id)[[OFBitSetCharacterSet alloc] initWithCharactersInString: characters]; } |
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + | + (instancetype)characterSetWithCharactersInString: (OFString *)characters { return [[[self alloc] initWithCharactersInString: characters] autorelease]; } |
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - + - + | } - (instancetype)initWithCharactersInString: (OFString *)characters { OF_INVALID_INIT_METHOD } |
︙ | |||
167 168 169 170 171 172 173 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - + | } - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } |
︙ |
Modified src/OFCondition.h from [7e6ce2a6b1] to [24d692e490].
︙ | |||
68 69 70 71 72 73 74 | 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 | - + - + | * * @note Waiting might have been interrupted by a signal. It is thus recommended * to check the condition again after @ref waitForTimeInterval: returned! * * @param timeInterval The time interval until the timeout is reached * @return Whether the condition has been signaled */ |
︙ |
Modified src/OFCondition.m from [a2bba1aee6] to [4b58a9908d].
︙ | |||
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 104 105 106 107 108 109 110 111 112 | - + - + | if (error != 0) @throw [OFConditionWaitFailedException exceptionWithCondition: self errNo: error]; } #endif |
︙ |
Modified src/OFConstantString.m from [b52e6a55a7] to [c17936e454].
︙ | |||
175 176 177 178 179 180 181 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + | - (id)mutableCopy { [self finishInitialization]; return [self mutableCopy]; } /* From protocol OFComparing, but overridden in OFString */ |
︙ | |||
209 210 211 212 213 214 215 | 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 | - + - + - + - + - + - + - + - + + - - - + + + - + - - + + | { [self finishInitialization]; return self.UTF8String; } - (size_t)getCString: (char *)cString_ maxLength: (size_t)maxLength |
︙ | |||
320 321 322 323 324 325 326 | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | - + | - (OFString *)substringToIndex: (size_t)idx { [self finishInitialization]; return [self substringToIndex: idx]; } |
︙ | |||
362 363 364 365 366 367 368 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - + | return [self stringByReplacingOccurrencesOfString: string withString: replacement]; } - (OFString *)stringByReplacingOccurrencesOfString: (OFString *)string withString: (OFString *)replacement options: (int)options |
︙ | |||
426 427 428 429 430 431 432 | 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 | - + - + | - (OFArray *)componentsSeparatedByString: (OFString *)delimiter { [self finishInitialization]; return [self componentsSeparatedByString: delimiter]; } - (OFArray *)componentsSeparatedByString: (OFString *)delimiter |
︙ | |||
502 503 504 505 506 507 508 | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | - + - + - + - + - + - + | - (double)doubleValue { [self finishInitialization]; return self.doubleValue; } |
︙ | |||
573 574 575 576 577 578 579 | 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 | - + - + - + | #ifdef OF_HAVE_FILES - (void)writeToFile: (OFString *)path { [self finishInitialization]; [self writeToFile: path]; } |
Modified src/OFCountedMapTableSet.m from [1688e99723] to [00546e8e62].
︙ | |||
165 166 167 168 169 170 171 | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | - + - | - (size_t)countForObject: (id)object { return (size_t)(uintptr_t)[_mapTable objectForKey: object]; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFCountedSet.h from [d5fbc7df8a] to [aa07eb172d].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | * @brief A block for enumerating an OFCountedSet. * * @param object The current object * @param count The count of the object * @param stop A pointer to a variable that can be set to true to stop the * enumeration */ |
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - + - | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each object in the set. * * @param block The block to execute for each object in the set */ |
Modified src/OFCountedSet.m from [d6c7218230] to [fe3c7716dc].
︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - + - | objc_autoreleasePoolPop(pool); return [element autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFDNSResolver.h from [c467730d8f] to [85f077e644].
︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + | */ @property (copy, nonatomic) OFArray OF_GENERIC(OFString *) *searchDomains; /** * @brief The timeout, in seconds, after which the next name server should be * tried. */ |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + | @property (nonatomic) bool usesTCP; /** * @brief The interval in seconds in which the config should be reloaded. * * Setting this to 0 disables config reloading. */ |
︙ | |||
214 215 216 217 218 219 220 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | - + | * @brief Asynchronously performs the specified query. * * @param query The query to perform * @param runLoopMode The run loop mode in which to resolve * @param delegate The delegate to use for callbacks */ - (void)asyncPerformQuery: (OFDNSQuery *)query |
︙ | |||
247 248 249 250 251 252 253 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + | * @param host The host to resolve * @param addressFamily The desired socket address family * @param runLoopMode The run loop mode in which to resolve * @param delegate The delegate to use for callbacks */ - (void)asyncResolveAddressesForHost: (OFString *)host addressFamily: (of_socket_address_family_t)addressFamily |
︙ |
Modified src/OFDNSResolver.m from [536c83ec11] to [ad1a046297].
︙ | |||
643 644 645 646 647 648 649 | 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | - + - + | - (void)setSearchDomains: (OFArray *)searchDomains { OFArray *old = _settings->_searchDomains; _settings->_searchDomains = [searchDomains copy]; [old release]; } |
︙ | |||
685 686 687 688 689 690 691 | 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 710 | - + - + - + | } - (void)setUsesTCP: (bool)usesTCP { _settings->_usesTCP = usesTCP; } |
︙ | |||
782 783 784 785 786 787 788 | 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | - + - + | runLoopMode: runLoopMode]; } - (void)asyncPerformQuery: (OFDNSQuery *)query delegate: (id <OFDNSResolverQueryDelegate>)delegate { [self asyncPerformQuery: query |
︙ | |||
825 826 827 828 829 830 831 | 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | - + | [self of_sendQueryForContext: context runLoopMode: runLoopMode]; objc_autoreleasePoolPop(pool); } - (void)of_contextTimedOut: (OFDNSResolverContext *)context { |
︙ | |||
934 935 936 937 938 939 940 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 | - + | /* Opcode */ if ((buffer[2] & 0x78) != (queryDataBuffer[2] & 0x78)) @throw [OFInvalidServerReplyException exception]; /* TC */ if (buffer[2] & 0x02) { |
︙ | |||
977 978 979 980 981 982 983 | 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 | - + | tryNextNameServer = true; break; } if (tryNextNameServer) { if (context->_nameServersIndex + 1 < context->_settings->_nameServers.count) { |
︙ | |||
1178 1179 1180 1181 1182 1183 1184 | 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 | - + - + - + | } - (void)asyncResolveAddressesForHost: (OFString *)host delegate: (id <OFDNSResolverHostDelegate>)delegate { [self asyncResolveAddressesForHost: host addressFamily: OF_SOCKET_ADDRESS_FAMILY_ANY |
︙ |
Modified src/OFDNSResolverSettings.h from [f96b5d98db] to [e160ff7316].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - + | { @public OFDictionary OF_GENERIC(OFString *, OFArray OF_GENERIC(OFString *) *) *_staticHosts; OFArray OF_GENERIC(OFString *) *_nameServers; OFString *_Nullable _localDomain; OFArray OF_GENERIC(OFString *) *_searchDomains; |
Modified src/OFDNSResolverSettings.m from [a893fa1b35] to [b173bc8c7c].
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | * We can't use that as local domain. */ return nil; } @catch (OFInvalidFormatException *e) { /* Not an IP address -> we can use it if it contains a dot. */ size_t pos = [hostname rangeOfString: @"."].location; |
︙ | |||
171 172 173 174 175 176 177 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | - + | static OFArray OF_GENERIC(OFString *) * parseNetStackArray(OFString *string) { if (![string hasPrefix: @"["] || ![string hasSuffix: @"]"]) return nil; |
︙ | |||
263 264 265 266 267 268 269 | 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 | - + - + - + | while ((line = [file readLine]) != nil) { OFArray *components, *hosts; size_t pos; OFString *address; pos = [line rangeOfString: @"#"].location; |
︙ | |||
364 365 366 367 368 369 370 | 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 | - + - + - + | while ((line = [file readLine]) != nil) { void *pool2 = objc_autoreleasePoolPush(); size_t pos; OFArray *components, *arguments; OFString *option; pos = [line indexOfCharacterFromSet: commentCharacters]; |
︙ | |||
418 419 420 421 422 423 424 | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | - + | } # endif #endif #ifdef OF_WINDOWS - (void)obtainWindowsSystemConfig { |
︙ | |||
477 478 479 480 481 482 483 | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | - + | OFArray *hosts; if (components.count < 2) continue; address = components.firstObject; hosts = [components objectsInRange: |
︙ | |||
505 506 507 508 509 510 511 | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | - + | } #endif #ifdef OF_AMIGAOS4 - (void)obtainAmigaOS4SystemConfig { OFMutableArray *nameServers = [OFMutableArray array]; |
︙ |
Modified src/OFData+CryptographicHashing.m from [6d7c26a863] to [404b89feab].
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + | cString[i * 2] = (high > 9 ? high - 10 + 'a' : high + '0'); cString[i * 2 + 1] = (low > 9 ? low - 10 + 'a' : low + '0'); } objc_autoreleasePoolPop(pool); return [OFString stringWithCString: cString |
︙ |
Modified src/OFData.h from [5c1ed5a74d] to [654367484b].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + + + + + + + - - + + + - + | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFSerialization.h" #import "OFMessagePackRepresentation.h" /*! @file */ OF_ASSUME_NONNULL_BEGIN @class OFString; @class OFURL; /** * @brief Options for searching in data. * * This is a bit mask. */ |
︙ | |||
272 273 274 275 276 277 278 | 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 | - + - + - + - - - - - + - - - + + + | /** * @brief Compares the data to other data. * * @param data Data to compare the data to * @return The result of the comparison */ |
︙ |
Modified src/OFData.m from [398b865989] to [98780c8b8b].
︙ | |||
269 270 271 272 273 274 275 | 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 | - + - + - | - (instancetype)initWithStringRepresentation: (OFString *)string { self = [super init]; @try { size_t count = [string |
︙ | |||
331 332 333 334 335 336 337 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | - - + + - | self = [OFMutableData alloc]; } self = [(OFMutableData *)self initWithCapacity: string.length / 3]; @try { if (!of_base64_decode((OFMutableData *)self, |
︙ | |||
445 446 447 448 449 450 451 | 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 | - + - + - + - + - + - + - + | return false; if (memcmp(data.items, _items, _count * _itemSize) != 0) return false; return true; } |
︙ | |||
541 542 543 544 545 546 547 | 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | - - - + + + - + - + - + - + - + - + | } - (OFString *)stringByBase64Encoding { return of_base64_encode(_items, _count * _itemSize); } |
︙ |
Modified src/OFDatagramSocket.h from [3462a90bc3] to [28a526b5b6].
︙ | |||
32 33 34 35 36 37 38 | 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 | - - + + - - + | * * @param length The length of the packet * @param sender The address of the sender of the packet * @param exception An exception which occurred while receiving or `nil` on * success * @return A bool whether the same block should be used for the next receive */ |
︙ | |||
180 181 182 183 184 185 186 | 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 | - + - + - - + + | * * @param buffer The buffer to write the datagram to * @param length The length of the buffer * @param runLoopMode The run loop mode in which to perform the async receive */ - (void)asyncReceiveIntoBuffer: (void *)buffer length: (size_t)length |
︙ | |||
256 257 258 259 260 261 262 | 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 | - + - + - - + + | * @param data The data to send as a datagram * @param receiver A pointer to an @ref of_socket_address_t to which the * datagram should be sent. The receiver is copied. * @param runLoopMode The run loop mode in which to perform the async send */ - (void)asyncSendData: (OFData *)data receiver: (const of_socket_address_t *)receiver |
︙ |
Modified src/OFDatagramSocket.m from [ed638b6427] to [05b31b2631].
︙ | |||
217 218 219 220 221 222 223 | 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 | - + - + - + - + - - + + | return ret; } - (void)asyncReceiveIntoBuffer: (void *)buffer length: (size_t)length { [self asyncReceiveIntoBuffer: buffer length: length |
︙ | |||
307 308 309 310 311 312 313 | 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 | - + - + - + - + - - + + - + | } - (void)asyncSendData: (OFData *)data receiver: (const of_socket_address_t *)receiver { [self asyncSendData: data receiver: receiver |
︙ |
Modified src/OFDate.h from [dff8b1eb37] to [67980cebbc].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | */ #ifndef OF_DATE_M OF_SUBCLASSING_RESTRICTED #endif @interface OFDate: OFObject <OFCopying, OFComparing, OFSerialization, OFMessagePackRepresentation> { |
︙ | |||
120 121 122 123 124 125 126 | 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 | - + - + - + - + | * @brief The day of the year of the date in local time. */ @property (readonly, nonatomic) unsigned short localDayOfYear; /** * @brief The seconds since 1970-01-01T00:00:00Z. */ |
︙ | |||
213 214 215 216 217 218 219 | 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 | - + - + | /** * @brief Initializes an already allocated OFDate with the specified date and * time since 1970-01-01T00:00:00Z. * * @param seconds The seconds since 1970-01-01T00:00:00Z * @return An initialized OFDate with the specified date and time */ |
︙ | |||
269 270 271 272 273 274 275 | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + | /** * @brief Compares the date to another date. * * @param date The date to compare the date to * @return The result of the comparison */ |
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | - + - + | /** * @brief Returns the seconds the receiver is after the date. * * @param otherDate Date date to generate the difference with receiver * @return The seconds the receiver is after the date. */ |
Modified src/OFDate.m from [c1ec0de284] to [5b10481bac].
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + - + - + | static void initDistantPast(void) { distantPast = [[OFDateSingleton alloc] initWithTimeIntervalSince1970: -62167219200.0]; } |
︙ | |||
118 119 120 121 122 123 124 | 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 | - + - + - + - + - + - + | #ifdef OF_WINDOWS static __time64_t (*func__mktime64)(struct tm *); #endif #ifdef HAVE_GMTIME_R # define GMTIME_RET(field) \ |
︙ | |||
284 285 286 287 288 289 290 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | - + | @implementation OFDatePlaceholder #ifdef __clang__ /* We intentionally don't call into super, so silence the warning. */ # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wunknown-pragmas" # pragma clang diagnostic ignored "-Wobjc-designated-initializers" #endif |
︙ | |||
319 320 321 322 323 324 325 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - + | #ifdef __clang__ # pragma clang diagnostic pop #endif @end #if defined(OF_OBJFW_RUNTIME) && UINTPTR_MAX == UINT64_MAX @implementation OFTaggedPointerDate |
︙ | |||
378 379 380 381 382 383 384 | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | - + - + | } + (instancetype)date { return [[[self alloc] init] autorelease]; } |
︙ | |||
423 424 425 426 427 428 429 | 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | - + - + | } - (instancetype)init { return [self initWithTimeIntervalSince1970: now()]; } |
︙ | |||
466 467 468 469 470 471 472 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + | struct tm tm = { .tm_isdst = -1 }; /* * of_strptime() can never set this to SHRT_MAX, no matter what is * passed to it, so this is a safe way to figure out if the date * contains a time zone. */ short tz = SHRT_MAX; |
︙ | |||
494 495 496 497 498 499 500 | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | - + | objc_autoreleasePoolPop(pool); return [self initWithTimeIntervalSince1970: seconds]; } - (instancetype)initWithSerialization: (OFXMLElement *)element { |
︙ | |||
561 562 563 564 565 566 567 | 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + - + - + - + | } - (id)copy { return [self retain]; } |
︙ | |||
601 602 603 604 605 606 607 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | - + | return [element autorelease]; } - (OFData *)messagePackRepresentation { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
654 655 656 657 658 659 660 | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | - + | objc_autoreleasePoolPop(pool); return [ret autorelease]; } - (unsigned long)microsecond { |
︙ | |||
737 738 739 740 741 742 743 | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | - + | { LOCALTIME_RET(tm_yday + 1) } - (OFString *)dateStringWithFormat: (OFConstantString *)format { OFString *ret; |
︙ | |||
797 798 799 800 801 802 803 | 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | - + | return ret; } - (OFString *)localDateStringWithFormat: (OFConstantString *)format { OFString *ret; |
︙ | |||
859 860 861 862 863 864 865 | 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 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 | - + - + - + - + - + - + - + - + | } - (OFDate *)earlierDate: (OFDate *)otherDate { if (otherDate == nil) return self; |
Modified src/OFDictionary.h from [72e24e9365] to [a266eaef28].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - - - + + | #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); #ifdef OF_HAVE_BLOCKS |
︙ | |||
268 269 270 271 272 273 274 | 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 | - + - - - + + - - + + | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each key / object pair. * * @param block The block to execute for each key / object pair. */ |
︙ |
Modified src/OFDictionary.m from [45778dda9e] to [18419a43d0].
︙ | |||
170 171 172 173 174 175 176 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + | } - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } |
︙ | |||
503 504 505 506 507 508 509 | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | - + | - (OFEnumerator *)objectEnumerator { return [[[OFDictionaryObjectEnumerator alloc] initWithDictionary: self] autorelease]; } |
︙ | |||
533 534 535 536 537 538 539 | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 | - + - - + - + - | objects[i] = object; } return i; } #ifdef OF_HAVE_BLOCKS |
︙ |
Deleted src/OFDimensionValue.h version [1e5243cb9c].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted src/OFDimensionValue.m version [8d1db9e33c].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Modified src/OFEnumerator.h from [a48f5dd585] to [aa2de24ec1].
︙ | |||
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 | - + - + - + | /* * This needs to be exactly like this because it's hard-coded in the compiler. * * We need this bad check to see if we already imported Cocoa, which defines * this as well. */ /** |
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - + | * * @param state Context information for the enumeration * @param objects A pointer to an array where to put the objects * @param count The number of objects that can be stored at objects * @return The number of objects returned in objects or 0 when the enumeration * finished. */ |
︙ |
Modified src/OFEnumerator.m from [c36212a268] to [e234a4699e].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } |
︙ |
Modified src/OFEpollKernelEventObserver.m from [11ad156308] to [deb106197e].
︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + | [self of_removeObject: object fileDescriptor: object.fileDescriptorForWriting events: EPOLLOUT]; [super removeObjectForWriting: object]; } |
︙ |
Modified src/OFFileManager.h from [056f59171f] to [a969db1ae2].
︙ | |||
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 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 | - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - - + + + + + + + + - + - - + + - + - - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - + - + - + - + | @class OFURL; /** * @brief A key for a file attribute in the file attributes dictionary. * * Possible keys for file URLs are: * |
︙ | |||
267 268 269 270 271 272 273 | 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 | - + - + - + - + - + - - + | #ifdef OF_HAVE_FILES /** * @brief Returns the attributes for the item at the specified path. * * @param path The path to return the attributes for * @return A dictionary of attributes for the specified path, with the keys of |
︙ | |||
562 563 564 565 566 567 568 | 560 561 562 563 564 565 566 567 568 569 570 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 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + - + - + - + - - + - + - + - + - + - + - + - + - - + - - + - - + - + - + - | */ - (void)createSymbolicLinkAtURL: (OFURL *)URL withDestinationPath: (OFString *)target; @end @interface OFDictionary (FileAttributes) /** |
Modified src/OFFileManager.m from [89ccc3daf1] to [abf911c67b].
︙ | |||
67 68 69 70 71 72 73 | 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 | - - + - - + - - + - - + - - + - - - - + + + + - - - - + + + - - + - - + - - + - + - - - - - + + + + + - - + + - + - | # include <proto/exec.h> # include <proto/dos.h> #endif @interface OFDefaultFileManager: OFFileManager @end |
︙ | |||
227 228 229 230 231 232 233 | 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 | - + - + - + - - + - + | [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } #endif |
︙ | |||
565 566 567 568 569 570 571 | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | - - + + | } #endif - (void)copyItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; OFURLHandler *URLHandler; |
︙ | |||
597 598 599 600 601 602 603 | 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 | - + - + - - + | exceptionWithSourceURL: source destinationURL: destination errNo: e.errNo]; } type = attributes.fileType; |
︙ | |||
648 649 650 651 652 653 654 | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | - + | URLByAppendingPathComponent: item.lastPathComponent]; [self copyItemAtURL: item toURL: destinationURL]; objc_autoreleasePoolPop(pool2); } |
︙ | |||
674 675 676 677 678 679 680 | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | - + - - + | readIntoBuffer: buffer length: pageSize]; [destinationStream writeBuffer: buffer length: length]; } @try { |
︙ | |||
709 710 711 712 713 714 715 | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 | - + | @throw e; } @finally { [sourceStream close]; [destinationStream close]; free(buffer); } |
︙ | |||
910 911 912 913 914 915 916 | 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 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 | - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - - + - - + - - + - | return OF_RETAIN_COUNT_MAX; } @end @implementation OFDictionary (FileAttributes) - (unsigned long long)fileSize { |
Modified src/OFFileURLHandler.m from [db7a703dd2] to [46f9d28643].
︙ | |||
85 86 87 88 89 90 91 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + - + | # endif #endif #if defined(OF_WINDOWS) || defined(OF_AMIGAOS) typedef struct { of_offset_t st_size; unsigned int st_mode; |
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + | static int (*func__wutime64)(const wchar_t *, struct __utimbuf64 *); static WINAPI BOOLEAN (*func_CreateSymbolicLinkW)(LPCWSTR, LPCWSTR, DWORD); static WINAPI BOOLEAN (*func_CreateHardLinkW)(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES); #endif #ifdef OF_WINDOWS |
︙ | |||
258 259 260 261 262 263 264 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + | #elif defined(OF_AMIGAOS) BPTR lock; # ifdef OF_AMIGAOS4 struct ExamineData *ed; # else struct FileInfoBlock fib; # endif |
︙ | |||
311 312 313 314 315 316 317 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | - + | # ifdef OF_AMIGAOS4 date = &ed->Date; # else date = &fib.fib_Date; # endif timeInterval += date->ds_Days * 86400.0; timeInterval += date->ds_Minute * 60.0; |
︙ | |||
355 356 357 358 359 360 361 | 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 | - + - + - - + - - - + + - + - - - + + - - + + - + - - + - + - + - + - + - + - - + - + - + - + - + - + - + - - - + + | return 0; #else return of_stat(path, buffer); #endif } static void |
︙ | |||
501 502 503 504 505 506 507 | 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | - | @try { union { char bytes[MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; REPARSE_DATA_BUFFER data; } buffer; DWORD size; wchar_t *tmp; |
︙ | |||
524 525 526 527 528 529 530 | 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | - - + + - - + + | (slrb.SubstituteNameOffset / sizeof(wchar_t)); destination = [OFString stringWithUTF16String: tmp length: slrb.SubstituteNameLength / sizeof(wchar_t)]; |
︙ | |||
600 601 602 603 604 605 606 | 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | - + - + | mode: mode]; objc_autoreleasePoolPop(pool); return [file autorelease]; } |
︙ | |||
625 626 627 628 629 630 631 | 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | - + - + - + - - + + - | exceptionWithURL: URL errNo: error]; if (s.st_size < 0) @throw [OFOutOfRangeException exception]; [ret setObject: [NSNumber numberWithUnsignedLongLong: s.st_size] |
︙ | |||
699 700 701 702 703 704 705 | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | - + | exceptionWithURL: URL attributes: attributes failedAttribute: attributeKey errNo: errno]; } #elif defined(OF_AMIGAOS) /* AmigaOS does not support access time. */ |
︙ | |||
735 736 737 738 739 740 741 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | - - - + + | # endif @throw [OFSetItemAttributesFailedException exceptionWithURL: URL attributes: attributes failedAttribute: attributeKey errNo: retrieveError()]; #else |
︙ | |||
763 764 765 766 767 768 769 | 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | - + - + - - - - - + + + + + - + | failedAttribute: attributeKey errNo: errno]; #endif } - (void)of_setPOSIXPermissions: (OFNumber *)permissions ofItemAtURL: (OFURL *)URL |
︙ | |||
854 855 856 857 858 859 860 | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 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 | - - + - + - + - - + + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - - + - | failedAttribute: attributeKey errNo: errno]; #else OF_UNRECOGNIZED_SELECTOR #endif } |
︙ | |||
1064 1065 1066 1067 1068 1069 1070 | 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | - + | exceptionWithObject: self requestedLength: 0 errNo: retrieveError()]; } @finally { FindClose(handle); } } else { |
︙ | |||
1104 1105 1106 1107 1108 1109 1110 | 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 | - + | requestedLength: 0 errNo: retrieveError()]; } @finally { FindClose(handle); } } #elif defined(OF_AMIGAOS) |
︙ | |||
1174 1175 1176 1177 1178 1179 1180 | 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 | - + | exceptionWithObject: self requestedLength: 0 errNo: retrieveError()]; } @finally { UnLock(lock); } #else |
︙ | |||
1356 1357 1358 1359 1360 1361 1362 | 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 | - + | ![destination.scheme isEqual: _scheme]) @throw [OFInvalidArgumentException exception]; sourcePath = source.fileSystemRepresentation; destinationPath = destination.fileSystemRepresentation; # ifndef OF_WINDOWS |
︙ | |||
1397 1398 1399 1400 1401 1402 1403 | 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 | - + | if (![URL.scheme isEqual: _scheme]) @throw [OFInvalidArgumentException exception]; path = URL.fileSystemRepresentation; # ifndef OF_WINDOWS |
︙ | |||
1438 1439 1440 1441 1442 1443 1444 | 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 | - + - + | exceptionWithSourceURL: source destinationURL: destination errNo: EEXIST]; pool = objc_autoreleasePoolPush(); #ifdef OF_AMIGAOS |
︙ |
Modified src/OFHTTPClient.m from [02e9faa541] to [4234996a26].
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + | if (connectionHeader != nil) keepAlive = [connectionHeader isEqual: @"close"]; else keepAlive = true; } else { if (connectionHeader != nil) keepAlive = ([connectionHeader caseInsensitiveCompare: |
︙ | |||
344 345 346 347 348 349 350 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | - + - + - + - + | OFString *newURLScheme; newURL = [OFURL URLWithString: location relativeToURL: URL]; newURLScheme = newURL.scheme; if ([newURLScheme caseInsensitiveCompare: @"http"] != |
︙ | |||
456 457 458 459 460 461 462 | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | - + - + | return false; } if (![line hasPrefix: @"HTTP/"] || line.length < 9 || [line characterAtIndex: 8] != ' ') @throw [OFInvalidServerReplyException exception]; |
︙ | |||
565 566 567 568 569 570 571 | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | - + | } return ret; } - (OFString *)stream: (OFStream *)stream didWriteString: (OFString *)string |
︙ | |||
697 698 699 700 701 702 703 | 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | - + | OFTCPSocket *sock; uint16_t port; OFNumber *URLPort; [_client close]; if ([URL.scheme caseInsensitiveCompare: @"https"] == |
︙ | |||
993 994 995 996 997 998 999 | 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 | - + - + | @throw [OFInvalidServerReplyException exception]; } if (line == nil) return 0; pos = [line rangeOfString: @";"].location; |
︙ | |||
1236 1237 1238 1239 1240 1241 1242 | 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 | - - + + | - (void)asyncPerformRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects { void *pool = objc_autoreleasePoolPush(); OFURL *URL = request.URL; OFString *scheme = URL.scheme; |
︙ |
Modified src/OFHTTPCookie.m from [f788425642] to [c34a9bfc99].
︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + | (OFDictionary OF_GENERIC(OFString *, OFString *) *)headerFields forURL: (OFURL *)URL { OFMutableArray OF_GENERIC(OFHTTPCookie *) *ret = [OFMutableArray array]; void *pool = objc_autoreleasePoolPush(); OFString *string = [headerFields objectForKey: @"Set-Cookie"]; OFString *domain = URL.host; |
︙ | |||
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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - + - + - + | last = i; i--; } break; case STATE_NAME: if (characters[i] == '=') { name = [string substringWithRange: |
︙ | |||
151 152 153 154 155 156 157 | 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 | - + - + - + - + | last = i; i--; } break; case STATE_ATTR_NAME: if (characters[i] == '=') { name = [string substringWithRange: |
︙ | |||
211 212 213 214 215 216 217 | 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 | - + - + - + | break; case STATE_NAME: case STATE_QUOTED_VALUE: @throw [OFInvalidFormatException exception]; break; case STATE_VALUE: value = [string substringWithRange: |
︙ |
Modified src/OFHTTPCookieManager.m from [a7b81a9286] to [5134a266a2].
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + | OFString *cookieDomain, *URLHost; size_t i; if (![cookie.path hasPrefix: @"/"]) cookie.path = @"/"; if (cookie.secure && |
︙ | |||
117 118 119 120 121 122 123 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + | bool match; expires = cookie.expires; if (expires != nil && expires.timeIntervalSinceNow <= 0) continue; if (cookie.secure && [URL.scheme caseInsensitiveCompare: |
︙ |
Modified src/OFHTTPResponse.h from [4cf17ed197] to [ab5c38416c].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + | /** * @brief Returns the reply as a string, trying to detect the encoding and * falling back to the specified encoding if not detectable. * * @return The reply as a string */ |
︙ |
Modified src/OFHTTPResponse.m from [e267b58d94] to [b9c77a409c].
︙ | |||
112 113 114 115 116 117 118 | 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 | - + - + | case 505: return @"HTTP Version Not Supported"; default: return @"(unknown)"; } } |
︙ | |||
197 198 199 200 201 202 203 | 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 | - + - + - + | } break; case STATE_AFTER_PARAM_VALUE: if (UTF8String[i] == ';') { state = STATE_BEFORE_PARAM_NAME; last = i + 1; } else if (UTF8String[i] != ' ') |
︙ | |||
294 295 296 297 298 299 300 | 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 | - + - + - + - - + + | return [OFString stringWithFormat: @"%hhu.%hhu", _protocolVersion.major, _protocolVersion.minor]; } - (OFString *)string { |
︙ |
Modified src/OFHTTPServer.m from [bf72062f11] to [372c0e044a].
︙ | |||
350 351 352 353 354 355 356 | 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 | - - + + - + - + | { OFString *method; OFMutableString *path; size_t pos; @try { OFString *version = [line |
︙ | |||
442 443 444 445 446 447 448 | 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 | - + - + - - + - + | _state = SEND_RESPONSE; [self createResponse]; return false; } pos = [line rangeOfString: @":"].location; |
︙ | |||
531 532 533 534 535 536 537 | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | - + | URL = [OFMutableURL URL]; URL.scheme = @"http"; URL.host = _host; if (_port != 80) URL.port = [OFNumber numberWithUnsignedShort: _port]; |
︙ | |||
690 691 692 693 694 695 696 | 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | - + - + | @throw [OFInvalidFormatException exception]; } if (line == nil) return 0; pos = [line rangeOfString: @";"].location; |
︙ |
Modified src/OFHostAddressResolver.h from [6761889c77] to [dc6da26766].
︙ | |||
29 30 31 32 33 34 35 | 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 | - + - + | @interface OFHostAddressResolver: OFObject <OFDNSResolverQueryDelegate> { OFString *_host; of_socket_address_family_t _addressFamily; OFDNSResolver *_resolver; OFDNSResolverSettings *_settings; |
Modified src/OFHostAddressResolver.m from [4a261c10a0] to [65cece7bc1].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - - + + | @public bool _done; OFData *_addresses; id _exception; } @end |
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - + | } *address = [record address]; return true; } static void |
︙ | |||
113 114 115 116 117 118 119 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + | } @implementation OFHostAddressResolver: OFObject - (instancetype)initWithHost: (OFString *)host addressFamily: (of_socket_address_family_t)addressFamily resolver: (OFDNSResolver *)resolver settings: (OFDNSResolverSettings *)settings |
︙ |
Modified src/OFINICategory+Private.h from [c5a381e443] to [6b052bbd06].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 | - + | @class OFStream; OF_DIRECT_MEMBERS @interface OFINICategory () - (instancetype)of_initWithName: (OFString *)name OF_METHOD_FAMILY(init); - (void)of_parseLine: (OFString *)line; - (bool)of_writeToStream: (OFStream *)stream |
Modified src/OFINICategory.m from [3853ee5e40] to [d8e2a6f10b].
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + | unescapeString(OFString *string) { OFMutableString *mutableString; if (![string hasPrefix: @"\""] || ![string hasSuffix: @"\""]) return string; |
︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + | { if (![line hasPrefix: @";"]) { OFINICategoryPair *pair = [[[OFINICategoryPair alloc] init] autorelease]; OFString *key, *value; size_t pos; |
︙ | |||
464 465 466 467 468 469 470 | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | - + | } } objc_autoreleasePoolPop(pool); } - (bool)of_writeToStream: (OFStream *)stream |
︙ |
Modified src/OFINIFile.h from [bd06a8855c] to [8b191bee9f].
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + | * * @param path The path to the file whose contents the OFINIFile should contain * @param encoding The encoding of the specified file * * @return A new, autoreleased OFINIFile with the contents of the specified file */ + (instancetype)fileWithPath: (OFString *)path |
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | * * @param path The path to the file whose contents the OFINIFile should contain * @param encoding The encoding of the specified file * * @return An initialized OFINIFile with the contents of the specified file */ - (instancetype)initWithPath: (OFString *)path |
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 | - + | /** * @brief Writes the contents of the OFINIFile to a file in the specified * encoding. * * @param path The path of the file to write to * @param encoding The encoding to use */ |
Modified src/OFINIFile.m from [2183d90e0a] to [0891d21917].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + | #import "OFINICategory+Private.h" #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" OF_DIRECT_MEMBERS @interface OFINIFile () |
︙ | |||
50 51 52 53 54 55 56 | 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 | - + - + - + | + (instancetype)fileWithPath: (OFString *)path { return [[[self alloc] initWithPath: path] autorelease]; } + (instancetype)fileWithPath: (OFString *)path |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + | [_categories addObject: category]; objc_autoreleasePoolPop(pool); return category; } |
︙ | |||
135 136 137 138 139 140 141 | 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 | - + - + - + | if ([line hasPrefix: @"["]) { OFString *categoryName; if (![line hasSuffix: @"]"]) @throw [OFInvalidFormatException exception]; categoryName = [line substringWithRange: |
︙ |
Modified src/OFINIFileSettings.m from [a5f326cd7a] to [b35044d2f1].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - + - + | } - (void)of_getCategory: (OFString **)category andKey: (OFString **)key forPath: (OFString *)path OF_DIRECT { size_t pos = [path rangeOfString: @"." |
︙ |
Modified src/OFIPSocketAsyncConnector.h from [a61a99efb6] to [be1f67a820].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 | - - + + | - (instancetype)initWithSocket: (id)sock host: (OFString *)host port: (uint16_t)port delegate: (nullable id)delegate block: (nullable id)block; - (void)didConnect; |
Modified src/OFIPSocketAsyncConnector.m from [09c7bbbcdf] to [c25b7c4d07].
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - - + | { if (_exception == nil) [_socket setCanBlock: true]; #ifdef OF_HAVE_BLOCKS if (_block != NULL) { if ([_socket isKindOfClass: [OFTCPSocket class]]) |
︙ | |||
129 130 131 132 133 134 135 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - + | { return [OFConnectionFailedException exceptionWithHost: _host port: _port socket: _socket errNo: errNo]; } |
︙ | |||
220 221 222 223 224 225 226 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + | _socketAddresses = [addresses copy]; [self tryNextAddressWithRunLoopMode: [OFRunLoop currentRunLoop].currentMode]; } |
︙ |
Modified src/OFInvertedCharacterSet.h from [6a080d4b74] to [c74c805b51].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN @interface OFInvertedCharacterSet: OFCharacterSet { OFCharacterSet *_characterSet; |
Modified src/OFInvertedCharacterSet.m from [ea0333ca6e] to [e08da05e4c].
︙ | |||
28 29 30 31 32 33 34 | 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 | - + - + | - (instancetype)initWithCharacterSet: (OFCharacterSet *)characterSet { self = [super init]; @try { _characterSet = [characterSet retain]; |
Modified src/OFKernelEventObserver.h from [9a570d3d9f] to [3c8cfabf76].
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | /** * @brief Observes all objects until an event happens on an object or the * timeout is reached. * * @param timeInterval The time to wait for an event, in seconds */ |
︙ |
Modified src/OFKernelEventObserver.m from [9d77b8881b] to [4e64aadcfc].
︙ | |||
241 242 243 244 245 246 247 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | - + | } - (void)observe { [self observeForTimeInterval: -1]; } |
︙ |
Modified src/OFKqueueKernelEventObserver.m from [8d97fca7a9] to [a1444efdc0].
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + | if (kevent(_kernelQueue, &event, 1, NULL, 0, NULL) != 0) @throw [OFObserveFailedException exceptionWithObserver: self errNo: errno]; [super removeObjectForWriting: object]; } |
︙ |
Modified src/OFLHAArchive.h from [89478b5360] to [8b3e09cc61].
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + - + | { OFStream *_stream; enum { OF_LHA_ARCHIVE_MODE_READ, OF_LHA_ARCHIVE_MODE_WRITE, OF_LHA_ARCHIVE_MODE_APPEND } _mode; |
︙ |
Modified src/OFLHAArchive.m from [7c9dae9bb4] to [0005d98cda].
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + - + | - (void)of_skip; @end OF_DIRECT_MEMBERS @interface OFLHAArchiveFileWriteStream: OFStream <OFReadyForWritingObserving> { OFMutableLHAArchiveEntry *_entry; |
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + | ![_stream isKindOfClass: [OFSeekableStream class]]) @throw [OFInvalidArgumentException exception]; if (_mode == OF_LHA_ARCHIVE_MODE_APPEND) [(OFSeekableStream *)_stream seekToOffset: 0 whence: SEEK_END]; |
︙ | |||
430 431 432 433 434 435 436 | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - + | [super close]; } @end @implementation OFLHAArchiveFileWriteStream - (instancetype)of_initWithStream: (OFSeekableStream *)stream entry: (OFLHAArchiveEntry *)entry |
︙ |
Modified src/OFLHAArchiveEntry+Private.h from [7ab4266d19] to [1e5b6ab947].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - + | OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFLHAArchiveEntry () - (instancetype)of_initWithHeader: (char [_Nonnull 21])header stream: (OFStream *)stream |
Modified src/OFLHAArchiveEntry.m from [d68323165e] to [35e510f89b].
︙ | |||
51 52 53 54 55 56 57 | 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 | - + - + | return [OFDate dateWithLocalDateString: dateString format: @"%Y-%m-%d %H:%M:%S"]; } static void parseFileNameExtension(OFLHAArchiveEntry *entry, OFData *extension, |
︙ | |||
95 96 97 98 99 100 101 | 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 | - + - + - + | entry->_directoryName = [directoryName copy]; objc_autoreleasePoolPop(pool); } static void parseCommentExtension(OFLHAArchiveEntry *entry, OFData *extension, |
︙ | |||
151 152 153 154 155 156 157 | 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 | - + - + - + - + - + | entry->_GID = [[OFNumber alloc] initWithUnsignedShort: GID]; entry->_UID = [[OFNumber alloc] initWithUnsignedShort: UID]; } static void parseGroupExtension(OFLHAArchiveEntry *entry, OFData *extension, |
︙ | |||
238 239 240 241 242 243 244 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - + | function(entry, extension, encoding); return true; } static void readExtensions(OFLHAArchiveEntry *entry, OFStream *stream, |
︙ | |||
263 264 265 266 267 268 269 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | - + - | entry->_compressedSize -= size; } } } static void |
︙ | |||
329 330 331 332 333 334 335 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | - + - + | } return self; } - (instancetype)of_initWithHeader: (char [21])header stream: (OFStream *)stream |
︙ | |||
551 552 553 554 555 556 557 | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | - + - + - + | - (OFArray OF_GENERIC(OFData *) *)extensions { return _extensions; } - (void)of_writeToStream: (OFStream *)stream |
︙ |
Modified src/OFList.m from [734046ca66] to [eaa8494459].
︙ | |||
380 381 382 383 384 385 386 | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + | objc_autoreleasePoolPop(pool); } return element; } |
︙ |
Modified src/OFLocale.h from [88c5c97127] to [323b529f40].
︙ | |||
41 42 43 44 45 46 47 | 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 | - + - + | * * @brief A class for querying the locale and retrieving localized strings. */ OF_SUBCLASSING_RESTRICTED @interface OFLocale: OFObject { OFString *_Nullable _language, *_Nullable _territory; |
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + | * @brief The native 8-bit string encoding of the locale for messages. * * This is useful to encode strings correctly for passing them to operating * system calls. * * If the native 8-bit encoding is unknown, UTF-8 is assumed. */ |
︙ | |||
123 124 125 126 127 128 129 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - + | * This is useful to encode strings correctly for passing them to operating * system calls. * * If the native 8-bit encoding is unknown, UTF-8 is assumed. * * @return The native 8-bit string encoding for the locale */ |
︙ |
Modified src/OFLocale.m from [43f4209e77] to [d90d567f44].
︙ | |||
35 36 37 38 39 40 41 | 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 | - + - + - + | #endif static OFLocale *currentLocale = nil; static OFDictionary *operatorPrecedences = nil; #ifndef OF_AMIGAOS static void |
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | - + - + | [condition replaceOccurrencesOfString: @")" withString: @" )"]; /* Substitute variables and convert to RPN first */ tokens = [OFMutableArray array]; operators = [OFMutableArray array]; for (OFString *token in [condition componentsSeparatedByString: @" " |
︙ | |||
193 194 195 196 197 198 199 | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + - + - + - + | var = [OFNumber numberWithBool: [first isEqual: second]]; else if ([token isEqual: @"!="]) var = [OFNumber numberWithBool: ![first isEqual: second]]; else if ([token isEqual: @"<"]) var = [OFNumber numberWithBool: [first |
︙ | |||
347 348 349 350 351 352 353 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | - + | } + (OFString *)territory { return currentLocale.territory; } |
︙ | |||
376 377 378 379 380 381 382 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | - + | #ifndef OF_AMIGAOS char *locale, *messagesLocale = NULL; if (currentLocale != nil) @throw [OFInitializationFailedException exceptionWithClass: self.class]; |
︙ | |||
420 421 422 423 424 425 426 | 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 | - + - + - + - + | # if defined(OF_MORPHOS) if (GetVar("CODEPAGE", buffer, sizeof(buffer), 0) > 0) { # elif defined(OF_AMIGAOS4) if (GetVar("Charset", buffer, sizeof(buffer), 0) > 0) { # else if (0) { # endif |
︙ |
Modified src/OFMapTable.h from [428b0aea8c] to [843bd062c2].
︙ | |||
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 | - + - + | * @brief A block for enumerating an OFMapTable. * * @param key The current key * @param object The current object * @param stop A pointer to a variable that can be set to true to stop the * enumeration */ |
︙ | |||
213 214 215 216 217 218 219 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + - - + | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each key / object pair. * * @param block The block to execute for each key / object pair. */ |
︙ |
Modified src/OFMapTable.m from [8788cb21e4] to [69ee51ce08].
︙ | |||
572 573 574 575 576 577 578 | 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | - + | return [[[OFMapTableObjectEnumerator alloc] of_initWithMapTable: self buckets: _buckets capacity: _capacity mutationsPointer: &_mutations] autorelease]; } |
︙ | |||
598 599 600 601 602 603 604 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | - + - - + | state->itemsPtr = objects; state->mutationsPtr = &_mutations; return i; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFMapTableDictionary.m from [992c305595] to [b911edeffb].
︙ | |||
404 405 406 407 408 409 410 | 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 | - + - + - | - (OFEnumerator *)objectEnumerator { return [[[OFMapTableEnumeratorWrapper alloc] initWithEnumerator: [_mapTable objectEnumerator] object: self] autorelease]; } |
︙ |
Modified src/OFMapTableSet.m from [c0e93f6d5b] to [8d95facb2a].
︙ | |||
272 273 274 275 276 277 278 | 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 | - + - + | - (OFEnumerator *)objectEnumerator { return [[[OFMapTableEnumeratorWrapper alloc] initWithEnumerator: [_mapTable keyEnumerator] object: self] autorelease]; } |
Modified src/OFMutableAdjacentArray.m from [7c769150fe] to [93f56cbca2].
︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + | for (size_t i = 0; i < count; i++) [objects[i] release]; [_array removeAllItems]; } |
︙ | |||
289 290 291 292 293 294 295 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | - + | for (i = 0, j = count - 1; i < j; i++, j--) { id tmp = objects[i]; objects[i] = objects[j]; objects[j] = tmp; } } |
︙ | |||
326 327 328 329 330 331 332 | 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 | - + - + | { return [[[OFArrayEnumerator alloc] initWithArray: self mutationsPtr: &_mutations] autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFMutableArray.h from [16603a1ba8] to [a684ec1cde].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | /** * @brief A block for replacing values in an OFMutableArray. * * @param object The object to replace * @param index The index of the object to replace * @return The object to replace the object with */ |
︙ | |||
155 156 157 158 159 160 161 | 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 | - + - + - + - - - - - + - + - - - - - + + | - (void)removeObjectAtIndex: (size_t)index; /** * @brief Removes the object in the specified range. * * @param range The range of the objects to remove */ |
︙ |
Modified src/OFMutableArray.m from [2a2941cb17] to [680aac7358].
︙ | |||
30 31 32 33 34 35 36 | 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 | - + - - + + - + - + - - - + + + - - + + | static struct { Class isa; } placeholder; @interface OFMutableArrayPlaceholder: OFMutableArray @end |
︙ | |||
88 89 90 91 92 93 94 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + - + - - - + + + - - + + | left = i + 1; } } #ifdef OF_HAVE_BLOCKS static void quicksortWithBlock(OFMutableArray *array, size_t left, size_t right, |
︙ | |||
358 359 360 361 362 363 364 | 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 | - + - + - + | [self removeObjectAtIndex: i]; return; } } } |
︙ | |||
412 413 414 415 416 417 418 | 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 | - + - + + | - (void)sort { [self sortUsingSelector: @selector(compare:) options: 0]; } - (void)sortUsingSelector: (SEL)selector |
︙ |
Modified src/OFMutableData.h from [7e3b1e1f63] to [8cc32bdba7].
︙ | |||
186 187 188 189 190 191 192 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + | - (void)removeItemAtIndex: (size_t)index; /** * @brief Removes the specified amount of items at the specified index. * * @param range The range of items to remove */ |
︙ |
Modified src/OFMutableData.m from [01aa579278] to [641dd5b634].
︙ | |||
160 161 162 163 164 165 166 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - + | { if (_items == NULL || _count == 0) return NULL; return _items + (_count - 1) * _itemSize; } |
︙ | |||
240 241 242 243 244 245 246 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - + - + | memset(_items + _count * _itemSize, '\0', count * _itemSize); _count += count; } - (void)removeItemAtIndex: (size_t)idx { |
︙ |
Modified src/OFMutableDictionary.h from [d0bf1761a1] to [d2bbc1da30].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | /** * @brief A block for replacing objects in an OFMutableDictionary. * * @param key The key of the object to replace * @param object The object to replace * @return The object to replace the object with */ |
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + | #ifdef OF_HAVE_BLOCKS /** * @brief Replaces each object with the object returned by the block. * * @param block The block which returns a new object for each object */ |
Modified src/OFMutableDictionary.m from [76370e25f8] to [e5de8c4c10].
︙ | |||
197 198 199 200 201 202 203 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + | (object = [objectEnumerator nextObject]) != nil) [self setObject: object forKey: key]; objc_autoreleasePoolPop(pool); } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFMutableMapTableDictionary.m from [b27a83ce2f] to [1009eb93ce].
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | - (void)removeAllObjects { [_mapTable removeAllObjects]; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFMutableString.h from [ae1870f5f2] to [9719f9d256].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + - | @interface OFMutableString: OFString /** * @brief Sets the character at the specified index. * * @param character The character to set * @param index The index where to set the character */ |
︙ | |||
71 72 73 74 75 76 77 | 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 | - + - + - - + + - - + + | /** * @brief Appends a C string with the specified encoding to the OFMutableString. * * @param cString A C string to append * @param encoding The encoding of the C string */ - (void)appendCString: (const char *)cString |
︙ | |||
152 153 154 155 156 157 158 | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | - + - + | - (void)insertString: (OFString *)string atIndex: (size_t)index; /** * @brief Deletes the characters at the specified range. * * @param range The range of the characters which should be removed */ |
︙ | |||
185 186 187 188 189 190 191 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | - + | * @param options Options modifying search behaviour * Possible values: None yet * @param range The range in which the string should be replaced */ - (void)replaceOccurrencesOfString: (OFString *)string withString: (OFString *)replacement options: (int)options |
︙ |
Modified src/OFMutableString.m from [e8ac978dc5] to [440135bc21].
︙ | |||
52 53 54 55 56 57 58 | 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 | - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + | { return (id)[[OFMutableUTF8String alloc] initWithUTF8String: UTF8String length: UTF8StringLength]; } - (instancetype)initWithCString: (const char *)cString |
︙ | |||
162 163 164 165 166 167 168 | 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 | - + - + | #ifdef OF_HAVE_FILES - (instancetype)initWithContentsOfFile: (OFString *)path { return (id)[[OFMutableUTF8String alloc] initWithContentsOfFile: path]; } - (instancetype)initWithContentsOfFile: (OFString *)path |
︙ | |||
224 225 226 227 228 229 230 | 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 | - - + + - + - + - + | if (self == [OFMutableString class]) return (id)&placeholder; return [super alloc]; } #ifdef OF_HAVE_UNICODE_TABLES |
︙ | |||
261 262 263 264 265 266 267 | 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 | - + - + - + - + - + | } #else static void convert(OFMutableString *self, char (*startFunction)(char), char (*middleFunction)(char)) { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
320 321 322 323 324 325 326 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + - + | void *pool = objc_autoreleasePoolPush(); [self appendString: [OFString stringWithUTF8String: UTF8String length: UTF8StringLength]]; objc_autoreleasePoolPop(pool); } - (void)appendCString: (const char *)cString |
︙ | |||
378 379 380 381 382 383 384 | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | - + | } - (void)reverse { size_t i, j, length = self.length; for (i = 0, j = length - 1; i < length / 2; i++, j--) { |
︙ | |||
427 428 429 430 431 432 433 | 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 514 515 516 517 518 519 520 521 522 523 524 525 526 527 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 | - + - + - + - + - + - - + + - + - + - + - + - + - + - + | { convert(self, of_ascii_toupper, of_ascii_tolower); } #endif - (void)insertString: (OFString *)string atIndex: (size_t)idx { |
︙ |
Modified src/OFMutableTarArchiveEntry.h from [2d44acedbb] to [ec04d24178].
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + - + | * @brief The date of the last modification of the file. */ @property (readwrite, retain, nonatomic) OFDate *modificationDate; /** * @brief The type of the archive entry. * |
︙ |
Modified src/OFMutableTarArchiveEntry.m from [9a77a0f3e7] to [a864b37365].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + | - (void)setModificationDate: (OFDate *)modificationDate { OFDate *old = _modificationDate; _modificationDate = [modificationDate retain]; [old release]; } |
︙ |
Modified src/OFMutableURL.m from [66f15c46f8] to [6cfd3507ce].
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + | - (void)setURLEncodedHost: (OFString *)URLEncodedHost { OFString *old; if ([URLEncodedHost hasPrefix: @"["] && [URLEncodedHost hasSuffix: @"]"]) { if (!of_url_is_ipv6_host([URLEncodedHost substringWithRange: |
︙ | |||
400 401 402 403 404 405 406 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | - + | done = false; break; } if ([current isEqual: @".."] && parent != nil && ![parent isEqual: @".."]) { [array removeObjectsInRange: |
︙ |
Modified src/OFMutableUTF8String.m from [ae60bfdf29] to [bfc8f3ea93].
︙ | |||
60 61 62 63 64 65 66 | 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 | - - + + - + - + | if (freeWhenDone) free(UTF8String); return self; } #ifdef OF_HAVE_UNICODE_TABLES |
︙ | |||
95 96 97 98 99 100 101 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + - + - + | _s->cString[i] = t; } return; } unicodeLen = self.length; |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | - + | free(unicodeString); @throw [OFInvalidEncodingException exception]; } isStart = of_ascii_isspace(c); if (c >> 8 < tableSize) { |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + - + | /* * Even though cStringLength can change, length cannot, therefore no * need to change it. */ } #endif |
︙ | |||
312 313 314 315 316 317 318 | 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 | - + - + - + | _s->cStringLength += UTF8StringLength; _s->length += length; _s->cString[_s->cStringLength] = 0; } - (void)appendCString: (const char *)cString |
︙ | |||
365 366 367 368 369 370 371 | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | - + | [string isKindOfClass: [OFMutableUTF8String class]]) { if (((OFMutableUTF8String *)string)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } |
︙ | |||
535 536 537 538 539 540 541 | 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | - + | [string isKindOfClass: [OFMutableUTF8String class]]) { if (((OFMutableUTF8String *)string)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } |
︙ | |||
564 565 566 567 568 569 570 | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | - + | @try { _s->cString = of_realloc(_s->cString, _s->cStringLength + 1, 1); } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } } |
︙ | |||
628 629 630 631 632 633 634 | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | - + | } else _s->isUTF8 = true; } - (void)replaceOccurrencesOfString: (OFString *)string withString: (OFString *)replacement options: (int)options |
︙ |
Modified src/OFNumber.h from [4b9e5cee54] to [6fc4bc7a5d].
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - - - - + + + + | @property (readonly, nonatomic) OFString *stringValue; #ifdef OF_HAVE_UNAVAILABLE + (instancetype)valueWithBytes: (const void *)bytes objCType: (const char *)objCType OF_UNAVAILABLE; + (instancetype)valueWithPointer: (const void *)pointer OF_UNAVAILABLE; + (instancetype)valueWithNonretainedObject: (id)object OF_UNAVAILABLE; |
︙ | |||
358 359 360 361 362 363 364 | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | - + | /** * @brief Compares the number to another number. * * @param number The number to compare the number to * @return The result of the comparison */ |
Modified src/OFNumber.m from [965d322b8e] to [abbcb2ae39].
︙ | |||
938 939 940 941 942 943 944 | 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 975 976 977 978 979 980 981 982 983 984 985 986 | - + - + - + - + - + - + - + - + - + - + | if (isSigned(self) || isSigned(number)) return (number.longLongValue == self.longLongValue); return (number.unsignedLongLongValue == self.unsignedLongLongValue); } |
︙ |
Modified src/OFObject.h from [846f3a0425] to [972f5ad44c].
︙ | |||
50 51 52 53 54 55 56 | 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 | - + - + - + - - + + - - + - + - + + + - - + + + + + + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - - - + + + - - + + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - + - - + + - + - + - + + + | OF_ASSUME_NONNULL_BEGIN /** @file */ /** * @brief A result of a comparison. */ |
︙ | |||
814 815 816 817 818 819 820 | 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 | - + - + - + - + | /** * @brief Performs the specified selector after the specified delay. * * @param selector The selector to perform * @param delay The delay after which the selector will be performed */ |
︙ | |||
884 885 886 887 888 889 890 | 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 | - + | * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector withObject: (nullable id)object1 withObject: (nullable id)object2 withObject: (nullable id)object3 withObject: (nullable id)object4 |
︙ | |||
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 1102 1103 1104 1105 1106 1107 1108 1109 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 | - + - + - + - + | * * @param selector The selector to perform * @param thread The thread on which to perform the selector * @param delay The delay after which the selector will be performed */ - (void)performSelector: (SEL)selector onThread: (OFThread *)thread |
︙ | |||
1143 1144 1145 1146 1147 1148 1149 | 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 | - + | */ - (void)performSelector: (SEL)selector onThread: (OFThread *)thread withObject: (nullable id)object1 withObject: (nullable id)object2 withObject: (nullable id)object3 withObject: (nullable id)object4 |
︙ | |||
1223 1224 1225 1226 1227 1228 1229 | 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 | - + | @protocol OFComparing /** * @brief Compares the object to another object. * * @param object An object to compare the object to * @return The result of the comparison */ |
︙ |
Modified src/OFObject.m from [ab465686e4] to [8df21bda9c].
︙ | |||
237 238 239 240 241 242 243 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | - + | #if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__) static void uncaughtExceptionHandler(id exception) { OFString *description = [exception description]; OFArray *backtrace = nil; |
︙ | |||
403 404 405 406 407 408 409 | 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | - + | { return self; } + (OFString *)className { return [OFString stringWithCString: class_getName(self) |
︙ | |||
558 559 560 561 562 563 564 | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - + | { return class_getSuperclass(object_getClass(self)); } - (OFString *)className { return [OFString stringWithCString: object_getClassName(self) |
︙ | |||
661 662 663 664 665 666 667 | 661 662 663 664 665 666 667 668 669 670 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 708 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 | - + - + - + - + - + | id (*imp)(id, SEL, id, id, id, id) = (id (*)(id, SEL, id, id, id, id))objc_msgSend; #endif return imp(self, selector, object1, object2, object3, object4); } |
︙ | |||
953 954 955 956 957 958 959 | 953 954 955 956 957 958 959 960 961 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 1003 1004 1005 1006 1007 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 | - + - + - + - + - + | [timer waitUntilDone]; objc_autoreleasePoolPop(pool); } - (void)performSelector: (SEL)selector onThread: (OFThread *)thread |
︙ |
Modified src/OFOptionsParser.h from [110ad440c1] to [84a06358b9].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + - + - + | #import "OFString.h" @class OFMapTable; OF_ASSUME_NONNULL_BEGIN /** |
︙ | |||
54 55 56 57 58 59 60 | 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 | - + - + - + - + | /** * An optional pointer to an `OFString *` that is set to the * argument specified for the option or `nil` for no argument. */ OFString *__autoreleasing _Nullable *_Nullable argumentPtr; }; |
︙ | |||
115 116 117 118 119 120 121 | 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 | - + - + - + - + - + | */ @property (readonly, nonatomic) OFArray OF_GENERIC(OFString *) *remainingArguments; /** * @brief Creates a new OFOptionsParser which accepts the specified options. * |
Modified src/OFOptionsParser.m from [9cfc874f7b] to [f1ad10653b].
︙ | |||
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 | - + - + - - + + | return [(OFString *)object1 isEqual: (OFString *)object2]; } @implementation OFOptionsParser @synthesize lastOption = _lastOption, lastLongOption = _lastLongOption; @synthesize argument = _argument; |
︙ | |||
137 138 139 140 141 142 143 | 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 | - + - + - + | return self; } - (void)dealloc { if (_options != NULL) |
︙ | |||
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 202 203 204 205 206 207 208 209 | - + - + - + | _index++; return '\0'; } if ([argument hasPrefix: @"--"]) { void *pool = objc_autoreleasePoolPush(); size_t pos; |
︙ | |||
267 268 269 270 271 272 273 | 267 268 269 270 271 272 273 274 275 276 | - + | return '?'; } - (OFArray *)remainingArguments { return [_arguments objectsInRange: |
Modified src/OFPointValue.h from [8f405bc77c] to [4a1e3a3976].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + - + | #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFPointValue: OFValue { |
Modified src/OFPointValue.m from [637e52428d] to [4e64632cbc].
︙ | |||
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 | - + - + - + | #import "OFString.h" #import "OFOutOfRangeException.h" @implementation OFPointValue @synthesize pointValue = _point; |
Modified src/OFPollKernelEventObserver.m from [f68dab1660] to [62bef4adc4].
︙ | |||
158 159 160 161 162 163 164 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + | - (void)removeObjectForWriting: (id <OFReadyForWritingObserving>)object { removeObject(self, object, object.fileDescriptorForWriting, POLLOUT); [super removeObjectForWriting: object]; } |
︙ |
Modified src/OFRangeCharacterSet.h from [146f282cd5] to [36adda48b7].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 | - + | #import "OFCharacterSet.h" OF_ASSUME_NONNULL_BEGIN @interface OFRangeCharacterSet: OFCharacterSet { |
Modified src/OFRangeCharacterSet.m from [e174e57848] to [171e0115ac].
︙ | |||
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 | - + - + | @implementation OFRangeCharacterSet - (instancetype)init { OF_INVALID_INIT_METHOD } |
Modified src/OFRangeValue.h from [d625b84e6d] to [364a68b940].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + - + | #import "OFValue.h" OF_ASSUME_NONNULL_BEGIN @interface OFRangeValue: OFValue { |
Modified src/OFRangeValue.m from [4b2520185b] to [d1e5de9d18].
︙ | |||
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" #import "OFOutOfRangeException.h" @implementation OFRangeValue @synthesize rangeValue = _range; |
Added src/OFRectValue.h version [57204033f6].
|
Added src/OFRectValue.m version [15e6c7cc85].
|
Deleted src/OFRectangleValue.h version [6cb58bb467].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted src/OFRectangleValue.m version [7e7907dbd9].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Modified src/OFRunLoop+Private.h from [b6fd0f0eaf] to [6eec0e29b2].
︙ | |||
35 36 37 38 39 40 41 | 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 | - + - + - + - + - - + + - + - - - + - + - - - + + - + - - - + - + - + - + - + - + - + - + - + - + - + - - + | @interface OFRunLoop () + (void)of_setMainRunLoop: (OFRunLoop *)runLoop; #ifdef OF_HAVE_SOCKETS + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer length: (size_t)length |
Modified src/OFRunLoop.h from [3ab2b642cc] to [7f5e7accfd].
︙ | |||
35 36 37 38 39 40 41 | 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 | - + - + - + - + - | @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFTimer; @class OFDate; /** * @brief A mode for an OFRunLoop. */ |
︙ | |||
98 99 100 101 102 103 104 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + | /** * @brief Adds an OFTimer to the run loop for the specified mode. * * @param timer The timer to add * @param mode The run loop mode in which to run the timer */ |
︙ | |||
133 134 135 136 137 138 139 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + | * @param mode The run loop mode in which to handle the signal * @param target The target to call when the signal was received * @param selector The selector to call on the target when the signal was * received. The selector must have one parameter for the ULONG * of the signal that was received. */ - (void)addExecSignal: (ULONG)signal |
︙ | |||
159 160 161 162 163 164 165 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + | * * @param signal The signal to remove * @param mode The run loop mode to which the signal was added * @param target The target which was specified when adding the signal * @param selector The selector which was specified when adding the signal */ - (void)removeExecSignal: (ULONG)signal |
︙ | |||
183 184 185 186 187 188 189 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | - - + | /** * @brief Run the run loop until an event or timer occurs or the specified * deadline is reached. * * @param mode The mode in which to run the run loop * @param deadline The date until which the run loop should run at the longest */ |
Modified src/OFRunLoop.m from [7f4271f15a] to [d30798d206].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + | #import "OFSortedList.h" #import "OFTimer.h" #import "OFTimer+Private.h" #import "OFDate.h" #import "OFObserveFailedException.h" |
︙ | |||
86 87 88 89 90 91 92 | 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 | - + - + - + - + - + - + - + | - (bool)handleObject: (id)object; @end @interface OFRunLoopReadQueueItem: OFRunLoopQueueItem { @public # ifdef OF_HAVE_BLOCKS |
︙ | |||
155 156 157 158 159 160 161 | 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 | - + - + - + - + | } @end @interface OFRunLoopDatagramReceiveQueueItem: OFRunLoopQueueItem { @public # ifdef OF_HAVE_BLOCKS |
︙ | |||
750 751 752 753 754 755 756 | 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | - - + + - + - | acceptedSocket = nil; exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) { if ([object isKindOfClass: [OFStreamSocket class]]) |
︙ | |||
1013 1014 1015 1016 1017 1018 1019 | 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 | - + | + (void)of_setMainRunLoop: (OFRunLoop *)runLoop { mainRunLoop = [runLoop retain]; } static OFRunLoopState * |
︙ | |||
1084 1085 1086 1087 1088 1089 1090 | 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 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 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 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 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 | - + - + - + - + - - + + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - | \ objc_autoreleasePoolPop(pool); + (void)of_addAsyncReadForStream: (OFStream <OFReadyForReadingObserving> *) stream buffer: (void *)buffer length: (size_t)length |
︙ | |||
1352 1353 1354 1355 1356 1357 1358 | 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 | - + - | @try { OFRunLoopState *state; _states = [[OFMutableDictionary alloc] init]; state = [[OFRunLoopState alloc] init]; @try { |
︙ | |||
1381 1382 1383 1384 1385 1386 1387 | 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 | - + - + | #endif [super dealloc]; } - (void)addTimer: (OFTimer *)timer { |
︙ | |||
1408 1409 1410 1411 1412 1413 1414 | 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 | - + | #if defined(OF_HAVE_SOCKETS) [state->_kernelEventObserver cancel]; #elif defined(OF_HAVE_THREADS) [state->_condition signal]; #endif } |
︙ | |||
1439 1440 1441 1442 1443 1444 1445 | 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 | - + - + | #endif } #ifdef OF_AMIGAOS - (void)addExecSignal: (ULONG)signal target: (id)target selector: (SEL)selector { [self addExecSignal: signal |
︙ | |||
1482 1483 1484 1485 1486 1487 1488 | 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 | - + - + | } - (void)removeExecSignal: (ULONG)signal target: (id)target selector: (SEL)selector { [self removeExecSignal: signal |
︙ | |||
1552 1553 1554 1555 1556 1557 1558 | 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 | - + - + - + | - (void)runUntilDate: (OFDate *)deadline { _stop = false; while (!_stop && (deadline == nil || deadline.timeIntervalSinceNow >= 0)) |
︙ | |||
1618 1619 1620 1621 1622 1623 1624 | 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 | - + | } @finally { [state->_timersQueueMutex unlock]; } #endif /* Watch for I/O events until the next timer is due */ if (nextTimer != nil || deadline != nil) { |
︙ | |||
1692 1693 1694 1695 1696 1697 1698 | 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 | - + - | } @finally { _currentMode = previousMode; } } - (void)stop { |
Modified src/OFSPXSocket.h from [20d64f5e49] to [3613243cdb].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + | #ifdef OF_HAVE_BLOCKS /** * @brief A block which is called when the socket connected. * * @param exception An exception which occurred while connecting the socket or * `nil` on success */ |
︙ | |||
114 115 116 117 118 119 120 | 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 | - + - + - - + + | * @param port The port (sometimes also called socket number) on the node to * connect to * @param runLoopMode The run loop mode in which to perform the async connect */ - (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node network: (uint32_t)network port: (uint16_t)port |
Modified src/OFSPXSocket.m from [852f3cc78c] to [52c6bd502b].
︙ | |||
47 48 49 50 51 52 53 | 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 | - + - + - + - + | @interface OFSPXSocketAsyncConnectDelegate: OFObject <OFRunLoopConnectDelegate> { OFSPXSocket *_socket; unsigned char _node[IPX_NODE_LEN]; uint32_t _network; uint16_t _port; #ifdef OF_HAVE_BLOCKS |
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + | #ifdef OF_HAVE_BLOCKS [_block release]; #endif [super dealloc]; } |
︙ | |||
250 251 252 253 254 255 256 | 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 | - + - + - + - + - - + + | - (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node network: (uint32_t)network port: (uint16_t)port { [self asyncConnectToNode: node network: network port: port |
︙ |
Modified src/OFSPXStreamSocket.h from [9b835a4c0b] to [83c06e9779].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - - + | #ifdef OF_HAVE_BLOCKS /** * @brief A block which is called when the socket connected. * * @param exception An exception which occurred while connecting the socket or * `nil` on success */ |
︙ | |||
118 119 120 121 122 123 124 | 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 | - + - + - - + + | * @param port The port (sometimes also called socket number) on the node to * connect to * @param runLoopMode The run loop mode in which to perform the async connect */ - (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node network: (uint32_t)network port: (uint16_t)port |
Modified src/OFSPXStreamSocket.m from [759cabd824] to [0c0bb7951d].
︙ | |||
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 | - + - - + - + - - + | <OFRunLoopConnectDelegate> { OFSPXStreamSocket *_socket; unsigned char _node[IPX_NODE_LEN]; uint32_t _network; uint16_t _port; #ifdef OF_HAVE_BLOCKS |
︙ | |||
102 103 104 105 106 107 108 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + | #ifdef OF_HAVE_BLOCKS [_block release]; #endif [super dealloc]; } |
︙ | |||
254 255 256 257 258 259 260 | 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 | - + - + - + - + - - + + | - (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node network: (uint32_t)network port: (uint16_t)port { [self asyncConnectToNode: node network: network port: port |
︙ |
Modified src/OFSelectKernelEventObserver.m from [3e6bc46edc] to [a83b51ae9b].
︙ | |||
165 166 167 168 169 170 171 | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | - + | #endif FD_CLR((of_socket_t)fd, &_writeFDs); [super removeObjectForWriting: object]; } |
︙ |
Modified src/OFSequencedPacketSocket.h from [441de8fe25] to [2e0a024066].
︙ | |||
31 32 33 34 35 36 37 | 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 | - + - + - + | * @brief A block which is called when a packet has been received. * * @param length The length of the packet * @param exception An exception which occurred while receiving or `nil` on * success * @return A bool whether the same block should be used for the next receive */ |
︙ | |||
199 200 201 202 203 204 205 | 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 | - + - - - + + - - + - - - - + + + - - + | * * @param buffer The buffer to write the packet to * @param length The length of the buffer * @param runLoopMode The run loop mode in which to perform the async receive */ - (void)asyncReceiveIntoBuffer: (void *)buffer length: (size_t)length |
︙ | |||
266 267 268 269 270 271 272 | 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 | - + - - - + - + - - + | /** * @brief Asynchronously sends the specified packet. * * @param data The data to send as a packet * @param runLoopMode The run loop mode in which to perform the async send */ |
︙ | |||
326 327 328 329 330 331 332 | 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 | - + - + - + - - + + | - (void)asyncAccept; /** * @brief Asynchronously accept an incoming connection. * * @param runLoopMode The run loop mode in which to perform the async accept */ |
︙ |
Modified src/OFSequencedPacketSocket.m from [7bba0bbd14] to [2fe1b9a9ce].
︙ | |||
176 177 178 179 180 181 182 | 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 | - + - + - - - + + - - + - + - + - - + | return ret; } - (void)asyncReceiveIntoBuffer: (void *)buffer length: (size_t)length { [self asyncReceiveIntoBuffer: buffer length: length |
︙ | |||
262 263 264 265 266 267 268 | 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 | - + - + - - + - + - - + + | requestedLength: length bytesWritten: bytesWritten errNo: 0]; } - (void)asyncSendData: (OFData *)data { |
︙ | |||
387 388 389 390 391 392 393 | 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 | - + - + - + - - + - + - - + + | } return client; } - (void)asyncAccept { |
︙ | |||
433 434 435 436 437 438 439 | 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | - + | return &_remoteAddress; } - (void)cancelAsyncRequests { [OFRunLoop of_cancelAsyncRequestsForObject: self |
︙ |
Modified src/OFSet.h from [14327ba57e] to [b05430c060].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + | /** * @brief A block for enumerating an OFSet. * * @param object The current object * @param stop A pointer to a variable that can be set to true to stop the * enumeration */ |
︙ | |||
250 251 252 253 254 255 256 | 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 | - + - - + + | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each object in the set. * * @param block The block to execute for each object in the set */ |
Modified src/OFSet.m from [f23395a631] to [b7d60ea604].
︙ | |||
237 238 239 240 241 242 243 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | - + | } - (OFEnumerator *)objectEnumerator { OF_UNRECOGNIZED_SELECTOR } |
︙ | |||
424 425 426 427 428 429 430 | 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 | - + - + | void *pool = objc_autoreleasePoolPush(); id ret = [[[self objectEnumerator] nextObject] retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ |
Added src/OFSizeValue.h version [48dc2259c8].
|
Added src/OFSizeValue.m version [c2a5ad86a9].
|
Modified src/OFSortedList.m from [1f44909bdd] to [2de4cf3237].
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + | } - (of_list_object_t *)insertObject: (id <OFComparing>)object { of_list_object_t *iter; for (iter = _lastListObject; iter != NULL; iter = iter->previous) { |
Modified src/OFStdIOStream.h from [db049cd597] to [cc0a782d1d].
︙ | |||
114 115 116 117 118 119 120 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | - + - + | /** * @brief Moves the cursor to the specified absolute position. Does nothing if * there is no underlying terminal. * * @param position The position to move the cursor to */ |
︙ |
Modified src/OFStdIOStream.m from [56aed5bccb] to [4b65dc7955].
︙ | |||
489 490 491 492 493 494 495 | 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 | - + - + | if (!isatty(_fd)) return; [self writeFormat: @"\033[%uG", column + 1]; #endif } |
︙ |
Modified src/OFStream.h from [7fe1e202cf] to [b19f1dd539].
︙ | |||
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 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 | - - + - + - - + + - + | * stream. * * @param length The length of the data that has been read * @param exception An exception which occurred while reading or `nil` on * success * @return A bool whether the same block should be used for the next read */ |
︙ | |||
157 158 159 160 161 162 163 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + | * matches the length of the specified data on the * asynchronous write if no exception was encountered. * @param exception An exception that occurred while writing, or nil on success * @return The string to repeat the write with or nil if it should not repeat */ - (nullable OFString *)stream: (OFStream *)stream didWriteString: (OFString *)string |
︙ | |||
309 310 311 312 313 314 315 | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | - + | * The buffer must not be freed before the async read completed! * @param length The length of the data that should be read at most. * The buffer *must* be *at least* this big! * @param runLoopMode The run loop mode in which to perform the async read */ - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length |
︙ | |||
348 349 350 351 352 353 354 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | - + | * @param buffer The buffer into which the data is read * @param length The length of the data that should be read. * The buffer *must* be *at least* this big! * @param runLoopMode The run loop mode in which to perform the async read */ - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length |
︙ | |||
378 379 380 381 382 383 384 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | - + | * If the block returns true, it will be called again with the same * buffer and maximum length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return false from the block. */ - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length |
︙ | |||
408 409 410 411 412 413 414 | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | - - + + | * If the block returns true, it will be called again with the same * buffer and maximum length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return false from the block. */ - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length |
︙ | |||
434 435 436 437 438 439 440 | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + | * If the block returns true, it will be called again with the same * buffer and exact length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return false from the block. */ - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length |
︙ | |||
460 461 462 463 464 465 466 | 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | - - + + | * If the block returns true, it will be called again with the same * buffer and exact length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return false from the block. */ - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length |
︙ | |||
788 789 790 791 792 793 794 | 787 788 789 790 791 792 793 794 795 796 797 798 799 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 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 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 | - + - + - + - - + + - + - - + + - - - + + + | * Otherwise you will get an exception! * * @param encoding The encoding of the string to read from the stream * @param length The length (in bytes) of the string to read from the stream * @return A string with the specified length */ - (OFString *)readStringWithLength: (size_t)length |
︙ | |||
914 915 916 917 918 919 920 | 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | - + | * @ref readLineWithEncoding:) and returns `nil` if no complete line has * been received yet. * * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the line is not * complete yet */ |
︙ | |||
936 937 938 939 940 941 942 | 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 | - + | * * @param delimiter The delimiter * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ - (nullable OFString *)readTillDelimiter: (OFString *)delimiter |
︙ | |||
960 961 962 963 964 965 966 | 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 | - + | * * @param delimiter The delimiter * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ - (nullable OFString *)tryReadTillDelimiter: (OFString *)delimiter |
︙ | |||
998 999 1000 1001 1002 1003 1004 | 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 | - + | * @note The stream must conform to @ref OFReadyForWritingObserving in order * for this to work! * * @param data The data which is written into the stream * @param runLoopMode The run loop mode in which to perform the async write */ - (void)asyncWriteData: (OFData *)data |
︙ | |||
1022 1023 1024 1025 1026 1027 1028 | 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 1061 1062 1063 1064 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 1102 1103 1104 1105 1106 1107 1108 1109 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 | - + - - + + - + - - + + - + - - + + - - - + + + | * for this to work! * * @param string The string which is written into the stream * @param encoding The encoding in which the string should be written to the * stream */ - (void)asyncWriteString: (OFString *)string |
︙ | |||
1339 1340 1341 1342 1343 1344 1345 | 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 | - + - - + - - - + + - - + + | * @brief Writes a string into the stream in the specified encoding, without * the trailing zero. * * @param string The string from which the data is written to the stream * @param encoding The encoding in which to write the string to the stream * @return The number of bytes written */ |
︙ |
Modified src/OFStream.m from [7e32841415] to [60268de704].
︙ | |||
196 197 198 199 200 201 202 | 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 | - + - + - + - + - + - + - - + + - + - + - - + + | } #ifdef OF_HAVE_SOCKETS - (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length { [self asyncReadIntoBuffer: buffer length: length |
︙ | |||
618 619 620 621 622 623 624 | 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 | - + - + - + | [data makeImmutable]; return data; } - (OFString *)readStringWithLength: (size_t)length { return [self readStringWithLength: length |
︙ | |||
787 788 789 790 791 792 793 | 787 788 789 790 791 792 793 794 795 796 797 798 799 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 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 | - + - + - - + + - + - + - - + + - + - - + + - - + + - + - - - + + + - + - + | _waitingForDelimiter = true; return nil; } - (OFString *)readLine { |
︙ | |||
1030 1031 1032 1033 1034 1035 1036 | 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 1061 1062 1063 | - + - + - + | return nil; } - (OFString *)readTillDelimiter: (OFString *)delimiter { return [self readTillDelimiter: delimiter |
︙ | |||
1092 1093 1094 1095 1096 1097 1098 | 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 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 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 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 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 | - + - + - - - + + - + - + - - + + - + - - + - - + + - + - - + + - - + + - + - - - + + + | return length; } } #ifdef OF_HAVE_SOCKETS - (void)asyncWriteData: (OFData *)data { |
︙ | |||
1557 1558 1559 1560 1561 1562 1563 | 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 | - + - + - - + - + | objc_autoreleasePoolPop(pool); return length; } - (size_t)writeString: (OFString *)string { |
︙ | |||
1729 1730 1731 1732 1733 1734 1735 | 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 | - + | OF_UNRECOGNIZED_SELECTOR } #ifdef OF_HAVE_SOCKETS - (void)cancelAsyncRequests { [OFRunLoop of_cancelAsyncRequestsForObject: self |
︙ |
Modified src/OFStreamSocket.h from [27f4a02196] to [b246a95c98].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - + + | * * @param acceptedSocket The socket which has been accepted * @param exception An exception which occurred while accepting the socket or * `nil` on success * @return A bool whether the same block should be used for the next incoming * connection */ |
︙ | |||
125 126 127 128 129 130 131 | 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 | - + - + - + - - + | - (void)asyncAccept; /** * @brief Asynchronously accept an incoming connection. * * @param runLoopMode The run loop mode in which to perform the async accept */ |
Modified src/OFStreamSocket.m from [7f5d88caa9] to [81e1bbc5f7].
︙ | |||
307 308 309 310 311 312 313 | 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 | - + - + - + - + - - - + + | } return client; } - (void)asyncAccept { |
︙ |
Modified src/OFString+CryptographicHashing.m from [9f70fbd17b] to [7e22b6306f].
︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + | cString[i * 2] = (high > 9 ? high - 10 + 'a' : high + '0'); cString[i * 2 + 1] = (low > 9 ? low - 10 + 'a' : low + '0'); } objc_autoreleasePoolPop(pool); return [OFString stringWithCString: cString |
︙ |
Modified src/OFString+JSONParsing.m from [c87ddb2735] to [b02567e9c8].
︙ | |||
105 106 107 108 109 110 111 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + - + | old = *pointer; skipWhitespaces(pointer, stop, line); skipComment(pointer, stop, line); } } |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - - + + | break; case 't': buffer[i++] = '\t'; (*pointer)++; break; /* Parse Unicode escape sequence */ case 'u':; |
︙ | |||
303 304 305 306 307 308 309 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | - - + + | (**pointer >= 'A' && **pointer <= 'Z') || (**pointer >= '0' && **pointer <= '9') || **pointer == '_' || **pointer == '$' || (**pointer & 0x80)) { buffer[i++] = **pointer; (*pointer)++; } else if (**pointer == '\\') { |
︙ |
Modified src/OFString+URLEncoding.m from [6ddd187364] to [88731f0af5].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - + - - + + - + | @implementation OFString (URLEncoding) - (OFString *)stringByURLEncodingWithAllowedCharacters: (OFCharacterSet *)allowedCharacters { OFMutableString *ret = [OFMutableString string]; void *pool = objc_autoreleasePoolPush(); |
︙ |
Modified src/OFString+XMLUnescaping.h from [d4c2a5d60a] to [cbe997ff43].
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - - + + | * @brief A block which is called to replace unknown XML entities in an XML * string. * * @param string The XML string which contains an unknown entity * @param entity The XML entity which is unknown * @return A replacement string for the unknown entity */ |
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 | - + - | #ifdef OF_HAVE_BLOCKS /** * @brief Unescapes XML in the string and uses the specified block for unknown * entities. * * @param block A block which handles unknown entities */ |
Modified src/OFString+XMLUnescaping.m from [c09f1d107c] to [0a903f9009].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | #import "OFUnknownXMLEntityException.h" int _OFString_XMLUnescaping_reference; static OF_INLINE OFString * parseNumericEntity(const char *entity, size_t length) { |
︙ | |||
98 99 100 101 102 103 104 | 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 | - + - + - + - + - + | inEntity = true; } else if (inEntity && string[i] == ';') { const char *entity = string + last; size_t entityLength = i - last; if (entityLength == 2 && memcmp(entity, "lt", 2) == 0) [ret appendCString: "<" |
︙ | |||
186 187 188 189 190 191 192 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + | return [delegate string: self containsUnknownEntityNamed: entity]; } #ifdef OF_HAVE_BLOCKS static id lookupUsingBlock(void *context, OFString *self, OFString *entity) { |
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 | - + - | - (OFString *)stringByXMLUnescapingWithDelegate: (id <OFStringXMLUnescapingDelegate>)delegate { return parseEntities(self, lookupUsingDelegate, delegate); } #ifdef OF_HAVE_BLOCKS |
Modified src/OFString.h from [9aa19fe6df] to [c20eafef33].
︙ | |||
50 51 52 53 54 55 56 | 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 | - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + + - - - + + + + + - + + + + + + + + + - + | @class OFConstantString; @class OFString; #else typedef void OFString; #endif #if defined(__cplusplus) && __cplusplus >= 201103L |
︙ | |||
213 214 215 216 217 218 219 | 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 | - + - + - + | /** * @brief The string as an array of Unicode characters. * * The result is valid until the autorelease pool is released. If you want to * use the result outside the scope of the current autorelease pool, you have to * copy it. */ |
︙ | |||
347 348 349 350 351 352 353 | 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 | - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - - + + | * @brief Creates a new OFString from a C string with the specified encoding. * * @param cString A C string to initialize the OFString with * @param encoding The encoding of the C string * @return A new autoreleased OFString */ + (instancetype)stringWithCString: (const char *)cString |
︙ | |||
510 511 512 513 514 515 516 | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | - + | * specified encoding. * * @param path The path to the file * @param encoding The encoding of the file * @return A new autoreleased OFString */ + (instancetype)stringWithContentsOfFile: (OFString *)path |
︙ | |||
536 537 538 539 540 541 542 | 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 | - + | * specified encoding. * * @param URL The URL to the contents for the string * @param encoding The encoding to assume * @return A new autoreleased OFString */ + (instancetype)stringWithContentsOfURL: (OFURL *)URL |
︙ | |||
604 605 606 607 608 609 610 | 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 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 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 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 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - - + + - - + + | * specified encoding. * * @param cString A C string to initialize the OFString with * @param encoding The encoding of the C string * @return An initialized OFString */ - (instancetype)initWithCString: (const char *)cString |
︙ | |||
782 783 784 785 786 787 788 | 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | - + | * specified file in the specified encoding. * * @param path The path to the file * @param encoding The encoding of the file * @return An initialized OFString */ - (instancetype)initWithContentsOfFile: (OFString *)path |
︙ | |||
809 810 811 812 813 814 815 | 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 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 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 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 1003 1004 1005 | - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - + - + + - + - - - - - + - - - + + + - + - + - - - - - + - + - + - - - - - + - - + + | * specified URL in the specified encoding. * * @param URL The URL to the contents for the string * @param encoding The encoding to assume * @return An initialized OFString */ - (instancetype)initWithContentsOfURL: (OFURL *)URL |
︙ | |||
1023 1024 1025 1026 1027 1028 1029 | 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 | - + | /** * @brief Creates a substring with the specified range. * * @param range The range of the substring * @return The substring as a new autoreleased OFString */ |
︙ | |||
1124 1125 1126 1127 1128 1129 1130 | 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 | - + | * * None yet * @param range The range in which to replace the string * @return A new string with the occurrences of the specified string replaced */ - (OFString *)stringByReplacingOccurrencesOfString: (OFString *)string withString: (OFString *)replacement options: (int)options |
︙ | |||
1157 1158 1159 1160 1161 1162 1163 | 1157 1158 1159 1160 1161 1162 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 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 | - + - - - - - + - + - - - - - + - + - + - + - + - + - + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + | componentsSeparatedByString: (OFString *)delimiter; /** * @brief Separates the string into an array of strings, split by the specified * delimiter. * * @param delimiter The delimiter for separating |
︙ |
Modified src/OFString.m from [858181ff3a] to [8bdf1a14a9].
︙ | |||
85 86 87 88 89 90 91 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + | #if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L) static locale_t cLocale; #endif @interface OFString () - (size_t)of_getCString: (char *)cString maxLength: (size_t)maxLength |
︙ | |||
141 142 143 144 145 146 147 | 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 | - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | void _reference_to_OFConstantString(void) { [OFConstantString class]; } |
︙ | |||
262 263 264 265 266 267 268 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | - + | return 4; } return 0; } ssize_t |
︙ | |||
312 313 314 315 316 317 318 | 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 | - + - + - + - + | return 4; } return 0; } size_t |
︙ | |||
417 418 419 420 421 422 423 | 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 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + | return (id)[[OFUTF8String alloc] initWithUTF8StringNoCopy: UTF8String length: UTF8StringLength freeWhenDone: freeWhenDone]; } - (instancetype)initWithCString: (const char *)cString |
︙ | |||
560 561 562 563 564 565 566 | 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | - + - + | #ifdef OF_HAVE_FILES - (instancetype)initWithContentsOfFile: (OFString *)path { return (id)[[OFUTF8String alloc] initWithContentsOfFile: path]; } - (instancetype)initWithContentsOfFile: (OFString *)path |
︙ | |||
664 665 666 667 668 669 670 | 664 665 666 667 668 669 670 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 708 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 | - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + | return [[[self alloc] initWithUTF8StringNoCopy: UTF8String length: UTF8StringLength freeWhenDone: freeWhenDone] autorelease]; } + (instancetype)stringWithCString: (const char *)cString |
︙ | |||
774 775 776 777 778 779 780 | 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | - + - + | #ifdef OF_HAVE_FILES + (instancetype)stringWithContentsOfFile: (OFString *)path { return [[[self alloc] initWithContentsOfFile: path] autorelease]; } + (instancetype)stringWithContentsOfFile: (OFString *)path |
︙ | |||
812 813 814 815 816 817 818 | 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | - + - + | return [super init]; } - (instancetype)initWithUTF8String: (const char *)UTF8String { return [self initWithCString: UTF8String |
︙ | |||
848 849 850 851 852 853 854 | 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 | - + - + - + | if (freeWhenDone) free(UTF8String); return ret; } - (instancetype)initWithCString: (const char *)cString |
︙ | |||
885 886 887 888 889 890 891 | 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 948 949 950 951 952 953 954 955 956 957 958 959 960 | - + - + - + - + - + - - + + - + - + - + - + - + - + - - + + - + - + | } - (instancetype)initWithString: (OFString *)string { OF_INVALID_INIT_METHOD } |
︙ | |||
973 974 975 976 977 978 979 | 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 | - + - + | OF_INVALID_INIT_METHOD } #ifdef OF_HAVE_FILES - (instancetype)initWithContentsOfFile: (OFString *)path { return [self initWithContentsOfFile: path |
︙ | |||
1028 1029 1030 1031 1032 1033 1034 | 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 | - + | tmp[(size_t)fileSize] = '\0'; } @catch (id e) { [self release]; @throw e; } |
︙ | |||
1054 1055 1056 1057 1058 1059 1060 | 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 | - + - + | return self; } #endif - (instancetype)initWithContentsOfURL: (OFURL *)URL { return [self initWithContentsOfURL: URL |
︙ | |||
1111 1112 1113 1114 1115 1116 1117 | 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 | - + - + - + | objc_autoreleasePoolPop(pool); return self; } - (size_t)of_getCString: (char *)cString maxLength: (size_t)maxLength |
︙ | |||
1155 1156 1157 1158 1159 1160 1161 | 1155 1156 1157 1158 1159 1160 1161 1162 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 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + | break; } } cString[j] = '\0'; return j; |
︙ | |||
1429 1430 1431 1432 1433 1434 1435 | 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 | - + - + - + - + - - + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + | freeWhenDone: true] items]; } @catch (id e) { free(cString); @throw e; } } |
︙ | |||
1794 1795 1796 1797 1798 1799 1800 | 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 | - + - + - + + - + - - - + + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - + - + | @throw [OFOutOfRangeException exception]; [data addItems: self.UTF8String count: length]; return data; } |
︙ | |||
1923 1924 1925 1926 1927 1928 1929 | 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 | - + - + - + - + - + - + | characters[i])) return range.location + i; } } @finally { free(characters); } |
︙ | |||
2037 2038 2039 2040 2041 2042 2043 | 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 | - + | [new makeImmutable]; return new; } - (OFString *)stringByReplacingOccurrencesOfString: (OFString *)string withString: (OFString *)replacement options: (int)options |
︙ | |||
2098 2099 2100 2101 2102 2103 2104 | 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 | - + - + - + - + - - + + - + - + - + - + - - + + | [new deleteEnclosingWhitespaces]; [new makeImmutable]; return new; } - (bool)hasPrefix: (OFString *)prefix { |
︙ | |||
2195 2196 2197 2198 2199 2200 2201 | 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 | - + - + + - + - + - - + + - - + + - + - + | return array; } last = 0; for (size_t i = 0; i <= length - delimiterLength; i++) { if (memcmp(characters + i, delimiterCharacters, |
︙ | |||
2417 2418 2419 2420 2421 2422 2423 | 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 | - - + + - - + + - + - + | } - (float)floatValue { void *pool = objc_autoreleasePoolPush(); OFString *stripped = self.stringByDeletingEnclosingWhitespaces; |
︙ | |||
2470 2471 2472 2473 2474 2475 2476 | 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 | - - + + - - + + - + - + | } - (double)doubleValue { void *pool = objc_autoreleasePoolPush(); OFString *stripped = self.stringByDeletingEnclosingWhitespaces; |
︙ | |||
2518 2519 2520 2521 2522 2523 2524 | 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 | - + - + - + - + - + - + - + - + - + - + - + - + - + | @throw [OFInvalidFormatException exception]; objc_autoreleasePoolPop(pool); return value; } |
︙ | |||
2582 2583 2584 2585 2586 2587 2588 | 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 | - + - + - + - + - + - + - + - + - + - + - + - + | } else buffer[j++] = c; } } buffer[j] = 0; @try { |
︙ | |||
2685 2686 2687 2688 2689 2690 2691 | 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 | - + - + - + - + - + - + - + - + - + | if ((length = ExpandEnvironmentStringsW(self.UTF16String, buffer, sizeof(buffer))) == 0) return self; return [OFString stringWithUTF16String: buffer length: length - 1]; } else { |
Modified src/OFSubarray.h from [a7a115b770] to [398ae6fbae].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - - + + | #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN @interface OFSubarray: OFArray { OFArray *_array; |
Modified src/OFSubarray.m from [a275f23615] to [d5bd07084c].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + - + | #include "config.h" #import "OFSubarray.h" #import "OFOutOfRangeException.h" @implementation OFSubarray |
︙ | |||
57 58 59 60 61 62 63 | 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 | - + - + - + - + - + - + | { if (idx >= _range.length) @throw [OFOutOfRangeException exception]; return [_array objectAtIndex: idx + _range.location]; } |
Modified src/OFSystemInfo.m from [6c63cf09e4] to [014dd1b2fc].
︙ | |||
160 161 162 163 164 165 166 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - + | } # endif #elif defined(OF_WINDOWS) # ifdef OF_HAVE_FILES void *pool = objc_autoreleasePoolPush(); @try { |
︙ | |||
386 387 388 389 390 391 392 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - + | OFString *home; if ((home = [env objectForKey: @"HOME"]) == nil) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; |
︙ | |||
478 479 480 481 482 483 484 | 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + | OFString *home; if ((home = [env objectForKey: @"HOME"]) == nil) @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; |
︙ | |||
537 538 539 540 541 542 543 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | - + | return nil; buffer[0] = regs.ebx; buffer[1] = regs.edx; buffer[2] = regs.ecx; return [OFString stringWithCString: (char *)buffer |
︙ | |||
561 562 563 564 565 566 567 | 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | - + - + | buffer[i++] = regs.eax; buffer[i++] = regs.ebx; buffer[i++] = regs.ecx; buffer[i++] = regs.edx; } return [OFString stringWithCString: (char *)buffer |
︙ |
Modified src/OFTCPSocket.h from [b81cee61b1] to [d5a780252d].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + | #ifdef OF_HAVE_BLOCKS /** * @brief A block which is called when the socket connected. * * @param exception An exception which occurred while connecting the socket or * `nil` on success */ |
︙ | |||
166 167 168 169 170 171 172 | 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 | - + - + - - + + | * * @param host The host to connect to * @param port The port on the host to connect to * @param runLoopMode The run loop mode in which to perform the async connect */ - (void)asyncConnectToHost: (OFString *)host port: (uint16_t)port |
︙ |
Modified src/OFTCPSocket.m from [5cdf6dd0d8] to [2ec643758e].
︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - - + + | #import "OFNotImplementedException.h" #import "OFNotOpenException.h" #import "OFSetOptionFailedException.h" #import "socket.h" #import "socket_helpers.h" |
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | - + - + | objc_autoreleasePoolPop(pool); } - (void)asyncConnectToHost: (OFString *)host port: (uint16_t)port { [self asyncConnectToHost: host port: port |
︙ | |||
251 252 253 254 255 256 257 | 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 | - + - + - - + + | objc_autoreleasePoolPop(pool); } #ifdef OF_HAVE_BLOCKS - (void)asyncConnectToHost: (OFString *)host port: (uint16_t)port |
︙ |
Modified src/OFTCPSocketSOCKS5Connector.h from [edab2535a4] to [2e0767356b].
︙ | |||
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 | - + - + - | @interface OFTCPSocketSOCKS5Connector: OFObject <OFTCPSocketDelegate> { OFTCPSocket *_socket; OFString *_host; uint16_t _port; id <OFTCPSocketDelegate> _Nullable _delegate; #ifdef OF_HAVE_BLOCKS |
Modified src/OFTCPSocketSOCKS5Connector.m from [777126a470] to [e22943df87].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + | @implementation OFTCPSocketSOCKS5Connector - (instancetype)initWithSocket: (OFTCPSocket *)sock host: (OFString *)host port: (uint16_t)port delegate: (id <OFTCPSocketDelegate>)delegate #ifdef OF_HAVE_BLOCKS |
︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + | } - (bool)stream: (OFStream *)sock didReadIntoBuffer: (void *)buffer length: (size_t)length exception: (id)exception { |
︙ | |||
265 266 267 268 269 270 271 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + | } - (OFData *)stream: (OFStream *)sock didWriteData: (OFData *)data bytesWritten: (size_t)bytesWritten exception: (id)exception { |
︙ |
Modified src/OFTarArchive.h from [a2350271f7] to [0ba5d85fe3].
︙ | |||
27 28 29 30 31 32 33 | 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 | - - - - + + + + - + - + | * * @brief A class for accessing and manipulating tar archives. */ OF_SUBCLASSING_RESTRICTED @interface OFTarArchive: OFObject { OFStream *_stream; |
︙ |
Modified src/OFTarArchive.m from [0481cd7f61] to [72e6e59f69].
︙ | |||
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 104 | - + - + - + - + | { self = [super init]; @try { _stream = [stream retain]; if ([mode isEqual: @"r"]) |
︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + | if (!empty) @throw [OFInvalidFormatException exception]; [(OFSeekableStream *)stream seekToOffset: -1024 whence: SEEK_END]; } |
︙ | |||
154 155 156 157 158 159 160 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + | - (OFTarArchiveEntry *)nextEntry { OFTarArchiveEntry *entry; uint32_t buffer[512 / sizeof(uint32_t)]; bool empty = true; |
︙ | |||
198 199 200 201 202 203 204 | 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 | - + - + - | entry: entry]; return entry; } - (OFStream *)streamForReadingCurrentEntry { |
︙ | |||
251 252 253 254 255 256 257 | 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | - + - - + - | [_lastReturnedStream close]; } @catch (OFNotOpenException *e) { /* Might have already been closed by the user - that's fine. */ } [_lastReturnedStream release]; _lastReturnedStream = nil; |
︙ |
Modified src/OFTarArchiveEntry+Private.h from [e07f2ba876] to [929bab9877].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + - + | OF_ASSUME_NONNULL_BEGIN @class OFStream; OF_DIRECT_MEMBERS @interface OFTarArchiveEntry () - (instancetype)of_initWithHeader: (unsigned char [_Nonnull 512])header |
Modified src/OFTarArchiveEntry.h from [e9a73505d7] to [5715325220].
︙ | |||
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + - + - + - + - + - + - + - + - - + + - + | /** @file */ @class OFDate; /** * @brief The type of the archive entry. */ |
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + - + | * @brief The date of the last modification of the file. */ @property (readonly, retain, nonatomic) OFDate *modificationDate; /** * @brief The type of the archive entry. * |
︙ |
Modified src/OFTarArchiveEntry.m from [9e0aa08280] to [4eb33d5a79].
︙ | |||
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 | - + - + | #import "OFStream.h" #import "OFString.h" #import "OFOutOfRangeException.h" static OFString * stringFromBuffer(const unsigned char *buffer, size_t length, |
︙ | |||
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 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 | - + - + - + - + | return 0; if (buffer[0] == 0x80) { for (size_t i = 1; i < length; i++) value = (value << 8) | buffer[i]; } else value = [stringFromBuffer(buffer, length, |
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + | - (instancetype)initWithFileName: (OFString *)fileName { self = [super init]; @try { _fileName = [fileName copy]; |
︙ | |||
228 229 230 231 232 233 234 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + | } - (OFDate *)modificationDate { return _modificationDate; } |
︙ | |||
286 287 288 289 290 291 292 | 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 | - + - + - + - + - + - + - + - + - + | objc_autoreleasePoolPop(pool); return [ret autorelease]; } - (void)of_writeToStream: (OFStream *)stream |
Modified src/OFThread.h from [f4a6bc3a11] to [4486e81af4].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + | #if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS) /** * @brief A block to be executed in a new thread. * * @return The object which should be returned when the thread is joined */ |
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | - + | OF_THREAD_RUNNING, OF_THREAD_WAITING_FOR_JOIN } _running; # ifndef OF_OBJFW_RUNTIME void *_pool; # endif # ifdef OF_HAVE_BLOCKS |
︙ | |||
115 116 117 118 119 120 121 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - + - | */ @property OF_NULLABLE_PROPERTY (copy) OFString *name; # ifdef OF_HAVE_BLOCKS /** * @brief The block to execute in the thread. */ |
︙ | |||
165 166 167 168 169 170 171 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - + | # ifdef OF_HAVE_BLOCKS /** * @brief Creates a new thread with the specified block. * * @param threadBlock A block which is executed by the thread * @return A new, autoreleased thread */ |
︙ | |||
213 214 215 216 217 218 219 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + | /** * @brief Suspends execution of the current thread for the specified time * interval. * * @param timeInterval The number of seconds to sleep */ |
︙ | |||
265 266 267 268 269 270 271 | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | - + | # ifdef OF_HAVE_BLOCKS /** * @brief Initializes an already allocated thread with the specified block. * * @param threadBlock A block which is executed by the thread * @return An initialized OFThread. */ |
︙ |
Modified src/OFThread.m from [9da78353a7] to [edb1078c84].
︙ | |||
171 172 173 174 175 176 177 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | - + | + (instancetype)thread { return [[[self alloc] init] autorelease]; } # ifdef OF_HAVE_BLOCKS |
︙ | |||
231 232 233 234 235 236 237 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - + | DNSResolver = [[OFDNSResolver alloc] init]; return DNSResolver; # endif } #endif |
︙ | |||
372 373 374 375 376 377 378 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | - + | @throw e; } return self; } # ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFThreadPool.h from [7948e1d39c] to [4da774feaf].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + | /** @file */ #ifdef OF_HAVE_BLOCKS /** * @brief A block for a job which should be executed in a thread pool. */ |
︙ | |||
100 101 102 103 104 105 106 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + | #ifdef OF_HAVE_BLOCKS /** * @brief Executes the specified block as soon as a thread is ready. * * @param block The block to execute */ |
Modified src/OFThreadPool.m from [1d33cef32f] to [ae8a5813e0].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + - + | OF_DIRECT_MEMBERS @interface OFThreadPoolJob: OFObject { id _target; SEL _selector; id _object; #ifdef OF_HAVE_BLOCKS |
︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + | @throw e; } return self; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
338 339 340 341 342 343 344 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - + | [self of_dispatchJob: job]; } @finally { [job release]; } } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFTimer+Private.h from [a79edf83ef] to [766374c70a].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 | - + | #import "OFTimer.h" OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface OFTimer () - (void)of_setInRunLoop: (nullable OFRunLoop *)runLoop |
Modified src/OFTimer.h from [4d79b8c7ef] to [2337ad9abd].
︙ | |||
28 29 30 31 32 33 34 | 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 | - + - + - + - + - + | #ifdef OF_HAVE_BLOCKS /** * @brief A block to execute when a timer fires. * * @param timer The timer which fired */ |
︙ | |||
93 94 95 96 97 98 99 | 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 | - + - + - + | * * @param timeInterval The time interval after which the timer should be fired * @param target The target on which to call the selector * @param selector The selector to call on the target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ |
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + | * @param object2 The second object to pass when calling the selector on the * target * @param object3 The third object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ |
︙ | |||
174 175 176 177 178 179 180 | 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 | - + - + - + - + - + - + | * @param object3 The third object to pass when calling the selector on the * target * @param object4 The fourth object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ |
︙ | |||
262 263 264 265 266 267 268 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | - + | * @param object2 The second object to pass when calling the selector on the * target * @param object3 The third object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ |
︙ | |||
287 288 289 290 291 292 293 | 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 | - + - + - + - + - + | * @param object3 The third object to pass when calling the selector on the * target * @param object4 The fourth object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return A new, autoreleased timer */ |
︙ | |||
367 368 369 370 371 372 373 | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - + | * target * @param object2 The second object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return An initialized timer */ - (instancetype)initWithFireDate: (OFDate *)fireDate |
︙ | |||
393 394 395 396 397 398 399 | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | - + | * target * @param object3 The third object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return An initialized timer */ - (instancetype)initWithFireDate: (OFDate *)fireDate |
︙ | |||
422 423 424 425 426 427 428 | 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | - + | * target * @param object4 The fourth object to pass when calling the selector on the * target * @param repeats Whether the timer repeats after it has been executed * @return An initialized timer */ - (instancetype)initWithFireDate: (OFDate *)fireDate |
︙ | |||
444 445 446 447 448 449 450 | 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 | - + - + - + | * @param interval The time interval after which to repeat the timer, if it is * a repeating timer * @param repeats Whether the timer repeats after it has been executed * @param block The block to invoke when the timer fires * @return An initialized timer */ - (instancetype)initWithFireDate: (OFDate *)fireDate |
︙ |
Modified src/OFTimer.m from [a68714fb85] to [c82a64c489].
︙ | |||
29 30 31 32 33 34 35 | 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 | - + - + | #endif #import "OFInvalidArgumentException.h" @implementation OFTimer @synthesize timeInterval = _interval, repeating = _repeats, valid = _valid; |
︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + | [timer retain]; objc_autoreleasePoolPop(pool); return [timer autorelease]; } |
︙ | |||
98 99 100 101 102 103 104 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + | [timer retain]; objc_autoreleasePoolPop(pool); return [timer autorelease]; } |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | - + | [timer retain]; objc_autoreleasePoolPop(pool); return [timer autorelease]; } |
︙ | |||
155 156 157 158 159 160 161 | 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 | - + - + - + - + - + | [timer retain]; objc_autoreleasePoolPop(pool); return [timer autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
238 239 240 241 242 243 244 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - + | [timer retain]; objc_autoreleasePoolPop(pool); return [timer autorelease]; } |
︙ | |||
263 264 265 266 267 268 269 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | - + | [timer retain]; objc_autoreleasePoolPop(pool); return [timer autorelease]; } |
︙ | |||
291 292 293 294 295 296 297 | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | - + - + | [timer retain]; objc_autoreleasePoolPop(pool); return [timer autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
315 316 317 318 319 320 321 | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - + | - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)of_initWithFireDate: (OFDate *)fireDate |
︙ | |||
352 353 354 355 356 357 358 | 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 | - + - + - + - + - + | @throw e; } return self; } - (instancetype)initWithFireDate: (OFDate *)fireDate |
︙ | |||
453 454 455 456 457 458 459 | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | - + - + | object: object4 arguments: 4 repeats: repeats]; } #ifdef OF_HAVE_BLOCKS - (instancetype)initWithFireDate: (OFDate *)fireDate |
︙ | |||
502 503 504 505 506 507 508 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - + - + - + | #ifdef OF_HAVE_THREADS [_condition release]; #endif [super dealloc]; } |
︙ | |||
536 537 538 539 540 541 542 | 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | - + | id object4 = [[_object4 retain] autorelease]; OF_ENSURE(_arguments <= 4); if (_repeats && _valid) { int64_t missedIntervals = -_fireDate.timeIntervalSinceNow / _interval; |
︙ |
Modified src/OFURL.m from [c6fcf8ea2f] to [67b8d12e14].
︙ | |||
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + | [[OFURLQueryKeyValueAllowedCharacterSet alloc] init]; } OF_DIRECT_MEMBERS @interface OFInvertedCharacterSetWithoutPercent: OFCharacterSet { OFCharacterSet *_characterSet; |
︙ | |||
146 147 148 149 150 151 152 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - + | - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } @end @implementation OFURLAllowedCharacterSet |
︙ | |||
175 176 177 178 179 180 181 | 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 | - + - + | default: return false; } } @end @implementation OFURLSchemeAllowedCharacterSet |
︙ | |||
224 225 226 227 228 229 230 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | - + | default: return false; } } @end @implementation OFURLQueryOrFragmentAllowedCharacterSet |
︙ | |||
257 258 259 260 261 262 263 | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + | default: return false; } } @end @implementation OFURLQueryKeyValueAllowedCharacterSet |
︙ | |||
294 295 296 297 298 299 300 | 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 | - + - + - + | @implementation OFInvertedCharacterSetWithoutPercent - (instancetype)initWithCharacterSet: (OFCharacterSet *)characterSet { self = [super init]; @try { _characterSet = [characterSet retain]; |
︙ | |||
672 673 674 675 676 677 678 | 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | - + - + - + | copy]; else { OFMutableString *path = [OFMutableString stringWithString: (URL->_URLEncodedPath != nil ? URL->_URLEncodedPath : @"/")]; |
︙ | |||
875 876 877 878 879 880 881 | 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 | - + | } - (OFString *)host { if ([_URLEncodedHost hasPrefix: @"["] && [_URLEncodedHost hasSuffix: @"]"]) { OFString *host = [_URLEncodedHost substringWithRange: |
︙ |
Modified src/OFURLHandler.h from [9ec6927971] to [aebd1b72ac].
︙ | |||
94 95 96 97 98 99 100 | 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 | - + - + - - + | - (OFStream *)openItemAtURL: (OFURL *)URL mode: (OFString *)mode; /** * @brief Returns the attributes for the item at the specified URL. * * @param URL The URL to return the attributes for * @return A dictionary of attributes for the specified URL, with the keys of |
︙ |
Modified src/OFURLHandler.m from [7996e25454] to [d88aa91e77].
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - + - - + | } - (OFStream *)openItemAtURL: (OFURL *)URL mode: (OFString *)mode { OF_UNRECOGNIZED_SELECTOR } |
︙ |
Modified src/OFUTF8String.m from [2057b791a1] to [325d0971b0].
︙ | |||
35 36 37 38 39 40 41 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + | #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "of_asprintf.h" #import "unicode.h" |
︙ | |||
223 224 225 226 227 228 229 | 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 | - + - + - + - - + + - + - + | @throw e; } return self; } - (instancetype)initWithCString: (const char *)cString |
︙ | |||
308 309 310 311 312 313 314 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + | switch (encoding) { #define CASE(encoding, var) \ case encoding: \ table = var; \ tableOffset = var##_offset; \ break; #ifdef HAVE_ISO_8859_2 |
︙ | |||
457 458 459 460 461 462 463 | 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | - + | [self release]; @throw e; } return self; } |
︙ | |||
501 502 503 504 505 506 507 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | - + - + - + - + - + | [self release]; @throw e; } return self; } |
︙ | |||
586 587 588 589 590 591 592 | 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 | - + - + - + | [self release]; @throw e; } return self; } |
︙ | |||
707 708 709 710 711 712 713 | 707 708 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 766 767 768 769 770 | - + - + - + - + - + - + - + - - + + | free(_s->cString); [super dealloc]; } - (size_t)getCString: (char *)cString maxLength: (size_t)maxLength |
︙ | |||
795 796 797 798 799 800 801 | 795 796 797 798 799 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 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 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 | - + - + - + - - + + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + | if (strcmp(_s->cString, string.UTF8String) != 0) return false; return true; } |
︙ | |||
942 943 944 945 946 947 948 | 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 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 | - + - + - + - + - + - - - + + + | _s->hash = hash; _s->hashed = true; return hash; } |
︙ | |||
1001 1002 1003 1004 1005 1006 1007 | 1001 1002 1003 1004 1005 1006 1007 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 1061 1062 1063 1064 1065 1066 1067 1068 1069 | - + - + - + - + - + - + | _s->cStringLength - rangeLocation); } else { rangeLocation = range.location; rangeLength = range.length; } if (cStringLength == 0) |
︙ | |||
1096 1097 1098 1099 1100 1101 1102 | 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 | - + - + | return false; return (memcmp(_s->cString + (_s->cStringLength - cStringLength), suffix.UTF8String, cStringLength) == 0); } - (OFArray *)componentsSeparatedByString: (OFString *)delimiter |
︙ | |||
1148 1149 1150 1151 1152 1153 1154 | 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 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 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 | - + - + - + - + - + - + - + - + - + - + | [array makeImmutable]; objc_autoreleasePoolPop(pool); return array; } |
︙ |
Modified src/OFValue.h from [938b5927a6] to [df3acd707a].
︙ | |||
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 | - + - + - + - + - + - + - + - + - + - + - + - + | * @brief The value as a non-retained object. * * If the value is not pointer-sized, @ref OFOutOfRangeException is thrown. */ @property (readonly, nonatomic) id nonretainedObjectValue; /** |
︙ | |||
109 110 111 112 113 114 115 | 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 | - + - + - + - - + - + - + - + | /** * @brief Creates a new, autoreleased OFValue containing the specified range. * * @param range The range the OFValue should contain * @return A new, autoreleased OFValue */ |
︙ |
Modified src/OFValue.m from [57c5a42ed5] to [712005bdcf].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - - + + | * 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. */ #import "OFValue.h" #import "OFBytesValue.h" |
︙ | |||
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 | - + - + - + - + - - + - + - | + (instancetype)valueWithNonretainedObject: (id)object { return [[[OFNonretainedObjectValue alloc] initWithNonretainedObject: object] autorelease]; } |
︙ | |||
169 170 171 172 173 174 175 | 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 | - + + + + + + + + - + - + - + - - - - - - - + - - + | - (id)nonretainedObjectValue { id ret; [self getValue: &ret size: sizeof(ret)]; return ret; } |
︙ |
Modified src/OFWin32ConsoleStdIOStream.h from [2abff1d7d9] to [c105a8c0f2].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + | OF_ASSUME_NONNULL_BEGIN @interface OFWin32ConsoleStdIOStream: OFStdIOStream { HANDLE _handle; WORD _attributes; |
Modified src/OFWin32ConsoleStdIOStream.m from [0662c30238] to [52d54dbd3b].
︙ | |||
56 57 58 59 60 61 62 | 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 | - + - + - + - + - + - + | #import "OFInvalidEncodingException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #include <windows.h> |
︙ | |||
124 125 126 127 128 129 130 | 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 | - + - + - + | return self; } - (size_t)lowlevelReadIntoBuffer: (void *)buffer_ length: (size_t)length { void *pool = objc_autoreleasePoolPush(); char *buffer = buffer_; |
︙ | |||
169 170 171 172 173 174 175 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | - + | @throw [OFOutOfRangeException exception]; UTF16Len = (DWORD)stringLen; memcpy(UTF16, string.UTF16String, stringLen); } if (UTF16Len > 0 && _incompleteUTF16Surrogate != 0) { |
︙ | |||
193 194 195 196 197 198 199 | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + - + | } _incompleteUTF16Surrogate = 0; i++; } for (; i < UTF16Len; i++) { |
︙ | |||
260 261 262 263 264 265 266 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + - - + + | return j; } - (size_t)lowlevelWriteBuffer: (const void *)buffer_ length: (size_t)length { const char *buffer = buffer_; |
︙ | |||
322 323 324 325 326 327 328 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - + | bytesWritten: bytesWritten * 2 errNo: EIO]; } else { void *pool = objc_autoreleasePoolPush(); OFString *string = [OFString stringWithUTF16String: UTF16 length: UTF16Len]; |
︙ | |||
353 354 355 356 357 358 359 | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | - + - + | bytesWritten: bytesWritten * 2 errNo: 0]; _incompleteUTF8SurrogateLen = 0; i += toCopy; } |
︙ | |||
405 406 407 408 409 410 411 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | - + | requestedLength: j * 2 bytesWritten: bytesWritten * 2 errNo: EIO]; } else { void *pool = objc_autoreleasePoolPush(); OFString *string = [OFString stringWithUTF16String: tmp length: j]; |
︙ | |||
578 579 580 581 582 583 584 | 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 | - + - + | return; csbi.dwCursorPosition.X = column; SetConsoleCursorPosition(_handle, csbi.dwCursorPosition); } |
Modified src/OFWindowsRegistryKey.m from [8c15fe2a75] to [c8ce2ece61].
︙ | |||
283 284 285 286 287 288 289 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | - + | if (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_LINK) @throw [OFInvalidEncodingException exception]; if (data.itemSize != 1) @throw [OFInvalidFormatException exception]; if ([OFSystemInfo isWindowsNT]) { |
︙ | |||
347 348 349 350 351 352 353 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | - + - + | { void *pool = objc_autoreleasePoolPush(); OFData *data; if ([OFSystemInfo isWindowsNT]) data = [OFData dataWithItems: string.UTF16String count: string.UTF16StringLength + 1 |
︙ |
Modified src/OFXMLElement+Serialization.m from [e82061841d] to [805366e391].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + | - (id)objectByDeserializing { void *pool = objc_autoreleasePoolPush(); Class class; id object; if ((class = objc_getClass([_name cStringWithEncoding: |
Modified src/OFXMLParser.h from [2b3552397a] to [88a3556818].
︙ | |||
163 164 165 166 167 168 169 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - + | OFString *_Nullable _attributeName, *_Nullable _attributePrefix; char _delimiter; OFMutableArray OF_GENERIC(OFString *) *_previous; size_t _level; bool _acceptProlog; size_t _lineNumber; bool _lastCarriageReturn, _finishedParsing; |
︙ |
Modified src/OFXMLParser.m from [02a95773a3] to [0ad1be565e].
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + - + | [OF_XMLPARSER_IN_COMMENT_1] = inCommentState1, [OF_XMLPARSER_IN_COMMENT_2] = inCommentState2, [OF_XMLPARSER_IN_DOCTYPE] = inDOCTYPEState }; static OF_INLINE void appendToBuffer(OFMutableData *buffer, const char *string, |
︙ | |||
207 208 209 210 211 212 213 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - + | dict = [OFMutableDictionary dictionaryWithKeysAndObjects: @"xml", @"http://www.w3.org/XML/1998/namespace", @"xmlns", @"http://www.w3.org/2000/xmlns/", nil]; [_namespaces addObject: dict]; _acceptProlog = true; _lineNumber = 1; |
︙ | |||
446 447 448 449 450 451 452 | 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | - + | hasVersion = true; } if ([attribute isEqual: @"encoding"]) { @try { self->_encoding = |
︙ | |||
485 486 487 488 489 490 491 | 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 | - + - + | appendToBuffer(self->_buffer, self->_data + self->_last, self->_encoding, self->_i - self->_last); PI = transformString(self, self->_buffer, 1, false); whitespaceCS = [OFCharacterSet characterSetWithCharactersInString: @" \r\n\r"]; pos = [PI indexOfCharacterFromSet: whitespaceCS]; |
︙ |
Modified src/OFZIPArchive.m from [4c67ad00cf] to [57930654e1].
︙ | |||
278 279 280 281 282 283 284 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | - + | _centralDirectoryEntries = [_stream readLittleEndianInt16]; _centralDirectorySize = [_stream readLittleEndianInt32]; _centralDirectoryOffset = [_stream readLittleEndianInt32]; commentLength = [_stream readLittleEndianInt16]; _archiveComment = [[_stream readStringWithLength: commentLength |
︙ | |||
631 632 633 634 635 636 637 | 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 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 | - + - + - - + - - + + | { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); OFMutableData *extraField = nil; uint16_t fileNameLength, extraFieldLength; |
︙ |
Modified src/OFZIPArchiveEntry.h from [2df45ec20c] to [3bbdaa40a9].
︙ | |||
246 247 248 249 250 251 252 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | - + | * specified tag. * * @param extraField The extra field to search for an extensible data field with * the specified tag * @param tag The tag to look for * @param size A pointer to an uint16_t that should be set to the size * @return The index at which the extra field content starts in the OFData, or |
Modified src/OFZIPArchiveEntry.m from [1b0f865f32] to [7b9fab9725].
︙ | |||
166 167 168 169 170 171 172 | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | - + | return i + 4; } i += 4 + currentSize; } *size = 0; |
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); OFMutableData *extraField = nil; uint16_t fileNameLength, extraFieldLength, fileCommentLength; |
︙ | |||
234 235 236 237 238 239 240 | 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 | - + - - + - - + + | fileCommentLength = [stream readLittleEndianInt16]; _startDiskNumber = [stream readLittleEndianInt16]; _internalAttributes = [stream readLittleEndianInt16]; _versionSpecificAttributes = [stream readLittleEndianInt32]; _localFileHeaderOffset = [stream readLittleEndianInt32]; encoding = (_generalPurposeBitFlag & (1u << 11) |
︙ |
Modified src/base64.m from [895a169025] to [06a2cd6d95].
︙ | |||
55 56 57 58 59 60 61 | 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 | - + - + - + | tb[0] = of_base64_encode_table[(sb & 0xFC0000) >> 18]; tb[1] = of_base64_encode_table[(sb & 0x03F000) >> 12]; tb[2] = of_base64_encode_table[(sb & 0x000FC0) >> 6]; tb[3] = of_base64_encode_table[sb & 0x00003F]; [ret appendCString: tb |
︙ |
Modified src/condition.h from [61428a9c46] to [0d9f4192a1].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + | #include "platform.h" #if !defined(OF_HAVE_THREADS) || \ (!defined(OF_HAVE_PTHREADS) && !defined(OF_WINDOWS) && !defined(OF_AMIGAOS)) # error No conditions available! #endif |
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + | extern "C" { #endif extern int of_condition_new(of_condition_t *condition); extern int of_condition_signal(of_condition_t *condition); extern int of_condition_broadcast(of_condition_t *condition); extern int of_condition_wait(of_condition_t *condition, of_mutex_t *mutex); extern int of_condition_timed_wait(of_condition_t *condition, |
Modified src/encodings/codepage-437.m from [e06381bb1c] to [e4e7c7d238].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + - + | 0xDE, 0xB0, 0xB1, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE }; static const uint8_t page25Start = 0x00; bool |
︙ |
Modified src/encodings/codepage-850.m from [3c49f43469] to [749e880312].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
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 | - + - + | 0x00, 0xB0, 0xB1, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE }; static const uint8_t page25Start = 0x00; bool |
︙ |
Modified src/encodings/codepage-858.m from [3ce6d4c463] to [713f34e1a5].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - + - + | 0x00, 0xB0, 0xB1, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE }; static const uint8_t page25Start = 0x00; bool |
︙ |
Modified src/encodings/iso-8859-15.m from [66f31de0ef] to [4e7f7697f6].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + - + | static const unsigned char page20[] = { 0xA4 }; static const uint8_t page20Start = 0xAC; bool |
︙ |
Modified src/encodings/iso-8859-2.m from [3fe77cae41] to [9e8609b7f9].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - + - + | 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA2, 0xFF, 0x00, 0xB2, 0x00, 0xBD }; static const uint8_t page2Start = 0xC7; bool |
︙ |
Modified src/encodings/iso-8859-3.m from [b571fab6a6] to [0df871c6b9].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + - + | static const unsigned char page2[] = { 0xA2, 0xFF }; static const uint8_t page2Start = 0xD8; bool |
︙ |
Modified src/encodings/koi8-r.m from [b612dc985f] to [e0fb41e40c].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
111 112 113 114 115 116 117 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - + - + | 0x8F, 0x90, 0x91, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94 }; static const uint8_t page25Start = 0x00; bool |
︙ |
Modified src/encodings/koi8-u.m from [bc833d67fc] to [6a1434b3fd].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
119 120 121 122 123 124 125 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - + - + | 0x8F, 0x90, 0x91, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94 }; static const uint8_t page25Start = 0x00; bool |
︙ |
Modified src/encodings/mac-roman.m from [db14d68482] to [c331a2e488].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
145 146 147 148 149 150 151 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + - + | static const unsigned char pageFB[] = { 0xDE, 0xDF }; static const uint8_t pageFBStart = 0x01; bool |
︙ |
Modified src/encodings/windows-1251.m from [baa2d5d34b] to [23d0ff0ab8].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
98 99 100 101 102 103 104 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + - + | static const unsigned char page21[] = { 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99 }; static const uint8_t page21Start = 0x16; bool |
︙ |
Modified src/encodings/windows-1252.m from [d5fc246852] to [0483911e0f].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | #include "config.h" #import "OFString.h" #import "common.h" |
︙ | |||
94 95 96 97 98 99 100 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + - + | static const unsigned char page21[] = { 0x99 }; static const uint8_t page21Start = 0x22; bool |
︙ |
Modified src/exceptions/OFSetItemAttributesFailedException.h from [d9ce8daea6] to [82396088b1].
︙ | |||
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 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 | - - + + - + - + - - + + - - + + | * ObjFW/OFSetItemAttributesFailedException.h * * @brief An exception indicating an item's attributes could not be set. */ @interface OFSetItemAttributesFailedException: OFException { OFURL *_URL; |
Modified src/exceptions/OFSetItemAttributesFailedException.m from [86a87692ad] to [868fc58c92].
︙ | |||
25 26 27 28 29 30 31 | 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 | - - + + - - + + | + (instancetype)exception { OF_UNRECOGNIZED_SELECTOR } + (instancetype)exceptionWithURL: (OFURL *)URL |
︙ |
Modified src/macros.h from [77087818b9] to [4a71564d16].
︙ | |||
98 99 100 101 102 103 104 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - - - - - - | # define OF_LIKELY(cond) (cond) # define OF_UNLIKELY(cond) (cond) # define OF_CONST_FUNC # define OF_NO_RETURN_FUNC # define OF_WEAK_REF(sym) #endif |
︙ | |||
352 353 354 355 356 357 358 | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | - | # define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET # endif # endif # endif #endif #define OF_RETAIN_COUNT_MAX UINT_MAX |
︙ |
Modified src/of_asprintf.m from [d2e16772ed] to [32debbce88].
︙ | |||
415 416 417 418 419 420 421 | 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 | - + - - + + | return false; ctx->subformat[ctx->subformatLen - 1] = 's'; { char buffer[5]; size_t len = of_string_utf8_encode( |
︙ |
Modified src/platform/amiga/OFString+PathAdditions.m from [173be0674b] to [52b79caac6].
︙ | |||
115 116 117 118 119 120 121 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | - - + + | { void *pool = objc_autoreleasePoolPush(); OFString *ret, *fileName; size_t pos; fileName = self.lastPathComponent; pos = [fileName rangeOfString: @"." |
︙ | |||
151 152 153 154 155 156 157 | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - + | } objc_autoreleasePoolPop(pool); return @""; } components = [components objectsInRange: |
︙ | |||
174 175 176 177 178 179 180 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - - + + | return [[self copy] autorelease]; pool = objc_autoreleasePoolPush(); components = [[self.pathComponents mutableCopy] autorelease]; fileName = components.lastObject; pos = [fileName rangeOfString: @"." |
︙ | |||
231 232 233 234 235 236 237 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - + | done = false; break; } if ([component isEqual: @"/"] && parent != nil && ![parent isEqual: @"/"]) { [array removeObjectsInRange: |
︙ |
Modified src/platform/amiga/condition.m from [fd8eb39931] to [dc620431f9].
︙ | |||
120 121 122 123 124 125 126 | 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 | - + - + | Permit(); return error; } int of_condition_timed_wait(of_condition_t *condition, of_mutex_t *mutex, |
︙ |
Modified src/platform/libfat/OFString+PathAdditions.m from [420e4f330e] to [cf135b33f9].
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - - + + | { void *pool = objc_autoreleasePoolPush(); OFString *ret, *fileName; size_t pos; fileName = self.lastPathComponent; pos = [fileName rangeOfString: @"." |
︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - - + + | return [[self copy] autorelease]; pool = objc_autoreleasePoolPush(); components = [[self.pathComponents mutableCopy] autorelease]; fileName = components.lastObject; pos = [fileName rangeOfString: @"." |
︙ | |||
277 278 279 280 281 282 283 | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | - + | done = false; break; } if ([component isEqual: @".."] && parent != nil && ![parent isEqual: @".."]) { [array removeObjectsInRange: |
︙ |
Modified src/platform/posix/OFString+PathAdditions.m from [456ec4e1f3] to [721ad2b22b].
︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - - + + | { void *pool = objc_autoreleasePoolPush(); OFString *ret, *fileName; size_t pos; fileName = self.lastPathComponent; pos = [fileName rangeOfString: @"." |
︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - - + + | return [[self copy] autorelease]; pool = objc_autoreleasePoolPush(); components = [[self.pathComponents mutableCopy] autorelease]; fileName = components.lastObject; pos = [fileName rangeOfString: @"." |
︙ | |||
273 274 275 276 277 278 279 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | - + | done = false; break; } if ([component isEqual: @".."] && parent != nil && ![parent isEqual: @".."]) { [array removeObjectsInRange: |
︙ |
Modified src/platform/posix/OFSubprocess.m from [d13ad2c4b0] to [4e071fc7f6].
︙ | |||
234 235 236 237 238 239 240 | 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 | - + - + | - (void)of_getArgv: (char ***)argv forProgramName: (OFString *)programName andArguments: (OFArray *)arguments { OFString *const *objects = arguments.objects; size_t i, count = arguments.count; |
︙ |
Modified src/platform/posix/condition.m from [118d5cf68b] to [7ce4083f77].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + | of_condition_wait(of_condition_t *condition, of_mutex_t *mutex) { return pthread_cond_wait(condition, mutex); } int of_condition_timed_wait(of_condition_t *condition, of_mutex_t *mutex, |
︙ |
Modified src/platform/windows/OFString+PathAdditions.m from [41e0a20445] to [257fbc0423].
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - - + + | { void *pool = objc_autoreleasePoolPush(); OFString *ret, *fileName; size_t pos; fileName = self.lastPathComponent; pos = [fileName rangeOfString: @"." |
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - + | } objc_autoreleasePoolPop(pool); return @"."; } components = [components objectsInRange: |
︙ | |||
222 223 224 225 226 227 228 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | - - + + | return [[self copy] autorelease]; pool = objc_autoreleasePoolPush(); components = [[self.pathComponents mutableCopy] autorelease]; fileName = components.lastObject; pos = [fileName rangeOfString: @"." |
︙ | |||
284 285 286 287 288 289 290 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | - + | if ([component isEqual: @".."] && parent != nil && ![parent isEqual: @".."] && ![parent hasSuffix: @":"] && ![parent hasSuffix: @":\\"] && ![parent hasSuffix: @"://"] && (![parent hasPrefix: @"\\"] || i != 1)) { [array removeObjectsInRange: |
︙ | |||
335 336 337 338 339 340 341 | 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | - + | if (components.count < 2) @throw [OFInvalidFormatException exception]; *URLEncodedHost = [[components objectAtIndex: 1] stringByURLEncodingWithAllowedCharacters: [OFCharacterSet URLHostAllowedCharacterSet]]; path = [OFString pathWithComponents: [components |
︙ |
Modified src/platform/windows/OFSubprocess.m from [be45f52a11] to [a5a0197d4c].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - + | #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #include <windows.h> @interface OFSubprocess () |
︙ | |||
178 179 180 181 182 183 184 | 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 | - + - + - + | if (containsSpaces) [argumentsString appendString: @"\""]; } if ([OFSystemInfo isWindowsNT]) { size_t length; |
︙ | |||
247 248 249 250 251 252 253 | 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 | - + - - + + - + - + | { if (_readPipe[0] != NULL) [self close]; [super dealloc]; } |
︙ |
Modified src/platform/windows/condition.m from [cc03ce6342] to [595cdc3d8b].
︙ | |||
92 93 94 95 96 97 98 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - + | default: OF_ENSURE(0); } } int of_condition_timed_wait(of_condition_t *condition, of_mutex_t *mutex, |
︙ |
Modified src/socket.m from [21df00d3c4] to [d3698b60b2].
︙ | |||
383 384 385 386 387 388 389 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | - + | for (OFString *component in components) { unsigned long long number; if (component.length == 0) @throw [OFInvalidFormatException exception]; if ([component indexOfCharacterFromSet: |
︙ | |||
407 408 409 410 411 412 413 | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + | static uint16_t parseIPv6Component(OFString *component) { unsigned long long number; if ([component indexOfCharacterFromSet: |
︙ | |||
439 440 441 442 443 444 445 | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | - + | #else addrIn6->sin6_family = AF_UNSPEC; #endif addrIn6->sin6_port = OF_BSWAP16_IF_LE(port); doubleColon = [IPv6 rangeOfString: @"::"].location; |
︙ |
Modified src/unicode.h from [2ed16f1d09] to [713ec05b75].
︙ | |||
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 | - + - + - + - + | #define OF_UNICODE_CASEFOLDING_TABLE_SIZE 0x1EA #define OF_UNICODE_DECOMPOSITION_TABLE_SIZE 0x2FB #define OF_UNICODE_DECOMPOSITION_COMPAT_TABLE_SIZE 0x2FB #ifdef __cplusplus extern "C" { #endif |
Modified src/unicode.m from [bb9481f3ae] to [5fc3ae74f1].
︙ | |||
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 | - + - + | * file. */ #include "config.h" #import "OFString.h" |
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 0, 216, 217, 218, 219, 220, 221, 222, 376, }; |
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + | 471, 0, 473, 0, 475, 398, 0, 478, 0, 480, 0, 482, 0, 484, 0, 486, 0, 488, 0, 490, 0, 492, 0, 494, 0, 0, 497, 497, 0, 500, 0, 0, 0, 504, 0, 506, 0, 508, 0, 510, }; |
︙ | |||
121 122 123 124 125 126 127 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
156 157 158 159 160 161 162 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + | 0, 984, 0, 986, 0, 988, 0, 990, 0, 992, 0, 994, 0, 996, 0, 998, 0, 1000, 0, 1002, 0, 1004, 0, 1006, 922, 929, 1017, 895, 0, 917, 0, 0, 1015, 0, 0, 1018, 0, 0, 0, 0, }; |
︙ | |||
191 192 193 194 195 196 197 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | - + | 0, 1240, 0, 1242, 0, 1244, 0, 1246, 0, 1248, 0, 1250, 0, 1252, 0, 1254, 0, 1256, 0, 1258, 0, 1260, 0, 1262, 0, 1264, 0, 1266, 0, 1268, 0, 1270, 0, 1272, 0, 1274, 0, 1276, 0, 1278, }; |
︙ | |||
226 227 228 229 230 231 232 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
261 262 263 264 265 266 267 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + | 7320, 7321, 7322, 7323, 7324, 7325, 7326, 7327, 7328, 7329, 7330, 7331, 7332, 7333, 7334, 7335, 7336, 7337, 7338, 7339, 7340, 7341, 7342, 7343, 7344, 7345, 7346, 7347, 7348, 7349, 7350, 7351, 7352, 7353, 7354, 0, 0, 7357, 7358, 7359, }; |
︙ | |||
296 297 298 299 300 301 302 | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5104, 5105, 5106, 5107, 5108, 5109, 0, 0, }; |
︙ | |||
331 332 333 334 335 336 337 | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
366 367 368 369 370 371 372 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
401 402 403 404 405 406 407 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - + | 0, 7896, 0, 7898, 0, 7900, 0, 7902, 0, 7904, 0, 7906, 0, 7908, 0, 7910, 0, 7912, 0, 7914, 0, 7916, 0, 7918, 0, 7920, 0, 7922, 0, 7924, 0, 7926, 0, 7928, 0, 7930, 0, 7932, 0, 7934, }; |
︙ | |||
436 437 438 439 440 441 442 | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 8168, 8169, 0, 0, 0, 8172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
471 472 473 474 475 476 477 | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
506 507 508 509 510 511 512 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | - + | 9406, 9407, 9408, 9409, 9410, 9411, 9412, 9413, 9414, 9415, 9416, 9417, 9418, 9419, 9420, 9421, 9422, 9423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
541 542 543 544 545 546 547 | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - + | 0, 11480, 0, 11482, 0, 11484, 0, 11486, 0, 11488, 0, 11490, 0, 0, 0, 0, 0, 0, 0, 0, 11499, 0, 11501, 0, 0, 0, 0, 11506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
576 577 578 579 580 581 582 | 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
611 612 613 614 615 616 617 | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
646 647 648 649 650 651 652 | 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42997, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
681 682 683 684 685 686 687 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
716 717 718 719 720 721 722 | 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
751 752 753 754 755 756 757 | 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | - + | 66736, 66737, 66738, 66739, 66740, 66741, 66742, 66743, 66744, 66745, 66746, 66747, 66748, 66749, 66750, 66751, 66752, 66753, 66754, 66755, 66756, 66757, 66758, 66759, 66760, 66761, 66762, 66763, 66764, 66765, 66766, 66767, 66768, 66769, 66770, 66771, 0, 0, 0, 0, }; |
︙ | |||
786 787 788 789 790 791 792 | 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 | - + | 68760, 68761, 68762, 68763, 68764, 68765, 68766, 68767, 68768, 68769, 68770, 68771, 68772, 68773, 68774, 68775, 68776, 68777, 68778, 68779, 68780, 68781, 68782, 68783, 68784, 68785, 68786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
821 822 823 824 825 826 827 | 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | - + | 71864, 71865, 71866, 71867, 71868, 71869, 71870, 71871, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
856 857 858 859 860 861 862 | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
891 892 893 894 895 896 897 | 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
926 927 928 929 930 931 932 | 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 | - + | 248, 249, 250, 251, 252, 253, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
961 962 963 964 965 966 967 | 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | - + | 0, 474, 0, 476, 0, 0, 479, 0, 481, 0, 483, 0, 485, 0, 487, 0, 489, 0, 491, 0, 493, 0, 495, 0, 0, 499, 499, 0, 501, 0, 405, 447, 505, 0, 507, 0, 509, 0, 511, 0, }; |
︙ | |||
996 997 998 999 1000 1001 1002 | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1031 1032 1033 1034 1035 1036 1037 | 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 | - + | 985, 0, 987, 0, 989, 0, 991, 0, 993, 0, 995, 0, 997, 0, 999, 0, 1001, 0, 1003, 0, 1005, 0, 1007, 0, 0, 0, 0, 0, 952, 0, 0, 1016, 0, 1010, 1019, 0, 0, 891, 892, 893, }; |
︙ | |||
1066 1067 1068 1069 1070 1071 1072 | 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | - + | 1241, 0, 1243, 0, 1245, 0, 1247, 0, 1249, 0, 1251, 0, 1253, 0, 1255, 0, 1257, 0, 1259, 0, 1261, 0, 1263, 0, 1265, 0, 1267, 0, 1269, 0, 1271, 0, 1273, 0, 1275, 0, 1277, 0, 1279, 0, }; |
︙ | |||
1101 1102 1103 1104 1105 1106 1107 | 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1136 1137 1138 1139 1140 1141 1142 | 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1171 1172 1173 1174 1175 1176 1177 | 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 | - + | 43944, 43945, 43946, 43947, 43948, 43949, 43950, 43951, 43952, 43953, 43954, 43955, 43956, 43957, 43958, 43959, 43960, 43961, 43962, 43963, 43964, 43965, 43966, 43967, 5112, 5113, 5114, 5115, 5116, 5117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1206 1207 1208 1209 1210 1211 1212 | 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1241 1242 1243 1244 1245 1246 1247 | 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 | - + | 7897, 0, 7899, 0, 7901, 0, 7903, 0, 7905, 0, 7907, 0, 7909, 0, 7911, 0, 7913, 0, 7915, 0, 7917, 0, 7919, 0, 7921, 0, 7923, 0, 7925, 0, 7927, 0, 7929, 0, 7931, 0, 7933, 0, 7935, 0, }; |
︙ | |||
1276 1277 1278 1279 1280 1281 1282 | 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 | - + | 8144, 8145, 8054, 8055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8160, 8161, 8058, 8059, 8165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8056, 8057, 8060, 8061, 8179, 0, 0, 0, }; |
︙ | |||
1311 1312 1313 1314 1315 1316 1317 | 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1346 1347 1348 1349 1350 1351 1352 | 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1381 1382 1383 1384 1385 1386 1387 | 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 | - + | 11481, 0, 11483, 0, 11485, 0, 11487, 0, 11489, 0, 11491, 0, 0, 0, 0, 0, 0, 0, 0, 11500, 0, 11502, 0, 0, 0, 0, 11507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1416 1417 1418 1419 1420 1421 1422 | 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1451 1452 1453 1454 1455 1456 1457 | 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42998, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1486 1487 1488 1489 1490 1491 1492 | 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1521 1522 1523 1524 1525 1526 1527 | 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1556 1557 1558 1559 1560 1561 1562 | 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1591 1592 1593 1594 1595 1596 1597 | 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1626 1627 1628 1629 1630 1631 1632 | 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1661 1662 1663 1664 1665 1666 1667 | 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1696 1697 1698 1699 1700 1701 1702 | 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 | - + | 471, 0, 473, 0, 475, 398, 0, 478, 0, 480, 0, 482, 0, 484, 0, 486, 0, 488, 0, 490, 0, 492, 0, 494, 0, 498, 498, 498, 0, 500, 0, 0, 0, 504, 0, 506, 0, 508, 0, 510, }; |
︙ | |||
1731 1732 1733 1734 1735 1736 1737 | 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 | - + | 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 0, 0, 4349, 4350, 4351, }; |
︙ | |||
1766 1767 1768 1769 1770 1771 1772 | 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 | - + | 248, 249, 250, 251, 252, 253, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1801 1802 1803 1804 1805 1806 1807 | 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 | - + | 0, 474, 0, 476, 0, 0, 479, 0, 481, 0, 483, 0, 485, 0, 487, 0, 489, 0, 491, 0, 493, 0, 495, 0, 0, 499, 499, 0, 501, 0, 405, 447, 505, 0, 507, 0, 509, 0, 511, 0, }; |
︙ | |||
1836 1837 1838 1839 1840 1841 1842 | 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 | - + | 985, 0, 987, 0, 989, 0, 991, 0, 993, 0, 995, 0, 997, 0, 999, 0, 1001, 0, 1003, 0, 1005, 0, 1007, 0, 954, 961, 0, 0, 952, 949, 0, 1016, 0, 1010, 1019, 0, 0, 891, 892, 893, }; |
︙ | |||
1871 1872 1873 1874 1875 1876 1877 | 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5104, 5105, 5106, 5107, 5108, 5109, 0, 0, }; |
︙ | |||
1906 1907 1908 1909 1910 1911 1912 | 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 | - + | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
︙ | |||
1941 1942 1943 1944 1945 1946 1947 | 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 | - + | 7897, 0, 7899, 0, 7901, 0, 7903, 0, 7905, 0, 7907, 0, 7909, 0, 7911, 0, 7913, 0, 7915, 0, 7917, 0, 7919, 0, 7921, 0, 7923, 0, 7925, 0, 7927, 0, 7929, 0, 7931, 0, 7933, 0, 7935, 0, }; |
︙ | |||
1976 1977 1978 1979 1980 1981 1982 | 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 | - + | 8144, 8145, 8054, 8055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8160, 8161, 8058, 8059, 8165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8056, 8057, 8060, 8061, 8179, 0, 0, 0, }; |
︙ | |||
12360 12361 12362 12363 12364 12365 12366 | 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 | - + | "\x36", "\x37", "\x38", "\x39", NULL, NULL, NULL, NULL, NULL, NULL, }; |
︙ | |||
12486 12487 12488 12489 12490 12491 12492 | 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 | - + | emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, uppercasePage489 }; |
︙ | |||
12612 12613 12614 12615 12616 12617 12618 | 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 | - + | emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, lowercasePage489 }; |
︙ | |||
12738 12739 12740 12741 12742 12743 12744 | 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 | - + | emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, emptyPage, uppercasePage489 }; |
︙ |
Modified tests/OFArrayTests.m from [578f78bc93] to [6905bf8867].
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | - + | TEST(@"-[indexOfObject:]", [a[0] indexOfObject: c_ary[1]] == 1) TEST(@"-[indexOfObjectIdenticalTo:]", [a[1] indexOfObjectIdenticalTo: c_ary[1]] == 1) TEST(@"-[objectsInRange:]", |
︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - + | m[1] = [[a[0] mutableCopy] autorelease]; TEST(@"-[removeObjectAtIndex:]", R([m[1] removeObjectAtIndex: 1]) && m[1].count == 2 && [[m[1] objectAtIndex: 1] isEqual: c_ary[2]]) m[1] = [[a[0] mutableCopy] autorelease]; TEST(@"-[removeObjectsInRange:]", |
︙ | |||
235 236 237 238 239 240 241 | 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 | - + - + + - - + + | m[1] = [[a[0] mutableCopy] autorelease]; [m[1] addObject: @"0"]; [m[1] addObject: @"z"]; TEST(@"-[sortedArray]", [[m[1] sortedArray] isEqual: [arrayClass arrayWithObjects: @"0", @"Bar", @"Baz", @"Foo", @"z", nil]] && [[m[1] sortedArrayUsingSelector: @selector(compare:) |
︙ |
Modified tests/OFCharacterSetTests.m from [7038831ad1] to [ee18bcb821].
︙ | |||
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 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 | - + - + - + - + + - + - + | static OFString *module = nil; @interface SimpleCharacterSet: OFCharacterSet @end @implementation SimpleCharacterSet |
︙ |
Modified tests/OFDataTests.m from [145ac3ede5] to [c6fec11f60].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + | @implementation TestsAppDelegate (OFDataTests) - (void)dataTests { void *pool = objc_autoreleasePoolPush(); OFMutableData *mutable; OFData *immutable; void *raw[2]; |
︙ | |||
59 60 61 62 63 64 65 | 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 | - - + + - + - + - + - - + + - + - - + + - + - - + + - + - + - + - + - + + - + + | TEST(@"-[mutableCopy]", (mutable = [[immutable mutableCopy] autorelease]) && [mutable isEqual: immutable]) TEST(@"-[compare]", [mutable compare: immutable] == 0 && R([mutable removeLastItem]) && |
︙ | |||
210 211 212 213 214 215 216 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + | OFOutOfRangeException, [mutable itemAtIndex: mutable.count]) EXPECT_EXCEPTION(@"Detect out of range in -[addItems:count:]", OFOutOfRangeException, [mutable addItems: raw[0] count: SIZE_MAX]) EXPECT_EXCEPTION(@"Detect out of range in -[removeItemsInRange:]", OFOutOfRangeException, |
Modified tests/OFDateTests.m from [02539a3684] to [dca21ab5a6].
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | [OFDate dateWithLocalDateString: @"2000-06-20T12:34:56+0200x" format: @"%Y-%m-%dT%H:%M:%S%z"]) TEST(@"-[isEqual:]", [d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0]] && ![d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0.0000001]]) |
︙ |
Modified tests/OFDictionaryTests.m from [daa54d882b] to [fdcd71652e].
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + | [_dictionary removeObjectForKey: key]; if (existed) _mutations++; } |
︙ |
Modified tests/OFINIFileTests.m from [4cccd0237d] to [0d85330d49].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + | OFArray *array; #ifndef OF_NINTENDO_DS OFString *writePath; #endif TEST(@"+[fileWithPath:encoding:]", (file = [OFINIFile fileWithPath: @"testfile.ini" |
︙ | |||
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 | - + - + | # else writePath = [OFString pathWithComponents: [OFArray arrayWithObjects: [[OFApplication environment] objectForKey: @"HOME"], @"tmp", @"tmpfile.ini", nil]]; # endif TEST(@"-[writeToFile:encoding:]", R([file writeToFile: writePath |
Modified tests/OFLocaleTests.m from [2b5c756cd6] to [958923ab2a].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + | [of_stdout writeFormat: @"[OFLocale] Language: %@\n", [OFLocale language]]; [of_stdout writeFormat: @"[OFLocale] Territory: %@\n", [OFLocale territory]]; [of_stdout writeFormat: @"[OFLocale] Encoding: %@\n", |
Modified tests/OFSetTests.m from [297b7fe674] to [04cbdfa860].
︙ | |||
140 141 142 143 144 145 146 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - + | [_set removeObject: object]; if (existed) _mutations++; } |
︙ |
Modified tests/OFStringTests.m from [bc3d5b4b0a] to [4dd338b89d].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + - + | #endif static OFString *module = nil; static OFString *whitespace[] = { @" \r \t\n\t \tasd \t \t\t\r\n", @" \t\t \t\t \t \t" }; |
︙ | |||
87 88 89 90 91 92 93 | 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 | - + - + - + - + - + | @throw e; } return self; } - (instancetype)initWithCString: (const char *)cString |
︙ | |||
165 166 167 168 169 170 171 | 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 | - + - + | - (void)dealloc { [_string release]; [super dealloc]; } |
︙ | |||
213 214 215 216 217 218 219 | 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 | - + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - + + | mutableClass: (Class)mutableStringClass { void *pool = objc_autoreleasePoolPush(); OFMutableString *s[3]; OFString *is; OFArray *a; size_t i; |
︙ | |||
346 347 348 349 350 351 352 | 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 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + | [is isEqual: @"fööbär🀺"] && (is = [stringClass stringWithUTF32String: sucstr]) && [is isEqual: @"fööbär🀺"]) #ifdef OF_HAVE_FILES TEST(@"+[stringWithContentsOfFile:encoding]", (is = [stringClass stringWithContentsOfFile: @"testfile.txt" |
︙ | |||
606 607 608 609 610 611 612 | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | - + | [[a objectAtIndex: 0] isEqual: @"foo"] && a.count == 1) i = 0; TEST(@"-[componentsSeparatedByString:options:]", (a = [C(@"fooXXbarXXXXbazXXXX") componentsSeparatedByString: @"XX" |
︙ | |||
635 636 637 638 639 640 641 | 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | - + | [[a objectAtIndex: i++] isEqual: @"x"] && a.count == i) i = 0; TEST(@"-[componentsSeparatedByCharactersInSet:options:]", (a = [C(@"fooXYbarXYZXbazXYXZ") componentsSeparatedByCharactersInSet: cs |
︙ | |||
1185 1186 1187 1188 1189 1190 1191 | 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 | - + - + | @"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF") unsignedLongLongValueWithBase: 16]) TEST(@"-[characters]", (ua = C(@"fööbär🀺").characters) && !memcmp(ua, ucstr + 1, sizeof(ucstr) - 8)) #ifdef OF_BIG_ENDIAN |
︙ | |||
1264 1265 1266 1267 1268 1269 1270 | 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | - + - + - + - + - + - + - + - + - + - + | [s[0] isEqual: @"abcde"] && R([s[0] setCharacter: 0x20AC atIndex: 3]) && [s[0] isEqual: @"abc€e"] && R([s[0] setCharacter: 'x' atIndex: 1]) && [s[0] isEqual: @"axc€e"]) TEST(@"-[deleteCharactersInRange:]", (s[0] = [mutableStringClass stringWithString: @"𝄞öööbä€"]) && |
︙ |
Modified tests/OFValueTests.m from [dd07d710ca] to [8235c5a687].
︙ | |||
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 | - - - - + + + + - - + - + - - + + - + | static OFString *module = @"OFValue"; @implementation TestsAppDelegate (OFValueTests) - (void)valueTests { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
73 74 75 76 77 78 79 | 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 | - + - - + + - + - + - - + + - + - - + + - - - - - + + + + + - - - - + + + + - + - + - - + + - - - - - + + + + + - - - - + + + + - + - + - - - - + + + | [[OFValue valueWithBytes: "a" objCType: @encode(char)] nonretainedObjectValue]) TEST(@"+[valueWithRange:]", (value = [OFValue valueWithRange: range])) TEST(@"-[rangeValue]", |
Modified tests/terminal/TerminalTests.m from [cd3ec05bca] to [75c2b20fdf].
︙ | |||
88 89 90 91 92 93 94 | 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 | - + - + - + - + - + - + - + | [of_stdout eraseLine]; [of_stdout writeString: @"World!"]; [OFThread sleepForTimeInterval: 2]; [of_stdout clear]; [OFThread sleepForTimeInterval: 2]; |
Modified utils/ofarc/Archive.h from [2900eb7128] to [c76a3f3daa].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + - + | #import "OFObject.h" #import "OFFile.h" #import "OFArray.h" @protocol Archive <OFObject> + (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream mode: (OFString *)mode |
Modified utils/ofarc/GZIPArchive.m from [c5bd2c7c25] to [cd709fb905].
︙ | |||
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 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 | - - - - + + + + - + - + - + - + | static OFArc *app; static void setPermissions(OFString *destination, OFString *source) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS OFFileManager *fileManager = [OFFileManager defaultManager]; |
︙ |
Modified utils/ofarc/LHAArchive.m from [a0cfa6c4ee] to [228be0ebf1].
︙ | |||
44 45 46 47 48 49 50 | 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 | - + - + - + - + - + - + - + | if (mode == nil) return; mode = [OFNumber numberWithUnsignedShort: mode.unsignedShortValue & 0777]; |
︙ | |||
449 450 451 452 453 454 455 | 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 | - - + + - - - - - - + + + + + + - + - + | @"Need one or more files to add!")]; app->_exitStatus = 1; return; } for (OFString *fileName in files) { void *pool = objc_autoreleasePoolPush(); |
︙ |
Modified utils/ofarc/OFArc.h from [535da98fc8] to [f6ae34fcaa].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - + | OFString *_archivePath; int _exitStatus; } - (id <Archive>)openArchiveWithPath: (OFString *)path type: (OFString *)type mode: (char)mode |
Modified utils/ofarc/OFArc.m from [e174e86e3a] to [f6c3dc0d49].
︙ | |||
77 78 79 80 81 82 83 | 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 | - - + + - - - - - + + + + + | @" -x --extract Extract files")]; } [OFApplication terminateWithStatus: status]; } static void |
︙ | |||
145 146 147 148 149 150 151 | 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 | - + - - + + | @"type", type)]; } @implementation OFArc - (void)applicationDidFinishLaunching { OFString *outputDir, *encodingString, *type; |
︙ | |||
292 293 294 295 296 297 298 | 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 | - + - + | [OFApplication terminateWithStatus: 1]; break; } } @try { if (encodingString != nil) |
︙ | |||
369 370 371 372 373 374 375 | 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 | - + - + | permissions: @"r"]; sandbox.allowsUnveil = false; [OFApplication of_activateSandbox: sandbox]; #endif files = [remainingArguments objectsInRange: |
︙ | |||
460 461 462 463 464 465 466 | 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | - + | [OFApplication terminateWithStatus: _exitStatus]; } - (id <Archive>)openArchiveWithPath: (OFString *)path type: (OFString *)type mode: (char)mode |
︙ |
Modified utils/ofarc/TarArchive.m from [c4cfac3bfa] to [661f4e2e9e].
︙ | |||
30 31 32 33 34 35 36 | 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 | - + - + - + - + - + - + - + | static OFArc *app; static void setPermissions(OFString *path, OFTarArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS OFNumber *mode = [OFNumber numberWithUnsignedShort: entry.mode & 0777]; |
︙ | |||
168 169 170 171 172 173 174 | 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 | - + - + - + - + - + - + - + - + | @"date", date)]; } if (app->_outputLevel >= 2) { [of_stdout writeString: @"\t"]; switch (entry.type) { |
︙ | |||
273 274 275 276 277 278 279 | 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 | - + - - + + | OFMutableSet OF_GENERIC(OFString *) *missing = [OFMutableSet setWithArray: files]; OFTarArchiveEntry *entry; while ((entry = [_archive nextEntry]) != nil) { void *pool = objc_autoreleasePoolPush(); OFString *fileName = entry.fileName; |
︙ | |||
311 312 313 314 315 316 317 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | - - + + | } if (app->_outputLevel >= 0) [of_stdout writeString: OF_LOCALIZED(@"extracting_file", @"Extracting %[file]...", @"file", fileName)]; |
︙ | |||
460 461 462 463 464 465 466 | 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 514 515 516 517 | - - + + - - - - + + + + - - - - + + + + - - + + - + | @"Need one or more files to add!")]; app->_exitStatus = 1; return; } for (OFString *fileName in files) { void *pool = objc_autoreleasePoolPush(); |
︙ |
Modified utils/ofarc/ZIPArchive.m from [a469b7585b] to [20066e086c].
︙ | |||
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 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 | - - - - + + + - + - + - + - + | 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: (entry.versionSpecificAttributes >> 16) & 0777]; |
︙ | |||
410 411 412 413 414 415 416 | 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 | - + - + | return; } for (OFString *localFileName in files) { void *pool = objc_autoreleasePoolPush(); OFArray OF_GENERIC (OFString *) *components; OFString *fileName; |
︙ |
Modified utils/ofdns/OFDNS.m from [f422617926] to [3d972b3bf5].
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + - + | if (_inFlight == 0) [OFApplication terminateWithStatus: _errors]; } - (void)applicationDidFinishLaunching { OFString *DNSClassString, *server; |
︙ |
Modified utils/ofhash/OFHash.m from [871b144274] to [20916b6a0f].
︙ | |||
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 | - + - + | @implementation OFHash - (void)applicationDidFinishLaunching { int exitStatus = 0; bool calculateMD5, calculateRIPEMD160, calculateSHA1, calculateSHA224; bool calculateSHA256, calculateSHA384, calculateSHA512; |
︙ |
Modified utils/ofhttp/OFHTTP.m from [f445945689] to [b36faae7ff].
︙ | |||
313 314 315 316 317 318 319 | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | - + | } - (void)addHeader: (OFString *)header { size_t pos = [header rangeOfString: @":"].location; OFString *name, *value; |
︙ | |||
383 384 385 386 387 388 389 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - + - + | } - (void)setProxy: (OFString *)proxy { @try { size_t pos = [proxy rangeOfString: @":" |
︙ | |||
410 411 412 413 414 415 416 | 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 | - + - + | [OFApplication terminateWithStatus: 1]; } } - (void)applicationDidFinishLaunching { OFString *outputPath; |
︙ | |||
569 570 571 572 573 574 575 | 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | - + | @"prog", [OFApplication programName])]; [OFApplication terminateWithStatus: 1]; } if (_insecure) _HTTPClient.allowsInsecureRedirects = true; |
︙ |