Differences From Artifact [f51e0ac16e]:
- File
src/OFURLEncoding.m
— part of check-in
[8f4d7a5b74]
at
2009-07-17 15:16:25
on branch trunk
— Initial OFXMLParser implementation. There's still a LOT missing.
Missing stuff includes proper namespace handling, handling of comments,
handling of <?xml ...?>, error handling and much more. (user: js, size: 2471) [annotate] [blame] [check-ins using]
To Artifact [6669fbc50f]:
- File src/OFURLEncoding.m — part of check-in [4eae61a78f] at 2009-07-19 14:05:30 on branch trunk — Rename andFoo: to foo: in all methods. (user: js, size: 2471) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
34 35 36 37 38 39 40 | /* * Worst case: 3 times longer than before. * Oh, and we can't use [self allocWithSize:] here as self might be a * @"" literal. */ if ((ret_c = malloc((length * 3) + 1)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | /* * Worst case: 3 times longer than before. * Oh, and we can't use [self allocWithSize:] here as self might be a * @"" literal. */ if ((ret_c = malloc((length * 3) + 1)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa size: (length * 3) + 1]; for (i = 0; *s != '\0'; s++) { if (isalnum(*s) || *s == '-' || *s == '_' || *s == '.' || *s == '~') ret_c[i++] = *s; else { uint8_t high, low; |
︙ | ︙ | |||
74 75 76 77 78 79 80 | int st; OFString *ret; s = string; if ((ret_c = malloc(length + 1)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa | | | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | int st; OFString *ret; s = string; if ((ret_c = malloc(length + 1)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa size: length + 1]; for (st = 0, i = 0, c = 0; *s; s++) { switch (st) { case 0: if (*s == '%') st = 1; else if (*s == '+') |
︙ | ︙ |