Lines Matching refs:p
200 const char* p = stamp; in Stamp() local
201 assert( p ); in Stamp()
203 while ( p < now ) in Stamp()
206 const unsigned char* pU = (const unsigned char*)p; in Stamp()
220 ++p; in Stamp()
223 if (*p == '\n') { in Stamp()
224 ++p; in Stamp()
234 ++p; in Stamp()
239 if (*p == '\r') { in Stamp()
240 ++p; in Stamp()
246 ++p; in Stamp()
255 if ( *(p+1) && *(p+2) ) in Stamp()
260 p += 3; in Stamp()
262 p += 3; in Stamp()
264 p += 3; in Stamp()
266 { p +=3; ++col; } // A normal character. in Stamp()
271 ++p; in Stamp()
280 int step = TiXmlBase::utf8ByteTable[*((unsigned char*)p)]; in Stamp()
283 p += step; in Stamp()
290 ++p; in Stamp()
300 stamp = p; in Stamp()
305 const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) in SkipWhiteSpace() argument
307 if ( !p || !*p ) in SkipWhiteSpace()
313 while ( *p ) in SkipWhiteSpace()
315 const unsigned char* pU = (const unsigned char*)p; in SkipWhiteSpace()
322 p += 3; in SkipWhiteSpace()
329 p += 3; in SkipWhiteSpace()
336 p += 3; in SkipWhiteSpace()
340 if ( IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) // Still using old rules for white space. in SkipWhiteSpace()
341 ++p; in SkipWhiteSpace()
348 while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) in SkipWhiteSpace()
349 ++p; in SkipWhiteSpace()
352 return p; in SkipWhiteSpace()
389 const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) in ReadName() argument
392 assert( p ); in ReadName()
401 if ( p && *p in ReadName()
402 && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) in ReadName()
404 while( p && *p in ReadName()
405 && ( IsAlphaNum( (unsigned char ) *p, encoding ) in ReadName()
406 || *p == '_' in ReadName()
407 || *p == '-' in ReadName()
408 || *p == '.' in ReadName()
409 || *p == ':' ) ) in ReadName()
411 (*name) += *p; in ReadName()
412 ++p; in ReadName()
414 return p; in ReadName()
419 const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) in GetEntity() argument
426 if ( *(p+1) && *(p+1) == '#' && *(p+2) ) in GetEntity()
432 if ( *(p+2) == 'x' ) in GetEntity()
435 if ( !*(p+3) ) return 0; in GetEntity()
437 const char* q = p+3; in GetEntity()
442 delta = q-p; in GetEntity()
462 if ( !*(p+2) ) return 0; in GetEntity()
464 const char* q = p+2; in GetEntity()
469 delta = q-p; in GetEntity()
492 return p + delta + 1; in GetEntity()
498 if ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 ) in GetEntity()
503 return ( p + entity[i].strLength ); in GetEntity()
508 *value = *p; // Don't put back the last one, since we return it! in GetEntity()
509 return p+1; in GetEntity()
513 bool TiXmlBase::StringEqual( const char* p, in StringEqual() argument
518 assert( p ); in StringEqual()
520 if ( !p || !*p ) in StringEqual()
526 const char* q = p; in StringEqual()
553 const char* TiXmlBase::ReadText( const char* p, in ReadText() argument
565 while ( p && *p in ReadText()
566 && !StringEqual( p, endTag, caseInsensitive, encoding ) in ReadText()
571 p = GetChar( p, cArr, &len, encoding ); in ReadText()
580 p = SkipWhiteSpace( p, encoding ); in ReadText()
581 while ( p && *p in ReadText()
582 && !StringEqual( p, endTag, caseInsensitive, encoding ) ) in ReadText()
584 if ( *p == '\r' || *p == '\n' ) in ReadText()
587 ++p; in ReadText()
589 else if ( IsWhiteSpace( *p ) ) in ReadText()
592 ++p; in ReadText()
605 p = GetChar( p, cArr, &len, encoding ); in ReadText()
613 return p + strlen( endTag ); in ReadText()
681 const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding… in Parse() argument
688 if ( !p || !*p ) in Parse()
708 TiXmlParsingData data( p, TabSize(), location.row, location.col ); in Parse()
714 const unsigned char* pU = (const unsigned char*)p; in Parse()
724 p = SkipWhiteSpace( p, encoding ); in Parse()
725 if ( !p ) in Parse()
731 while ( p && *p ) in Parse()
733 TiXmlNode* node = Identify( p, encoding ); in Parse()
736 p = node->Parse( p, &data, encoding ); in Parse()
762 p = SkipWhiteSpace( p, encoding ); in Parse()
772 return p; in Parse()
795 TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) in Identify() argument
799 p = SkipWhiteSpace( p, encoding ); in Identify()
800 if( !p || !*p || *p != '<' ) in Identify()
806 p = SkipWhiteSpace( p, encoding ); in Identify()
808 if ( !p || !*p ) in Identify()
825 if ( StringEqual( p, xmlHeader, true, encoding ) ) in Identify()
832 else if ( StringEqual( p, commentHeader, false, encoding ) ) in Identify()
839 else if ( StringEqual( p, cdataHeader, false, encoding ) ) in Identify()
848 else if ( StringEqual( p, dtdHeader, false, encoding ) ) in Identify()
855 else if ( IsAlpha( *(p+1), encoding ) in Identify()
856 || *(p+1) == '_' ) in Identify()
1014 const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1016 p = SkipWhiteSpace( p, encoding ); in Parse()
1019 if ( !p || !*p ) in Parse()
1027 data->Stamp( p, encoding ); in Parse()
1031 if ( *p != '<' ) in Parse()
1033 if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding ); in Parse()
1037 p = SkipWhiteSpace( p+1, encoding ); in Parse()
1040 const char* pErr = p; in Parse()
1042 p = ReadName( p, &value, encoding ); in Parse()
1043 if ( !p || !*p ) in Parse()
1055 while ( p && *p ) in Parse()
1057 pErr = p; in Parse()
1058 p = SkipWhiteSpace( p, encoding ); in Parse()
1059 if ( !p || !*p ) in Parse()
1064 if ( *p == '/' ) in Parse()
1066 ++p; in Parse()
1068 if ( *p != '>' ) in Parse()
1070 if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding ); in Parse()
1073 return (p+1); in Parse()
1075 else if ( *p == '>' ) in Parse()
1080 ++p; in Parse()
1081 …p = ReadValue( p, data, encoding ); // Note this is an Element method, and will set the error if … in Parse()
1082 if ( !p || !*p ) in Parse()
1086 if ( StringEqual( p, endTag.c_str(), false, encoding ) ) in Parse()
1088 p += endTag.length(); in Parse()
1089 return p; in Parse()
1093 if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding ); in Parse()
1108 const char* pErr = p; in Parse()
1109 p = attrib->Parse( p, data, encoding ); in Parse()
1111 if ( !p || !*p ) in Parse()
1130 return p; in Parse()
1134 const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in ReadValue() argument
1139 const char* pWithWhiteSpace = p; in ReadValue()
1140 p = SkipWhiteSpace( p, encoding ); in ReadValue()
1142 while ( p && *p ) in ReadValue()
1144 if ( *p != '<' ) in ReadValue()
1157 p = textNode->Parse( p, data, encoding ); in ReadValue()
1163 p = textNode->Parse( pWithWhiteSpace, data, encoding ); in ReadValue()
1176 if ( StringEqual( p, "</", false, encoding ) ) in ReadValue()
1178 return p; in ReadValue()
1182 TiXmlNode* node = Identify( p, encoding ); in ReadValue()
1185 p = node->Parse( p, data, encoding ); in ReadValue()
1194 pWithWhiteSpace = p; in ReadValue()
1195 p = SkipWhiteSpace( p, encoding ); in ReadValue()
1198 if ( !p ) in ReadValue()
1202 return p; in ReadValue()
1231 const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1234 p = SkipWhiteSpace( p, encoding ); in Parse()
1238 data->Stamp( p, encoding ); in Parse()
1241 if ( !p || !*p || *p != '<' ) in Parse()
1243 if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding ); in Parse()
1246 ++p; in Parse()
1249 while ( p && *p && *p != '>' ) in Parse()
1251 value += *p; in Parse()
1252 ++p; in Parse()
1255 if ( !p ) in Parse()
1259 if ( *p == '>' ) in Parse()
1260 return p+1; in Parse()
1261 return p; in Parse()
1292 const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1297 p = SkipWhiteSpace( p, encoding ); in Parse()
1301 data->Stamp( p, encoding ); in Parse()
1307 if ( !StringEqual( p, startTag, false, encoding ) ) in Parse()
1309 document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); in Parse()
1312 p += strlen( startTag ); in Parse()
1313 p = ReadText( p, &value, false, endTag, false, encoding ); in Parse()
1314 return p; in Parse()
1318 const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1320 p = SkipWhiteSpace( p, encoding ); in Parse()
1321 if ( !p || !*p ) return 0; in Parse()
1329 data->Stamp( p, encoding ); in Parse()
1333 const char* pErr = p; in Parse()
1334 p = ReadName( p, &name, encoding ); in Parse()
1335 if ( !p || !*p ) in Parse()
1340 p = SkipWhiteSpace( p, encoding ); in Parse()
1341 if ( !p || !*p || *p != '=' ) in Parse()
1343 if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); in Parse()
1347 ++p; // skip '=' in Parse()
1348 p = SkipWhiteSpace( p, encoding ); in Parse()
1349 if ( !p || !*p ) in Parse()
1351 if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); in Parse()
1357 if ( *p == '\'' ) in Parse()
1359 ++p; in Parse()
1361 p = ReadText( p, &value, false, end, false, encoding ); in Parse()
1363 else if ( *p == '"' ) in Parse()
1365 ++p; in Parse()
1367 p = ReadText( p, &value, false, end, false, encoding ); in Parse()
1375 while ( p && *p // existence in Parse()
1376 && !IsWhiteSpace( *p ) && *p != '\n' && *p != '\r' // whitespace in Parse()
1377 && *p != '/' && *p != '>' ) // tag end in Parse()
1379 value += *p; in Parse()
1380 ++p; in Parse()
1383 return p; in Parse()
1432 const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) in Parse() argument
1439 data->Stamp( p, encoding ); in Parse()
1446 if ( cdata || StringEqual( p, startTag, false, encoding ) ) in Parse()
1450 if ( !StringEqual( p, startTag, false, encoding ) ) in Parse()
1452 document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding ); in Parse()
1455 p += strlen( startTag ); in Parse()
1458 while ( p && *p in Parse()
1459 && !StringEqual( p, endTag, false, encoding ) in Parse()
1462 value += *p; in Parse()
1463 ++p; in Parse()
1467 p = ReadText( p, &dummy, false, endTag, false, encoding ); in Parse()
1468 return p; in Parse()
1475 p = ReadText( p, &value, ignoreWhite, end, false, encoding ); in Parse()
1476 if ( p ) in Parse()
1477 return p-1; // don't truncate the '<' in Parse()
1506 const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding… in Parse() argument
1508 p = SkipWhiteSpace( p, _encoding ); in Parse()
1512 if ( !p || !*p || !StringEqual( p, "<?xml", true, _encoding ) ) in Parse()
1519 data->Stamp( p, _encoding ); in Parse()
1522 p += 5; in Parse()
1528 while ( p && *p ) in Parse()
1530 if ( *p == '>' ) in Parse()
1532 ++p; in Parse()
1533 return p; in Parse()
1536 p = SkipWhiteSpace( p, _encoding ); in Parse()
1537 if ( StringEqual( p, "version", true, _encoding ) ) in Parse()
1540 p = attrib.Parse( p, data, _encoding ); in Parse()
1543 else if ( StringEqual( p, "encoding", true, _encoding ) ) in Parse()
1546 p = attrib.Parse( p, data, _encoding ); in Parse()
1549 else if ( StringEqual( p, "standalone", true, _encoding ) ) in Parse()
1552 p = attrib.Parse( p, data, _encoding ); in Parse()
1558 while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) in Parse()
1559 ++p; in Parse()