Normalize source code
Add .gitattributes Remove trailing whitespaces
This commit is contained in:
parent
a240429cb8
commit
d85dd3e20f
|
@ -0,0 +1,6 @@
|
|||
# Normalize source code before commits
|
||||
*.lua eol=lf
|
||||
*.txt eol=lf
|
||||
*.ot* eol=lf
|
||||
*.cpp eol=lf
|
||||
*.h eol=lf
|
|
@ -74,7 +74,7 @@ function Options.init()
|
|||
optionsWindow = g_ui.displayUI('options.otui')
|
||||
optionsWindow:hide()
|
||||
optionsButton = TopMenu.addLeftButton('optionsButton', tr('Options') .. ' (Ctrl+D)', 'options.png', Options.toggle)
|
||||
|
||||
|
||||
optionsTabBar = optionsWindow:getChildById('optionsTabBar')
|
||||
optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))
|
||||
|
||||
|
@ -146,7 +146,7 @@ function Options.setOption(key, value)
|
|||
value = 0
|
||||
end
|
||||
|
||||
if graphicsPanel then
|
||||
if graphicsPanel then
|
||||
graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
|
||||
end
|
||||
g_app.setBackgroundPaneMaxFps(value)
|
||||
|
|
|
@ -4,7 +4,7 @@ Table < UITable
|
|||
header-row-style: HeaderTableRow
|
||||
column-style: TableColumn
|
||||
row-style: TableRow
|
||||
|
||||
|
||||
TableData < UIScrollArea
|
||||
layout: verticalBox
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ end
|
|||
function TopMenu.addRightGameButton(id, description, icon, callback)
|
||||
return addButton(id, description, icon, callback, rightGameButtonsPanel, false)
|
||||
end
|
||||
|
||||
|
||||
function TopMenu.addRightGameToggleButton(id, description, icon, callback, right)
|
||||
return addButton(id, description, icon, callback, rightGameButtonsPanel, true)
|
||||
end
|
||||
|
|
|
@ -62,7 +62,7 @@ TopPanel
|
|||
anchors.bottom: parent.bottom
|
||||
anchors.left: prev.right
|
||||
visible: false
|
||||
|
||||
|
||||
UILabel
|
||||
id: frameCounter
|
||||
text-align: right
|
||||
|
|
|
@ -5,7 +5,7 @@ function Bit.bit(p)
|
|||
end
|
||||
|
||||
function Bit.hasBit(x, p)
|
||||
return x % (p + p) >= p
|
||||
return x % (p + p) >= p
|
||||
end
|
||||
|
||||
function Bit.setbit(x, p)
|
||||
|
|
|
@ -18,7 +18,7 @@ LogoutWindow < MainWindow
|
|||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin-left: 65
|
||||
|
||||
|
||||
Button
|
||||
id: buttonNo
|
||||
!text: tr('No')
|
||||
|
|
|
@ -183,16 +183,16 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
|
|||
else
|
||||
for k, stat in pairs(saleStats) do
|
||||
if not table.empty(stat) then
|
||||
sellStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
{['text'] = stat[1], ['width'] = 270}})
|
||||
|
||||
sellStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
{['text'] = stat[3], ['width'] = 270}})
|
||||
|
||||
sellStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
{['text'] = math.floor(stat[2]/stat[1])}})
|
||||
|
||||
sellStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
{['text'] = stat[4], ['width'] = 270}})
|
||||
end
|
||||
end
|
||||
|
@ -205,16 +205,16 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
|
|||
else
|
||||
for k, stat in pairs(purchaseStats) do
|
||||
if not table.empty(stat) then
|
||||
buyStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
{['text'] = stat[1], ['width'] = 270}})
|
||||
|
||||
buyStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
{['text'] = stat[3], ['width'] = 270}})
|
||||
|
||||
buyStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
{['text'] = math.floor(stat[2]/stat[1]), ['width'] = 270}})
|
||||
|
||||
buyStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
{['text'] = stat[4], ['width'] = 270}})
|
||||
end
|
||||
end
|
||||
|
@ -230,7 +230,7 @@ local function updateSelectedItem(newItem)
|
|||
nameLabel:setText(selectedItem.item.marketData.name)
|
||||
-- update offer types
|
||||
Market.enableCreateOffer(true)
|
||||
|
||||
|
||||
MarketProtocol.sendMarketBrowse(selectedItem.item.ptr:getId()) -- send browsed msg
|
||||
else
|
||||
Market.Market.clearSelectedItem()
|
||||
|
@ -429,7 +429,7 @@ local function initInterface()
|
|||
-- setup 'My Offer' section tabs
|
||||
myOffersPanel = g_ui.loadUI('ui/myoffers.otui')
|
||||
mainTabBar:addTab(tr('My Offers'), myOffersPanel)
|
||||
|
||||
|
||||
offersTabBar = myOffersPanel:getChildById('offersTabBar')
|
||||
offersTabBar:setContentWidget(myOffersPanel:getChildById('offersTabContent'))
|
||||
|
||||
|
@ -483,7 +483,7 @@ local function initInterface()
|
|||
categoryList:addOption(getMarketCategoryName(255)) -- meta weapons
|
||||
categoryList:setCurrentOption(getMarketCategoryName(MarketCategory.First))
|
||||
subCategoryList:setEnabled(false)
|
||||
|
||||
|
||||
-- hook item filters
|
||||
categoryList.onOptionChange = onChangeCategory
|
||||
subCategoryList.onOptionChange = onChangeSubCategory
|
||||
|
@ -521,7 +521,7 @@ function terminate()
|
|||
if marketWindow then
|
||||
marketWindow:destroy()
|
||||
end
|
||||
|
||||
|
||||
Market = nil
|
||||
end
|
||||
|
||||
|
@ -693,7 +693,7 @@ function Market.loadDepotItems(depotItems)
|
|||
table.insert(items, newItem)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for _, newItem in pairs(items) do
|
||||
local marketData = newItem:getMarketData()
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# FRAMEWORK_NET
|
||||
# FRAMEWORK_XML
|
||||
|
||||
# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatiblity
|
||||
# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatibility
|
||||
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
||||
get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
||||
|
|
|
@ -224,7 +224,7 @@ class TiXmlString
|
|||
// to the normal allocation, although use an 'int' for systems
|
||||
// that are overly picky about structure alignment.
|
||||
const size_type bytesNeeded = sizeof(Rep) + cap;
|
||||
const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int );
|
||||
const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int );
|
||||
rep_ = reinterpret_cast<Rep*>( new int[ intsNeeded ] );
|
||||
|
||||
rep_->str[ rep_->size = sz ] = '\0';
|
||||
|
|
|
@ -57,7 +57,7 @@ void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )
|
|||
{
|
||||
unsigned char c = (unsigned char) str[i];
|
||||
|
||||
if ( c == '&'
|
||||
if ( c == '&'
|
||||
&& i < ( (int)str.length() - 2 )
|
||||
&& str[i+1] == '#'
|
||||
&& str[i+2] == 'x' )
|
||||
|
@ -110,12 +110,12 @@ void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )
|
|||
// Easy pass at non-alpha/numeric/symbol
|
||||
// Below 32 is symbolic.
|
||||
char buf[ 32 ];
|
||||
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) );
|
||||
#else
|
||||
sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//*ME: warning C4267: convert 'size_t' to 'int'
|
||||
//*ME: Int-Cast to make compiler happy ...
|
||||
|
@ -154,14 +154,14 @@ TiXmlNode::~TiXmlNode()
|
|||
temp = node;
|
||||
node = node->next;
|
||||
delete temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TiXmlNode::CopyTo( TiXmlNode* target ) const
|
||||
{
|
||||
target->SetValue (value.c_str() );
|
||||
target->userData = userData;
|
||||
target->userData = userData;
|
||||
target->location = location;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ void TiXmlNode::Clear()
|
|||
temp = node;
|
||||
node = node->next;
|
||||
delete temp;
|
||||
}
|
||||
}
|
||||
|
||||
firstChild = 0;
|
||||
lastChild = 0;
|
||||
|
@ -191,7 +191,7 @@ TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node )
|
|||
if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT )
|
||||
{
|
||||
delete node;
|
||||
if ( GetDocument() )
|
||||
if ( GetDocument() )
|
||||
GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return 0;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )
|
|||
{
|
||||
if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
|
||||
{
|
||||
if ( GetDocument() )
|
||||
if ( GetDocument() )
|
||||
GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return 0;
|
||||
}
|
||||
|
@ -228,13 +228,13 @@ TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )
|
|||
|
||||
|
||||
TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis )
|
||||
{
|
||||
{
|
||||
if ( !beforeThis || beforeThis->parent != this ) {
|
||||
return 0;
|
||||
}
|
||||
if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
|
||||
{
|
||||
if ( GetDocument() )
|
||||
if ( GetDocument() )
|
||||
GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return 0;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& a
|
|||
}
|
||||
if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT )
|
||||
{
|
||||
if ( GetDocument() )
|
||||
if ( GetDocument() )
|
||||
GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return 0;
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& wit
|
|||
if ( withThis.ToDocument() ) {
|
||||
// A document can never be a child. Thanks to Noam.
|
||||
TiXmlDocument* document = GetDocument();
|
||||
if ( document )
|
||||
if ( document )
|
||||
document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return 0;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ bool TiXmlNode::RemoveChild( TiXmlNode* removeThis )
|
|||
}
|
||||
|
||||
if ( removeThis->parent != this )
|
||||
{
|
||||
{
|
||||
assert( 0 );
|
||||
return false;
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode*
|
|||
}
|
||||
|
||||
|
||||
const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
|
||||
const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
|
||||
{
|
||||
const TiXmlNode* node;
|
||||
for ( node = next; node; node = node->next )
|
||||
|
@ -515,7 +515,7 @@ const TiXmlDocument* TiXmlNode::GetDocument() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
TiXmlElement::TiXmlElement( const std::string& _value )
|
||||
TiXmlElement::TiXmlElement( const std::string& _value )
|
||||
: TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
|
||||
{
|
||||
firstChild = lastChild = 0;
|
||||
|
@ -526,7 +526,7 @@ TiXmlElement::TiXmlElement( const TiXmlElement& copy)
|
|||
: TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
|
||||
{
|
||||
firstChild = lastChild = 0;
|
||||
copy.CopyTo( this );
|
||||
copy.CopyTo( this );
|
||||
}
|
||||
|
||||
|
||||
|
@ -658,7 +658,7 @@ void TiXmlElement::CopyTo( TiXmlElement* target ) const
|
|||
// superclass:
|
||||
TiXmlNode::CopyTo( target );
|
||||
|
||||
// Element class:
|
||||
// Element class:
|
||||
// Clone the attributes, then clone the children.
|
||||
const TiXmlAttribute* attribute = 0;
|
||||
for( attribute = attributeSet.First();
|
||||
|
@ -677,7 +677,7 @@ void TiXmlElement::CopyTo( TiXmlElement* target ) const
|
|||
|
||||
bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const
|
||||
{
|
||||
if ( visitor->VisitEnter( *this, attributeSet.First() ) )
|
||||
if ( visitor->VisitEnter( *this, attributeSet.First() ) )
|
||||
{
|
||||
for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
|
||||
{
|
||||
|
@ -771,7 +771,7 @@ bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
|
|||
value = filename;
|
||||
|
||||
// reading in binary mode so that tinyxml can normalize the EOL
|
||||
FILE* file = TiXmlFOpen( value.c_str (), "rb" );
|
||||
FILE* file = TiXmlFOpen( value.c_str (), "rb" );
|
||||
|
||||
if ( file )
|
||||
{
|
||||
|
@ -788,7 +788,7 @@ bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
|
|||
|
||||
bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
|
||||
{
|
||||
if ( !file )
|
||||
if ( !file )
|
||||
{
|
||||
SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return false;
|
||||
|
@ -815,13 +815,13 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
|
|||
// 2.11 End-of-Line Handling
|
||||
// <snip>
|
||||
// <quote>
|
||||
// ...the XML processor MUST behave as if it normalized all line breaks in external
|
||||
// parsed entities (including the document entity) on input, before parsing, by translating
|
||||
// both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
|
||||
// ...the XML processor MUST behave as if it normalized all line breaks in external
|
||||
// parsed entities (including the document entity) on input, before parsing, by translating
|
||||
// both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
|
||||
// a single #xA character.
|
||||
// </quote>
|
||||
//
|
||||
// It is not clear fgets does that, and certainly isn't clear it works cross platform.
|
||||
// It is not clear fgets does that, and certainly isn't clear it works cross platform.
|
||||
// Generally, you expect fgets to translate from the convention of the OS to the c/unix
|
||||
// convention, and not work generally.
|
||||
|
||||
|
@ -846,7 +846,7 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
|
|||
// a newline-carriage return is hit.
|
||||
//
|
||||
// Wikipedia:
|
||||
// Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or
|
||||
// Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or
|
||||
// CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)...
|
||||
// * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
|
||||
// * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS
|
||||
|
@ -900,7 +900,7 @@ bool TiXmlDocument::SaveFile( const char * filename ) const
|
|||
|
||||
bool TiXmlDocument::SaveFile( FILE* fp ) const
|
||||
{
|
||||
if ( useMicrosoftBOM )
|
||||
if ( useMicrosoftBOM )
|
||||
{
|
||||
const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
|
||||
const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
|
||||
|
@ -930,7 +930,7 @@ void TiXmlDocument::CopyTo( TiXmlDocument* target ) const
|
|||
for ( node = firstChild; node; node = node->NextSibling() )
|
||||
{
|
||||
target->LinkEndChild( node->Clone() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1053,7 +1053,7 @@ int TiXmlAttribute::QueryDoubleValue( double* dval ) const
|
|||
void TiXmlAttribute::SetIntValue( int _value )
|
||||
{
|
||||
char buf [64];
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);
|
||||
#else
|
||||
sprintf (buf, "%d", _value);
|
||||
|
@ -1064,7 +1064,7 @@ void TiXmlAttribute::SetIntValue( int _value )
|
|||
void TiXmlAttribute::SetDoubleValue( double _value )
|
||||
{
|
||||
char buf [256];
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value);
|
||||
#else
|
||||
sprintf (buf, "%g", _value);
|
||||
|
@ -1167,7 +1167,7 @@ bool TiXmlText::Accept( TiXmlVisitor* visitor ) const
|
|||
|
||||
|
||||
TiXmlNode* TiXmlText::Clone() const
|
||||
{
|
||||
{
|
||||
TiXmlText* clone = 0;
|
||||
clone = new TiXmlText( "" );
|
||||
|
||||
|
@ -1206,7 +1206,7 @@ TiXmlDeclaration::TiXmlDeclaration( const std::string& _version,
|
|||
TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy )
|
||||
: TiXmlNode( TiXmlNode::TINYXML_DECLARATION )
|
||||
{
|
||||
copy.CopyTo( this );
|
||||
copy.CopyTo( this );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1257,7 +1257,7 @@ bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const
|
|||
|
||||
|
||||
TiXmlNode* TiXmlDeclaration::Clone() const
|
||||
{
|
||||
{
|
||||
TiXmlDeclaration* clone = new TiXmlDeclaration();
|
||||
|
||||
if ( !clone )
|
||||
|
@ -1395,7 +1395,7 @@ TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name )
|
|||
}
|
||||
|
||||
|
||||
#ifdef TIXML_USE_STL
|
||||
#ifdef TIXML_USE_STL
|
||||
std::istream& operator>> (std::istream & in, TiXmlNode & base)
|
||||
{
|
||||
TIXML_STRING tag;
|
||||
|
@ -1408,7 +1408,7 @@ std::istream& operator>> (std::istream & in, TiXmlNode & base)
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef TIXML_USE_STL
|
||||
#ifdef TIXML_USE_STL
|
||||
std::ostream& operator<< (std::ostream & out, const TiXmlNode & base)
|
||||
{
|
||||
TiXmlPrinter printer;
|
||||
|
@ -1578,12 +1578,12 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
|
|||
attrib->Print( 0, 0, &buffer );
|
||||
}
|
||||
|
||||
if ( !element.FirstChild() )
|
||||
if ( !element.FirstChild() )
|
||||
{
|
||||
buffer += " />";
|
||||
DoLineBreak();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
buffer += ">";
|
||||
if ( element.FirstChild()->ToText()
|
||||
|
@ -1598,7 +1598,7 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
|
|||
DoLineBreak();
|
||||
}
|
||||
}
|
||||
++depth;
|
||||
++depth;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1606,11 +1606,11 @@ bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute
|
|||
bool TiXmlPrinter::VisitExit( const TiXmlElement& element )
|
||||
{
|
||||
--depth;
|
||||
if ( !element.FirstChild() )
|
||||
if ( !element.FirstChild() )
|
||||
{
|
||||
// nothing.
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if ( simpleTextPrint )
|
||||
{
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
www.sourceforge.net/projects/tinyxml
|
||||
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
|
|
|
@ -2,23 +2,23 @@
|
|||
www.sourceforge.net/projects/tinyxml
|
||||
Original code by Lee Thomason (www.grinninglizard.com)
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
*/
|
||||
|
||||
|
@ -39,8 +39,8 @@ distribution.
|
|||
|
||||
// Note tha "PutString" hardcodes the same list. This
|
||||
// is less flexible than it appears. Changing the entries
|
||||
// or order will break putstring.
|
||||
TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] =
|
||||
// or order will break putstring.
|
||||
TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] =
|
||||
{
|
||||
{ "&", 5, '&' },
|
||||
{ "<", 4, '<' },
|
||||
|
@ -54,16 +54,16 @@ TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] =
|
|||
// Including the basic of this table, which determines the #bytes in the
|
||||
// sequence from the lead byte. 1 placed for invalid sequences --
|
||||
// although the result will be junk, pass it through as much as possible.
|
||||
// Beware of the non-characters in UTF-8:
|
||||
// Beware of the non-characters in UTF-8:
|
||||
// ef bb bf (Microsoft "lead bytes")
|
||||
// ef bf be
|
||||
// ef bf bf
|
||||
// ef bf bf
|
||||
|
||||
const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
|
||||
const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
|
||||
const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
|
||||
|
||||
const int TiXmlBase::utf8ByteTable[256] =
|
||||
const int TiXmlBase::utf8ByteTable[256] =
|
||||
{
|
||||
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00
|
||||
|
@ -75,9 +75,9 @@ const int TiXmlBase::utf8ByteTable[256] =
|
|||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0
|
||||
1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0
|
||||
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte
|
||||
|
@ -91,7 +91,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
|
|||
const unsigned long BYTE_MARK = 0x80;
|
||||
const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
|
||||
|
||||
if (input < 0x80)
|
||||
if (input < 0x80)
|
||||
*length = 1;
|
||||
else if ( input < 0x800 )
|
||||
*length = 2;
|
||||
|
@ -105,22 +105,22 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
|
|||
output += *length;
|
||||
|
||||
// Scary scary fall throughs.
|
||||
switch (*length)
|
||||
switch (*length)
|
||||
{
|
||||
case 4:
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
input >>= 6;
|
||||
case 3:
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
input >>= 6;
|
||||
case 2:
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
input >>= 6;
|
||||
case 1:
|
||||
--output;
|
||||
--output;
|
||||
*output = (char)(input | FIRST_BYTE_MARK[*length]);
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
|
|||
{
|
||||
// This will only work for low-ascii, everything else is assumed to be a valid
|
||||
// letter. I'm not sure this is the best approach, but it is quite tricky trying
|
||||
// to figure out alhabetical vs. not across encoding. So take a very
|
||||
// to figure out alhabetical vs. not across encoding. So take a very
|
||||
// conservative approach.
|
||||
|
||||
// if ( encoding == TIXML_ENCODING_UTF8 )
|
||||
|
@ -151,7 +151,7 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
|
|||
{
|
||||
// This will only work for low-ascii, everything else is assumed to be a valid
|
||||
// letter. I'm not sure this is the best approach, but it is quite tricky trying
|
||||
// to figure out alhabetical vs. not across encoding. So take a very
|
||||
// to figure out alhabetical vs. not across encoding. So take a very
|
||||
// conservative approach.
|
||||
|
||||
// if ( encoding == TIXML_ENCODING_UTF8 )
|
||||
|
@ -224,7 +224,7 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
|
|||
case '\r':
|
||||
// bump down to the next line
|
||||
++row;
|
||||
col = 0;
|
||||
col = 0;
|
||||
// Eat the character
|
||||
++p;
|
||||
|
||||
|
@ -266,11 +266,11 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
|
|||
// In these cases, don't advance the column. These are
|
||||
// 0-width spaces.
|
||||
if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )
|
||||
p += 3;
|
||||
p += 3;
|
||||
else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )
|
||||
p += 3;
|
||||
p += 3;
|
||||
else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )
|
||||
p += 3;
|
||||
p += 3;
|
||||
else
|
||||
{ p +=3; ++col; } // A normal character.
|
||||
}
|
||||
|
@ -322,10 +322,10 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
|
|||
while ( *p )
|
||||
{
|
||||
const unsigned char* pU = (const unsigned char*)p;
|
||||
|
||||
|
||||
// Skip the stupid Microsoft UTF-8 Byte order marks
|
||||
if ( *(pU+0)==TIXML_UTF_LEAD_0
|
||||
&& *(pU+1)==TIXML_UTF_LEAD_1
|
||||
&& *(pU+1)==TIXML_UTF_LEAD_1
|
||||
&& *(pU+2)==TIXML_UTF_LEAD_2 )
|
||||
{
|
||||
p += 3;
|
||||
|
@ -413,12 +413,12 @@ const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncodi
|
|||
// After that, they can be letters, underscores, numbers,
|
||||
// hyphens, or colons. (Colons are valid ony for namespaces,
|
||||
// but tinyxml can't tell namespaces from names.)
|
||||
if ( p && *p
|
||||
if ( p && *p
|
||||
&& ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) )
|
||||
{
|
||||
const char* start = p;
|
||||
while( p && *p
|
||||
&& ( IsAlphaNum( (unsigned char ) *p, encoding )
|
||||
&& ( IsAlphaNum( (unsigned char ) *p, encoding )
|
||||
|| *p == '_'
|
||||
|| *p == '-'
|
||||
|| *p == '.'
|
||||
|
@ -469,7 +469,7 @@ const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXml
|
|||
ucs += mult * (*q - 'a' + 10);
|
||||
else if ( *q >= 'A' && *q <= 'F' )
|
||||
ucs += mult * (*q - 'A' + 10 );
|
||||
else
|
||||
else
|
||||
return 0;
|
||||
mult *= 16;
|
||||
--q;
|
||||
|
@ -492,7 +492,7 @@ const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXml
|
|||
{
|
||||
if ( *q >= '0' && *q <= '9' )
|
||||
ucs += mult * (*q - '0');
|
||||
else
|
||||
else
|
||||
return 0;
|
||||
mult *= 10;
|
||||
--q;
|
||||
|
@ -571,10 +571,10 @@ bool TiXmlBase::StringEqual( const char* p,
|
|||
return false;
|
||||
}
|
||||
|
||||
const char* TiXmlBase::ReadText( const char* p,
|
||||
TIXML_STRING * text,
|
||||
bool trimWhiteSpace,
|
||||
const char* endTag,
|
||||
const char* TiXmlBase::ReadText( const char* p,
|
||||
TIXML_STRING * text,
|
||||
bool trimWhiteSpace,
|
||||
const char* endTag,
|
||||
bool caseInsensitive,
|
||||
TiXmlEncoding encoding )
|
||||
{
|
||||
|
@ -647,7 +647,7 @@ void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
// This "pre-streaming" will never read the closing ">" so the
|
||||
// sub-tag can orient itself.
|
||||
|
||||
if ( !StreamTo( in, '<', tag ) )
|
||||
if ( !StreamTo( in, '<', tag ) )
|
||||
{
|
||||
SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return;
|
||||
|
@ -669,7 +669,7 @@ void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
|
||||
if ( in->good() )
|
||||
{
|
||||
// We now have something we presume to be a node of
|
||||
// We now have something we presume to be a node of
|
||||
// some sort. Identify it, and call the node to
|
||||
// continue streaming.
|
||||
TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING );
|
||||
|
@ -778,7 +778,7 @@ const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiX
|
|||
encoding = TIXML_ENCODING_UTF8;
|
||||
else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) )
|
||||
encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice
|
||||
else
|
||||
else
|
||||
encoding = TIXML_ENCODING_LEGACY;
|
||||
}
|
||||
|
||||
|
@ -796,7 +796,7 @@ const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiX
|
|||
}
|
||||
|
||||
void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding )
|
||||
{
|
||||
{
|
||||
// The first error in a chain is more accurate - don't set again!
|
||||
if ( error )
|
||||
return;
|
||||
|
@ -832,7 +832,7 @@ TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding )
|
|||
return 0;
|
||||
}
|
||||
|
||||
// What is this thing?
|
||||
// What is this thing?
|
||||
// - Elements start with a letter or underscore, but xml is reserved.
|
||||
// - Comments: <!--
|
||||
// - Decleration: <?xml
|
||||
|
@ -915,7 +915,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
|
|||
return;
|
||||
}
|
||||
(*tag) += (char) c ;
|
||||
|
||||
|
||||
if ( c == '>' )
|
||||
break;
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
|
|||
// Okay...if we are a "/>" tag, then we're done. We've read a complete tag.
|
||||
// If not, identify and stream.
|
||||
|
||||
if ( tag->at( tag->length() - 1 ) == '>'
|
||||
if ( tag->at( tag->length() - 1 ) == '>'
|
||||
&& tag->at( tag->length() - 2 ) == '/' )
|
||||
{
|
||||
// All good!
|
||||
|
@ -943,7 +943,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
|
|||
StreamWhiteSpace( in, tag );
|
||||
|
||||
// Do we have text?
|
||||
if ( in->good() && in->peek() != '<' )
|
||||
if ( in->good() && in->peek() != '<' )
|
||||
{
|
||||
// Yep, text.
|
||||
TiXmlText text( "" );
|
||||
|
@ -976,7 +976,7 @@ void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
|
|||
document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( c == '>' )
|
||||
break;
|
||||
|
||||
|
@ -1095,7 +1095,7 @@ const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
|
|||
// Empty tag.
|
||||
if ( *p != '>' )
|
||||
{
|
||||
if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );
|
||||
if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );
|
||||
return 0;
|
||||
}
|
||||
return (p+1);
|
||||
|
@ -1117,7 +1117,7 @@ const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
|
|||
// We should find the end tag now
|
||||
// note that:
|
||||
// </foo > and
|
||||
// </foo>
|
||||
// </foo>
|
||||
// are both valid end tags.
|
||||
if ( StringEqual( p, endTag.c_str(), false, encoding ) )
|
||||
{
|
||||
|
@ -1211,8 +1211,8 @@ const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXm
|
|||
LinkEndChild( textNode );
|
||||
else
|
||||
delete textNode;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
// We hit a '<'
|
||||
// Have we hit a new element or an end tag? This could also be
|
||||
|
@ -1228,7 +1228,7 @@ const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXm
|
|||
{
|
||||
p = node->Parse( p, data, encoding );
|
||||
LinkEndChild( node );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
|
@ -1242,7 +1242,7 @@ const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXm
|
|||
if ( !p )
|
||||
{
|
||||
if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding );
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -1252,7 +1252,7 @@ void TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
{
|
||||
while ( in->good() )
|
||||
{
|
||||
int c = in->get();
|
||||
int c = in->get();
|
||||
if ( c <= 0 )
|
||||
{
|
||||
TiXmlDocument* document = GetDocument();
|
||||
|
@ -1265,7 +1265,7 @@ void TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
if ( c == '>' )
|
||||
{
|
||||
// All is well.
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1298,7 +1298,7 @@ const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
|
|||
|
||||
if ( !p )
|
||||
{
|
||||
if ( document )
|
||||
if ( document )
|
||||
document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
|
||||
}
|
||||
if ( p && *p == '>' )
|
||||
|
@ -1311,7 +1311,7 @@ void TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
{
|
||||
while ( in->good() )
|
||||
{
|
||||
int c = in->get();
|
||||
int c = in->get();
|
||||
if ( c <= 0 )
|
||||
{
|
||||
TiXmlDocument* document = GetDocument();
|
||||
|
@ -1322,12 +1322,12 @@ void TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
|
||||
(*tag) += (char) c;
|
||||
|
||||
if ( c == '>'
|
||||
if ( c == '>'
|
||||
&& tag->at( tag->length() - 2 ) == '-'
|
||||
&& tag->at( tag->length() - 3 ) == '-' )
|
||||
{
|
||||
// All is well.
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1363,11 +1363,11 @@ const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
|
|||
//
|
||||
// from the XML spec:
|
||||
/*
|
||||
[Definition: Comments may appear anywhere in a document outside other markup; in addition,
|
||||
they may appear within the document type declaration at places allowed by the grammar.
|
||||
They are not part of the document's character data; an XML processor MAY, but need not,
|
||||
make it possible for an application to retrieve the text of comments. For compatibility,
|
||||
the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity
|
||||
[Definition: Comments may appear anywhere in a document outside other markup; in addition,
|
||||
they may appear within the document type declaration at places allowed by the grammar.
|
||||
They are not part of the document's character data; an XML processor MAY, but need not,
|
||||
make it possible for an application to retrieve the text of comments. For compatibility,
|
||||
the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity
|
||||
references MUST NOT be recognized within comments.
|
||||
|
||||
An example of a comment:
|
||||
|
@ -1382,7 +1382,7 @@ const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
|
|||
value.append( p, 1 );
|
||||
++p;
|
||||
}
|
||||
if ( p && *p )
|
||||
if ( p && *p )
|
||||
p += strlen( endTag );
|
||||
|
||||
return p;
|
||||
|
@ -1421,7 +1421,7 @@ const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlE
|
|||
if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
const char* end;
|
||||
const char SINGLE_QUOTE = '\'';
|
||||
const char DOUBLE_QUOTE = '\"';
|
||||
|
@ -1450,7 +1450,7 @@ const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlE
|
|||
{
|
||||
if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) {
|
||||
// [ 1451649 ] Attribute values with trailing quotes not handled correctly
|
||||
// We did not have an opening quote but seem to have a
|
||||
// We did not have an opening quote but seem to have a
|
||||
// closing one. Give up and throw an error.
|
||||
if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
|
||||
return 0;
|
||||
|
@ -1467,8 +1467,8 @@ void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
{
|
||||
while ( in->good() )
|
||||
{
|
||||
int c = in->peek();
|
||||
if ( !cdata && (c == '<' ) )
|
||||
int c = in->peek();
|
||||
if ( !cdata && (c == '<' ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1489,7 +1489,7 @@ void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )
|
|||
// terminator of cdata.
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1529,7 +1529,7 @@ const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncodi
|
|||
++p;
|
||||
}
|
||||
|
||||
TIXML_STRING dummy;
|
||||
TIXML_STRING dummy;
|
||||
p = ReadText( p, &dummy, false, endTag, false, encoding );
|
||||
return p;
|
||||
}
|
||||
|
@ -1603,19 +1603,19 @@ const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXm
|
|||
if ( StringEqual( p, "version", true, _encoding ) )
|
||||
{
|
||||
TiXmlAttribute attrib;
|
||||
p = attrib.Parse( p, data, _encoding );
|
||||
p = attrib.Parse( p, data, _encoding );
|
||||
version = attrib.Value();
|
||||
}
|
||||
else if ( StringEqual( p, "encoding", true, _encoding ) )
|
||||
{
|
||||
TiXmlAttribute attrib;
|
||||
p = attrib.Parse( p, data, _encoding );
|
||||
p = attrib.Parse( p, data, _encoding );
|
||||
encoding = attrib.Value();
|
||||
}
|
||||
else if ( StringEqual( p, "standalone", true, _encoding ) )
|
||||
{
|
||||
TiXmlAttribute attrib;
|
||||
p = attrib.Parse( p, data, _encoding );
|
||||
p = attrib.Parse( p, data, _encoding );
|
||||
standalone = attrib.Value();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatiblity
|
||||
# CMAKE_CURRENT_LIST_DIR cmake 2.6 compatibility
|
||||
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
||||
get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
||||
|
|
|
@ -21,7 +21,7 @@ def generate_bitmap_font(timg, tdrawable, font, font_size, first_char, glyph_wid
|
|||
|
||||
glyphs_layer = gimp.Layer(image, "Glyphs", width, height, RGBA_IMAGE, 100, NORMAL_MODE)
|
||||
image.add_layer(glyphs_layer, 0)
|
||||
|
||||
|
||||
disp = gimp.Display(image)
|
||||
|
||||
for i in range(char_begin, char_end):
|
||||
|
|
Loading…
Reference in New Issue