8 Commits
2.0.1 ... 2.1.0

Author SHA1 Message Date
Lee Thomason
6ee53e7d49 setting the version to 2.1.0 2014-04-06 14:43:37 -07:00
Lee Thomason
256adb6371 missing default parameter for compact mode in XMLPrinter 2014-04-06 14:41:46 -07:00
Lee Thomason
98112fcdba minor doxygen file fix 2014-03-16 20:44:35 -07:00
Lee Thomason
433f1272d4 update readme 2014-03-16 20:22:12 -07:00
Lee Thomason
b59ac45131 setting the version to 2.0.2 2014-03-16 20:18:41 -07:00
Lee Thomason
a0744c8dca fix implementation of much simpler visual studio printing 2014-03-16 10:32:27 -07:00
Lee Thomason
8f7b87b323 Merge branch 'master' of https://github.com/pzychotic/tinyxml2 into pzychotic-master 2014-03-16 10:21:34 -07:00
Thomas Roß
268c683fbd Use _vscprintf to calc length of expanded format string. 2014-03-13 23:35:16 +01:00
6 changed files with 1433 additions and 972 deletions

View File

@@ -10,7 +10,7 @@ include(GNUInstallDirs)
################################
# set lib version here
set(GENERIC_LIB_VERSION "2.0.1")
set(GENERIC_LIB_VERSION "2.1.0")
set(GENERIC_LIB_SOVERSION "2")

2360
dox Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -269,6 +269,14 @@ an XCode project, a Code::Blocks project, and a cmake CMakeLists.txt included to
The top of tinyxml.h even has a simple g++ command line if you are are *nix and don't want
to use a build system.
Versioning
----------
TinyXML-2 uses semantic versioning. http://semver.org/ Releases are now tagged in github.
Note that the major version will (probably) change fairly rapidly. API changes are fairly
common.
Documentation
-------------

View File

@@ -116,3 +116,6 @@ print( "Release note:" )
print( '1. Build. g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe' )
print( '2. Commit. git commit -am"setting the version to ' + versionStr + '"' )
print( '3. Tag. git tag ' + versionStr )
print( ' OR git tag -a ' + versionStr + ' -m <tag message>' )
print( 'Remember to "git push" both code and tag.' )

View File

@@ -1855,27 +1855,19 @@ void XMLPrinter::Print( const char* format, ... )
vfprintf( _fp, format, va );
}
else {
// This seems brutally complex. Haven't figured out a better
// way on windows.
#ifdef _MSC_VER
int len = -1;
int expand = 1000;
while ( len < 0 ) {
len = vsnprintf_s( _accumulator.Mem(), _accumulator.Capacity(), _TRUNCATE, format, va );
if ( len < 0 ) {
expand *= 3/2;
_accumulator.PushArr( expand );
}
}
char* p = _buffer.PushArr( len ) - 1;
memcpy( p, _accumulator.Mem(), len+1 );
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
int len = _vscprintf( format, va );
#else
int len = vsnprintf( 0, 0, format, va );
#endif
// Close out and re-start the va-args
va_end( va );
va_start( va, format );
char* p = _buffer.PushArr( len ) - 1;
vsnprintf( p, len+1, format, va );
char* p = _buffer.PushArr( len ) - 1; // back up over the null terminator.
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
vsnprintf_s( p, len+1, _TRUNCATE, format, va );
#else
vsnprintf( p, len+1, format, va );
#endif
}
va_end( va );

View File

@@ -120,8 +120,8 @@ inline int TIXML_SNPRINTF( char* buffer, size_t size, const char* format, ... )
http://semver.org/
*/
static const int TIXML2_MAJOR_VERSION = 2;
static const int TIXML2_MINOR_VERSION = 0;
static const int TIXML2_PATCH_VERSION = 1;
static const int TIXML2_MINOR_VERSION = 1;
static const int TIXML2_PATCH_VERSION = 0;
namespace tinyxml2
{
@@ -1964,7 +1964,7 @@ public:
/** If streaming, start writing an element.
The element must be closed with CloseElement()
*/
void OpenElement( const char* name, bool compactMode );
void OpenElement( const char* name, bool compactMode=false );
/// If streaming, add an attribute to an open element.
void PushAttribute( const char* name, const char* value );
void PushAttribute( const char* name, int value );
@@ -1972,7 +1972,7 @@ public:
void PushAttribute( const char* name, bool value );
void PushAttribute( const char* name, double value );
/// If streaming, close the Element.
virtual void CloseElement( bool compactMode );
virtual void CloseElement( bool compactMode=false );
/// Add a text node.
void PushText( const char* text, bool cdata=false );