Comment: | Coding style
No functional change intended. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
9da9b2b64caecd02414186086a446b06 |
User & Date: | js on 2014-04-14 00:45:58 |
Other Links: | manifest | tags |
2014-04-14
| ||
01:11 | OFString+XMLUnescaping.m: Remove code duplication check-in: f0cc196adc user: js tags: trunk | |
00:45 | Coding style check-in: 9da9b2b64c user: js tags: trunk | |
2014-04-10
| ||
00:03 | forwarding/*.S: Include config.h check-in: 9a4792a99e user: js tags: trunk | |
Modified configure.ac from [1a1e700998] to [16bc63395d].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - - + + | AC_ARG_WITH(wii, AS_HELP_STRING([--with-wii], [build for Wii])) AS_IF([test x"$with_wii" = x"yes"], [ AS_IF([test x"$DEVKITPRO" = x""], [ AC_MSG_ERROR([DEVKITPRO is not set! Please set DEVKITPRO.]) ]) |
︙ |
Modified src/OFDataArray.m from [4b9ac6b409] to [48e3ed07c1].
︙ | |||
510 511 512 513 514 515 516 | 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | - + | return false; dataArray = object; if ([dataArray count] != _count || [dataArray itemSize] != _itemSize) return false; |
︙ |
Modified src/OFFile.m from [4ef14749f7] to [fd77a17f17].
︙ | |||
132 133 134 135 136 137 138 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + | buffer); #endif } static int parseMode(const char *mode) { |
︙ | |||
350 351 352 353 354 355 356 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | - - + + | mode: @"r"]; @try { while ((dirent = readdir(dir)) != NULL) { void *pool = objc_autoreleasePoolPush(); OFString *file; |
︙ |
Modified src/OFHTTPRequest.m from [cd6a2290d9] to [7522c047c2].
︙ | |||
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 84 | - + - + - + - + - + - + - + - + | return NULL; } of_http_request_method_t of_http_request_method_from_string(const char *string) { |
︙ |
Modified src/OFIntrospection.m from [6ffe55f66b] to [9e051f7ab4].
︙ | |||
120 121 122 123 124 125 126 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | - + | return false; if ((method->_typeEncoding == NULL && _typeEncoding != NULL) || (method->_typeEncoding != NULL && _typeEncoding == NULL)) return false; if (method->_typeEncoding != NULL && _typeEncoding != NULL && |
︙ |
Modified src/OFMutableString.m from [33c49a61cb] to [6564d3d79b].
︙ | |||
486 487 488 489 490 491 492 | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | - + | } pool2 = objc_autoreleasePoolPush(); characters = [self characters]; for (i = range.location; i <= range.length - searchLength; i++) { if (memcmp(characters + i, searchCharacters, |
︙ |
Modified src/OFMutableString_UTF8.m from [9c8e6d80a9] to [c7dede3563].
︙ | |||
272 273 274 275 276 277 278 | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | - + + | } - (void)appendUTF8String: (const char*)UTF8String { size_t UTF8StringLength = strlen(UTF8String); size_t length; |
︙ | |||
301 302 303 304 305 306 307 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | - + + | } - (void)appendUTF8String: (const char*)UTF8String length: (size_t)UTF8StringLength { size_t length; |
︙ | |||
671 672 673 674 675 676 677 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 | - + | newCString = NULL; newCStringLength = 0; newLength = _s->length; last = 0; for (i = range.location; i <= range.length - searchLength; i++) { |
︙ |
Modified src/OFString+JSONValue.m from [d042fbb026] to [848285d233].
︙ | |||
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 628 629 630 631 632 | - + - + - + | return parseArray(pointer, stop, line, depth, depthLimit); case '{': return parseDictionary(pointer, stop, line, depth, depthLimit); case 't': if (*pointer + 3 >= stop) return nil; |
︙ |
Modified src/OFString+XMLUnescaping.m from [cfdc01faaa] to [654beb3068].
︙ | |||
104 105 106 107 108 109 110 | 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 | - + - + + - + - + - + + | last = i + 1; inEntity = true; } else if (inEntity && string[i] == ';') { const char *entity = string + last; size_t entityLength = i - last; |
︙ | |||
205 206 207 208 209 210 211 | 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 | - + - + + - + - + - + + | last = i + 1; inEntity = true; } else if (inEntity && string[i] == ';') { const char *entity = string + last; size_t entityLength = i - last; |
︙ |
Modified src/OFString.m from [5c8d912349] to [3cae95280a].
︙ | |||
1263 1264 1265 1266 1267 1268 1269 | 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 | - + | pool = objc_autoreleasePoolPush(); characters = [self characters]; otherCharacters = [otherString characters]; if (memcmp(characters, otherCharacters, |
︙ | |||
1592 1593 1594 1595 1596 1597 1598 | 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 | - - + + - - + + | @try { [self getCharacters: characters inRange: range]; if (options & OF_STRING_SEARCH_BACKWARDS) { for (i = range.length - searchLength;; i--) { |
︙ | |||
1640 1641 1642 1643 1644 1645 1646 | 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 | - - + + | pool = objc_autoreleasePoolPush(); characters = [self characters]; searchCharacters = [string characters]; for (i = 0; i <= length - searchLength; i++) { |
︙ | |||
1834 1835 1836 1837 1838 1839 1840 | 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 | - + - - + + - + - + - - + + - + | } - (bool)hasPrefix: (OFString*)prefix { of_unichar_t *tmp; const of_unichar_t *prefixCharacters; size_t prefixLength; |
︙ | |||
1926 1927 1928 1929 1930 1931 1932 | 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 | - + | objc_autoreleasePoolPop(pool); return array; } for (i = 0, last = 0; i <= length - delimiterLength; i++) { if (memcmp(characters + i, delimiterCharacters, |
︙ |
Modified src/OFString_UTF8.m from [0b123dda77] to [26025dccab].
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | - + | length: (size_t)UTF8StringLength storage: (char*)storage { self = [super init]; @try { if (UTF8StringLength >= 3 && |
︙ | |||
213 214 215 216 217 218 219 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | - + + | self = [super init]; @try { size_t i, j; const of_char16_t *table; if (encoding == OF_STRING_ENCODING_UTF_8 && |
︙ | |||
342 343 344 345 346 347 348 | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | - + | { self = [super init]; @try { size_t UTF8StringLength = strlen(UTF8String); if (UTF8StringLength >= 3 && |
︙ | |||
728 729 730 731 732 733 734 | 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | - + | if (([otherString isKindOfClass: [OFString_UTF8 class]] || [otherString isKindOfClass: [OFMutableString_UTF8 class]]) && _s->hashed && otherString->_s->hashed && _s->hash != otherString->_s->hash) return false; |
︙ | |||
948 949 950 951 952 953 954 | 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 | - - + + - - + + | return of_range(0, 0); if (cStringLength > rangeLength) return of_range(OF_NOT_FOUND, 0); if (options & OF_STRING_SEARCH_BACKWARDS) { for (i = rangeLength - cStringLength;; i--) { |
︙ | |||
989 990 991 992 993 994 995 | 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 | - + | if (cStringLength == 0) return true; if (cStringLength > _s->cStringLength) return false; for (i = 0; i <= _s->cStringLength - cStringLength; i++) |
︙ | |||
1021 1022 1023 1024 1025 1026 1027 | 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 | - + - - + + | - (bool)hasPrefix: (OFString*)prefix { size_t cStringLength = [prefix UTF8StringLength]; if (cStringLength > _s->cStringLength) return false; |
︙ | |||
1057 1058 1059 1060 1061 1062 1063 | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 | - + | [array addObject: [[self copy] autorelease]]; objc_autoreleasePoolPop(pool); return array; } for (i = 0, last = 0; i <= _s->cStringLength - cStringLength; i++) { |
︙ |
Modified src/OFUDPSocket.m from [aca7fe3ad4] to [9fe4ea7a6f].
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | sin6_1 = (struct sockaddr_in6*)&address1->address; sin6_2 = (struct sockaddr_in6*)&address2->address; if (sin6_1->sin6_port != sin6_2->sin6_port) return false; if (memcmp(sin6_1->sin6_addr.s6_addr, sin6_2->sin6_addr.s6_addr, |
︙ |
Modified src/runtime/class.m from [fb4bbc3736] to [cf051d40ec].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + | if (empty_dtable == NULL) empty_dtable = objc_sparsearray_new(); cls->dtable = empty_dtable; cls->metaclass->dtable = empty_dtable; |
︙ | |||
535 536 537 538 539 540 541 | 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | - + | objc_global_mutex_unlock(); return j; } if (classes->data[i] == NULL) continue; |
︙ | |||
862 863 864 865 866 867 868 | 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 | - + | objc_unregister_class(cls->subclass_list[0]); if (cls->info & OBJC_CLASS_INFO_LOADED) call_method(cls, "unload"); objc_hashtable_delete(classes, cls->name); |
︙ |
Modified src/runtime/exception.m from [c587b3ed95] to [bf6c15d416].
︙ | |||
479 480 481 482 483 484 485 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | - + | c = (uintptr_t)resolve_value(c, lsda->typestable_enc, lsda->typestable - i, lsda->typestable_base); #endif className = (const char*)c; if (className != NULL && *className != '\0' && |
︙ |
Modified src/runtime/hashtable.m from [f9c1f2768d] to [f1cf7ae4d1].
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - + | return hash; } bool objc_equal_string(const void *obj1, const void *obj2) { |
︙ |
Modified src/runtime/protocol.m from [66c66e6946] to [f526015ede].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | { return p->name; } inline bool __attribute__((gnu_inline)) protocol_isEqual(Protocol *a, Protocol *b) { |
︙ |
Modified tests/OFStringTests.m from [8c5b4654b9] to [aef3727a76].
︙ | |||
164 165 166 167 168 169 170 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - + | TEST(@"+[stringWithUTF16String:]", (is = [OFString stringWithUTF16String: utf16str]) && [is isEqual: @"fööbär🀺"] && (is = [OFString stringWithUTF16String: sutf16str]) && [is isEqual: @"fööbär🀺"]) |
︙ |