Differences From Artifact [a389df28b8]:
- File
src/OFXMLParser.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 25947) [annotate] [blame] [check-ins using]
To Artifact [3a91a054b9]:
- File src/OFXMLParser.m — part of check-in [1efd40d895] at 2013-04-10 16:48:17 on branch trunk — OFXMLParser: Require version in prolog. (user: js, size: 26019) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
392 393 394 395 396 397 398 399 400 401 402 403 404 405 | { const char *cString; size_t i, last, length; int PIState = 0; OFString *attribute = nil; OFMutableString *value = nil; char piDelimiter = 0; if (!_acceptProlog) return false; _acceptProlog = false; pi = [pi substringWithRange: of_range(3, [pi length] - 3)]; | > | 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 | { const char *cString; size_t i, last, length; int PIState = 0; OFString *attribute = nil; OFMutableString *value = nil; char piDelimiter = 0; bool hasVersion = false; if (!_acceptProlog) return false; _acceptProlog = false; pi = [pi substringWithRange: of_range(3, [pi length] - 3)]; |
︙ | ︙ | |||
444 445 446 447 448 449 450 | if (cString[i] != piDelimiter) continue; value = [OFMutableString stringWithUTF8String: cString + last length: i - last]; | | > > > | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | if (cString[i] != piDelimiter) continue; value = [OFMutableString stringWithUTF8String: cString + last length: i - last]; if ([attribute isEqual: @"version"]) { if (![value hasPrefix: @"1."]) return false; hasVersion = true; } if ([attribute isEqual: @"encoding"]) { [value lowercase]; if ([value isEqual: @"utf-8"]) _encoding = OF_STRING_ENCODING_UTF_8; else if ([value isEqual: @"iso-8859-1"]) |
︙ | ︙ | |||
473 474 475 476 477 478 479 | last = i + 1; PIState = 0; break; } } | | | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | last = i + 1; PIState = 0; break; } } if (PIState != 0 || !hasVersion) return false; return true; } /* Inside processing instructions */ - (void)OF_parseInProcessingInstructionsWithBuffer: (const char*)buffer |
︙ | ︙ |