Changeset 1580 for trunk/src/core
- Timestamp:
- Oct 13, 2009, 3:57:07 PM (15 years ago)
- Location:
- trunk/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/RpEncode.cc
r1579 r1580 191 191 size = strlen(buf); 192 192 } 193 const char *cp, *endPtr; 194 for (cp = buf, endPtr = cp + size; cp < endPtr; 195 cp++) { 196 if (!_xmlchars[(unsigned int)*cp]) { 193 unsigned const char *p, *pend; 194 for (p = (unsigned const char *)buf, pend = p + size; p < pend; p++) { 195 if (!_xmlchars[*p]) { 197 196 return true; 198 197 } … … 210 209 size = strlen(buf); 211 210 } 212 const char *cp, *endPtr;213 for ( cp = buf, endPtr = buf + size; cp < endPtr; cp++) {214 if (!_base64chars[ (unsigned int)*cp]) {215 fprintf(stderr, "%c % d is not base64\n", *cp, *cp);211 unsigned const char *p, *pend; 212 for (p = (unsigned const char *)buf, pend = p + size; p < pend; p++) { 213 if (!_base64chars[*p]) { 214 fprintf(stderr, "%c %u is not base64\n", *p, *p); 216 215 return false; 217 216 } -
trunk/src/core/RpEntityRef.cc
r1559 r1580 23 23 * < "<" 24 24 * > ">" 25 * " 26 * &apos 25 * " "\"" 26 * ' "'" 27 27 * 28 28 */ … … 42 42 43 43 static PredefEntityRef predef[] = { 44 { "" ", 5, "\"" },45 { "& ", 4, "&" },46 { "< ", 3, "<" },47 { "> ", 3, ">" },48 { "&apos ", 5, "'" }44 { """, 6, "\"" }, 45 { "&", 5, "&" }, 46 { "<", 4, "<" }, 47 { ">", 4, ">" }, 48 { "'", 6, "'" } 49 49 }; 50 50 static int nPredefs = sizeof(predef) / sizeof (PredefEntityRef); … … 107 107 EntityRef::encode (const char* string, unsigned int len) 108 108 { 109 unsigned int pos = 0;110 111 109 if (string == NULL) { 112 // Don't do anything with NULL strings.113 return NULL; 110 return NULL; /* Don't do anything with NULL 111 * strings. */ 114 112 } 115 113 _bout.clear();
Note: See TracChangeset
for help on using the changeset viewer.