388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
if (!acceptProlog)
return NO;
acceptProlog = NO;
pi = [pi substringFromIndex: 3
toIndex: [pi length]];
pi = [pi stringByDeletingLeadingAndTrailingWhitespaces];
cString = [pi cString];
length = [pi cStringLength];
for (i = last = 0; i < length; i++) {
switch (piState) {
case 0:
|
|
|
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
if (!acceptProlog)
return NO;
acceptProlog = NO;
pi = [pi substringFromIndex: 3
toIndex: [pi length]];
pi = [pi stringByDeletingEnclosingWhitespaces];
cString = [pi cString];
length = [pi cStringLength];
for (i = last = 0; i < length; i++) {
switch (piState) {
case 0:
|
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
|
if (buffer[*i] != '=')
return;
if ((length = *i - *last) > 0)
cache_append(cache, buffer + *last, encoding, length);
[cache deleteLeadingAndTrailingWhitespaces];
cacheCString = [cache cString];
cacheLength = [cache cStringLength];
if ((tmp = memchr(cacheCString, ':', cacheLength)) != NULL) {
attributeName = [[OFString alloc]
initWithCString: tmp + 1
|
|
|
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
|
if (buffer[*i] != '=')
return;
if ((length = *i - *last) > 0)
cache_append(cache, buffer + *last, encoding, length);
[cache deleteEnclosingWhitespaces];
cacheCString = [cache cString];
cacheLength = [cache cStringLength];
if ((tmp = memchr(cacheCString, ':', cacheLength)) != NULL) {
attributeName = [[OFString alloc]
initWithCString: tmp + 1
|