Lines Matching refs:p
209 const char* p = stamp; in Stamp() local
210 assert( p ); in Stamp()
212 while ( p < now ) in Stamp()
215 const unsigned char* pU = (const unsigned char*)p; in Stamp()
229 ++p; in Stamp()
232 if (*p == '\n') { in Stamp()
233 ++p; in Stamp()
243 ++p; in Stamp()
248 if (*p == '\r') { in Stamp()
249 ++p; in Stamp()
255 ++p; in Stamp()
264 if ( *(p+1) && *(p+2) ) in Stamp()
269 p += 3; in Stamp()
271 p += 3; in Stamp()
273 p += 3; in Stamp()
275 { p +=3; ++col; } // A normal character. in Stamp()
280 ++p; in Stamp()
289 int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)]; in Stamp()
292 p += step; in Stamp()
299 ++p; in Stamp()
309 stamp = p; in Stamp()
314 const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) in SkipWhiteSpace() argument
316 if ( !p || !*p ) in SkipWhiteSpace()
322 while ( *p ) in SkipWhiteSpace()
324 const unsigned char* pU = (const unsigned char*)p; in SkipWhiteSpace()
331 p += 3; in SkipWhiteSpace()
338 p += 3; in SkipWhiteSpace()
345 p += 3; in SkipWhiteSpace()
349 if ( IsWhiteSpace( *p ) ) // Still using old rules for white space. in SkipWhiteSpace()
350 ++p; in SkipWhiteSpace()
357 while ( *p && IsWhiteSpace( *p ) ) in SkipWhiteSpace()
358 ++p; in SkipWhiteSpace()
361 return p; in SkipWhiteSpace()
401 const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) in ReadName() argument
407 assert( p ); in ReadName()
416 if ( p && *p in ReadName()
417 && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) in ReadName()
419 const char* start = p; in ReadName()
420 while( p && *p in ReadName()
421 && ( IsAlphaNum( (unsigned char ) *p, encoding ) in ReadName()
422 || *p == '_' in ReadName()
423 || *p == '-' in ReadName()
424 || *p == '.' in ReadName()
425 || *p == ':' ) ) in ReadName()
428 ++p; in ReadName()
430 if ( p-start > 0 ) { in ReadName()
431 name->assign( start, p-start ); in ReadName()
433 return p; in ReadName()
438 const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) in GetEntity() argument
445 if ( *(p+1) && *(p+1) == '#' && *(p+2) ) in GetEntity()
451 if ( *(p+2) == 'x' ) in GetEntity()
454 if ( !*(p+3) ) return 0; in GetEntity()
456 const char* q = p+3; in GetEntity()
461 delta = q-p; in GetEntity()
481 if ( !*(p+2) ) return 0; in GetEntity()
483 const char* q = p+2; in GetEntity()
488 delta = q-p; in GetEntity()
511 return p + delta + 1; in GetEntity()
517 if ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 ) in GetEntity()
522 return ( p + entity[i].strLength ); in GetEntity()
527 *value = *p; // Don't put back the last one, since we return it! in GetEntity()
530 return p+1; in GetEntity()
534 bool TiXmlBase::StringEqual( const char* p, in StringEqual() argument
539 assert( p ); in StringEqual()
541 if ( !p || !*p ) in StringEqual()
547 const char* q = p; in StringEqual()
574 const char* TiXmlBase::ReadText( const char* p, in ReadText() argument
586 while ( p && *p in ReadText()
587 && !StringEqual( p, endTag, caseInsensitive, encoding ) in ReadText()
592 p = GetChar( p, cArr, &len, encoding ); in ReadText()
601 p = SkipWhiteSpace( p, encoding ); in ReadText()
602 while ( p && *p in ReadText()
603 && !StringEqual( p, endTag, caseInsensitive, encoding ) ) in ReadText()
605 if ( *p == '\r' || *p == '\n' ) in ReadText()
608 ++p; in ReadText()
610 else if ( IsWhiteSpace( *p ) ) in ReadText()
613 ++p; in ReadText()
626 p = GetChar( p, cArr, &len, encoding ); in ReadText()
634 if ( p && *p ) in ReadText()
635 p += strlen( endTag ); in ReadText()
636 return ( p && *p ) ? p : 0; in ReadText()
704 const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding… in Parse() argument
711 if ( !p || !*p ) in Parse()
731 TiXmlParsingData data( p, TabSize(), location.row, location.col ); in Parse()
737 const unsigned char* pU = (const unsigned char*)p; in Parse()
747 p = SkipWhiteSpace( p, encoding ); in Parse()
748 if ( !p ) in Parse()
754 while ( p && *p ) in Parse()
756 TiXmlNode* node = Identify( p, encoding ); in Parse()
759 p = node->Parse( p, &data, encoding ); in Parse()
785 p = SkipWhiteSpace( p, encoding ); in Parse()
795 return p; in Parse()
818 TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) in Identify() argument
822 p = SkipWhiteSpace( p, encoding ); in Identify()
823 if( !p || !*p || *p != '<' ) in Identify()
828 p = SkipWhiteSpace( p, encoding ); in Identify()
830 if ( !p || !*p ) in Identify()
847 if ( StringEqual( p, xmlHeader, true, encoding ) ) in Identify()
854 else if ( StringEqual( p, commentHeader, false, encoding ) ) in Identify()
861 else if ( StringEqual( p, cdataHeader, false, encoding ) ) in Identify()
870 else if ( StringEqual( p, dtdHeader, false, encoding ) ) in Identify()
877 else if ( IsAlpha( *(p+1), encoding ) in Identify()
878 || *(p+1) == '_' ) in Identify()
1043 const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1045 p = SkipWhiteSpace( p, encoding ); in Parse()
1048 if ( !p || !*p ) in Parse()
1056 data->Stamp( p, encoding ); in Parse()
1060 if ( *p != '<' ) in Parse()
1062 if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding ); in Parse()
1066 p = SkipWhiteSpace( p+1, encoding ); in Parse()
1069 const char* pErr = p; in Parse()
1071 p = ReadName( p, &value, encoding ); in Parse()
1072 if ( !p || !*p ) in Parse()
1083 while ( p && *p ) in Parse()
1085 pErr = p; in Parse()
1086 p = SkipWhiteSpace( p, encoding ); in Parse()
1087 if ( !p || !*p ) in Parse()
1092 if ( *p == '/' ) in Parse()
1094 ++p; in Parse()
1096 if ( *p != '>' ) in Parse()
1098 if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding ); in Parse()
1101 return (p+1); in Parse()
1103 else if ( *p == '>' ) in Parse()
1108 ++p; in Parse()
1109 …p = ReadValue( p, data, encoding ); // Note this is an Element method, and will set the error if … in Parse()
1110 if ( !p || !*p ) { in Parse()
1113 if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding ); in Parse()
1122 if ( StringEqual( p, endTag.c_str(), false, encoding ) ) in Parse()
1124 p += endTag.length(); in Parse()
1125 p = SkipWhiteSpace( p, encoding ); in Parse()
1126 if ( p && *p && *p == '>' ) { in Parse()
1127 ++p; in Parse()
1128 return p; in Parse()
1130 if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding ); in Parse()
1135 if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding ); in Parse()
1149 pErr = p; in Parse()
1150 p = attrib->Parse( p, data, encoding ); in Parse()
1152 if ( !p || !*p ) in Parse()
1175 return p; in Parse()
1179 const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in ReadValue() argument
1184 const char* pWithWhiteSpace = p; in ReadValue()
1185 p = SkipWhiteSpace( p, encoding ); in ReadValue()
1187 while ( p && *p ) in ReadValue()
1189 if ( *p != '<' ) in ReadValue()
1201 p = textNode->Parse( p, data, encoding ); in ReadValue()
1207 p = textNode->Parse( pWithWhiteSpace, data, encoding ); in ReadValue()
1220 if ( StringEqual( p, "</", false, encoding ) ) in ReadValue()
1222 return p; in ReadValue()
1226 TiXmlNode* node = Identify( p, encoding ); in ReadValue()
1229 p = node->Parse( p, data, encoding ); in ReadValue()
1238 pWithWhiteSpace = p; in ReadValue()
1239 p = SkipWhiteSpace( p, encoding ); in ReadValue()
1242 if ( !p ) in ReadValue()
1246 return p; in ReadValue()
1275 const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1278 p = SkipWhiteSpace( p, encoding ); in Parse()
1282 data->Stamp( p, encoding ); in Parse()
1285 if ( !p || !*p || *p != '<' ) in Parse()
1287 if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding ); in Parse()
1290 ++p; in Parse()
1293 while ( p && *p && *p != '>' ) in Parse()
1295 value += *p; in Parse()
1296 ++p; in Parse()
1299 if ( !p ) in Parse()
1304 if ( p && *p == '>' ) in Parse()
1305 return p+1; in Parse()
1306 return p; in Parse()
1337 const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1342 p = SkipWhiteSpace( p, encoding ); in Parse()
1346 data->Stamp( p, encoding ); in Parse()
1352 if ( !StringEqual( p, startTag, false, encoding ) ) in Parse()
1355 document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); in Parse()
1358 p += strlen( startTag ); in Parse()
1380 while ( p && *p && !StringEqual( p, endTag, false, encoding ) ) in Parse()
1382 value.append( p, 1 ); in Parse()
1383 ++p; in Parse()
1385 if ( p && *p ) in Parse()
1386 p += strlen( endTag ); in Parse()
1388 return p; in Parse()
1392 const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1394 p = SkipWhiteSpace( p, encoding ); in Parse()
1395 if ( !p || !*p ) return 0; in Parse()
1399 data->Stamp( p, encoding ); in Parse()
1403 const char* pErr = p; in Parse()
1404 p = ReadName( p, &name, encoding ); in Parse()
1405 if ( !p || !*p ) in Parse()
1410 p = SkipWhiteSpace( p, encoding ); in Parse()
1411 if ( !p || !*p || *p != '=' ) in Parse()
1413 if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); in Parse()
1417 ++p; // skip '=' in Parse()
1418 p = SkipWhiteSpace( p, encoding ); in Parse()
1419 if ( !p || !*p ) in Parse()
1421 if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); in Parse()
1429 if ( *p == SINGLE_QUOTE ) in Parse()
1431 ++p; in Parse()
1433 p = ReadText( p, &value, false, end, false, encoding ); in Parse()
1435 else if ( *p == DOUBLE_QUOTE ) in Parse()
1437 ++p; in Parse()
1439 p = ReadText( p, &value, false, end, false, encoding ); in Parse()
1447 while ( p && *p // existence in Parse()
1448 && !IsWhiteSpace( *p ) // whitespace in Parse()
1449 && *p != '/' && *p != '>' ) // tag end in Parse()
1451 if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) { in Parse()
1455 if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); in Parse()
1458 value += *p; in Parse()
1459 ++p; in Parse()
1462 return p; in Parse()
1497 const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1504 data->Stamp( p, encoding ); in Parse()
1511 if ( cdata || StringEqual( p, startTag, false, encoding ) ) in Parse()
1515 if ( !StringEqual( p, startTag, false, encoding ) ) in Parse()
1518 document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding ); in Parse()
1521 p += strlen( startTag ); in Parse()
1524 while ( p && *p in Parse()
1525 && !StringEqual( p, endTag, false, encoding ) in Parse()
1528 value += *p; in Parse()
1529 ++p; in Parse()
1533 p = ReadText( p, &dummy, false, endTag, false, encoding ); in Parse()
1534 return p; in Parse()
1541 p = ReadText( p, &value, ignoreWhite, end, false, encoding ); in Parse()
1542 if ( p && *p ) in Parse()
1543 return p-1; // don't truncate the '<' in Parse()
1572 const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding… in Parse() argument
1574 p = SkipWhiteSpace( p, _encoding ); in Parse()
1578 if ( !p || !*p || !StringEqual( p, "<?xml", true, _encoding ) ) in Parse()
1585 data->Stamp( p, _encoding ); in Parse()
1588 p += 5; in Parse()
1594 while ( p && *p ) in Parse()
1596 if ( *p == '>' ) in Parse()
1598 ++p; in Parse()
1599 return p; in Parse()
1602 p = SkipWhiteSpace( p, _encoding ); in Parse()
1603 if ( StringEqual( p, "version", true, _encoding ) ) in Parse()
1606 p = attrib.Parse( p, data, _encoding ); in Parse()
1609 else if ( StringEqual( p, "encoding", true, _encoding ) ) in Parse()
1612 p = attrib.Parse( p, data, _encoding ); in Parse()
1615 else if ( StringEqual( p, "standalone", true, _encoding ) ) in Parse()
1618 p = attrib.Parse( p, data, _encoding ); in Parse()
1624 while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) in Parse()
1625 ++p; in Parse()