updated visual studio project

This commit is contained in:
timerix 2023-02-08 03:04:04 +06:00
parent 52c2d2f855
commit 75f023a4bd
4 changed files with 63 additions and 18 deletions

View File

@ -19,46 +19,88 @@
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\Array\Array.c" />
<ClCompile Include="src\Autoarr\Autoarr.c" /> <ClCompile Include="src\Autoarr\Autoarr.c" />
<ClCompile Include="src\Autoarr\Autoarr_KVPair_exported.c" /> <ClCompile Include="src\Autoarr\Autoarr_KVPair_exported.c" />
<ClCompile Include="src\Autoarr\Autoarr_Unitype.c" />
<ClCompile Include="src\Autoarr\Autoarr_Unitype_exported.c" /> <ClCompile Include="src\Autoarr\Autoarr_Unitype_exported.c" />
<ClCompile Include="src\base\cptr.c" /> <ClCompile Include="src\base\cptr.c" />
<ClCompile Include="src\base\endian.c" />
<ClCompile Include="src\base\errors.c" /> <ClCompile Include="src\base\errors.c" />
<ClCompile Include="src\base\types.c" /> <ClCompile Include="src\base\type_system\base_toString.c" />
<ClCompile Include="src\base\type_system\init.c" />
<ClCompile Include="src\base\type_system\kt_functions.c" />
<ClCompile Include="src\base\type_system\unitype.c" />
<ClCompile Include="src\DtsodParser\DtsodV24.c" /> <ClCompile Include="src\DtsodParser\DtsodV24.c" />
<ClCompile Include="src\DtsodParser\DtsodV24_deserialize.c" /> <ClCompile Include="src\DtsodParser\DtsodV24_deserialize.c" />
<ClCompile Include="src\DtsodParser\DtsodV24_exported.c" /> <ClCompile Include="src\DtsodParser\DtsodV24_exported.c" />
<ClCompile Include="src\DtsodParser\DtsodV24_serialize.c" /> <ClCompile Include="src\DtsodParser\DtsodV24_serialize.c" />
<ClCompile Include="src\Filesystem\dir.c" />
<ClCompile Include="src\Filesystem\file.c" />
<ClCompile Include="src\Filesystem\path.c" />
<ClCompile Include="src\HashFunctions\hash.c" /> <ClCompile Include="src\HashFunctions\hash.c" />
<ClCompile Include="src\Hashtable\Hashtable.c" /> <ClCompile Include="src\Hashtable\Hashtable.c" />
<ClCompile Include="src\Hashtable\KeyValuePair.c" /> <ClCompile Include="src\Hashtable\KeyValuePair.c" />
<ClCompile Include="src\kprint\kprint.c" />
<ClCompile Include="src\kprint\kprintf.c" />
<ClCompile Include="src\random\splitmix64\splitmix64.c" />
<ClCompile Include="src\random\xoroshiro\32bitValue\xoroshiro64star.c" />
<ClCompile Include="src\random\xoroshiro\32bitValue\xoroshiro64starstar.c" />
<ClCompile Include="src\random\xoroshiro\64bitValue\xoroshiro128plus.c" />
<ClCompile Include="src\random\xoroshiro\64bitValue\xoroshiro128plusplus.c" />
<ClCompile Include="src\random\xoroshiro\64bitValue\xoroshiro128starstar.c" />
<ClCompile Include="src\random\xoshiro\32bitValue\xoshiro128plus.c" />
<ClCompile Include="src\random\xoshiro\32bitValue\xoshiro128plusplus.c" />
<ClCompile Include="src\random\xoshiro\32bitValue\xoshiro128starstar.c" />
<ClCompile Include="src\random\xoshiro\64bitValue\xoshiro256plus.c" />
<ClCompile Include="src\random\xoshiro\64bitValue\xoshiro256plusplus.c" />
<ClCompile Include="src\random\xoshiro\64bitValue\xoshiro256starstar.c" />
<ClCompile Include="src\SearchTree\SearchTree.c" /> <ClCompile Include="src\SearchTree\SearchTree.c" />
<ClCompile Include="src\String\string.c" /> <ClCompile Include="src\String\string.c" />
<ClCompile Include="src\String\StringBuilder.c" /> <ClCompile Include="src\String\StringBuilder.c" />
<ClCompile Include="tests\main.cpp" />
<ClCompile Include="tests\test_autoarr.c" />
<ClCompile Include="tests\test_dtsod.c" />
<ClCompile Include="tests\test_hashtable.c" />
<ClCompile Include="tests\test_hash_functions.c" />
<ClCompile Include="tests\test_marshalling.c" /> <ClCompile Include="tests\test_marshalling.c" />
<ClCompile Include="tests\test_safethrow.c" />
<ClCompile Include="tests\test_searchtree.c" />
<ClCompile Include="tests\test_string.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="src\Array\Array.h" />
<ClInclude Include="src\Array\Array_declare.h" />
<ClInclude Include="src\Array\Array_define.h" />
<ClInclude Include="src\Autoarr\Autoarr.h" /> <ClInclude Include="src\Autoarr\Autoarr.h" />
<ClInclude Include="src\Autoarr\Autoarr_declare.h" /> <ClInclude Include="src\Autoarr\Autoarr_declare.h" />
<ClInclude Include="src\Autoarr\Autoarr_define.h" /> <ClInclude Include="src\Autoarr\Autoarr_define.h" />
<ClInclude Include="src\Autoarr\Autoarr_Unitype.h" />
<ClInclude Include="src\base\base.h" /> <ClInclude Include="src\base\base.h" />
<ClInclude Include="src\base\cptr.h" /> <ClInclude Include="src\base\cptr.h" />
<ClInclude Include="src\base\endian.h" />
<ClInclude Include="src\base\errors.h" /> <ClInclude Include="src\base\errors.h" />
<ClInclude Include="src\base\optime.h" /> <ClInclude Include="src\base\optime.h" />
<ClInclude Include="src\base\std.h" /> <ClInclude Include="src\base\std.h" />
<ClInclude Include="src\base\types.h" /> <ClInclude Include="src\base\type_system\base_toString.h" />
<ClInclude Include="src\base\type_system\init.h" />
<ClInclude Include="src\base\type_system\ktDescriptor.h" />
<ClInclude Include="src\base\type_system\ktid.h" />
<ClInclude Include="src\base\type_system\kt_functions.h" />
<ClInclude Include="src\base\type_system\type_system.h" />
<ClInclude Include="src\base\type_system\unitype.h" />
<ClInclude Include="src\DtsodParser\DtsodV24.h" /> <ClInclude Include="src\DtsodParser\DtsodV24.h" />
<ClInclude Include="src\Filesystem\dir.h" />
<ClInclude Include="src\Filesystem\file.h" />
<ClInclude Include="src\Filesystem\filesystem.h" />
<ClInclude Include="src\Filesystem\path.h" />
<ClInclude Include="src\HashFunctions\hash.h" /> <ClInclude Include="src\HashFunctions\hash.h" />
<ClInclude Include="src\Hashtable\Hashtable.h" /> <ClInclude Include="src\Hashtable\Hashtable.h" />
<ClInclude Include="src\Hashtable\KeyValuePair.h" /> <ClInclude Include="src\Hashtable\KeyValuePair.h" />
<ClInclude Include="src\kprint\kprint.h" />
<ClInclude Include="src\kprint\kprintf.h" />
<ClInclude Include="src\kprint\kprint_colors.h" />
<ClInclude Include="src\kprint\kprint_format.h" />
<ClInclude Include="src\random\krandom.h" />
<ClInclude Include="src\random\splitmix64\splitmix64.h" />
<ClInclude Include="src\random\xoroshiro\32bitValue\xoroshiro64.h" />
<ClInclude Include="src\random\xoroshiro\64bitValue\xoroshiro128.h" />
<ClInclude Include="src\random\xoroshiro\xoroshiro.h" />
<ClInclude Include="src\random\xoshiro\32bitValue\xoshiro128.h" />
<ClInclude Include="src\random\xoshiro\64bitValue\xoshiro256.h" />
<ClInclude Include="src\random\xoshiro\xoshiro.h" />
<ClInclude Include="src\SearchTree\SearchTree.h" /> <ClInclude Include="src\SearchTree\SearchTree.h" />
<ClInclude Include="src\String\string.h" /> <ClInclude Include="src\String\string.h" />
<ClInclude Include="src\String\StringBuilder.h" /> <ClInclude Include="src\String\StringBuilder.h" />
@ -156,7 +198,7 @@
<LanguageStandard_C>stdc17</LanguageStandard_C> <LanguageStandard_C>stdc17</LanguageStandard_C>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PrecompiledHeaderOutputFile /> <PrecompiledHeaderOutputFile />
<AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 -Wno-clang-analyzer-valist.Uninitialized %(AdditionalOptions)</AdditionalOptions>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>None</DebugInformationFormat> <DebugInformationFormat>None</DebugInformationFormat>
@ -182,7 +224,7 @@
<LanguageStandard_C>stdc17</LanguageStandard_C> <LanguageStandard_C>stdc17</LanguageStandard_C>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PrecompiledHeaderOutputFile /> <PrecompiledHeaderOutputFile />
<AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 -Wno-clang-analyzer-valist.Uninitialized %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
@ -208,7 +250,7 @@
<LanguageStandard_C>stdc17</LanguageStandard_C> <LanguageStandard_C>stdc17</LanguageStandard_C>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PrecompiledHeaderOutputFile /> <PrecompiledHeaderOutputFile />
<AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 -Wno-clang-analyzer-valist.Uninitialized %(AdditionalOptions)</AdditionalOptions>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>None</DebugInformationFormat> <DebugInformationFormat>None</DebugInformationFormat>
@ -235,7 +277,7 @@
<LanguageStandard_C>stdc17</LanguageStandard_C> <LanguageStandard_C>stdc17</LanguageStandard_C>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PrecompiledHeaderOutputFile /> <PrecompiledHeaderOutputFile />
<AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/Zc:twoPhase- /MP -fms-compatibility-version=14 -Wno-clang-analyzer-valist.Uninitialized %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>

View File

@ -67,7 +67,7 @@ typedef uint8 bool;
#endif #endif
#ifndef sprintf_s #ifndef sprintf_s
#define sprintf_s(BUF, BUFSIZE, FORMAT, ...) sprintf(BUF, FORMAT, ## __VA_ARGS__) //#define sprintf_s(BUF, BUFSIZE, FORMAT, ...) sprintf(BUF, FORMAT, ## __VA_ARGS__)
#endif #endif

View File

@ -67,7 +67,10 @@ char* toString_uint(uint64 n, bool withPostfix, bool uppercase){
throw("too big precision");\ throw("too big precision");\
if(precision==0)\ if(precision==0)\
precision=toString_float_default_precision;\ precision=toString_float_default_precision;\
int cn=sprintf(str, "%.*f", precision, n);\ int cn=IFMSC(\
sprintf_s(str, bufsize, "%.*f", precision, n),\
sprintf(str, "%.*f", precision, n)\
);\
/* remove trailing zeroes except .0*/\ /* remove trailing zeroes except .0*/\
while(str[cn-1]=='0' && str[cn-2]!='.')\ while(str[cn-1]=='0' && str[cn-2]!='.')\
cn--;\ cn--;\

View File

@ -133,7 +133,7 @@ void kprintf(const char* format, ...){
putc(c,stdout); putc(c,stdout);
} }
#if defined(_WIN64) || defined(_WIN32) #if defined(_WIN64) || defined(_WIN32)
end_iteration: end_iteration:;
#endif #endif
} }
va_end(vl); va_end(vl);