Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d01b831aa | ||
|
|
0d2e791e82 | ||
|
|
71fe947ff5 | ||
|
|
beb2a595f1 |
6 changed files with 58 additions and 132 deletions
124
.appveyor.yml
124
.appveyor.yml
|
|
@ -2,6 +2,10 @@ version: '{build}'
|
||||||
|
|
||||||
# for Appveyor CI (windows)
|
# for Appveyor CI (windows)
|
||||||
|
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
os: Windows Server 2012 R2
|
os: Windows Server 2012 R2
|
||||||
|
|
||||||
clone_folder: c:\projects\STEPcode
|
clone_folder: c:\projects\STEPcode
|
||||||
|
|
@ -42,127 +46,19 @@ build_script:
|
||||||
cd build
|
cd build
|
||||||
cmake -version
|
cmake -version
|
||||||
grep --version
|
grep --version
|
||||||
cmake .. -DSC_ENABLE_TESTING=ON -G"$env:GENERATOR" -DSC_BUILD_SCHEMAS="ifc2x3"
|
cmake .. -DSC_ENABLE_TESTING=ON -G"$env:GENERATOR" -DSC_BUILD_SCHEMAS="ifc2x3;ap214e3;ap209"
|
||||||
cmake --build . --config Debug --target tst_inverse_attr3
|
echo "filtering build output with grep"
|
||||||
|
cmake --build . --config Debug | grep -ve "CMake does not need to re-run because" -e "ZERO_CHECK.ZERO_CHECK" -e "^ Creating directory"
|
||||||
|
|
||||||
#msbuld seems to provide no benefits, and I can't filter its output...
|
#msbuld seems to provide no benefits, and I can't filter its output...
|
||||||
#msbuild SC.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=Debug /p:Platform=x64
|
#msbuild SC.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=Debug /p:Platform=x64
|
||||||
# /toolsversion:14.0 /p:PlatformToolset=v140
|
# /toolsversion:14.0 /p:PlatformToolset=v140
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- cmd: echo inverse_attr3 test 100x
|
- cmd: echo Running CTest...
|
||||||
- cmd: cd c:\projects\STEPcode\build
|
- cmd: cd c:\projects\STEPcode\build
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
- cmd: echo excluding test_inverse_attr3, which hangs
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
- cmd: ctest -j1 . -C Debug -E test_inverse_attr3 --output-on-failure
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 10
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 20
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 30
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 40
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 50
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 60
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 70
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 80
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 90
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: bin\tst_inverse_attr3 ..\test\p21\test_inverse_attr.p21
|
|
||||||
- cmd: echo 100
|
|
||||||
- cmd: echo done
|
|
||||||
|
|
||||||
# - cmd: grep -niB20 "Test Failed" Testing/Temporary/LastTest.log
|
# - cmd: grep -niB20 "Test Failed" Testing/Temporary/LastTest.log
|
||||||
|
|
||||||
|
|
|
||||||
11
.travis.yml
11
.travis.yml
|
|
@ -3,6 +3,17 @@ language: cpp
|
||||||
compiler:
|
compiler:
|
||||||
- clang
|
- clang
|
||||||
script: mkdir build && cd build && cmake .. -DSC_ENABLE_TESTING=ON && make -j3 && ctest -j2 --output-on-failure
|
script: mkdir build && cd build && cmake .. -DSC_ENABLE_TESTING=ON && make -j3 && ctest -j2 --output-on-failure
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
notifications:
|
||||||
|
irc: "chat.freenode.net#stepcode"
|
||||||
|
email: scl-dev@groups.google.com
|
||||||
|
on_success: change
|
||||||
|
on_failure: always
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- os: osx
|
||||||
|
|
|
||||||
|
|
@ -47,24 +47,37 @@ string(REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COMMIT_ID})
|
||||||
#once cmake_minimum_required is >= 2.8.11, we can use TIMESTAMP:
|
#once cmake_minimum_required is >= 2.8.11, we can use TIMESTAMP:
|
||||||
#string(TIMESTAMP date_time_string)
|
#string(TIMESTAMP date_time_string)
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
execute_process(COMMAND date "+%d %b %Y %H:%M" OUTPUT_VARIABLE date_time_string OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
elseif(WIN32)
|
||||||
|
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE currentDate OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE currentTime OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
set (date_time_string "${currentDate} ${currentTime}")
|
||||||
|
else()
|
||||||
|
set(date_time_string "\" __DATE__ \" \" __TIME__ \" ")
|
||||||
|
if(NOT SC_IS_SUBBUILD)
|
||||||
|
message(STATUS "Unknown platform - using date from preprocessor")
|
||||||
|
endif(NOT SC_IS_SUBBUILD)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(header_string "/* sc_version_string.h - written by cmake. Changes will be lost! */\n"
|
set(header_string "/* sc_version_string.h - written by cmake. Changes will be lost! */\n"
|
||||||
"#ifndef SC_VERSION_STRING\n"
|
"#ifndef SC_VERSION_STRING\n"
|
||||||
"#define SC_VERSION_STRING\n\n"
|
"#define SC_VERSION_STRING\n\n"
|
||||||
"/*\n** The git commit id looks like \"test-1-g5e1fb47\", where test is the\n"
|
"/*\n** The git commit id looks like \"test-1-g5e1fb47\", where test is the\n"
|
||||||
"** name of the last tagged git revision, 1 is the number of commits since that tag,\n"
|
"** name of the last tagged git revision, 1 is the number of commits since that tag,\n"
|
||||||
"** 'g' is unknown, and 5e1fb47 is the first 7 chars of the git sha1 commit id.\n"
|
"** 'g' is unknown, and 5e1fb47 is the first 7 chars of the git sha1 commit id.\n"
|
||||||
"*/\n\n"
|
"** timestamp is created from date/time commands on known platforms, and uses\n"
|
||||||
|
"** preprocessor macros elsewhere.\n*/\n\n"
|
||||||
"static char sc_version[512] = {\n"
|
"static char sc_version[512] = {\n"
|
||||||
" \"git commit id: ${GIT_COMMIT_ID}\"\n"
|
" \"git commit id: ${GIT_COMMIT_ID}, build timestamp ${date_time_string}\"\n"
|
||||||
"}\;\n\n"
|
"}\;\n\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
#don't update the file unless somethig changed
|
#don't update the file unless somethig changed
|
||||||
string(RANDOM tmpsuffix)
|
file(WRITE ${SC_VERSION_HEADER}.tmp ${header_string})
|
||||||
file(WRITE ${SC_VERSION_HEADER}.${tmpsuffix} ${header_string})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SC_VERSION_HEADER}.tmp ${SC_VERSION_HEADER})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SC_VERSION_HEADER}.${tmpsuffix} ${SC_VERSION_HEADER})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${SC_VERSION_HEADER}.tmp)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${SC_VERSION_HEADER}.${tmpsuffix})
|
|
||||||
|
|
||||||
if(NOT SC_IS_SUBBUILD)
|
if(NOT SC_IS_SUBBUILD)
|
||||||
message("-- sc_version_string.h is up-to-date.")
|
message("-- sc_version_string.h is up-to-date.")
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ instancesLoaded_t * lazyFileReader::getHeaderInstances() {
|
||||||
}
|
}
|
||||||
|
|
||||||
lazyFileReader::lazyFileReader( std::string fname, lazyInstMgr * i, fileID fid ): _fileName( fname ), _parent( i ), _fileID( fid ) {
|
lazyFileReader::lazyFileReader( std::string fname, lazyInstMgr * i, fileID fid ): _fileName( fname ), _parent( i ), _fileID( fid ) {
|
||||||
_file.open( _fileName.c_str(), std::ios::binary );
|
_file.open( _fileName.c_str() );
|
||||||
_file.imbue( std::locale::classic() );
|
_file.imbue( std::locale::classic() );
|
||||||
_file.unsetf( std::ios_base::skipws );
|
_file.unsetf( std::ios_base::skipws );
|
||||||
assert( _file.is_open() && _file.good() );
|
assert( _file.is_open() && _file.good() );
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ std::streampos sectionReader::findNormalString( const std::string & str, bool se
|
||||||
}
|
}
|
||||||
if( c == '\'' ) {
|
if( c == '\'' ) {
|
||||||
//push past string
|
//push past string
|
||||||
_file.seekg( _file.tellg() - std::streampos(1) );
|
_file.unget();
|
||||||
GetLiteralStr( _file, _lazyFile->getInstMgr()->getErrorDesc() );
|
GetLiteralStr( _file, _lazyFile->getInstMgr()->getErrorDesc() );
|
||||||
}
|
}
|
||||||
if( ( c == '/' ) && ( _file.peek() == '*' ) ) {
|
if( ( c == '/' ) && ( _file.peek() == '*' ) ) {
|
||||||
|
|
@ -129,7 +129,7 @@ std::streampos sectionReader::seekInstanceEnd( instanceRefs ** refs ) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '\'':
|
case '\'':
|
||||||
_file.seekg( _file.tellg() - std::streampos(1) );
|
_file.unget();
|
||||||
GetLiteralStr( _file, _lazyFile->getInstMgr()->getErrorDesc() );
|
GetLiteralStr( _file, _lazyFile->getInstMgr()->getErrorDesc() );
|
||||||
break;
|
break;
|
||||||
case '=':
|
case '=':
|
||||||
|
|
@ -155,7 +155,7 @@ std::streampos sectionReader::seekInstanceEnd( instanceRefs ** refs ) {
|
||||||
if( _file.get() == ';' ) {
|
if( _file.get() == ';' ) {
|
||||||
return _file.tellg();
|
return _file.tellg();
|
||||||
} else {
|
} else {
|
||||||
_file.seekg( _file.tellg() - std::streampos(1) );
|
_file.unget();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
@ -186,7 +186,7 @@ instanceID sectionReader::readInstanceNumber() {
|
||||||
if( ( c == '/' ) && ( _file.peek() == '*' ) ) {
|
if( ( c == '/' ) && ( _file.peek() == '*' ) ) {
|
||||||
findNormalString( "*/" );
|
findNormalString( "*/" );
|
||||||
} else {
|
} else {
|
||||||
_file.seekg( _file.tellg() - std::streampos(1) );
|
_file.unget();
|
||||||
}
|
}
|
||||||
skipWS();
|
skipWS();
|
||||||
c = _file.get();
|
c = _file.get();
|
||||||
|
|
@ -210,7 +210,7 @@ instanceID sectionReader::readInstanceNumber() {
|
||||||
digits++;
|
digits++;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_file.seekg( _file.tellg() - std::streampos(1) );
|
_file.unget();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,7 +221,7 @@ instanceID sectionReader::readInstanceNumber() {
|
||||||
_error->UserMsg( "A very large instance ID encountered" );
|
_error->UserMsg( "A very large instance ID encountered" );
|
||||||
_error->DetailMsg( errorMsg.str() );
|
_error->DetailMsg( errorMsg.str() );
|
||||||
|
|
||||||
delete [] buffer;
|
delete buffer;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -309,7 +309,7 @@ SDAI_Application_instance * sectionReader::getRealInstance( const Registry * reg
|
||||||
assert( inst->getEDesc() );
|
assert( inst->getEDesc() );
|
||||||
_file.seekg( begin );
|
_file.seekg( begin );
|
||||||
findNormalString( "(" );
|
findNormalString( "(" );
|
||||||
_file.seekg( _file.tellg() - std::streampos(1) );
|
_file.unget();
|
||||||
sev = inst->STEPread( instance, 0, _lazyFile->getInstMgr()->getAdapter(), _file, sName, true, false );
|
sev = inst->STEPread( instance, 0, _lazyFile->getInstMgr()->getAdapter(), _file, sName, true, false );
|
||||||
//TODO do something with 'sev'
|
//TODO do something with 'sev'
|
||||||
inst->InitIAttrs();
|
inst->InitIAttrs();
|
||||||
|
|
|
||||||
|
|
@ -125,9 +125,13 @@ static jmp_buf ERROR_safe_env;
|
||||||
|
|
||||||
static int ERROR_vprintf( const char *format, va_list ap ) {
|
static int ERROR_vprintf( const char *format, va_list ap ) {
|
||||||
int result = snprintf( ERROR_string, ERROR_string_end - ERROR_string, format, ap );
|
int result = snprintf( ERROR_string, ERROR_string_end - ERROR_string, format, ap );
|
||||||
if(result < 0) ERROR_string = ERROR_string_end;
|
if(result < 0) {
|
||||||
else if(result > (ERROR_string_end - ERROR_string)) ERROR_string = ERROR_string_end;
|
ERROR_string = ERROR_string_end;
|
||||||
else ERROR_string = ERROR_string + result;
|
} else if(result > (ERROR_string_end - ERROR_string)) {
|
||||||
|
ERROR_string = ERROR_string_end;
|
||||||
|
} else {
|
||||||
|
ERROR_string = ERROR_string + result;
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,7 +145,9 @@ static int ERROR_printf( const char *format, ... ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ERROR_nexterror() {
|
static void ERROR_nexterror() {
|
||||||
if( ERROR_string == ERROR_string_end ) return;
|
if( ERROR_string == ERROR_string_end ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ERROR_string++;
|
ERROR_string++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue