4 Commits
2.0.1 ... 2.0.2

Author SHA1 Message Date
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
5 changed files with 12 additions and 19 deletions

View File

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

2
dox
View File

@@ -32,7 +32,7 @@ PROJECT_NAME = "TinyXML-2"
# This could be handy for archiving the generated documentation or # This could be handy for archiving the generated documentation or
# if some version control system is used. # if some version control system is used.
PROJECT_NUMBER = 2.0.1 PROJECT_NUMBER = 2.0.2
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer # for a project that appears at the top of each page and should give viewer

View File

@@ -116,3 +116,4 @@ print( "Release note:" )
print( '1. Build. g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe' ) 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( '2. Commit. git commit -am"setting the version to ' + versionStr + '"' )
print( '3. Tag. git tag ' + versionStr ) print( '3. Tag. git tag ' + versionStr )
print( ' OR git tag -a ' + versionStr + ' -m <tag message>' )

View File

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

View File

@@ -121,7 +121,7 @@ inline int TIXML_SNPRINTF( char* buffer, size_t size, const char* format, ... )
*/ */
static const int TIXML2_MAJOR_VERSION = 2; static const int TIXML2_MAJOR_VERSION = 2;
static const int TIXML2_MINOR_VERSION = 0; static const int TIXML2_MINOR_VERSION = 0;
static const int TIXML2_PATCH_VERSION = 1; static const int TIXML2_PATCH_VERSION = 2;
namespace tinyxml2 namespace tinyxml2
{ {