diff --git a/.gitignore b/.gitignore index f3558747..3b20a416 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,12 @@ .vs/ x64/ *.recipe -/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/Debug/CompilerIdC.tlog/CL.command.1.tlog *.tlog +*.vcxproj +*.sln +*.log +*.filters +*.user +*.config +m_packages/ +packages/ diff --git a/MagicGame.sln b/MagicGame.sln deleted file mode 100644 index 9b9d28a2..00000000 --- a/MagicGame.sln +++ /dev/null @@ -1,151 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.33122.133 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MagicGame", "MagicGame.vcxproj", "{6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqstdlib_static", "m_packages\squirrel\build\sqstdlib\sqstdlib_static.vcxproj", "{C76C34C2-5D15-3AC8-9F90-65164B0953F5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "squirrel_static", "m_packages\squirrel\build\squirrel\squirrel_static.vcxproj", "{172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano", "..\..\..\Yosin_Game\kiwano\projects\kiwano\kiwano.vcxproj", "{FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kiwano-audio", "..\..\..\Yosin_Game\kiwano\projects\kiwano-audio\kiwano-audio.vcxproj", "{1B97937D-8184-426C-BE71-29A163DC76C9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "..\..\..\Yosin_Game\kiwano\projects\3rd-party\libogg\libogg.vcxproj", "{D8A5E8EC-3983-4028-9BA9-B1E337E75917}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbis", "..\..\..\Yosin_Game\kiwano\projects\3rd-party\vorbis\libvorbis.vcxproj", "{B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - MinSizeRel|x64 = MinSizeRel|x64 - MinSizeRel|x86 = MinSizeRel|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - RelWithDebInfo|x64 = RelWithDebInfo|x64 - RelWithDebInfo|x86 = RelWithDebInfo|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Debug|x64.ActiveCfg = Debug|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Debug|x64.Build.0 = Debug|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Debug|x86.ActiveCfg = Debug|Win32 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Debug|x86.Build.0 = Debug|Win32 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.MinSizeRel|x64.ActiveCfg = Debug|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.MinSizeRel|x64.Build.0 = Debug|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.MinSizeRel|x86.ActiveCfg = Debug|Win32 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.MinSizeRel|x86.Build.0 = Debug|Win32 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Release|x64.ActiveCfg = Release|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Release|x64.Build.0 = Release|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Release|x86.ActiveCfg = Release|Win32 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.Release|x86.Build.0 = Release|Win32 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.RelWithDebInfo|x64.Build.0 = Release|x64 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {6E33BD8E-CDD0-4735-8A8F-6CE93B1BD8BE}.RelWithDebInfo|x86.Build.0 = Release|Win32 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Debug|x64.ActiveCfg = Debug|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Debug|x64.Build.0 = Debug|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Debug|x86.ActiveCfg = Debug|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Debug|x86.Build.0 = Debug|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.MinSizeRel|x86.Build.0 = MinSizeRel|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Release|x64.ActiveCfg = Release|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Release|x64.Build.0 = Release|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Release|x86.ActiveCfg = Release|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.Release|x86.Build.0 = Release|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 - {C76C34C2-5D15-3AC8-9F90-65164B0953F5}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Debug|x64.ActiveCfg = Debug|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Debug|x64.Build.0 = Debug|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Debug|x86.ActiveCfg = Debug|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Debug|x86.Build.0 = Debug|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.MinSizeRel|x86.Build.0 = MinSizeRel|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Release|x64.ActiveCfg = Release|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Release|x64.Build.0 = Release|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Release|x86.ActiveCfg = Release|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.Release|x86.Build.0 = Release|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|x64.ActiveCfg = Debug|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|x64.Build.0 = Debug|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|x86.ActiveCfg = Debug|Win32 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Debug|x86.Build.0 = Debug|Win32 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.MinSizeRel|x64.ActiveCfg = Release|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.MinSizeRel|x64.Build.0 = Release|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.MinSizeRel|x86.ActiveCfg = Debug|Win32 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.MinSizeRel|x86.Build.0 = Debug|Win32 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|x64.ActiveCfg = Release|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|x64.Build.0 = Release|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|x86.ActiveCfg = Release|Win32 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.Release|x86.Build.0 = Release|Win32 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.RelWithDebInfo|x64.Build.0 = Release|x64 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {FF7F943D-A89C-4E6C-97CF-84F7D8FF8EDF}.RelWithDebInfo|x86.Build.0 = Release|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|x64.ActiveCfg = Debug|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|x64.Build.0 = Debug|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|x86.ActiveCfg = Debug|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Debug|x86.Build.0 = Debug|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.MinSizeRel|x64.ActiveCfg = Release|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.MinSizeRel|x64.Build.0 = Release|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.MinSizeRel|x86.ActiveCfg = Debug|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.MinSizeRel|x86.Build.0 = Debug|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Release|x64.ActiveCfg = Release|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Release|x64.Build.0 = Release|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Release|x86.ActiveCfg = Release|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.Release|x86.Build.0 = Release|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.RelWithDebInfo|x64.Build.0 = Release|x64 - {1B97937D-8184-426C-BE71-29A163DC76C9}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {1B97937D-8184-426C-BE71-29A163DC76C9}.RelWithDebInfo|x86.Build.0 = Release|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Debug|x64.ActiveCfg = Debug|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Debug|x64.Build.0 = Debug|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Debug|x86.ActiveCfg = Debug|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Debug|x86.Build.0 = Debug|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.MinSizeRel|x64.ActiveCfg = Release|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.MinSizeRel|x64.Build.0 = Release|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.MinSizeRel|x86.ActiveCfg = Debug|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.MinSizeRel|x86.Build.0 = Debug|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Release|x64.ActiveCfg = Release|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Release|x64.Build.0 = Release|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Release|x86.ActiveCfg = Release|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.Release|x86.Build.0 = Release|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.RelWithDebInfo|x64.Build.0 = Release|x64 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {D8A5E8EC-3983-4028-9BA9-B1E337E75917}.RelWithDebInfo|x86.Build.0 = Release|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Debug|x64.ActiveCfg = Debug|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Debug|x64.Build.0 = Debug|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Debug|x86.ActiveCfg = Debug|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Debug|x86.Build.0 = Debug|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.MinSizeRel|x64.ActiveCfg = Debug|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.MinSizeRel|x64.Build.0 = Debug|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.MinSizeRel|x86.ActiveCfg = Debug|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.MinSizeRel|x86.Build.0 = Debug|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Release|x64.ActiveCfg = Release|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Release|x64.Build.0 = Release|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Release|x86.ActiveCfg = Release|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.Release|x86.Build.0 = Release|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.RelWithDebInfo|x64.Build.0 = Release|x64 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {B62E3DE6-812D-4CE6-90D9-18FD4FEA8EB2}.RelWithDebInfo|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {594C166C-2E69-4A69-90C2-4F1892DF8847} - EndGlobalSection -EndGlobal diff --git a/MagicGame.vcxproj b/MagicGame.vcxproj deleted file mode 100644 index ec807527..00000000 --- a/MagicGame.vcxproj +++ /dev/null @@ -1,183 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - {d8a5e8ec-3983-4028-9ba9-b1e337e75917} - - - {1b97937d-8184-426c-be71-29a163dc76c9} - - - {ff7f943d-a89c-4e6c-97cf-84f7d8ff8edf} - - - {c76c34c2-5d15-3ac8-9f90-65164b0953f5} - - - {172df2be-82a2-31eb-b041-9cba46e8e9a3} - - - - - - - - - - - - - - - - - - - 16.0 - Win32Proj - {6e33bd8e-cdd0-4735-8a8f-6ce93b1bd8be} - MagicGame - 10.0 - - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - - - - - - - - - - - - - - - - - - - - $(ProjectDir)m_packages\kiwano\src\3rd-party;$(ProjectDir)m_packages\kiwano\src;$(ProjectDir)m_packages\include;$(ProjectDir)include;$(IncludePath) - $(SolutionDir)..\..\Magic_Game\ - $(ProjectDir)src;$(SourcePath) - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - TurnOffAllWarnings - true - true - true - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions) - true - Disabled - stdcpp17 - - - Console - true - true - true - $(ProjectDir)m_packages\lib;%(AdditionalLibraryDirectories) - %(AdditionalDependencies) - - - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - \ No newline at end of file diff --git a/MagicGame.vcxproj.filters b/MagicGame.vcxproj.filters deleted file mode 100644 index 358360ac..00000000 --- a/MagicGame.vcxproj.filters +++ /dev/null @@ -1,58 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {66405c6e-b3b9-4351-911d-be83e2e43672} - - - {197e8fb4-5a03-49a4-b0c5-074f60435887} - - - {a9cb3856-1c9a-49da-902e-487ff2b6b530} - - - - - - - - src - - - src - - - src - - - src - - - - - include - - - include - - - include - - - SqrRegister - - - SqrRegister - - - SqrRegister - - - SqrRegister - - - \ No newline at end of file diff --git a/MagicGame.vcxproj.user b/MagicGame.vcxproj.user deleted file mode 100644 index d2d6f749..00000000 --- a/MagicGame.vcxproj.user +++ /dev/null @@ -1,7 +0,0 @@ - - - - $(SolutionDir)..\..\Magic_Game\ - WindowsLocalDebugger - - \ No newline at end of file diff --git a/m_packages/include/sqconfig.h b/m_packages/include/sqconfig.h deleted file mode 100644 index 58bc9793..00000000 --- a/m_packages/include/sqconfig.h +++ /dev/null @@ -1,146 +0,0 @@ - -#ifdef _SQ64 - -#ifdef _MSC_VER -typedef __int64 SQInteger; -typedef unsigned __int64 SQUnsignedInteger; -typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/ -#else -typedef long long SQInteger; -typedef unsigned long long SQUnsignedInteger; -typedef unsigned long long SQHash; /*should be the same size of a pointer*/ -#endif -typedef int SQInt32; -typedef unsigned int SQUnsignedInteger32; -#else -typedef int SQInteger; -typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/ -typedef unsigned int SQUnsignedInteger32; /*must be 32 bits(also on 64bits processors)*/ -typedef unsigned int SQUnsignedInteger; -typedef unsigned int SQHash; /*should be the same size of a pointer*/ -#endif - - -#ifdef SQUSEDOUBLE -typedef double SQFloat; -#else -typedef float SQFloat; -#endif - -#if defined(SQUSEDOUBLE) && !defined(_SQ64) || !defined(SQUSEDOUBLE) && defined(_SQ64) -#ifdef _MSC_VER -typedef __int64 SQRawObjectVal; //must be 64bits -#else -typedef long long SQRawObjectVal; //must be 64bits -#endif -#define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; } -#else -typedef SQUnsignedInteger SQRawObjectVal; //is 32 bits on 32 bits builds and 64 bits otherwise -#define SQ_OBJECT_RAWINIT() -#endif - -#ifndef SQ_ALIGNMENT // SQ_ALIGNMENT shall be less than or equal to SQ_MALLOC alignments, and its value shall be power of 2. -#if defined(SQUSEDOUBLE) || defined(_SQ64) -#define SQ_ALIGNMENT 8 -#else -#define SQ_ALIGNMENT 4 -#endif -#endif - -typedef void* SQUserPointer; -typedef SQUnsignedInteger SQBool; -typedef SQInteger SQRESULT; - -#ifdef SQUNICODE -#include -#include - - -typedef wchar_t SQChar; - - -#define scstrcmp wcscmp -#ifdef _WIN32 -#define scsprintf _snwprintf -#else -#define scsprintf swprintf -#endif -#define scstrlen wcslen -#define scstrtod wcstod -#ifdef _SQ64 -#define scstrtol wcstoll -#else -#define scstrtol wcstol -#endif -#define scstrtoul wcstoul -#define scvsprintf vswprintf -#define scstrstr wcsstr -#define scprintf wprintf - -#ifdef _WIN32 -#define WCHAR_SIZE 2 -#define WCHAR_SHIFT_MUL 1 -#define MAX_CHAR 0xFFFF -#else -#define WCHAR_SIZE 4 -#define WCHAR_SHIFT_MUL 2 -#define MAX_CHAR 0xFFFFFFFF -#endif - -#define _SC(a) L##a - - -#define scisspace iswspace -#define scisdigit iswdigit -#define scisprint iswprint -#define scisxdigit iswxdigit -#define scisalpha iswalpha -#define sciscntrl iswcntrl -#define scisalnum iswalnum - - -#define sq_rsl(l) ((l)<=0) - -#ifdef __GNUC__ -# define SQ_UNUSED_ARG(x) x __attribute__((__unused__)) -#else -# define SQ_UNUSED_ARG(x) x -#endif - -#ifdef __cplusplus -} /*extern "C"*/ -#endif - -#endif /*_SQUIRREL_H_*/ diff --git a/m_packages/kiwano b/m_packages/kiwano deleted file mode 160000 index 0f3ab573..00000000 --- a/m_packages/kiwano +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0f3ab5732d6c23a4353b36ddb67845e8293279f0 diff --git a/m_packages/lib/sqstdlib_static.lib b/m_packages/lib/sqstdlib_static.lib deleted file mode 100644 index b1cd61f3..00000000 Binary files a/m_packages/lib/sqstdlib_static.lib and /dev/null differ diff --git a/m_packages/lib/squirrel_static.lib b/m_packages/lib/squirrel_static.lib deleted file mode 100644 index c5f559c4..00000000 Binary files a/m_packages/lib/squirrel_static.lib and /dev/null differ diff --git a/m_packages/squirrel/.gitignore b/m_packages/squirrel/.gitignore deleted file mode 100644 index 6e97beb7..00000000 --- a/m_packages/squirrel/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Folders created at compilation -bin/ -lib/ - -# Folders created at documentation generation -doc/build/ diff --git a/m_packages/squirrel/.travis.yml b/m_packages/squirrel/.travis.yml deleted file mode 100644 index 1e31c1d6..00000000 --- a/m_packages/squirrel/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: cpp -compiler: - - gcc - - clang - -# Travis VMs are 64-bit but we compile both for 32 and 64 bit. To enable the -# 32-bit builds to work, we need gcc-multilib. -addons: - apt: - packages: - - gcc-multilib - - g++-multilib - -# Enable container-based builds. -sudo: false - -script: mkdir build && cd build && cmake .. && make -j2 diff --git a/m_packages/squirrel/CMakeLists.txt b/m_packages/squirrel/CMakeLists.txt deleted file mode 100644 index 474e99df..00000000 --- a/m_packages/squirrel/CMakeLists.txt +++ /dev/null @@ -1,148 +0,0 @@ -cmake_minimum_required(VERSION 3.12) -project(squirrel - VERSION 3.2 - DESCRIPTION "The Squirrel programming language" - HOMEPAGE_URL "http://squirrel-lang.org/" - LANGUAGES C CXX - ) - -option(DISABLE_STATIC "Avoid building/installing static libraries.") -option(LONG_OUTPUT_NAMES "Use longer names for binaries and libraries: squirrel3 (not sq).") - -if (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") -endif () - -include(GNUInstallDirs) - -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") -set(CMAKE_CXX_STANDARD 11) - -if(CMAKE_COMPILER_IS_GNUCXX) - add_compile_options( - "$<$:-fno-rtti;-fno-exceptions>" - -fno-strict-aliasing - -Wall - -Wextra - -pedantic - -Wcast-qual - "$<$:-O3>" - "$<$:-O3;-g>" - "$<$:-Os>" - "$<$:-pg;-pie;-gstabs;-g3;-Og>" - ) -elseif(MSVC) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - add_definitions(-D_CRT_SECURE_NO_WARNINGS) -endif() - -# Need to be defined here to be visible to squirrel.pc.in -if(LONG_OUTPUT_NAMES) - set(LIBSQUIRREL_NAME squirrel3) - set(SQSTDLIB_NAME sqstdlib3) -else() - set(LIBSQUIRREL_NAME squirrel) - set(SQSTDLIB_NAME sqstdlib) -endif() - -add_subdirectory(squirrel) -add_subdirectory(sqstdlib) -if(NOT SQ_DISABLE_INTERPRETER) - add_subdirectory(sq) -endif() - -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(tgts) - if(NOT DISABLE_DYNAMIC) - list(APPEND tgts squirrel sqstdlib) - if(NOT SQ_DISABLE_INTERPRETER) - list(APPEND tgts sq) - endif() - endif() - if(NOT DISABLE_STATIC) - list(APPEND tgts squirrel_static sqstdlib_static) - if(NOT SQ_DISABLE_INTERPRETER) - list(APPEND tgts sq_static) - endif() - endif() - foreach(t ${tgts}) - target_compile_definitions(${t} PUBLIC -D_SQ64) - endforeach() -endif() - -if(NOT DISABLE_DYNAMIC) - set_target_properties(squirrel sqstdlib PROPERTIES SOVERSION 0 VERSION 0.0.0) -endif() - -if(NOT SQ_DISABLE_INSTALLER AND NOT SQ_DISABLE_HEADER_INSTALLER) - install(FILES - include/sqconfig.h - include/squirrel.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT Development - ) - install(FILES - include/sqstdaux.h - include/sqstdblob.h - include/sqstdio.h - include/sqstdmath.h - include/sqstdstring.h - include/sqstdsystem.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT Development - ) -endif() - -include(CMakePackageConfigHelpers) - -write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/squirrel/squirrel-config-version.cmake" - VERSION "${squirrel_VERSION}" - COMPATIBILITY AnyNewerVersion - ) - -configure_package_config_file( - "${CMAKE_CURRENT_SOURCE_DIR}/squirrel-config.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/squirrel/squirrel-config.cmake" - INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/squirrel" - ) - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/squirrel.pc.in" - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc - @ONLY -) - -if(NOT SQ_DISABLE_INSTALLER AND NOT SQ_DISABLE_CMAKE_INSTALLER) - export(EXPORT squirrel - NAMESPACE squirrel:: - FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/squirrel/squirrel-targets.cmake" - ) - - install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/squirrel/squirrel-config-version.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/squirrel/squirrel-config.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/squirrel" - COMPONENT Development - ) - - # pc(5) only allows static variant to have extra flags, not an entirely new - # set of flags. While it's uncommon, a way to do it would be to generate a - # ${PROJECT_NAME}_static.pc file. - if(NOT DISABLE_DYNAMIC) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - COMPONENT Development - ) - endif() - - install(EXPORT squirrel - NAMESPACE squirrel:: - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/squirrel" - FILE "squirrel-targets.cmake" - COMPONENT Development - ) -endif() diff --git a/m_packages/squirrel/COMPILE b/m_packages/squirrel/COMPILE deleted file mode 100644 index 53881db7..00000000 --- a/m_packages/squirrel/COMPILE +++ /dev/null @@ -1,86 +0,0 @@ -Squirrel 3.2 stable --------------------------------------------------------- -What is in this distribution? - -squirrel - static library implementing the compiler and interpreter of the language - -sqstdlib - the standard utility libraries - -sq - stand alone interpreter - -doc - The manual - -etc - a minimalistic embedding sample - -samples - samples programs - - -HOW TO COMPILE ---------------------------------------------------------- -CMAKE USERS -......................................................... -If you want to build the shared libraries under Windows using Visual -Studio, you will have to use CMake version 3.4 or newer. If not, an -earlier version will suffice. For a traditional out-of-source build -under Linux, type something like - - $ mkdir build # Create temporary build directory - $ cd build - $ cmake .. # CMake will determine all the necessary information, - # including the platform (32- vs. 64-bit) - $ make - $ make install - $ cd ..; rm -r build - -The default installation directory will be /usr/local on Unix platforms, -and C:/Program Files/squirrel on Windows. The binaries will go into bin/ -and the libraries into lib/. You can change this behavior by calling CMake like -this: - - $ cmake .. -DCMAKE_INSTALL_PREFIX=/some/path/on/your/system - -With the CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_LIBDIR options, the directories -the binaries & libraries will go in (relative to CMAKE_INSTALL_PREFIX) -can be specified. For instance, - - $ cmake .. -DCMAKE_INSTALL_LIBDIR=lib64 - -will install the libraries into a 'lib64' subdirectory in the top -source directory. The public header files will be installed into the directory -the value of CMAKE_INSTALL_INCLUDEDIR points to. If you want only the -binaries and no headers, just set -DSQ_DISABLE_HEADER_INSTALLER=ON, and no -header files will be installed. - -Under Windows, it is probably easiest to use the CMake GUI interface, -although invoking CMake from the command line as explained above -should work as well. - -GCC USERS -......................................................... -There is a very simple makefile that compiles all libraries and exes -from the root of the project run 'make' - -for 32 bits systems - - $ make - -for 64 bits systems - - $ make sq64 - -VISUAL C++ USERS -......................................................... -Open squirrel.dsw from the root project directory and build(dho!) - -DOCUMENTATION GENERATION -......................................................... -To be able to compile the documentation, make sure that you have Python -installed and the packages sphinx and sphinx_rtd_theme. Browse into doc/ -and use either the Makefile for GCC-based platforms or make.bat for -Windows platforms. diff --git a/m_packages/squirrel/COPYRIGHT b/m_packages/squirrel/COPYRIGHT deleted file mode 100644 index 4a8e5815..00000000 --- a/m_packages/squirrel/COPYRIGHT +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2003-2022 Alberto Demichelis - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ------------------------------------------------------ -END OF COPYRIGHT diff --git a/m_packages/squirrel/HISTORY b/m_packages/squirrel/HISTORY deleted file mode 100644 index d09d9eea..00000000 --- a/m_packages/squirrel/HISTORY +++ /dev/null @@ -1,535 +0,0 @@ -***version 3.2 stable*** --added new inline bind env syntax for closures --added sq_tailcall --added rawcall keyword --added post call initializer syntax --added table.keys() and table.values() --added table.filter() --added skipempty in split() --additional parameters in array.map() and array.apply() --additional optional initializer in array.reduce() --added sqstd_pushstringf and sqstd_throwerrorf --closure.call() is now a "native tailcall" and the invoked function can now be suspended --fixed sq_newmember and sq_rawnewmember properly pop parameters --fixed capturing free variable on for loop counter before a break statement --fixed \u in lexer --various bugfixes --sq_gettypetag doesn't set last error(it's treated as SQBool function but keeps a SQRESULT for backward compatibility) --fixed _set method in userdata delegates --fixed some warnings - -***2016-03-27 *** -***version 3.1 stable*** --added slice range for tolower and toupper --added startswith() and endswith() in string lib --added SQ_EXCLUDE_DEFAULT_MEMFUNCTIONS to exclude default mem fuction from compilation --added sq_getreleasehook --added thread.wakeupthrow() --added sq_pushthread --added \u and \U escape sequence for UTF8,UTF16 or UCS4 characters --added CMake scripts(thx Fabian Wolff) --the escape character \x is based on sizeof(SQChar) --fixed several warnings(thx Markus Oberhumer) --fixed optimizer bug in compound arith oprators(+=,-= etc...) --fixed sq_getrefvmcount() (thx Gerrit) --fixed sq_getrefcount() when no references were added with sq_addref() (thx Gerrit) --fixed bug in string.tointeger() (thx Domingo) --fixed weakref comparison in 32bit builds using doubles(thx Domingo) --fixed compiler bug(thx Peter) --fixed some error in the documentation(thx Alexander) --fixed some error reporting in compiler(thx Alexander) --fixed incorrect optional semicolon after "if block"(thx Alexander) --fixed crash bug in compiler related to compound arith operators(+=,-= etc...) (thx Jeff1) - -***2015-01-10 *** -***version 3.1 RC 1*** --added new header sqconfig.h for all optional type declarations(unicode, 64bits etc..) --added sq_setsharedforeignptr sq_getsharedforeignptr --added sq_setsharedreleasehook sq_getsharedreleasehook --added escape() in sqstd string library --added __LINE__ and __FILE__ (thx mingodad) --widechar support on gcc builds --now boolean can be used in constants --reduced dependencies on C runtime library --newthread and sq_newthread() no longer reinitialize the root table on friend VMs(thx Lucas Cardellini) --exceptions in the _inherited metamethod are propagated(thx Lucas Cardellini) --'in' operator performance improvement(thx unagipai and mingodad) --fixes crash in compiler when trying to write 'base' --fixed bug in switch statement when using locals as case values (thx mingodad) --fixed bug in print()(thx Lucas Cardellini) - -***2013-08-30 *** -***version 3.1 beta 1*** --added new scoping rule(root attached to closures) --added closure.setroot() closure.getroot() --added sq_setclosureroot() and sq_getclosureroot() --added sq_setvmreleasehook() and sq_getvmreleasehook() --added documentaion for sq_getbase() --now string.tointeger() accepts an optional parameter 'base' --now format accepts zeroes in the format string (thx mingodad) --fixed bug in sqstd_createfile() (thx mingodad) --minor buxfixes - -***2012-11-10 *** -***version 3.0.4 stable*** --sq_deleteslot slot now pops the key in case of failure --fixed bug when _get metamethod throws null --fixed a bug in rstrip --added some error handling --minor bugfixes - -***2012-06-19 *** -***version 3.1.0 alpha 1*** --changed in and instanceof operator precendence --root object in closures --added closure.setroot closure.getroot --added sq_setclosureroot and sq_getclosureroot - -***version 3.0.3 stable*** --improved error messages for _cmp(when a non integer value is returned) (thx Yexo) --added class.newmember() built in method (thx Nam) --added class.rawnewmember() built in method (thx Nam) --added sq_rawnewmember() (thx Nam) --added sq_getversion() --added sq_typeof() --added sq_getclosurename() --added file.close() in stdlib --documented closure.getinfos() built-in method --fixed string iteration doesn't return negative numbers for characters > 127 --fixed bug in tofloat() when converting a string with scientific notation without a decimal point (thx wr2) --fixed potential infinite loop in array.sort() when the _cmp function is inconsistent (thx Yexo) --fixed obscure bug in the compiler(thx yishin) --fixed some minor bug - -***2011-11-28 *** -***version 3.0.2 stable*** --added sq_gethash API --now array.sort() is implemented with heapsort --now floats in scientific notation also accept numbers with no '.' (eg. 1e+6 or 1e6) --fixed some warning --fixed some documentation --fixed bug in GC - -***2011-09-08 *** -***version 3.0.1 stable*** --added # as alternative symbol for "line comment"(mostly useful for shell scripts) --added sq_throwobject() to throw an arbitrary object from the C API --added alignement flag for userdata types, SQ_ALIGNMENT (thx Shigemasa) --added rawset() and rawget() to class and instance default delegate --changed bytecode format now ensures matching integer size and float size --now inherited classes also inherit userdatasize --added SQUIRREL_VERSION_NUMBER in squirrel.h and _versionnumber_ global symbol --fixed sq_getmemberhandle --fixed sq_getrefcount --refactored some sqstdio code --refactored some clone code --refactored some stuff in the string lib --added -s and -fno-exceptions in GCC makefile(better performance when using GCC) - -***2011-03-13 *** -***version 3.0 stable*** --added sq_getcallee() --sq_getfreevariable() also works for native closures --minior optimizations --removed several warning when compiling with GCC 4.x --fixed some errors in the documentation --fixed bug when using SQUSEDOUBLE and 32bits intengers --fixed bug when invoking generators with closure.call() (thx huntercool) - -***2010-12-19 *** -***version 3.0 release candidate 1(RC 1)*** --improved metamethods error handling --added parameter 'isstatic' to _newmember metamethod(thx G.Meyer) --added sq_getrefcount() to return number of refences from C++(thx G.Meyer) - -***2010-11-07 *** -***version 3.0 beta 3*** --license changed to "MIT license" --added sq_resurrectunreachable() and resurrectunreachable() --added callee() built in function, returns the current running closure --added thread.getstackinfos() --added sq_objtouserpointer() --added sq_newtableex() --various refactoring and optimizations --fixed several 64bits issues regarding integer to string conversions --fixed some bugs when SQUSEDOUBLE is used in 32bits systems - -***2010-08-18 *** -***version 3.0 beta 2.1*** --fixed bug in class constructor --fixed bug in compound arith - -***2010-08-12 *** -***version 3.0 beta 2*** --class methods can be added or replaced after the class as been instantiated --JSON compliant table syntax, this is currently an experimental feature (thx atai) --sq_getsize() now returns userdatasize for classes and instances --now setroottable() and setconsttable() return the previous value of the respective table --fixed bug in compound arith operators when used on a free variable (thx ellon) --fixed some x64 minor bugs --fixed minor bug in the compiler --refactored some VM internals --documented sq_getmemberhandle, sq_getbyhandle, sq_setbyhandle to set and get value from classes - -***2009-11-15 *** -***version 3.0 beta 1*** --various refactoring and optimizations --fixed bug in free variables (thx mokehehe) --fixed bug in functions with default parameters (thx ara & Yexo) --fixed bug in exception handling --improved error propagation in _set and _get metamethods ( and 'throw null' for clean failure) --added sq_getmemberhandle, sq_getbyhandle, sq_setbyhandle to set and get value from classes - -***2009-06-30 *** -***version 3.0 alpha 2*** --added real free variables(thx Paul Ruizendaal) --added refactored function call implementation and compiler(thx Paul Ruizendaal) --added sq_getfunctioninfo --added compile time flag SQUSEDOUBLE to use double precision floats --added global slot _floatsize_ int the base lib to recognize single precision and double precision builds --sq_wakeupvm can now resume the vm with an exception --added sqstd_format --now blobs can be cloned --generators can now be instantiated by calling sq_call() or closure.call() --fixed debughook bug --fixed cooroutine error propagation - -***2008-07-23 *** -***version 3.0 alpha 1*** --first branch from 2.x source tree --added 'base' keyword --removed 'delegate' keyword --now compiled scripts are vararg functions --added setdelegate() and getdelegate() table builtin methods --added <=> 3 ways compare operator --added lambda expression @(a,b) a + b --added local function statement --added array built-in map(),reduce(),apply(),filter() and find() --generators hold only a weak reference of the enviroment object --removed 'vargv' and 'vargc' keywords --now var args are passed as an array called vargv(as a paramter) --removed 'parent' keyword --added class getbase() built in method --instanceof doesn't throw an exception if the left expression is not a class --lexical scoping for free variables(free variables are no longer in the second parameter list) --sq_setprintfunc accept error func --sq_geterrorfunc() --added sq_arrayremove() and sq_arrayinsert() --error() built in function(works like print but prints using the errorfunc) --added native debug hook - -***2008-02-17 *** -***version 2.2 stable*** --added _newslot metamethod in classes --added enums added constants --added sq_pushconsttable, sq_setconsttable --added default param --added octal literals(thx Dinosaur) --fixed debug hook, 'calls' and 'returns' are properly notified in the same number. --fixed a coroutine bug - -***2007-07-29 *** -***version 2.1.2 stable*** --new behaviour for generators iteration using foreach -now when a generator is iterated by foreach the value returned by a 'return val' statement -will terminate the iteration but will not be returned as foreach iteration --added sq_setclassudsize() --added sq_clear() --added table.clear(), array.clear() --fixed sq_cmp() (thx jyuill) --fixed minor bugs - -***2006-08-21 *** -***version 2.1.1 stable*** --vm refactoring --optimized internal function memory layout --new global symbol _version_ (is the version string) --code size optimization for float literals(on 32bits float builts) --now the raw ref API(sq_addref etc...) is fully reentrant. --fixed a bug in sq_getdelegate() now pushes null if the object doesn't have a delegate(thx MatzeB) --improved C reference performances in NO_GARBAGE_COLLECTOR builds --sq_getlocal() now enumerates also outer values. --fixed regexp library for GCC users. - -***2006-03-19 *** -***version 2.1 stable*** --added static class fields, new keyword static --added 64bits architecture support --added global slot _intsize_ int the base lib to recognize 32bits and 64bits builds --added functions with fixed environment, closure.bindenv() built-in function --all types except userdata and null implement the tostring() method --string concatenation now invokes metamethod _tostring --new metamethods for class objects _newmember and _inherited --sq_call() sq_resume() sq_wakeupvm() have a new signature --new C referencing implementation(scales more with the amount of references) --refactored hash table --new api functions sq_newslot(),sq_tobool(),sq_getbase(), sq_instanceof(), sq_bindenv() --the api func sq_createslot was deprecated but still supported in form of C macro on top of sq_newslot --sq_setreleasehook() now also works for classes --stream.readstr() and stream.writestr() have been deprecated(this affects file and blob) --fixed squirrel.h undeclared api calls --fixed few minor bugs --SQChar is now defined as wchar_t --removed warning when building with -Wall -pedantic for GCC users --added new std io function writeclosuretofile() --added new std string functions strip(),rstrip(),lstrip() and split() --regular expressions operators (+,*) now have more POSIX greedyness behaviour --class constructors are now invoked as normal functions - -***2005-10-02 *** -***version 2.0.5 stable*** --fixed some 64bits incompatibilities (thx sarge) --fixed minor bug in the stdlib format() function (thx Rick) --fixed a bug in dofile() that was preventing to compile empty files --added new API sq_poptop() & sq_getfreevariable() --some performance improvements - -***2005-08-14 *** -***version 2.0.4 stable*** --weak references and related API calls --added sq_objtobool() --class instances memory policies improved(1 mem allocation for the whole instance) --typetags are now declared as SQUserPointer instead of unsigned int --first pass for 64bits compatibility --fixed minor bug in the stdio stream --fixed a bug in format() --fixed bug in string.tointeger() and string.tofloat() - -***2005-06-24 *** -***version 2.0.3 stable*** --dofile() and loadfile() in the iolib now can decode ASCII, UTF8 files UCS2 big-endian and little-endian --sq_setparamscheck() : now typemesk can check for null --added string escape sequence \xhhhh --fixed some C++ standard incompatibilities - -***2005-05-15 *** -***version 2.0.2 stable*** --performances improvements (expecially for GCC users) --removed all dependencies from C++ exception handling --various bugfixes - -***2005-04-12 *** -***version 2.0.1 stable*** --various bugfixes --sq_setparamscheck() now allows spaces in the typemask - -***2005-04-03 *** -***version 2.0 stable*** --added API sq_gettypetag() --added built-in function to the bool type(tointeger, tostring etc...) - -***2005-02-27 *** -***version 2.0 release candidate 1(RC 1)*** --added API sq_reseterror() --modified sq_release() --now class instances can be cloned --various bufixes - -***2005-01-26 *** -***version 2.0 beta 1*** --added bool type --class properties can be redefined in a derived class --added ops *= /= and %= --new syntax for class attributes declaration instead of ( and ) --increased the max number of literals per function from 65535 to 16777215 --now free variables have proper lexical scoping --added API sq_createinstance(), sq_pushbool(), sq_getbool() --added built-in function type() --added built-in function obj.rawin(key) in table,class and instance --sq_rawget() and sq_rawset() now work also on classes and instances --the VM no longer uses C++ exception handling (more suitable for embedded devices) --various bufixes - -***2004-12-21 *** -***version 2.0 alpha 2*** --globals scoping changed, now if :: is omitted the VM automatically falls back on the root table --various bufixes --added class level attributes - -***2004-12-12 *** -***version 2.0 alpha 1*** --codebase branch from version 1.x --added classes --added functions with variable number of parameters(vargc & vargv and the ...) --0 and 0.0 are now considered 'false' by all conditional statements(if,while,for,?,do-while) --added new api functions sq_newclass() sq_setinstanceup() sq_getinstanceup() sq_getattributes() sq_setattributes() --modified api sq_settypetag() - -***2004-11-01 *** -***version 1.0 stable*** --fixed some minor bug --improved operator 'delete' performances --added scientific notation for float numbers( eg. 2.e16 or 2.e-2) - -***2004-08-30 *** -***version 1.0 release candidate 2(RC 2)*** --fixed bug in the vm(thx Pierre Renaux) --fixed bug in the optimizer(thx Pierre Renaux) --fixed some bug in the documentation(thx JD) --added new api functions for raw object handling --removed nested multiline comments --reduced memory footprint in C references - -***2004-08-23 *** -***version 1.0 release candidate 1(RC 1)*** --fixed division by zero --the 'in' operator and obj.rawget() do not query the default delegate anymore --added function sq_getprintfunc() --added new standard library 'auxlib'(implements default error handlers) - -***2004-07-12 *** -***version 1.0 beta 4*** --fixed a bug in the integer.tochar() built-in method --fixed unary minus operator --fixed bug in dofile() --fixed inconsistency between != and == operators(on float/integer comparison) --added javascript style unsigned right shift operator '>>>' --added array(size) constructor built-in function --array.resize(size,[fill]) built-in function accepts an optional 'fill' value --improved debug API, added sq_getclosureinfo() and sq_setnativeclosurename() - -***2004-05-23 *** -***version 1.0 beta 3*** --minor vm bug fixes --string allocation is now faster --tables and array memory usage is now less conservative(they shrink) --added regular expression routines in the standard library --The 'c' expression now accepts only 1 character(thx irbrian) --multiline strings <[ ]> have been substituted with C# style verbatim strings (eg. @"string") --added new keyword 'parent' for accessing the delegate of tables and unserdata --The metamethod '_clone' has been renamed '_cloned' --the _delslot metamethod's behaviour and prototype have been changed --new default function in the integer and float object 'tochar()' --the built-in function chcode2string has been removed --the default method [table].getdelegate() has been removed --new api sq_rawdeleteslot() --new table built-in method rawdelete(key) --the dynamic mudule loading has been removed from the standard distribution --some optimizations in the VM - -***2004-04-21 *** -***version 1.0 beta 2*** --minor compiler/parser bug fixes --sq_newclosure has a different prototype, the "paramscheck" of paramter has been moved to the new function sq_setparamscheck() --sq_setparamscheck allows to add automatic parameters type checking in native closures --sq_compile() lost the lineinfo parameter --new api sq_enabledebuginfo() globally sets compiler's debug info generation --added consistency check on bytecode serialization --fixed += operator, now works on strings like + --added global slot in the base lib _charsize_ to recognize unicode builds from ascii builds runtime --added registry table --new api call sq_pushregistrytable() --added type tag to the userdata type sq_settypetag() --sq_getuserdata now queries the userdata typetag --the built in function collect_garbage() as been renamed collectgarbage() for consistency reasons --new standard libraries(sqlibs are now obsolete) - -***2004-02-20 *** -***version 1.0 beta 1*** --fixed a bug in the compiler (thanks Martin Kofler) --fixed bug in the switch case statement --fixed the _unm metamethod --fixed minor bugs in the API --fixed automatic stack resizing --first beta version - first pass code clean up in the VM and base lib - first pass code coverege test has been done on VM and built-in lib --new VM creation API sq_open() sq_close() (sq_newvm and sq_releasevm are now obsolete) --new api allows to specifiy a "print" function to output text(sq_printfunc) --added some small optimizations --new cooperative multi-threading capabilities in the base library(coroutines), VMs are now a built in type("thread") --new built in functions have been added for manipulating the new "thread" type --friend virtual machines share the same root table, error handler and debug hook by default --new compile time options - -***2004-01-19 *** -***version 0.9 alpha*** --fixed a garbage collection bug --fixed some API bugs(thanks to Joshua Jensen) --fixed tail calls (in the version 0.8 the tail call optimization was erroneously disabled) --new function parameters semantic, now passing a wrong number of parameters generates an exception --native closures have now a built in parameter number checking --sq_rawget and sq_rawset now work also on arrays --sq_getsize now woks also on userdata --the userdata release hook prototype is changed(now passes the size of the userdata) --the lexer reader function now returns an integer instead of a char that allows better error checking on the input(thx Joshua Jensen) --faster compiler --try/catch blocks do not cause any runtime memory allocation anymore - -***2003-12-06 *** -***version 0.8 alpha*** --fixed a bug that was preventing to have callable userdata throught the metamethod _call --fixed a garbage collection bug --fixed == operator now can compare correctly different types --new built in method getstackinfos(level) --improved line informations precision for the debug hook --new api call sq_compilebuffer() --new built-in api function compilestring() --new syntactic sugar for function declarations inside tables --the debug API has been finalized - -***2003-11-17 *** -***version 0.7 alpha*** --fixed critical bug SQInteger the tail call system --fixed bug in the continue statement code generation --fixed func call param issue(thanks to Rewoonenco Andrew) --added _delslot metamethod(thanks to Rewoonenco Andrew) --new multiline string expression ( delimited by <[ and ]> ) --normal strings ("") do not allow embedded new line anymore --reduced vm memory footprint(C refs are shared between friend VMs) --new api method sq_deleteslot() --new debug hook event 'r' is triggered when a function returns - -***2003-11-04 *** -***version 0.6 alpha*** --fixed switch statement(was executing the default case after a break) --sq_call() doesn't pop the closure (just the params) --the vm execution can be suspended from the C API anytime (micro-threads) --new api calls sq_suspendvm() sq_wakeupvm() sq_getvmstate() and sq_reservestack() - -***2003-10-13 *** -***version 0.5 alpha*** --fixed some minor bug --tested with non ASCII identifiers in unicode mode(I've tried chinese chars) --added built-in function string.find() --the built-in function array.sort() optionally accepts a cmp(a,b) function --the debug hook function now has a new prototype debug_hook(event_type,sourcefile,line,functionname) --fixed some debug info imprecision - -***2003-10-01 *** -***version 0.4 alpha*** --faster VM --sq_call will pop arguments and closure also in case of failure --fixed a bug in sq_remove --now the VM detects delegation cycles(and throws an exception) --new operators ++ and -- --new operator ',' comma operator --fixed some expression precedence issue --fixed bug in sq_arraypop - -***2003-09-15 *** -***version 0.3 alpha*** --fixed a bug in array::insert() --optional Unicode core(define SQUNICODE or _UNICODE on Win32) --sq_compiler uses a new reader function SQLEXREADFUNC --the debug hook passes 'l' instead of 'line' for line callbacks - and 'c' instead of 'call' for call callbacks --new array.extend() bulit-in function --new API sq_clone() - -***2003-09-10 *** -***version 0.2 pre-alpha*** --new completely reentrant VM (sq_open and sq_close are now obsolete) --sq_newvm() has a new prototype --allocators are now global and linked in the VM --_newslot meta method added --rawset creates a slot if doesn't exists --the compiler error callback pass the vm handle(thanks Pierre Renaux) --sq_setforeignptr() sq_getforeingptr() are now public --sq_resume() now is possible to resume generators from C --sq_getlasterror() retrieve the last thrown error --improved docs - -***2003-09-06 *** -***version 0.1 pre-alpha*** -first release diff --git a/m_packages/squirrel/Makefile b/m_packages/squirrel/Makefile deleted file mode 100644 index 2ed97e26..00000000 --- a/m_packages/squirrel/Makefile +++ /dev/null @@ -1,22 +0,0 @@ - -SQUIRREL=. -MAKE=make - -sq32: folders - cd squirrel; $(MAKE) - cd sqstdlib; $(MAKE) - cd sq; $(MAKE) - -sqprof: folders - cd squirrel; $(MAKE) sqprof - cd sqstdlib; $(MAKE) sqprof - cd sq; $(MAKE) sqprof - -sq64: folders - cd squirrel; $(MAKE) sq64 - cd sqstdlib; $(MAKE) sq64 - cd sq; $(MAKE) sq64 - -folders: - mkdir -p lib - mkdir -p bin diff --git a/m_packages/squirrel/README b/m_packages/squirrel/README deleted file mode 100644 index de37cad0..00000000 --- a/m_packages/squirrel/README +++ /dev/null @@ -1,33 +0,0 @@ -The programming language SQUIRREL 3.2 stable - --------------------------------------------------- -This project has successfully been compiled and run on - * Windows (x86 and amd64) - * Linux (x86, amd64 and ARM) - * Illumos (x86 and amd64) - * FreeBSD (x86 and ARM) - -The following compilers have been confirmed to be working: - MS Visual C++ 6.0 (all on x86 and amd64) - 7.0 | - 7.1 v - 8.0 - 9.0 - 10.0 - 12.0 --- - MinGW gcc 3.2 (mingw special 20020817-1) - Cygnus gcc 3.2 - Linux gcc 3.2.3 - 4.0.0 (x86 and amd64) - 5.3.1 (amd64) - Illumos gcc 4.0.0 (x86 and amd64) - ARM Linux gcc 4.6.3 (Raspberry Pi Model B) - - -Feedback and suggestions are appreciated -project page - http://www.squirrel-lang.org -community forums - http://forum.squirrel-lang.org -wiki - http://wiki.squirrel-lang.org -author - alberto@demichelis.net - -END OF README diff --git a/m_packages/squirrel/appveyor.yml b/m_packages/squirrel/appveyor.yml deleted file mode 100644 index 4da9b37b..00000000 --- a/m_packages/squirrel/appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: 0.0.{build} - -platform: - - x86 - - x64 - -configuration: - - Debug - - Release - -clone_folder: c:\sq - -before_build: - - mkdir build - - cd build - - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform% - - echo %platform% - - if %platform%==X64 (cmake .. -G "Visual Studio 14 2015 Win64") - - if %platform%==x86 (cmake .. -G "Visual Studio 14 2015") - -build_script: - - cmake --build . --config %configuration% -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - -artifacts: - - path: build\*\%configuration%\*.exe - - path: build\*\%configuration%\*.dll - -test: off diff --git a/m_packages/squirrel/build/ALL_BUILD.vcxproj b/m_packages/squirrel/build/ALL_BUILD.vcxproj deleted file mode 100644 index 7a0ecd79..00000000 --- a/m_packages/squirrel/build/ALL_BUILD.vcxproj +++ /dev/null @@ -1,204 +0,0 @@ - - - - x64 - - - false - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {3A945C97-C785-35A2-B03C-822543E0A519} - Win32Proj - 10.0.22621.0 - x64 - ALL_BUILD - NoUpgrade - - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - Always - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp - false - - - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184} - sq - - - {7453F643-9077-3653-9215-251A8BBC9911} - sq_static - - - {A08064B5-BCE0-3321-89AE-9702449A7DAB} - sqstdlib - - - {55256B84-34E3-30E3-8A7C-2F5F832AEA13} - sqstdlib_static - - - {CDEEC194-9F6C-3A7B-9A26-4388BA201311} - squirrel - - - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD} - squirrel_static - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/ALL_BUILD.vcxproj.filters b/m_packages/squirrel/build/ALL_BUILD.vcxproj.filters deleted file mode 100644 index 8387fda8..00000000 --- a/m_packages/squirrel/build/ALL_BUILD.vcxproj.filters +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/m_packages/squirrel/build/CMakeCache.txt b/m_packages/squirrel/build/CMakeCache.txt deleted file mode 100644 index 62eb6d69..00000000 --- a/m_packages/squirrel/build/CMakeCache.txt +++ /dev/null @@ -1,431 +0,0 @@ -# This is the CMakeCache file. -# For build in directory: f:/Magic_Game/project/Magic_Game/m_packages/squirrel/build -# It was generated by CMake: F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe -# You can edit this file to change values found and used by cmake. -# If you do not want to change any of the values, simply exit the editor. -# If you do want to change a value, simply edit, save, and exit the editor. -# The syntax for the file is as follows: -# KEY:TYPE=VALUE -# KEY is the name of a variable in the cache. -# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. -# VALUE is the current value for the KEY. - -######################## -# EXTERNAL cache entries -######################## - -//Path to a program. -CMAKE_AR:FILEPATH=F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/lib.exe - -//Semicolon separated list of supported configuration types, only -// supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything -// else will be ignored. -CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo - -//Flags used by the CXX compiler during all build types. -CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc - -//Flags used by the CXX compiler during DEBUG builds. -CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1 - -//Flags used by the CXX compiler during MINSIZEREL builds. -CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG - -//Flags used by the CXX compiler during RELEASE builds. -CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG - -//Flags used by the CXX compiler during RELWITHDEBINFO builds. -CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG - -//Libraries linked by default with all C++ applications. -CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib - -//Flags used by the C compiler during all build types. -CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 - -//Flags used by the C compiler during DEBUG builds. -CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1 - -//Flags used by the C compiler during MINSIZEREL builds. -CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG - -//Flags used by the C compiler during RELEASE builds. -CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG - -//Flags used by the C compiler during RELWITHDEBINFO builds. -CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG - -//Libraries linked by default with all C applications. -CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib - -//Flags used by the linker during all build types. -CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64 - -//Flags used by the linker during DEBUG builds. -CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL - -//Flags used by the linker during MINSIZEREL builds. -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO - -//Flags used by the linker during RELEASE builds. -CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO - -//Flags used by the linker during RELWITHDEBINFO builds. -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL - -//Value Computed by CMake. -CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/pkgRedirects - -//User executables (bin) -CMAKE_INSTALL_BINDIR:PATH=bin - -//Read-only architecture-independent data (DATAROOTDIR) -CMAKE_INSTALL_DATADIR:PATH= - -//Read-only architecture-independent data root (share) -CMAKE_INSTALL_DATAROOTDIR:PATH=share - -//Documentation root (DATAROOTDIR/doc/PROJECT_NAME) -CMAKE_INSTALL_DOCDIR:PATH= - -//C header files (include) -CMAKE_INSTALL_INCLUDEDIR:PATH=include - -//Info documentation (DATAROOTDIR/info) -CMAKE_INSTALL_INFODIR:PATH= - -//Object code libraries (lib) -CMAKE_INSTALL_LIBDIR:PATH=lib - -//Program executables (libexec) -CMAKE_INSTALL_LIBEXECDIR:PATH=libexec - -//Locale-dependent data (DATAROOTDIR/locale) -CMAKE_INSTALL_LOCALEDIR:PATH= - -//Modifiable single-machine data (var) -CMAKE_INSTALL_LOCALSTATEDIR:PATH=var - -//Man documentation (DATAROOTDIR/man) -CMAKE_INSTALL_MANDIR:PATH= - -//C header files for non-gcc (/usr/include) -CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include - -//Install path prefix, prepended onto install directories. -CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/squirrel - -//Run-time variable data (LOCALSTATEDIR/run) -CMAKE_INSTALL_RUNSTATEDIR:PATH= - -//System admin executables (sbin) -CMAKE_INSTALL_SBINDIR:PATH=sbin - -//Modifiable architecture-independent data (com) -CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com - -//Read-only single-machine data (etc) -CMAKE_INSTALL_SYSCONFDIR:PATH=etc - -//Path to a program. -CMAKE_LINKER:FILEPATH=F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/link.exe - -//Flags used by the linker during the creation of modules during -// all build types. -CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64 - -//Flags used by the linker during the creation of modules during -// DEBUG builds. -CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL - -//Flags used by the linker during the creation of modules during -// MINSIZEREL builds. -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of modules during -// RELEASE builds. -CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of modules during -// RELWITHDEBINFO builds. -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL - -//Path to a program. -CMAKE_MT:FILEPATH=CMAKE_MT-NOTFOUND - -//Value Computed by CMake -CMAKE_PROJECT_DESCRIPTION:STATIC=The Squirrel programming language - -//Value Computed by CMake -CMAKE_PROJECT_HOMEPAGE_URL:STATIC=http://squirrel-lang.org/ - -//Value Computed by CMake -CMAKE_PROJECT_NAME:STATIC=squirrel - -//Value Computed by CMake -CMAKE_PROJECT_VERSION:STATIC=3.2 - -//Value Computed by CMake -CMAKE_PROJECT_VERSION_MAJOR:STATIC=3 - -//Value Computed by CMake -CMAKE_PROJECT_VERSION_MINOR:STATIC=2 - -//Value Computed by CMake -CMAKE_PROJECT_VERSION_PATCH:STATIC= - -//Value Computed by CMake -CMAKE_PROJECT_VERSION_TWEAK:STATIC= - -//RC compiler -CMAKE_RC_COMPILER:FILEPATH=rc - -//Flags for Windows Resource Compiler during all build types. -CMAKE_RC_FLAGS:STRING=-DWIN32 - -//Flags for Windows Resource Compiler during DEBUG builds. -CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG - -//Flags for Windows Resource Compiler during MINSIZEREL builds. -CMAKE_RC_FLAGS_MINSIZEREL:STRING= - -//Flags for Windows Resource Compiler during RELEASE builds. -CMAKE_RC_FLAGS_RELEASE:STRING= - -//Flags for Windows Resource Compiler during RELWITHDEBINFO builds. -CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= - -//Flags used by the linker during the creation of shared libraries -// during all build types. -CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64 - -//Flags used by the linker during the creation of shared libraries -// during DEBUG builds. -CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL - -//Flags used by the linker during the creation of shared libraries -// during MINSIZEREL builds. -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of shared libraries -// during RELEASE builds. -CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of shared libraries -// during RELWITHDEBINFO builds. -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL - -//If set, runtime paths are not added when installing shared libraries, -// but are added when building. -CMAKE_SKIP_INSTALL_RPATH:BOOL=NO - -//If set, runtime paths are not added when using shared libraries. -CMAKE_SKIP_RPATH:BOOL=NO - -//Flags used by the linker during the creation of static libraries -// during all build types. -CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64 - -//Flags used by the linker during the creation of static libraries -// during DEBUG builds. -CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during the creation of static libraries -// during MINSIZEREL builds. -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during the creation of static libraries -// during RELEASE builds. -CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during the creation of static libraries -// during RELWITHDEBINFO builds. -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//If this value is on, makefiles will be generated without the -// .SILENT directive, and all commands will be echoed to the console -// during the make. This is useful for debugging only. With Visual -// Studio IDE projects all commands are done without /nologo. -CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE - -//Avoid building/installing static libraries. -DISABLE_STATIC:BOOL=OFF - -//Use longer names for binaries and libraries: squirrel3 (not sq). -LONG_OUTPUT_NAMES:BOOL=OFF - -//Value Computed by CMake -squirrel_BINARY_DIR:STATIC=F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build - -//Value Computed by CMake -squirrel_IS_TOP_LEVEL:STATIC=ON - -//Value Computed by CMake -squirrel_SOURCE_DIR:STATIC=F:/Magic_Game/project/Magic_Game/m_packages/squirrel - - -######################## -# INTERNAL cache entries -######################## - -//ADVANCED property for variable: CMAKE_AR -CMAKE_AR-ADVANCED:INTERNAL=1 -//This is the directory where this CMakeCache.txt was created -CMAKE_CACHEFILE_DIR:INTERNAL=f:/Magic_Game/project/Magic_Game/m_packages/squirrel/build -//Major version of cmake used to create the current loaded cache -CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 -//Minor version of cmake used to create the current loaded cache -CMAKE_CACHE_MINOR_VERSION:INTERNAL=28 -//Patch version of cmake used to create the current loaded cache -CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 -//Path to CMake executable. -CMAKE_COMMAND:INTERNAL=F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe -//Path to cpack program executable. -CMAKE_CPACK_COMMAND:INTERNAL=F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cpack.exe -//Path to ctest program executable. -CMAKE_CTEST_COMMAND:INTERNAL=F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ctest.exe -//ADVANCED property for variable: CMAKE_CXX_FLAGS -CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG -CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL -CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE -CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO -CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES -CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS -CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG -CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL -CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE -CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO -CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES -CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 -//Executable file format -CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS -CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG -CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE -CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//Name of external makefile project generator. -CMAKE_EXTRA_GENERATOR:INTERNAL= -//Name of generator. -CMAKE_GENERATOR:INTERNAL=Visual Studio 17 2022 -//Generator instance identifier. -CMAKE_GENERATOR_INSTANCE:INTERNAL=F:/App/VisualStudio/IDE -//Name of generator platform. -CMAKE_GENERATOR_PLATFORM:INTERNAL= -//Name of generator toolset. -CMAKE_GENERATOR_TOOLSET:INTERNAL= -//Source directory with the top level CMakeLists.txt file for this -// project -CMAKE_HOME_DIRECTORY:INTERNAL=F:/Magic_Game/project/Magic_Game/m_packages/squirrel -//ADVANCED property for variable: CMAKE_INSTALL_BINDIR -CMAKE_INSTALL_BINDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_DATADIR -CMAKE_INSTALL_DATADIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_DATAROOTDIR -CMAKE_INSTALL_DATAROOTDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_DOCDIR -CMAKE_INSTALL_DOCDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_INCLUDEDIR -CMAKE_INSTALL_INCLUDEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_INFODIR -CMAKE_INSTALL_INFODIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LIBDIR -CMAKE_INSTALL_LIBDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LIBEXECDIR -CMAKE_INSTALL_LIBEXECDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LOCALEDIR -CMAKE_INSTALL_LOCALEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LOCALSTATEDIR -CMAKE_INSTALL_LOCALSTATEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_MANDIR -CMAKE_INSTALL_MANDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_OLDINCLUDEDIR -CMAKE_INSTALL_OLDINCLUDEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_RUNSTATEDIR -CMAKE_INSTALL_RUNSTATEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_SBINDIR -CMAKE_INSTALL_SBINDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_SHAREDSTATEDIR -CMAKE_INSTALL_SHAREDSTATEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_SYSCONFDIR -CMAKE_INSTALL_SYSCONFDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_LINKER -CMAKE_LINKER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS -CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG -CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE -CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MT -CMAKE_MT-ADVANCED:INTERNAL=1 -//number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=4 -//Platform information initialized -CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 -//noop for ranlib -CMAKE_RANLIB:INTERNAL=: -//ADVANCED property for variable: CMAKE_RC_COMPILER -CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 -CMAKE_RC_COMPILER_WORKS:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS -CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG -CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL -CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE -CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO -CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//Path to CMake installation. -CMAKE_ROOT:INTERNAL=F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS -CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG -CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE -CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH -CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_RPATH -CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS -CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG -CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE -CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE -CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 -//CMAKE_INSTALL_PREFIX during last run -_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX:INTERNAL=C:/Program Files (x86)/squirrel - diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCCompiler.cmake b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCCompiler.cmake deleted file mode 100644 index 5cbbf0b3..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCCompiler.cmake +++ /dev/null @@ -1,74 +0,0 @@ -set(CMAKE_C_COMPILER "F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe") -set(CMAKE_C_COMPILER_ARG1 "") -set(CMAKE_C_COMPILER_ID "MSVC") -set(CMAKE_C_COMPILER_VERSION "19.39.33523.0") -set(CMAKE_C_COMPILER_VERSION_INTERNAL "") -set(CMAKE_C_COMPILER_WRAPPER "") -set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "90") -set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "OFF") -set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17") -set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") -set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") -set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") -set(CMAKE_C17_COMPILE_FEATURES "c_std_17") -set(CMAKE_C23_COMPILE_FEATURES "") - -set(CMAKE_C_PLATFORM_ID "Windows") -set(CMAKE_C_SIMULATE_ID "") -set(CMAKE_C_COMPILER_FRONTEND_VARIANT "MSVC") -set(CMAKE_C_SIMULATE_VERSION "") -set(CMAKE_C_COMPILER_ARCHITECTURE_ID x64) - -set(MSVC_C_ARCHITECTURE_ID x64) - -set(CMAKE_AR "F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/lib.exe") -set(CMAKE_C_COMPILER_AR "") -set(CMAKE_RANLIB ":") -set(CMAKE_C_COMPILER_RANLIB "") -set(CMAKE_LINKER "F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/link.exe") -set(CMAKE_MT "CMAKE_MT-NOTFOUND") -set(CMAKE_TAPI "") -set(CMAKE_COMPILER_IS_GNUCC ) -set(CMAKE_C_COMPILER_LOADED 1) -set(CMAKE_C_COMPILER_WORKS TRUE) -set(CMAKE_C_ABI_COMPILED TRUE) - -set(CMAKE_C_COMPILER_ENV_VAR "CC") - -set(CMAKE_C_COMPILER_ID_RUN 1) -set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) -set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_C_LINKER_PREFERENCE 10) -set(CMAKE_C_LINKER_DEPFILE_SUPPORTED ) - -# Save compiler ABI information. -set(CMAKE_C_SIZEOF_DATA_PTR "8") -set(CMAKE_C_COMPILER_ABI "") -set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") -set(CMAKE_C_LIBRARY_ARCHITECTURE "") - -if(CMAKE_C_SIZEOF_DATA_PTR) - set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") -endif() - -if(CMAKE_C_COMPILER_ABI) - set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") -endif() - -if(CMAKE_C_LIBRARY_ARCHITECTURE) - set(CMAKE_LIBRARY_ARCHITECTURE "") -endif() - -set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") -if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) - set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") -endif() - - - - - -set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "") -set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "") -set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "") -set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCXXCompiler.cmake b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCXXCompiler.cmake deleted file mode 100644 index c372852a..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCXXCompiler.cmake +++ /dev/null @@ -1,85 +0,0 @@ -set(CMAKE_CXX_COMPILER "F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe") -set(CMAKE_CXX_COMPILER_ARG1 "") -set(CMAKE_CXX_COMPILER_ID "MSVC") -set(CMAKE_CXX_COMPILER_VERSION "19.39.33523.0") -set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") -set(CMAKE_CXX_COMPILER_WRAPPER "") -set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") -set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "OFF") -set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23") -set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") -set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") -set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") -set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") -set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") -set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23") - -set(CMAKE_CXX_PLATFORM_ID "Windows") -set(CMAKE_CXX_SIMULATE_ID "") -set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "MSVC") -set(CMAKE_CXX_SIMULATE_VERSION "") -set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID x64) - -set(MSVC_CXX_ARCHITECTURE_ID x64) - -set(CMAKE_AR "F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/lib.exe") -set(CMAKE_CXX_COMPILER_AR "") -set(CMAKE_RANLIB ":") -set(CMAKE_CXX_COMPILER_RANLIB "") -set(CMAKE_LINKER "F:/App/VisualStudio/IDE/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/link.exe") -set(CMAKE_MT "CMAKE_MT-NOTFOUND") -set(CMAKE_TAPI "") -set(CMAKE_COMPILER_IS_GNUCXX ) -set(CMAKE_CXX_COMPILER_LOADED 1) -set(CMAKE_CXX_COMPILER_WORKS TRUE) -set(CMAKE_CXX_ABI_COMPILED TRUE) - -set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") - -set(CMAKE_CXX_COMPILER_ID_RUN 1) -set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm;ccm;cxxm;c++m) -set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) - -foreach (lang C OBJC OBJCXX) - if (CMAKE_${lang}_COMPILER_ID_RUN) - foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) - list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) - endforeach() - endif() -endforeach() - -set(CMAKE_CXX_LINKER_PREFERENCE 30) -set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) -set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED ) - -# Save compiler ABI information. -set(CMAKE_CXX_SIZEOF_DATA_PTR "8") -set(CMAKE_CXX_COMPILER_ABI "") -set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN") -set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") - -if(CMAKE_CXX_SIZEOF_DATA_PTR) - set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") -endif() - -if(CMAKE_CXX_COMPILER_ABI) - set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") -endif() - -if(CMAKE_CXX_LIBRARY_ARCHITECTURE) - set(CMAKE_LIBRARY_ARCHITECTURE "") -endif() - -set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") -if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) - set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") -endif() - - - - - -set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "") -set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") -set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "") -set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeDetermineCompilerABI_C.bin b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeDetermineCompilerABI_C.bin deleted file mode 100644 index c37b5ef1..00000000 Binary files a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeDetermineCompilerABI_C.bin and /dev/null differ diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeDetermineCompilerABI_CXX.bin b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeDetermineCompilerABI_CXX.bin deleted file mode 100644 index 9630457b..00000000 Binary files a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeDetermineCompilerABI_CXX.bin and /dev/null differ diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeRCCompiler.cmake b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeRCCompiler.cmake deleted file mode 100644 index 0f619610..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeRCCompiler.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(CMAKE_RC_COMPILER "rc") -set(CMAKE_RC_COMPILER_ARG1 "") -set(CMAKE_RC_COMPILER_LOADED 1) -set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) -set(CMAKE_RC_OUTPUT_EXTENSION .res) -set(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeSystem.cmake b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeSystem.cmake deleted file mode 100644 index 9c49cbb3..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeSystem.cmake +++ /dev/null @@ -1,15 +0,0 @@ -set(CMAKE_HOST_SYSTEM "Windows-10.0.22631") -set(CMAKE_HOST_SYSTEM_NAME "Windows") -set(CMAKE_HOST_SYSTEM_VERSION "10.0.22631") -set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") - - - -set(CMAKE_SYSTEM "Windows-10.0.22631") -set(CMAKE_SYSTEM_NAME "Windows") -set(CMAKE_SYSTEM_VERSION "10.0.22631") -set(CMAKE_SYSTEM_PROCESSOR "AMD64") - -set(CMAKE_CROSSCOMPILING "FALSE") - -set(CMAKE_SYSTEM_LOADED 1) diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CMakeCCompilerId.c b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CMakeCCompilerId.c deleted file mode 100644 index 0a0ec9b1..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CMakeCCompilerId.c +++ /dev/null @@ -1,880 +0,0 @@ -#ifdef __cplusplus -# error "A C++ compiler has been selected for C." -#endif - -#if defined(__18CXX) -# define ID_VOID_MAIN -#endif -#if defined(__CLASSIC_C__) -/* cv-qualifiers did not exist in K&R C */ -# define const -# define volatile -#endif - -#if !defined(__has_include) -/* If the compiler does not have __has_include, pretend the answer is - always no. */ -# define __has_include(x) 0 -#endif - - -/* Version number components: V=Version, R=Revision, P=Patch - Version date components: YYYY=Year, MM=Month, DD=Day */ - -#if defined(__INTEL_COMPILER) || defined(__ICC) -# define COMPILER_ID "Intel" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# if defined(__GNUC__) -# define SIMULATE_ID "GNU" -# endif - /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, - except that a few beta releases use the old format with V=2021. */ -# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) -# else -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) -# endif -# else -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) - /* The third version component from --version is an update index, - but no macro is provided for it. */ -# define COMPILER_VERSION_PATCH DEC(0) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) - /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ -# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# if defined(__GNUC__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -# elif defined(__GNUG__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) -# endif -# if defined(__GNUC_MINOR__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) -# define COMPILER_ID "IntelLLVM" -#if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -#endif -#if defined(__GNUC__) -# define SIMULATE_ID "GNU" -#endif -/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and - * later. Look for 6 digit vs. 8 digit version number to decide encoding. - * VVVV is no smaller than the current year when a version is released. - */ -#if __INTEL_LLVM_COMPILER < 1000000L -# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) -#else -# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) -# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) -#endif -#if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -#endif -#if defined(__GNUC__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -#elif defined(__GNUG__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) -#endif -#if defined(__GNUC_MINOR__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -#endif -#if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -#endif - -#elif defined(__PATHCC__) -# define COMPILER_ID "PathScale" -# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) -# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) -# if defined(__PATHCC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) -# endif - -#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) -# define COMPILER_ID "Embarcadero" -# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) -# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) -# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) - -#elif defined(__BORLANDC__) -# define COMPILER_ID "Borland" - /* __BORLANDC__ = 0xVRR */ -# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) -# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) - -#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 -# define COMPILER_ID "Watcom" - /* __WATCOMC__ = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__WATCOMC__) -# define COMPILER_ID "OpenWatcom" - /* __WATCOMC__ = VVRP + 1100 */ -# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__SUNPRO_C) -# define COMPILER_ID "SunPro" -# if __SUNPRO_C >= 0x5100 - /* __SUNPRO_C = 0xVRRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) -# else - /* __SUNPRO_CC = 0xVRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) -# endif - -#elif defined(__HP_cc) -# define COMPILER_ID "HP" - /* __HP_cc = VVRRPP */ -# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) -# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) - -#elif defined(__DECC) -# define COMPILER_ID "Compaq" - /* __DECC_VER = VVRRTPPPP */ -# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) -# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) -# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) - -#elif defined(__IBMC__) && defined(__COMPILER_VER__) -# define COMPILER_ID "zOS" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__open_xl__) && defined(__clang__) -# define COMPILER_ID "IBMClang" -# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) -# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) -# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) -# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) - - -#elif defined(__ibmxl__) && defined(__clang__) -# define COMPILER_ID "XLClang" -# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) -# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) -# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) -# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) - - -#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 -# define COMPILER_ID "XL" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 -# define COMPILER_ID "VisualAge" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__NVCOMPILER) -# define COMPILER_ID "NVHPC" -# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) -# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) -# if defined(__NVCOMPILER_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) -# endif - -#elif defined(__PGI) -# define COMPILER_ID "PGI" -# define COMPILER_VERSION_MAJOR DEC(__PGIC__) -# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) -# endif - -#elif defined(__clang__) && defined(__cray__) -# define COMPILER_ID "CrayClang" -# define COMPILER_VERSION_MAJOR DEC(__cray_major__) -# define COMPILER_VERSION_MINOR DEC(__cray_minor__) -# define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__) -# define COMPILER_VERSION_INTERNAL_STR __clang_version__ - - -#elif defined(_CRAYC) -# define COMPILER_ID "Cray" -# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) -# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) - -#elif defined(__TI_COMPILER_VERSION__) -# define COMPILER_ID "TI" - /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ -# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) -# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) -# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) - -#elif defined(__CLANG_FUJITSU) -# define COMPILER_ID "FujitsuClang" -# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) -# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) -# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) -# define COMPILER_VERSION_INTERNAL_STR __clang_version__ - - -#elif defined(__FUJITSU) -# define COMPILER_ID "Fujitsu" -# if defined(__FCC_version__) -# define COMPILER_VERSION __FCC_version__ -# elif defined(__FCC_major__) -# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) -# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) -# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) -# endif -# if defined(__fcc_version) -# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) -# elif defined(__FCC_VERSION) -# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) -# endif - - -#elif defined(__ghs__) -# define COMPILER_ID "GHS" -/* __GHS_VERSION_NUMBER = VVVVRP */ -# ifdef __GHS_VERSION_NUMBER -# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) -# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) -# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) -# endif - -#elif defined(__TASKING__) -# define COMPILER_ID "Tasking" - # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) - # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) -# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) - -#elif defined(__ORANGEC__) -# define COMPILER_ID "OrangeC" -# define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__) -# define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__) -# define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__) - -#elif defined(__TINYC__) -# define COMPILER_ID "TinyCC" - -#elif defined(__BCC__) -# define COMPILER_ID "Bruce" - -#elif defined(__SCO_VERSION__) -# define COMPILER_ID "SCO" - -#elif defined(__ARMCC_VERSION) && !defined(__clang__) -# define COMPILER_ID "ARMCC" -#if __ARMCC_VERSION >= 1000000 - /* __ARMCC_VERSION = VRRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#else - /* __ARMCC_VERSION = VRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#endif - - -#elif defined(__clang__) && defined(__apple_build_version__) -# define COMPILER_ID "AppleClang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) - -#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) -# define COMPILER_ID "ARMClang" - # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100) -# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) - -#elif defined(__clang__) -# define COMPILER_ID "Clang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif - -#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) -# define COMPILER_ID "LCC" -# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) -# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) -# if defined(__LCC_MINOR__) -# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) -# endif -# if defined(__GNUC__) && defined(__GNUC_MINOR__) -# define SIMULATE_ID "GNU" -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -# if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif -# endif - -#elif defined(__GNUC__) -# define COMPILER_ID "GNU" -# define COMPILER_VERSION_MAJOR DEC(__GNUC__) -# if defined(__GNUC_MINOR__) -# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif defined(_MSC_VER) -# define COMPILER_ID "MSVC" - /* _MSC_VER = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) -# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) -# if defined(_MSC_FULL_VER) -# if _MSC_VER >= 1400 - /* _MSC_FULL_VER = VVRRPPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) -# else - /* _MSC_FULL_VER = VVRRPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) -# endif -# endif -# if defined(_MSC_BUILD) -# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) -# endif - -#elif defined(_ADI_COMPILER) -# define COMPILER_ID "ADSP" -#if defined(__VERSIONNUM__) - /* __VERSIONNUM__ = 0xVVRRPPTT */ -# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) -# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) -# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) -# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) -#endif - -#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) -# define COMPILER_ID "IAR" -# if defined(__VER__) && defined(__ICCARM__) -# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) -# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) -# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) -# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) -# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) -# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) -# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) -# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) -# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) -# endif - -#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) -# define COMPILER_ID "SDCC" -# if defined(__SDCC_VERSION_MAJOR) -# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) -# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) -# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) -# else - /* SDCC = VRP */ -# define COMPILER_VERSION_MAJOR DEC(SDCC/100) -# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) -# define COMPILER_VERSION_PATCH DEC(SDCC % 10) -# endif - - -/* These compilers are either not known or too old to define an - identification macro. Try to identify the platform and guess that - it is the native compiler. */ -#elif defined(__hpux) || defined(__hpua) -# define COMPILER_ID "HP" - -#else /* unknown compiler */ -# define COMPILER_ID "" -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; -#ifdef SIMULATE_ID -char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; -#endif - -#ifdef __QNXNTO__ -char const* qnxnto = "INFO" ":" "qnxnto[]"; -#endif - -#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) -char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; -#endif - -#define STRINGIFY_HELPER(X) #X -#define STRINGIFY(X) STRINGIFY_HELPER(X) - -/* Identify known platforms by name. */ -#if defined(__linux) || defined(__linux__) || defined(linux) -# define PLATFORM_ID "Linux" - -#elif defined(__MSYS__) -# define PLATFORM_ID "MSYS" - -#elif defined(__CYGWIN__) -# define PLATFORM_ID "Cygwin" - -#elif defined(__MINGW32__) -# define PLATFORM_ID "MinGW" - -#elif defined(__APPLE__) -# define PLATFORM_ID "Darwin" - -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -# define PLATFORM_ID "Windows" - -#elif defined(__FreeBSD__) || defined(__FreeBSD) -# define PLATFORM_ID "FreeBSD" - -#elif defined(__NetBSD__) || defined(__NetBSD) -# define PLATFORM_ID "NetBSD" - -#elif defined(__OpenBSD__) || defined(__OPENBSD) -# define PLATFORM_ID "OpenBSD" - -#elif defined(__sun) || defined(sun) -# define PLATFORM_ID "SunOS" - -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) -# define PLATFORM_ID "AIX" - -#elif defined(__hpux) || defined(__hpux__) -# define PLATFORM_ID "HP-UX" - -#elif defined(__HAIKU__) -# define PLATFORM_ID "Haiku" - -#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) -# define PLATFORM_ID "BeOS" - -#elif defined(__QNX__) || defined(__QNXNTO__) -# define PLATFORM_ID "QNX" - -#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) -# define PLATFORM_ID "Tru64" - -#elif defined(__riscos) || defined(__riscos__) -# define PLATFORM_ID "RISCos" - -#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) -# define PLATFORM_ID "SINIX" - -#elif defined(__UNIX_SV__) -# define PLATFORM_ID "UNIX_SV" - -#elif defined(__bsdos__) -# define PLATFORM_ID "BSDOS" - -#elif defined(_MPRAS) || defined(MPRAS) -# define PLATFORM_ID "MP-RAS" - -#elif defined(__osf) || defined(__osf__) -# define PLATFORM_ID "OSF1" - -#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) -# define PLATFORM_ID "SCO_SV" - -#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) -# define PLATFORM_ID "ULTRIX" - -#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) -# define PLATFORM_ID "Xenix" - -#elif defined(__WATCOMC__) -# if defined(__LINUX__) -# define PLATFORM_ID "Linux" - -# elif defined(__DOS__) -# define PLATFORM_ID "DOS" - -# elif defined(__OS2__) -# define PLATFORM_ID "OS2" - -# elif defined(__WINDOWS__) -# define PLATFORM_ID "Windows3x" - -# elif defined(__VXWORKS__) -# define PLATFORM_ID "VxWorks" - -# else /* unknown platform */ -# define PLATFORM_ID -# endif - -#elif defined(__INTEGRITY) -# if defined(INT_178B) -# define PLATFORM_ID "Integrity178" - -# else /* regular Integrity */ -# define PLATFORM_ID "Integrity" -# endif - -# elif defined(_ADI_COMPILER) -# define PLATFORM_ID "ADSP" - -#else /* unknown platform */ -# define PLATFORM_ID - -#endif - -/* For windows compilers MSVC and Intel we can determine - the architecture of the compiler being used. This is because - the compilers do not have flags that can change the architecture, - but rather depend on which compiler is being used -*/ -#if defined(_WIN32) && defined(_MSC_VER) -# if defined(_M_IA64) -# define ARCHITECTURE_ID "IA64" - -# elif defined(_M_ARM64EC) -# define ARCHITECTURE_ID "ARM64EC" - -# elif defined(_M_X64) || defined(_M_AMD64) -# define ARCHITECTURE_ID "x64" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# elif defined(_M_ARM64) -# define ARCHITECTURE_ID "ARM64" - -# elif defined(_M_ARM) -# if _M_ARM == 4 -# define ARCHITECTURE_ID "ARMV4I" -# elif _M_ARM == 5 -# define ARCHITECTURE_ID "ARMV5I" -# else -# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) -# endif - -# elif defined(_M_MIPS) -# define ARCHITECTURE_ID "MIPS" - -# elif defined(_M_SH) -# define ARCHITECTURE_ID "SHx" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__WATCOMC__) -# if defined(_M_I86) -# define ARCHITECTURE_ID "I86" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) -# if defined(__ICCARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__ICCRX__) -# define ARCHITECTURE_ID "RX" - -# elif defined(__ICCRH850__) -# define ARCHITECTURE_ID "RH850" - -# elif defined(__ICCRL78__) -# define ARCHITECTURE_ID "RL78" - -# elif defined(__ICCRISCV__) -# define ARCHITECTURE_ID "RISCV" - -# elif defined(__ICCAVR__) -# define ARCHITECTURE_ID "AVR" - -# elif defined(__ICC430__) -# define ARCHITECTURE_ID "MSP430" - -# elif defined(__ICCV850__) -# define ARCHITECTURE_ID "V850" - -# elif defined(__ICC8051__) -# define ARCHITECTURE_ID "8051" - -# elif defined(__ICCSTM8__) -# define ARCHITECTURE_ID "STM8" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__ghs__) -# if defined(__PPC64__) -# define ARCHITECTURE_ID "PPC64" - -# elif defined(__ppc__) -# define ARCHITECTURE_ID "PPC" - -# elif defined(__ARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__x86_64__) -# define ARCHITECTURE_ID "x64" - -# elif defined(__i386__) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__TI_COMPILER_VERSION__) -# if defined(__TI_ARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__MSP430__) -# define ARCHITECTURE_ID "MSP430" - -# elif defined(__TMS320C28XX__) -# define ARCHITECTURE_ID "TMS320C28x" - -# elif defined(__TMS320C6X__) || defined(_TMS320C6X) -# define ARCHITECTURE_ID "TMS320C6x" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -# elif defined(__ADSPSHARC__) -# define ARCHITECTURE_ID "SHARC" - -# elif defined(__ADSPBLACKFIN__) -# define ARCHITECTURE_ID "Blackfin" - -#elif defined(__TASKING__) - -# if defined(__CTC__) || defined(__CPTC__) -# define ARCHITECTURE_ID "TriCore" - -# elif defined(__CMCS__) -# define ARCHITECTURE_ID "MCS" - -# elif defined(__CARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__CARC__) -# define ARCHITECTURE_ID "ARC" - -# elif defined(__C51__) -# define ARCHITECTURE_ID "8051" - -# elif defined(__CPCP__) -# define ARCHITECTURE_ID "PCP" - -# else -# define ARCHITECTURE_ID "" -# endif - -#else -# define ARCHITECTURE_ID -#endif - -/* Convert integer to decimal digit literals. */ -#define DEC(n) \ - ('0' + (((n) / 10000000)%10)), \ - ('0' + (((n) / 1000000)%10)), \ - ('0' + (((n) / 100000)%10)), \ - ('0' + (((n) / 10000)%10)), \ - ('0' + (((n) / 1000)%10)), \ - ('0' + (((n) / 100)%10)), \ - ('0' + (((n) / 10)%10)), \ - ('0' + ((n) % 10)) - -/* Convert integer to hex digit literals. */ -#define HEX(n) \ - ('0' + ((n)>>28 & 0xF)), \ - ('0' + ((n)>>24 & 0xF)), \ - ('0' + ((n)>>20 & 0xF)), \ - ('0' + ((n)>>16 & 0xF)), \ - ('0' + ((n)>>12 & 0xF)), \ - ('0' + ((n)>>8 & 0xF)), \ - ('0' + ((n)>>4 & 0xF)), \ - ('0' + ((n) & 0xF)) - -/* Construct a string literal encoding the version number. */ -#ifdef COMPILER_VERSION -char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; - -/* Construct a string literal encoding the version number components. */ -#elif defined(COMPILER_VERSION_MAJOR) -char const info_version[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', - COMPILER_VERSION_MAJOR, -# ifdef COMPILER_VERSION_MINOR - '.', COMPILER_VERSION_MINOR, -# ifdef COMPILER_VERSION_PATCH - '.', COMPILER_VERSION_PATCH, -# ifdef COMPILER_VERSION_TWEAK - '.', COMPILER_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct a string literal encoding the internal version number. */ -#ifdef COMPILER_VERSION_INTERNAL -char const info_version_internal[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', - 'i','n','t','e','r','n','a','l','[', - COMPILER_VERSION_INTERNAL,']','\0'}; -#elif defined(COMPILER_VERSION_INTERNAL_STR) -char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; -#endif - -/* Construct a string literal encoding the version number components. */ -#ifdef SIMULATE_VERSION_MAJOR -char const info_simulate_version[] = { - 'I', 'N', 'F', 'O', ':', - 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', - SIMULATE_VERSION_MAJOR, -# ifdef SIMULATE_VERSION_MINOR - '.', SIMULATE_VERSION_MINOR, -# ifdef SIMULATE_VERSION_PATCH - '.', SIMULATE_VERSION_PATCH, -# ifdef SIMULATE_VERSION_TWEAK - '.', SIMULATE_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; -char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; - - - -#if !defined(__STDC__) && !defined(__clang__) -# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) -# define C_VERSION "90" -# else -# define C_VERSION -# endif -#elif __STDC_VERSION__ > 201710L -# define C_VERSION "23" -#elif __STDC_VERSION__ >= 201710L -# define C_VERSION "17" -#elif __STDC_VERSION__ >= 201000L -# define C_VERSION "11" -#elif __STDC_VERSION__ >= 199901L -# define C_VERSION "99" -#else -# define C_VERSION "90" -#endif -const char* info_language_standard_default = - "INFO" ":" "standard_default[" C_VERSION "]"; - -const char* info_language_extensions_default = "INFO" ":" "extensions_default[" -#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ - defined(__TI_COMPILER_VERSION__)) && \ - !defined(__STRICT_ANSI__) - "ON" -#else - "OFF" -#endif -"]"; - -/*--------------------------------------------------------------------------*/ - -#ifdef ID_VOID_MAIN -void main() {} -#else -# if defined(__CLASSIC_C__) -int main(argc, argv) int argc; char *argv[]; -# else -int main(int argc, char* argv[]) -# endif -{ - int require = 0; - require += info_compiler[argc]; - require += info_platform[argc]; - require += info_arch[argc]; -#ifdef COMPILER_VERSION_MAJOR - require += info_version[argc]; -#endif -#ifdef COMPILER_VERSION_INTERNAL - require += info_version_internal[argc]; -#endif -#ifdef SIMULATE_ID - require += info_simulate[argc]; -#endif -#ifdef SIMULATE_VERSION_MAJOR - require += info_simulate_version[argc]; -#endif -#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) - require += info_cray[argc]; -#endif - require += info_language_standard_default[argc]; - require += info_language_extensions_default[argc]; - (void)argv; - return require; -} -#endif diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CompilerIdC.exe b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CompilerIdC.exe deleted file mode 100644 index d4e004f5..00000000 Binary files a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CompilerIdC.exe and /dev/null differ diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CompilerIdC.vcxproj b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CompilerIdC.vcxproj deleted file mode 100644 index 38f433ed..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CompilerIdC.vcxproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - - Debug - x64 - - - - {CAE07175-D007-4FC3-BFE8-47B392814159} - CompilerIdC - Win32Proj - - - 10.0.22621.0 - - - - - - - - - x64 - - - Application - v143 - - MultiByte - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\ - $(Configuration)\ - false - - - - Disabled - %(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - TurnOffAllWarnings - - - - - - false - Console - - - - for %%i in (cl.exe) do %40echo CMAKE_C_COMPILER=%%~$PATH:i - - - - - - - - - - diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/Debug/CMakeCCompilerId.obj b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/Debug/CMakeCCompilerId.obj deleted file mode 100644 index c2e7376f..00000000 Binary files a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/Debug/CMakeCCompilerId.obj and /dev/null differ diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CMakeCXXCompilerId.cpp b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CMakeCXXCompilerId.cpp deleted file mode 100644 index 9c9c90ea..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CMakeCXXCompilerId.cpp +++ /dev/null @@ -1,869 +0,0 @@ -/* This source file must have a .cpp extension so that all C++ compilers - recognize the extension without flags. Borland does not know .cxx for - example. */ -#ifndef __cplusplus -# error "A C compiler has been selected for C++." -#endif - -#if !defined(__has_include) -/* If the compiler does not have __has_include, pretend the answer is - always no. */ -# define __has_include(x) 0 -#endif - - -/* Version number components: V=Version, R=Revision, P=Patch - Version date components: YYYY=Year, MM=Month, DD=Day */ - -#if defined(__COMO__) -# define COMPILER_ID "Comeau" - /* __COMO_VERSION__ = VRR */ -# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) -# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) - -#elif defined(__INTEL_COMPILER) || defined(__ICC) -# define COMPILER_ID "Intel" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# if defined(__GNUC__) -# define SIMULATE_ID "GNU" -# endif - /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, - except that a few beta releases use the old format with V=2021. */ -# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) -# else -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) -# endif -# else -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) - /* The third version component from --version is an update index, - but no macro is provided for it. */ -# define COMPILER_VERSION_PATCH DEC(0) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) - /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ -# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# if defined(__GNUC__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -# elif defined(__GNUG__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) -# endif -# if defined(__GNUC_MINOR__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) -# define COMPILER_ID "IntelLLVM" -#if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -#endif -#if defined(__GNUC__) -# define SIMULATE_ID "GNU" -#endif -/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and - * later. Look for 6 digit vs. 8 digit version number to decide encoding. - * VVVV is no smaller than the current year when a version is released. - */ -#if __INTEL_LLVM_COMPILER < 1000000L -# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) -#else -# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) -# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) -#endif -#if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -#endif -#if defined(__GNUC__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -#elif defined(__GNUG__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) -#endif -#if defined(__GNUC_MINOR__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -#endif -#if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -#endif - -#elif defined(__PATHCC__) -# define COMPILER_ID "PathScale" -# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) -# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) -# if defined(__PATHCC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) -# endif - -#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) -# define COMPILER_ID "Embarcadero" -# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) -# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) -# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) - -#elif defined(__BORLANDC__) -# define COMPILER_ID "Borland" - /* __BORLANDC__ = 0xVRR */ -# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) -# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) - -#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 -# define COMPILER_ID "Watcom" - /* __WATCOMC__ = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__WATCOMC__) -# define COMPILER_ID "OpenWatcom" - /* __WATCOMC__ = VVRP + 1100 */ -# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__SUNPRO_CC) -# define COMPILER_ID "SunPro" -# if __SUNPRO_CC >= 0x5100 - /* __SUNPRO_CC = 0xVRRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) -# else - /* __SUNPRO_CC = 0xVRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) -# endif - -#elif defined(__HP_aCC) -# define COMPILER_ID "HP" - /* __HP_aCC = VVRRPP */ -# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) -# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) - -#elif defined(__DECCXX) -# define COMPILER_ID "Compaq" - /* __DECCXX_VER = VVRRTPPPP */ -# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) -# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) -# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) - -#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) -# define COMPILER_ID "zOS" - /* __IBMCPP__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) - -#elif defined(__open_xl__) && defined(__clang__) -# define COMPILER_ID "IBMClang" -# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) -# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) -# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) -# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) - - -#elif defined(__ibmxl__) && defined(__clang__) -# define COMPILER_ID "XLClang" -# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) -# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) -# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) -# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) - - -#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 -# define COMPILER_ID "XL" - /* __IBMCPP__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) - -#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 -# define COMPILER_ID "VisualAge" - /* __IBMCPP__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) - -#elif defined(__NVCOMPILER) -# define COMPILER_ID "NVHPC" -# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) -# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) -# if defined(__NVCOMPILER_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) -# endif - -#elif defined(__PGI) -# define COMPILER_ID "PGI" -# define COMPILER_VERSION_MAJOR DEC(__PGIC__) -# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) -# endif - -#elif defined(__clang__) && defined(__cray__) -# define COMPILER_ID "CrayClang" -# define COMPILER_VERSION_MAJOR DEC(__cray_major__) -# define COMPILER_VERSION_MINOR DEC(__cray_minor__) -# define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__) -# define COMPILER_VERSION_INTERNAL_STR __clang_version__ - - -#elif defined(_CRAYC) -# define COMPILER_ID "Cray" -# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) -# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) - -#elif defined(__TI_COMPILER_VERSION__) -# define COMPILER_ID "TI" - /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ -# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) -# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) -# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) - -#elif defined(__CLANG_FUJITSU) -# define COMPILER_ID "FujitsuClang" -# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) -# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) -# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) -# define COMPILER_VERSION_INTERNAL_STR __clang_version__ - - -#elif defined(__FUJITSU) -# define COMPILER_ID "Fujitsu" -# if defined(__FCC_version__) -# define COMPILER_VERSION __FCC_version__ -# elif defined(__FCC_major__) -# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) -# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) -# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) -# endif -# if defined(__fcc_version) -# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) -# elif defined(__FCC_VERSION) -# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) -# endif - - -#elif defined(__ghs__) -# define COMPILER_ID "GHS" -/* __GHS_VERSION_NUMBER = VVVVRP */ -# ifdef __GHS_VERSION_NUMBER -# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) -# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) -# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) -# endif - -#elif defined(__TASKING__) -# define COMPILER_ID "Tasking" - # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) - # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) -# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) - -#elif defined(__ORANGEC__) -# define COMPILER_ID "OrangeC" -# define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__) -# define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__) -# define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__) - -#elif defined(__SCO_VERSION__) -# define COMPILER_ID "SCO" - -#elif defined(__ARMCC_VERSION) && !defined(__clang__) -# define COMPILER_ID "ARMCC" -#if __ARMCC_VERSION >= 1000000 - /* __ARMCC_VERSION = VRRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#else - /* __ARMCC_VERSION = VRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#endif - - -#elif defined(__clang__) && defined(__apple_build_version__) -# define COMPILER_ID "AppleClang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) - -#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) -# define COMPILER_ID "ARMClang" - # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100) -# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) - -#elif defined(__clang__) -# define COMPILER_ID "Clang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif - -#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) -# define COMPILER_ID "LCC" -# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) -# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) -# if defined(__LCC_MINOR__) -# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) -# endif -# if defined(__GNUC__) && defined(__GNUC_MINOR__) -# define SIMULATE_ID "GNU" -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -# if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif -# endif - -#elif defined(__GNUC__) || defined(__GNUG__) -# define COMPILER_ID "GNU" -# if defined(__GNUC__) -# define COMPILER_VERSION_MAJOR DEC(__GNUC__) -# else -# define COMPILER_VERSION_MAJOR DEC(__GNUG__) -# endif -# if defined(__GNUC_MINOR__) -# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif defined(_MSC_VER) -# define COMPILER_ID "MSVC" - /* _MSC_VER = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) -# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) -# if defined(_MSC_FULL_VER) -# if _MSC_VER >= 1400 - /* _MSC_FULL_VER = VVRRPPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) -# else - /* _MSC_FULL_VER = VVRRPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) -# endif -# endif -# if defined(_MSC_BUILD) -# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) -# endif - -#elif defined(_ADI_COMPILER) -# define COMPILER_ID "ADSP" -#if defined(__VERSIONNUM__) - /* __VERSIONNUM__ = 0xVVRRPPTT */ -# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) -# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) -# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) -# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) -#endif - -#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) -# define COMPILER_ID "IAR" -# if defined(__VER__) && defined(__ICCARM__) -# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) -# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) -# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) -# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) -# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) -# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) -# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) -# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) -# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) -# endif - - -/* These compilers are either not known or too old to define an - identification macro. Try to identify the platform and guess that - it is the native compiler. */ -#elif defined(__hpux) || defined(__hpua) -# define COMPILER_ID "HP" - -#else /* unknown compiler */ -# define COMPILER_ID "" -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; -#ifdef SIMULATE_ID -char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; -#endif - -#ifdef __QNXNTO__ -char const* qnxnto = "INFO" ":" "qnxnto[]"; -#endif - -#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) -char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; -#endif - -#define STRINGIFY_HELPER(X) #X -#define STRINGIFY(X) STRINGIFY_HELPER(X) - -/* Identify known platforms by name. */ -#if defined(__linux) || defined(__linux__) || defined(linux) -# define PLATFORM_ID "Linux" - -#elif defined(__MSYS__) -# define PLATFORM_ID "MSYS" - -#elif defined(__CYGWIN__) -# define PLATFORM_ID "Cygwin" - -#elif defined(__MINGW32__) -# define PLATFORM_ID "MinGW" - -#elif defined(__APPLE__) -# define PLATFORM_ID "Darwin" - -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -# define PLATFORM_ID "Windows" - -#elif defined(__FreeBSD__) || defined(__FreeBSD) -# define PLATFORM_ID "FreeBSD" - -#elif defined(__NetBSD__) || defined(__NetBSD) -# define PLATFORM_ID "NetBSD" - -#elif defined(__OpenBSD__) || defined(__OPENBSD) -# define PLATFORM_ID "OpenBSD" - -#elif defined(__sun) || defined(sun) -# define PLATFORM_ID "SunOS" - -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) -# define PLATFORM_ID "AIX" - -#elif defined(__hpux) || defined(__hpux__) -# define PLATFORM_ID "HP-UX" - -#elif defined(__HAIKU__) -# define PLATFORM_ID "Haiku" - -#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) -# define PLATFORM_ID "BeOS" - -#elif defined(__QNX__) || defined(__QNXNTO__) -# define PLATFORM_ID "QNX" - -#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) -# define PLATFORM_ID "Tru64" - -#elif defined(__riscos) || defined(__riscos__) -# define PLATFORM_ID "RISCos" - -#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) -# define PLATFORM_ID "SINIX" - -#elif defined(__UNIX_SV__) -# define PLATFORM_ID "UNIX_SV" - -#elif defined(__bsdos__) -# define PLATFORM_ID "BSDOS" - -#elif defined(_MPRAS) || defined(MPRAS) -# define PLATFORM_ID "MP-RAS" - -#elif defined(__osf) || defined(__osf__) -# define PLATFORM_ID "OSF1" - -#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) -# define PLATFORM_ID "SCO_SV" - -#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) -# define PLATFORM_ID "ULTRIX" - -#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) -# define PLATFORM_ID "Xenix" - -#elif defined(__WATCOMC__) -# if defined(__LINUX__) -# define PLATFORM_ID "Linux" - -# elif defined(__DOS__) -# define PLATFORM_ID "DOS" - -# elif defined(__OS2__) -# define PLATFORM_ID "OS2" - -# elif defined(__WINDOWS__) -# define PLATFORM_ID "Windows3x" - -# elif defined(__VXWORKS__) -# define PLATFORM_ID "VxWorks" - -# else /* unknown platform */ -# define PLATFORM_ID -# endif - -#elif defined(__INTEGRITY) -# if defined(INT_178B) -# define PLATFORM_ID "Integrity178" - -# else /* regular Integrity */ -# define PLATFORM_ID "Integrity" -# endif - -# elif defined(_ADI_COMPILER) -# define PLATFORM_ID "ADSP" - -#else /* unknown platform */ -# define PLATFORM_ID - -#endif - -/* For windows compilers MSVC and Intel we can determine - the architecture of the compiler being used. This is because - the compilers do not have flags that can change the architecture, - but rather depend on which compiler is being used -*/ -#if defined(_WIN32) && defined(_MSC_VER) -# if defined(_M_IA64) -# define ARCHITECTURE_ID "IA64" - -# elif defined(_M_ARM64EC) -# define ARCHITECTURE_ID "ARM64EC" - -# elif defined(_M_X64) || defined(_M_AMD64) -# define ARCHITECTURE_ID "x64" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# elif defined(_M_ARM64) -# define ARCHITECTURE_ID "ARM64" - -# elif defined(_M_ARM) -# if _M_ARM == 4 -# define ARCHITECTURE_ID "ARMV4I" -# elif _M_ARM == 5 -# define ARCHITECTURE_ID "ARMV5I" -# else -# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) -# endif - -# elif defined(_M_MIPS) -# define ARCHITECTURE_ID "MIPS" - -# elif defined(_M_SH) -# define ARCHITECTURE_ID "SHx" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__WATCOMC__) -# if defined(_M_I86) -# define ARCHITECTURE_ID "I86" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) -# if defined(__ICCARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__ICCRX__) -# define ARCHITECTURE_ID "RX" - -# elif defined(__ICCRH850__) -# define ARCHITECTURE_ID "RH850" - -# elif defined(__ICCRL78__) -# define ARCHITECTURE_ID "RL78" - -# elif defined(__ICCRISCV__) -# define ARCHITECTURE_ID "RISCV" - -# elif defined(__ICCAVR__) -# define ARCHITECTURE_ID "AVR" - -# elif defined(__ICC430__) -# define ARCHITECTURE_ID "MSP430" - -# elif defined(__ICCV850__) -# define ARCHITECTURE_ID "V850" - -# elif defined(__ICC8051__) -# define ARCHITECTURE_ID "8051" - -# elif defined(__ICCSTM8__) -# define ARCHITECTURE_ID "STM8" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__ghs__) -# if defined(__PPC64__) -# define ARCHITECTURE_ID "PPC64" - -# elif defined(__ppc__) -# define ARCHITECTURE_ID "PPC" - -# elif defined(__ARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__x86_64__) -# define ARCHITECTURE_ID "x64" - -# elif defined(__i386__) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__TI_COMPILER_VERSION__) -# if defined(__TI_ARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__MSP430__) -# define ARCHITECTURE_ID "MSP430" - -# elif defined(__TMS320C28XX__) -# define ARCHITECTURE_ID "TMS320C28x" - -# elif defined(__TMS320C6X__) || defined(_TMS320C6X) -# define ARCHITECTURE_ID "TMS320C6x" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -# elif defined(__ADSPSHARC__) -# define ARCHITECTURE_ID "SHARC" - -# elif defined(__ADSPBLACKFIN__) -# define ARCHITECTURE_ID "Blackfin" - -#elif defined(__TASKING__) - -# if defined(__CTC__) || defined(__CPTC__) -# define ARCHITECTURE_ID "TriCore" - -# elif defined(__CMCS__) -# define ARCHITECTURE_ID "MCS" - -# elif defined(__CARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__CARC__) -# define ARCHITECTURE_ID "ARC" - -# elif defined(__C51__) -# define ARCHITECTURE_ID "8051" - -# elif defined(__CPCP__) -# define ARCHITECTURE_ID "PCP" - -# else -# define ARCHITECTURE_ID "" -# endif - -#else -# define ARCHITECTURE_ID -#endif - -/* Convert integer to decimal digit literals. */ -#define DEC(n) \ - ('0' + (((n) / 10000000)%10)), \ - ('0' + (((n) / 1000000)%10)), \ - ('0' + (((n) / 100000)%10)), \ - ('0' + (((n) / 10000)%10)), \ - ('0' + (((n) / 1000)%10)), \ - ('0' + (((n) / 100)%10)), \ - ('0' + (((n) / 10)%10)), \ - ('0' + ((n) % 10)) - -/* Convert integer to hex digit literals. */ -#define HEX(n) \ - ('0' + ((n)>>28 & 0xF)), \ - ('0' + ((n)>>24 & 0xF)), \ - ('0' + ((n)>>20 & 0xF)), \ - ('0' + ((n)>>16 & 0xF)), \ - ('0' + ((n)>>12 & 0xF)), \ - ('0' + ((n)>>8 & 0xF)), \ - ('0' + ((n)>>4 & 0xF)), \ - ('0' + ((n) & 0xF)) - -/* Construct a string literal encoding the version number. */ -#ifdef COMPILER_VERSION -char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; - -/* Construct a string literal encoding the version number components. */ -#elif defined(COMPILER_VERSION_MAJOR) -char const info_version[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', - COMPILER_VERSION_MAJOR, -# ifdef COMPILER_VERSION_MINOR - '.', COMPILER_VERSION_MINOR, -# ifdef COMPILER_VERSION_PATCH - '.', COMPILER_VERSION_PATCH, -# ifdef COMPILER_VERSION_TWEAK - '.', COMPILER_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct a string literal encoding the internal version number. */ -#ifdef COMPILER_VERSION_INTERNAL -char const info_version_internal[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', - 'i','n','t','e','r','n','a','l','[', - COMPILER_VERSION_INTERNAL,']','\0'}; -#elif defined(COMPILER_VERSION_INTERNAL_STR) -char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; -#endif - -/* Construct a string literal encoding the version number components. */ -#ifdef SIMULATE_VERSION_MAJOR -char const info_simulate_version[] = { - 'I', 'N', 'F', 'O', ':', - 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', - SIMULATE_VERSION_MAJOR, -# ifdef SIMULATE_VERSION_MINOR - '.', SIMULATE_VERSION_MINOR, -# ifdef SIMULATE_VERSION_PATCH - '.', SIMULATE_VERSION_PATCH, -# ifdef SIMULATE_VERSION_TWEAK - '.', SIMULATE_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; -char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; - - - -#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L -# if defined(__INTEL_CXX11_MODE__) -# if defined(__cpp_aggregate_nsdmi) -# define CXX_STD 201402L -# else -# define CXX_STD 201103L -# endif -# else -# define CXX_STD 199711L -# endif -#elif defined(_MSC_VER) && defined(_MSVC_LANG) -# define CXX_STD _MSVC_LANG -#else -# define CXX_STD __cplusplus -#endif - -const char* info_language_standard_default = "INFO" ":" "standard_default[" -#if CXX_STD > 202002L - "23" -#elif CXX_STD > 201703L - "20" -#elif CXX_STD >= 201703L - "17" -#elif CXX_STD >= 201402L - "14" -#elif CXX_STD >= 201103L - "11" -#else - "98" -#endif -"]"; - -const char* info_language_extensions_default = "INFO" ":" "extensions_default[" -#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ - defined(__TI_COMPILER_VERSION__)) && \ - !defined(__STRICT_ANSI__) - "ON" -#else - "OFF" -#endif -"]"; - -/*--------------------------------------------------------------------------*/ - -int main(int argc, char* argv[]) -{ - int require = 0; - require += info_compiler[argc]; - require += info_platform[argc]; - require += info_arch[argc]; -#ifdef COMPILER_VERSION_MAJOR - require += info_version[argc]; -#endif -#ifdef COMPILER_VERSION_INTERNAL - require += info_version_internal[argc]; -#endif -#ifdef SIMULATE_ID - require += info_simulate[argc]; -#endif -#ifdef SIMULATE_VERSION_MAJOR - require += info_simulate_version[argc]; -#endif -#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) - require += info_cray[argc]; -#endif - require += info_language_standard_default[argc]; - require += info_language_extensions_default[argc]; - (void)argv; - return require; -} diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CompilerIdCXX.exe b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CompilerIdCXX.exe deleted file mode 100644 index 462aca3b..00000000 Binary files a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CompilerIdCXX.exe and /dev/null differ diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CompilerIdCXX.vcxproj b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CompilerIdCXX.vcxproj deleted file mode 100644 index f1804540..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CompilerIdCXX.vcxproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - - Debug - x64 - - - - {CAE07175-D007-4FC3-BFE8-47B392814159} - CompilerIdCXX - Win32Proj - - - 10.0.22621.0 - - - - - - - - - x64 - - - Application - v143 - - MultiByte - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\ - $(Configuration)\ - false - - - - Disabled - %(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - TurnOffAllWarnings - - - - - - false - Console - - - - for %%i in (cl.exe) do %40echo CMAKE_CXX_COMPILER=%%~$PATH:i - - - - - - - - - - diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj deleted file mode 100644 index 68cc2721..00000000 Binary files a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj and /dev/null differ diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/VCTargetsPath.txt b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/VCTargetsPath.txt deleted file mode 100644 index 13abbbb2..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/VCTargetsPath.txt +++ /dev/null @@ -1 +0,0 @@ -F:/App/VisualStudio/IDE/MSBuild/Microsoft/VC/v170 diff --git a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/VCTargetsPath.vcxproj b/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/VCTargetsPath.vcxproj deleted file mode 100644 index ccb7d625..00000000 --- a/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/VCTargetsPath.vcxproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Debug - x64 - - - - {F3FC6D86-508D-3FB1-96D2-995F08B142EC} - Win32Proj - x64 - 10.0.22621.0 - - - - x64 - - - Utility - MultiByte - v143 - - - - - echo VCTargetsPath=$(VCTargetsPath) - - - - diff --git a/m_packages/squirrel/build/CMakeFiles/6f6c1b78d3fa4aa1fa866d53d1849ec9/INSTALL_force.rule b/m_packages/squirrel/build/CMakeFiles/6f6c1b78d3fa4aa1fa866d53d1849ec9/INSTALL_force.rule deleted file mode 100644 index 2d3998c9..00000000 --- a/m_packages/squirrel/build/CMakeFiles/6f6c1b78d3fa4aa1fa866d53d1849ec9/INSTALL_force.rule +++ /dev/null @@ -1 +0,0 @@ -# generated from CMake diff --git a/m_packages/squirrel/build/CMakeFiles/CMakeConfigureLog.yaml b/m_packages/squirrel/build/CMakeFiles/CMakeConfigureLog.yaml deleted file mode 100644 index a63b9003..00000000 --- a/m_packages/squirrel/build/CMakeFiles/CMakeConfigureLog.yaml +++ /dev/null @@ -1,231 +0,0 @@ - ---- -events: - - - kind: "message-v1" - backtrace: - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:233 (message)" - - "CMakeLists.txt:2 (project)" - message: | - The system is: Windows - 10.0.22631 - AMD64 - - - kind: "message-v1" - backtrace: - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)" - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)" - - "CMakeLists.txt:2 (project)" - message: | - Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. - Compiler: - Build flags: - Id flags: - - The output was: - 0 - 适用于 .NET Framework MSBuild 版本 17.9.8+b34f75857 - 生成启动时间为 2024/5/4 23:36:41。 - - 节点 1 上的项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\3.28.0-msvc1\\CompilerIdC\\CompilerIdC.vcxproj”(默认目标)。 - PrepareForBuild: - 正在创建目录“Debug\\”。 - 已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。 - 正在创建目录“Debug\\CompilerIdC.tlog\\”。 - InitializeBuildStatus: - 正在创建“Debug\\CompilerIdC.tlog\\unsuccessfulbuild”,因为已指定“AlwaysCreate”。 - 正在对“Debug\\CompilerIdC.tlog\\unsuccessfulbuild”执行 Touch 任务。 - ClCompile: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\\\" /Fd"Debug\\vc143.pdb" /external:W0 /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c - CMakeCCompilerId.c - Link: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\link.exe /ERRORREPORT:QUEUE /OUT:".\\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\\CompilerIdC.lib" /MACHINE:X64 Debug\\CMakeCCompilerId.obj - CompilerIdC.vcxproj -> F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\3.28.0-msvc1\\CompilerIdC\\CompilerIdC.exe - PostBuildEvent: - for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i - :VCEnd - CMAKE_C_COMPILER=F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\Hostx64\\x64\\cl.exe - FinalizeBuildStatus: - 正在删除文件“Debug\\CompilerIdC.tlog\\unsuccessfulbuild”。 - 正在对“Debug\\CompilerIdC.tlog\\CompilerIdC.lastbuildstate”执行 Touch 任务。 - 已完成生成项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\3.28.0-msvc1\\CompilerIdC\\CompilerIdC.vcxproj”(默认目标)的操作。 - - 已成功生成。 - 0 个警告 - 0 个错误 - - 已用时间 00:00:00.77 - - - Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe" - - Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj" - - The C compiler identification is MSVC, found in: - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdC/CompilerIdC.exe - - - - kind: "message-v1" - backtrace: - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)" - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)" - - "CMakeLists.txt:2 (project)" - message: | - Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. - Compiler: - Build flags: - Id flags: - - The output was: - 0 - 适用于 .NET Framework MSBuild 版本 17.9.8+b34f75857 - 生成启动时间为 2024/5/4 23:36:42。 - - 节点 1 上的项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\3.28.0-msvc1\\CompilerIdCXX\\CompilerIdCXX.vcxproj”(默认目标)。 - PrepareForBuild: - 正在创建目录“Debug\\”。 - 已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。 - 正在创建目录“Debug\\CompilerIdCXX.tlog\\”。 - InitializeBuildStatus: - 正在创建“Debug\\CompilerIdCXX.tlog\\unsuccessfulbuild”,因为已指定“AlwaysCreate”。 - 正在对“Debug\\CompilerIdCXX.tlog\\unsuccessfulbuild”执行 Touch 任务。 - ClCompile: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\\\" /Fd"Debug\\vc143.pdb" /external:W0 /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp - CMakeCXXCompilerId.cpp - Link: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\link.exe /ERRORREPORT:QUEUE /OUT:".\\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\\CompilerIdCXX.lib" /MACHINE:X64 Debug\\CMakeCXXCompilerId.obj - CompilerIdCXX.vcxproj -> F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\3.28.0-msvc1\\CompilerIdCXX\\CompilerIdCXX.exe - PostBuildEvent: - for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i - :VCEnd - CMAKE_CXX_COMPILER=F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\Hostx64\\x64\\cl.exe - FinalizeBuildStatus: - 正在删除文件“Debug\\CompilerIdCXX.tlog\\unsuccessfulbuild”。 - 正在对“Debug\\CompilerIdCXX.tlog\\CompilerIdCXX.lastbuildstate”执行 Touch 任务。 - 已完成生成项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\3.28.0-msvc1\\CompilerIdCXX\\CompilerIdCXX.vcxproj”(默认目标)的操作。 - - 已成功生成。 - 0 个警告 - 0 个错误 - - 已用时间 00:00:00.50 - - - Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe" - - Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.vcxproj" - - The CXX compiler identification is MSVC, found in: - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CompilerIdCXX/CompilerIdCXX.exe - - - - kind: "try_compile-v1" - backtrace: - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" - - "CMakeLists.txt:2 (project)" - checks: - - "Detecting C compiler ABI info" - directories: - source: "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-u9cfaw" - binary: "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-u9cfaw" - cmakeVariables: - CMAKE_C_FLAGS: "/DWIN32 /D_WINDOWS /W3" - CMAKE_C_FLAGS_DEBUG: "/MDd /Zi /Ob0 /Od /RTC1" - CMAKE_EXE_LINKER_FLAGS: "/machine:x64" - buildResult: - variable: "CMAKE_C_ABI_COMPILED" - cached: true - stdout: | - Change Dir: 'F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-u9cfaw' - - Run Build Command(s): F:/App/VisualStudio/IDE/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_3b6af.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n - 适用于 .NET Framework MSBuild 版本 17.9.8+b34f75857 - 生成启动时间为 2024/5/4 23:36:43。 - - 节点 1 上的项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-u9cfaw\\cmTC_3b6af.vcxproj”(默认目标)。 - PrepareForBuild: - 正在创建目录“cmTC_3b6af.dir\\Debug\\”。 - 已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。 - 正在创建目录“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-u9cfaw\\Debug\\”。 - 正在创建目录“cmTC_3b6af.dir\\Debug\\cmTC_3b6af.tlog\\”。 - InitializeBuildStatus: - 正在创建“cmTC_3b6af.dir\\Debug\\cmTC_3b6af.tlog\\unsuccessfulbuild”,因为已指定“AlwaysCreate”。 - 正在对“cmTC_3b6af.dir\\Debug\\cmTC_3b6af.tlog\\unsuccessfulbuild”执行 Touch 任务。 - ClCompile: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\\"Debug\\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_3b6af.dir\\Debug\\\\" /Fd"cmTC_3b6af.dir\\Debug\\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "F:\\App\\VisualStudio\\IDE\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\share\\cmake-3.28\\Modules\\CMakeCCompilerABI.c" - 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.39.33523 版 - 版权所有(C) Microsoft Corporation。保留所有权利。 - cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\\"Debug\\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_3b6af.dir\\Debug\\\\" /Fd"cmTC_3b6af.dir\\Debug\\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "F:\\App\\VisualStudio\\IDE\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\share\\cmake-3.28\\Modules\\CMakeCCompilerABI.c" - CMakeCCompilerABI.c - Link: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\link.exe /ERRORREPORT:QUEUE /OUT:"F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-u9cfaw\\Debug\\cmTC_3b6af.exe" /INCREMENTAL /ILK:"cmTC_3b6af.dir\\Debug\\cmTC_3b6af.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-u9cfaw/Debug/cmTC_3b6af.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-u9cfaw/Debug/cmTC_3b6af.lib" /MACHINE:X64 /machine:x64 cmTC_3b6af.dir\\Debug\\CMakeCCompilerABI.obj - cmTC_3b6af.vcxproj -> F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-u9cfaw\\Debug\\cmTC_3b6af.exe - FinalizeBuildStatus: - 正在删除文件“cmTC_3b6af.dir\\Debug\\cmTC_3b6af.tlog\\unsuccessfulbuild”。 - 正在对“cmTC_3b6af.dir\\Debug\\cmTC_3b6af.tlog\\cmTC_3b6af.lastbuildstate”执行 Touch 任务。 - 已完成生成项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-u9cfaw\\cmTC_3b6af.vcxproj”(默认目标)的操作。 - - 已成功生成。 - 0 个警告 - 0 个错误 - - 已用时间 00:00:00.49 - - exitCode: 0 - - - kind: "try_compile-v1" - backtrace: - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" - - "F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" - - "CMakeLists.txt:2 (project)" - checks: - - "Detecting CXX compiler ABI info" - directories: - source: "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-eg9cwy" - binary: "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-eg9cwy" - cmakeVariables: - CMAKE_CXX_FLAGS: "/DWIN32 /D_WINDOWS /W3 /GR /EHsc" - CMAKE_CXX_FLAGS_DEBUG: "/MDd /Zi /Ob0 /Od /RTC1" - CMAKE_EXE_LINKER_FLAGS: "/machine:x64" - buildResult: - variable: "CMAKE_CXX_ABI_COMPILED" - cached: true - stdout: | - Change Dir: 'F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-eg9cwy' - - Run Build Command(s): F:/App/VisualStudio/IDE/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_003f8.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n - 适用于 .NET Framework MSBuild 版本 17.9.8+b34f75857 - 生成启动时间为 2024/5/4 23:36:44。 - - 节点 1 上的项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-eg9cwy\\cmTC_003f8.vcxproj”(默认目标)。 - PrepareForBuild: - 正在创建目录“cmTC_003f8.dir\\Debug\\”。 - 已启用结构化输出。编译器诊断的格式设置将反映错误层次结构。有关详细信息,请参阅 https://aka.ms/cpp/structured-output。 - 正在创建目录“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-eg9cwy\\Debug\\”。 - 正在创建目录“cmTC_003f8.dir\\Debug\\cmTC_003f8.tlog\\”。 - InitializeBuildStatus: - 正在创建“cmTC_003f8.dir\\Debug\\cmTC_003f8.tlog\\unsuccessfulbuild”,因为已指定“AlwaysCreate”。 - 正在对“cmTC_003f8.dir\\Debug\\cmTC_003f8.tlog\\unsuccessfulbuild”执行 Touch 任务。 - ClCompile: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\\"Debug\\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_003f8.dir\\Debug\\\\" /Fd"cmTC_003f8.dir\\Debug\\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue "F:\\App\\VisualStudio\\IDE\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\share\\cmake-3.28\\Modules\\CMakeCXXCompilerABI.cpp" - 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.39.33523 版 - 版权所有(C) Microsoft Corporation。保留所有权利。 - cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\\"Debug\\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_003f8.dir\\Debug\\\\" /Fd"cmTC_003f8.dir\\Debug\\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue "F:\\App\\VisualStudio\\IDE\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\share\\cmake-3.28\\Modules\\CMakeCXXCompilerABI.cpp" - CMakeCXXCompilerABI.cpp - Link: - F:\\App\\VisualStudio\\IDE\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\link.exe /ERRORREPORT:QUEUE /OUT:"F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-eg9cwy\\Debug\\cmTC_003f8.exe" /INCREMENTAL /ILK:"cmTC_003f8.dir\\Debug\\cmTC_003f8.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-eg9cwy/Debug/cmTC_003f8.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/CMakeScratch/TryCompile-eg9cwy/Debug/cmTC_003f8.lib" /MACHINE:X64 /machine:x64 cmTC_003f8.dir\\Debug\\CMakeCXXCompilerABI.obj - cmTC_003f8.vcxproj -> F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-eg9cwy\\Debug\\cmTC_003f8.exe - FinalizeBuildStatus: - 正在删除文件“cmTC_003f8.dir\\Debug\\cmTC_003f8.tlog\\unsuccessfulbuild”。 - 正在对“cmTC_003f8.dir\\Debug\\cmTC_003f8.tlog\\cmTC_003f8.lastbuildstate”执行 Touch 任务。 - 已完成生成项目“F:\\Magic_Game\\project\\Magic_Game\\m_packages\\squirrel\\build\\CMakeFiles\\CMakeScratch\\TryCompile-eg9cwy\\cmTC_003f8.vcxproj”(默认目标)的操作。 - - 已成功生成。 - 0 个警告 - 0 个错误 - - 已用时间 00:00:00.47 - - exitCode: 0 -... diff --git a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-debug.cmake b/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-debug.cmake deleted file mode 100644 index e2a420d0..00000000 --- a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-debug.cmake +++ /dev/null @@ -1,67 +0,0 @@ -#---------------------------------------------------------------- -# Generated CMake target import file for configuration "Debug". -#---------------------------------------------------------------- - -# Commands may need to know the format version. -set(CMAKE_IMPORT_FILE_VERSION 1) - -# Import target "squirrel::squirrel" for configuration "Debug" -set_property(TARGET squirrel::squirrel APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -set_target_properties(squirrel::squirrel PROPERTIES - IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/squirrel.lib" - IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/squirrel.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel "${_IMPORT_PREFIX}/lib/squirrel.lib" "${_IMPORT_PREFIX}/bin/squirrel.dll" ) - -# Import target "squirrel::squirrel_static" for configuration "Debug" -set_property(TARGET squirrel::squirrel_static APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -set_target_properties(squirrel::squirrel_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" - IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/squirrel_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel_static ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel_static "${_IMPORT_PREFIX}/lib/squirrel_static.lib" ) - -# Import target "squirrel::sqstdlib" for configuration "Debug" -set_property(TARGET squirrel::sqstdlib APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -set_target_properties(squirrel::sqstdlib PROPERTIES - IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/sqstdlib.lib" - IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sqstdlib.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib "${_IMPORT_PREFIX}/lib/sqstdlib.lib" "${_IMPORT_PREFIX}/bin/sqstdlib.dll" ) - -# Import target "squirrel::sqstdlib_static" for configuration "Debug" -set_property(TARGET squirrel::sqstdlib_static APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -set_target_properties(squirrel::sqstdlib_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" - IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib_static ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib_static "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" ) - -# Import target "squirrel::interpreter" for configuration "Debug" -set_property(TARGET squirrel::interpreter APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -set_target_properties(squirrel::interpreter PROPERTIES - IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sq.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter "${_IMPORT_PREFIX}/bin/sq.exe" ) - -# Import target "squirrel::interpreter_static" for configuration "Debug" -set_property(TARGET squirrel::interpreter_static APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -set_target_properties(squirrel::interpreter_static PROPERTIES - IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/sq_static.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter_static ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter_static "${_IMPORT_PREFIX}/bin/sq_static.exe" ) - -# Commands beyond this point should not need to know the version. -set(CMAKE_IMPORT_FILE_VERSION) diff --git a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-minsizerel.cmake b/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-minsizerel.cmake deleted file mode 100644 index 501b9e3f..00000000 --- a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-minsizerel.cmake +++ /dev/null @@ -1,67 +0,0 @@ -#---------------------------------------------------------------- -# Generated CMake target import file for configuration "MinSizeRel". -#---------------------------------------------------------------- - -# Commands may need to know the format version. -set(CMAKE_IMPORT_FILE_VERSION 1) - -# Import target "squirrel::squirrel" for configuration "MinSizeRel" -set_property(TARGET squirrel::squirrel APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) -set_target_properties(squirrel::squirrel PROPERTIES - IMPORTED_IMPLIB_MINSIZEREL "${_IMPORT_PREFIX}/lib/squirrel.lib" - IMPORTED_LOCATION_MINSIZEREL "${_IMPORT_PREFIX}/bin/squirrel.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel "${_IMPORT_PREFIX}/lib/squirrel.lib" "${_IMPORT_PREFIX}/bin/squirrel.dll" ) - -# Import target "squirrel::squirrel_static" for configuration "MinSizeRel" -set_property(TARGET squirrel::squirrel_static APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) -set_target_properties(squirrel::squirrel_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_MINSIZEREL "CXX" - IMPORTED_LOCATION_MINSIZEREL "${_IMPORT_PREFIX}/lib/squirrel_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel_static ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel_static "${_IMPORT_PREFIX}/lib/squirrel_static.lib" ) - -# Import target "squirrel::sqstdlib" for configuration "MinSizeRel" -set_property(TARGET squirrel::sqstdlib APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) -set_target_properties(squirrel::sqstdlib PROPERTIES - IMPORTED_IMPLIB_MINSIZEREL "${_IMPORT_PREFIX}/lib/sqstdlib.lib" - IMPORTED_LOCATION_MINSIZEREL "${_IMPORT_PREFIX}/bin/sqstdlib.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib "${_IMPORT_PREFIX}/lib/sqstdlib.lib" "${_IMPORT_PREFIX}/bin/sqstdlib.dll" ) - -# Import target "squirrel::sqstdlib_static" for configuration "MinSizeRel" -set_property(TARGET squirrel::sqstdlib_static APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) -set_target_properties(squirrel::sqstdlib_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_MINSIZEREL "CXX" - IMPORTED_LOCATION_MINSIZEREL "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib_static ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib_static "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" ) - -# Import target "squirrel::interpreter" for configuration "MinSizeRel" -set_property(TARGET squirrel::interpreter APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) -set_target_properties(squirrel::interpreter PROPERTIES - IMPORTED_LOCATION_MINSIZEREL "${_IMPORT_PREFIX}/bin/sq.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter "${_IMPORT_PREFIX}/bin/sq.exe" ) - -# Import target "squirrel::interpreter_static" for configuration "MinSizeRel" -set_property(TARGET squirrel::interpreter_static APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) -set_target_properties(squirrel::interpreter_static PROPERTIES - IMPORTED_LOCATION_MINSIZEREL "${_IMPORT_PREFIX}/bin/sq_static.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter_static ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter_static "${_IMPORT_PREFIX}/bin/sq_static.exe" ) - -# Commands beyond this point should not need to know the version. -set(CMAKE_IMPORT_FILE_VERSION) diff --git a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-release.cmake b/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-release.cmake deleted file mode 100644 index 5eb6a10c..00000000 --- a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-release.cmake +++ /dev/null @@ -1,67 +0,0 @@ -#---------------------------------------------------------------- -# Generated CMake target import file for configuration "Release". -#---------------------------------------------------------------- - -# Commands may need to know the format version. -set(CMAKE_IMPORT_FILE_VERSION 1) - -# Import target "squirrel::squirrel" for configuration "Release" -set_property(TARGET squirrel::squirrel APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -set_target_properties(squirrel::squirrel PROPERTIES - IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/squirrel.lib" - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/squirrel.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel "${_IMPORT_PREFIX}/lib/squirrel.lib" "${_IMPORT_PREFIX}/bin/squirrel.dll" ) - -# Import target "squirrel::squirrel_static" for configuration "Release" -set_property(TARGET squirrel::squirrel_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -set_target_properties(squirrel::squirrel_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/squirrel_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel_static ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel_static "${_IMPORT_PREFIX}/lib/squirrel_static.lib" ) - -# Import target "squirrel::sqstdlib" for configuration "Release" -set_property(TARGET squirrel::sqstdlib APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -set_target_properties(squirrel::sqstdlib PROPERTIES - IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/sqstdlib.lib" - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sqstdlib.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib "${_IMPORT_PREFIX}/lib/sqstdlib.lib" "${_IMPORT_PREFIX}/bin/sqstdlib.dll" ) - -# Import target "squirrel::sqstdlib_static" for configuration "Release" -set_property(TARGET squirrel::sqstdlib_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -set_target_properties(squirrel::sqstdlib_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib_static ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib_static "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" ) - -# Import target "squirrel::interpreter" for configuration "Release" -set_property(TARGET squirrel::interpreter APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -set_target_properties(squirrel::interpreter PROPERTIES - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sq.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter "${_IMPORT_PREFIX}/bin/sq.exe" ) - -# Import target "squirrel::interpreter_static" for configuration "Release" -set_property(TARGET squirrel::interpreter_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -set_target_properties(squirrel::interpreter_static PROPERTIES - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/sq_static.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter_static ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter_static "${_IMPORT_PREFIX}/bin/sq_static.exe" ) - -# Commands beyond this point should not need to know the version. -set(CMAKE_IMPORT_FILE_VERSION) diff --git a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-relwithdebinfo.cmake b/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-relwithdebinfo.cmake deleted file mode 100644 index 585211d9..00000000 --- a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-relwithdebinfo.cmake +++ /dev/null @@ -1,67 +0,0 @@ -#---------------------------------------------------------------- -# Generated CMake target import file for configuration "RelWithDebInfo". -#---------------------------------------------------------------- - -# Commands may need to know the format version. -set(CMAKE_IMPORT_FILE_VERSION 1) - -# Import target "squirrel::squirrel" for configuration "RelWithDebInfo" -set_property(TARGET squirrel::squirrel APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) -set_target_properties(squirrel::squirrel PROPERTIES - IMPORTED_IMPLIB_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/squirrel.lib" - IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/bin/squirrel.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel "${_IMPORT_PREFIX}/lib/squirrel.lib" "${_IMPORT_PREFIX}/bin/squirrel.dll" ) - -# Import target "squirrel::squirrel_static" for configuration "RelWithDebInfo" -set_property(TARGET squirrel::squirrel_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) -set_target_properties(squirrel::squirrel_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELWITHDEBINFO "CXX" - IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/squirrel_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::squirrel_static ) -list(APPEND _cmake_import_check_files_for_squirrel::squirrel_static "${_IMPORT_PREFIX}/lib/squirrel_static.lib" ) - -# Import target "squirrel::sqstdlib" for configuration "RelWithDebInfo" -set_property(TARGET squirrel::sqstdlib APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) -set_target_properties(squirrel::sqstdlib PROPERTIES - IMPORTED_IMPLIB_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/sqstdlib.lib" - IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/bin/sqstdlib.dll" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib "${_IMPORT_PREFIX}/lib/sqstdlib.lib" "${_IMPORT_PREFIX}/bin/sqstdlib.dll" ) - -# Import target "squirrel::sqstdlib_static" for configuration "RelWithDebInfo" -set_property(TARGET squirrel::sqstdlib_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) -set_target_properties(squirrel::sqstdlib_static PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELWITHDEBINFO "CXX" - IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" - ) - -list(APPEND _cmake_import_check_targets squirrel::sqstdlib_static ) -list(APPEND _cmake_import_check_files_for_squirrel::sqstdlib_static "${_IMPORT_PREFIX}/lib/sqstdlib_static.lib" ) - -# Import target "squirrel::interpreter" for configuration "RelWithDebInfo" -set_property(TARGET squirrel::interpreter APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) -set_target_properties(squirrel::interpreter PROPERTIES - IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/bin/sq.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter "${_IMPORT_PREFIX}/bin/sq.exe" ) - -# Import target "squirrel::interpreter_static" for configuration "RelWithDebInfo" -set_property(TARGET squirrel::interpreter_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) -set_target_properties(squirrel::interpreter_static PROPERTIES - IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/bin/sq_static.exe" - ) - -list(APPEND _cmake_import_check_targets squirrel::interpreter_static ) -list(APPEND _cmake_import_check_files_for_squirrel::interpreter_static "${_IMPORT_PREFIX}/bin/sq_static.exe" ) - -# Commands beyond this point should not need to know the version. -set(CMAKE_IMPORT_FILE_VERSION) diff --git a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets.cmake b/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets.cmake deleted file mode 100644 index d51978c6..00000000 --- a/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets.cmake +++ /dev/null @@ -1,148 +0,0 @@ -# Generated by CMake - -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) - message(FATAL_ERROR "CMake >= 2.8.0 required") -endif() -if(CMAKE_VERSION VERSION_LESS "2.8.3") - message(FATAL_ERROR "CMake >= 2.8.3 required") -endif() -cmake_policy(PUSH) -cmake_policy(VERSION 2.8.3...3.26) -#---------------------------------------------------------------- -# Generated CMake target import file. -#---------------------------------------------------------------- - -# Commands may need to know the format version. -set(CMAKE_IMPORT_FILE_VERSION 1) - -# Protect against multiple inclusion, which would fail when already imported targets are added once more. -set(_cmake_targets_defined "") -set(_cmake_targets_not_defined "") -set(_cmake_expected_targets "") -foreach(_cmake_expected_target IN ITEMS squirrel::squirrel squirrel::squirrel_static squirrel::sqstdlib squirrel::sqstdlib_static squirrel::interpreter squirrel::interpreter_static) - list(APPEND _cmake_expected_targets "${_cmake_expected_target}") - if(TARGET "${_cmake_expected_target}") - list(APPEND _cmake_targets_defined "${_cmake_expected_target}") - else() - list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") - endif() -endforeach() -unset(_cmake_expected_target) -if(_cmake_targets_defined STREQUAL _cmake_expected_targets) - unset(_cmake_targets_defined) - unset(_cmake_targets_not_defined) - unset(_cmake_expected_targets) - unset(CMAKE_IMPORT_FILE_VERSION) - cmake_policy(POP) - return() -endif() -if(NOT _cmake_targets_defined STREQUAL "") - string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") - string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") - message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") -endif() -unset(_cmake_targets_defined) -unset(_cmake_targets_not_defined) -unset(_cmake_expected_targets) - - -# Compute the installation prefix relative to this file. -get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) -get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -if(_IMPORT_PREFIX STREQUAL "/") - set(_IMPORT_PREFIX "") -endif() - -# Create imported target squirrel::squirrel -add_library(squirrel::squirrel SHARED IMPORTED) - -set_target_properties(squirrel::squirrel PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "_SQ64" - INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" -) - -# Create imported target squirrel::squirrel_static -add_library(squirrel::squirrel_static STATIC IMPORTED) - -set_target_properties(squirrel::squirrel_static PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "_SQ64" - INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" -) - -# Create imported target squirrel::sqstdlib -add_library(squirrel::sqstdlib SHARED IMPORTED) - -set_target_properties(squirrel::sqstdlib PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "_SQ64" - INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" - INTERFACE_LINK_LIBRARIES "squirrel::squirrel" -) - -# Create imported target squirrel::sqstdlib_static -add_library(squirrel::sqstdlib_static STATIC IMPORTED) - -set_target_properties(squirrel::sqstdlib_static PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "_SQ64" - INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" -) - -# Create imported target squirrel::interpreter -add_executable(squirrel::interpreter IMPORTED) - -set_target_properties(squirrel::interpreter PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "_SQ64" - INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" -) - -# Create imported target squirrel::interpreter_static -add_executable(squirrel::interpreter_static IMPORTED) - -set_target_properties(squirrel::interpreter_static PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "_SQ64" - INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" -) - -if(CMAKE_VERSION VERSION_LESS 2.8.12) - message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") -endif() - -# Load information for each installed configuration. -file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/squirrel-targets-*.cmake") -foreach(_cmake_config_file IN LISTS _cmake_config_files) - include("${_cmake_config_file}") -endforeach() -unset(_cmake_config_file) -unset(_cmake_config_files) - -# Cleanup temporary variables. -set(_IMPORT_PREFIX) - -# Loop over all imported files and verify that they actually exist -foreach(_cmake_target IN LISTS _cmake_import_check_targets) - foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") - if(NOT EXISTS "${_cmake_file}") - message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file - \"${_cmake_file}\" -but this file does not exist. Possible reasons include: -* The file was deleted, renamed, or moved to another location. -* An install or uninstall procedure did not complete successfully. -* The installation package was faulty and contained - \"${CMAKE_CURRENT_LIST_FILE}\" -but not all the files it references. -") - endif() - endforeach() - unset(_cmake_file) - unset("_cmake_import_check_files_for_${_cmake_target}") -endforeach() -unset(_cmake_target) -unset(_cmake_import_check_targets) - -# This file does not depend on other imported targets which have -# been exported from the same project but in a separate export set. - -# Commands beyond this point should not need to know the version. -set(CMAKE_IMPORT_FILE_VERSION) -cmake_policy(POP) diff --git a/m_packages/squirrel/build/CMakeFiles/TargetDirectories.txt b/m_packages/squirrel/build/CMakeFiles/TargetDirectories.txt deleted file mode 100644 index bfaccccf..00000000 --- a/m_packages/squirrel/build/CMakeFiles/TargetDirectories.txt +++ /dev/null @@ -1,12 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/INSTALL.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/ALL_BUILD.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/ZERO_CHECK.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/squirrel.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/squirrel_static.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/INSTALL.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/sqstdlib.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/sqstdlib_static.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/INSTALL.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/sq.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/sq_static.dir -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/INSTALL.dir diff --git a/m_packages/squirrel/build/CMakeFiles/b34ac901fce3c2e1922e2b52d85c0d4c/INSTALL_force.rule b/m_packages/squirrel/build/CMakeFiles/b34ac901fce3c2e1922e2b52d85c0d4c/INSTALL_force.rule deleted file mode 100644 index 2d3998c9..00000000 --- a/m_packages/squirrel/build/CMakeFiles/b34ac901fce3c2e1922e2b52d85c0d4c/INSTALL_force.rule +++ /dev/null @@ -1 +0,0 @@ -# generated from CMake diff --git a/m_packages/squirrel/build/CMakeFiles/cmake.check_cache b/m_packages/squirrel/build/CMakeFiles/cmake.check_cache deleted file mode 100644 index 3dccd731..00000000 --- a/m_packages/squirrel/build/CMakeFiles/cmake.check_cache +++ /dev/null @@ -1 +0,0 @@ -# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/m_packages/squirrel/build/CMakeFiles/d5d6cdf48f9ac7620d3df431553ba7c5/INSTALL_force.rule b/m_packages/squirrel/build/CMakeFiles/d5d6cdf48f9ac7620d3df431553ba7c5/INSTALL_force.rule deleted file mode 100644 index 2d3998c9..00000000 --- a/m_packages/squirrel/build/CMakeFiles/d5d6cdf48f9ac7620d3df431553ba7c5/INSTALL_force.rule +++ /dev/null @@ -1 +0,0 @@ -# generated from CMake diff --git a/m_packages/squirrel/build/CMakeFiles/d5d6cdf48f9ac7620d3df431553ba7c5/generate.stamp.rule b/m_packages/squirrel/build/CMakeFiles/d5d6cdf48f9ac7620d3df431553ba7c5/generate.stamp.rule deleted file mode 100644 index 2d3998c9..00000000 --- a/m_packages/squirrel/build/CMakeFiles/d5d6cdf48f9ac7620d3df431553ba7c5/generate.stamp.rule +++ /dev/null @@ -1 +0,0 @@ -# generated from CMake diff --git a/m_packages/squirrel/build/CMakeFiles/d91de6650e51076a2ccfc3e8eeefc1fd/INSTALL_force.rule b/m_packages/squirrel/build/CMakeFiles/d91de6650e51076a2ccfc3e8eeefc1fd/INSTALL_force.rule deleted file mode 100644 index 2d3998c9..00000000 --- a/m_packages/squirrel/build/CMakeFiles/d91de6650e51076a2ccfc3e8eeefc1fd/INSTALL_force.rule +++ /dev/null @@ -1 +0,0 @@ -# generated from CMake diff --git a/m_packages/squirrel/build/CMakeFiles/generate.stamp b/m_packages/squirrel/build/CMakeFiles/generate.stamp deleted file mode 100644 index 9b5f49fa..00000000 --- a/m_packages/squirrel/build/CMakeFiles/generate.stamp +++ /dev/null @@ -1 +0,0 @@ -# CMake generation timestamp file for this directory. diff --git a/m_packages/squirrel/build/CMakeFiles/generate.stamp.depend b/m_packages/squirrel/build/CMakeFiles/generate.stamp.depend deleted file mode 100644 index f0e5fd3f..00000000 --- a/m_packages/squirrel/build/CMakeFiles/generate.stamp.depend +++ /dev/null @@ -1,110 +0,0 @@ -# CMake generation dependency list for this directory. -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCCompiler.cmake.in -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCCompilerABI.c -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCInformation.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCXXCompiler.cmake.in -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCXXInformation.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeCompilerIdDetection.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompileFeatures.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineRCCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeGenericSystem.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeInitializeConfigs.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakePackageConfigHelpers.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeParseImplicitIncludeInfo.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeParseImplicitLinkInfo.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeParseLibraryArchitecture.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeRCCompiler.cmake.in -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeRCInformation.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeSystem.cmake.in -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeSystemSpecificInformation.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeSystemSpecificInitialize.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeTestCCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeTestCompilerCommon.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CMakeTestRCCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/ADSP-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/ARMCC-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/ARMClang-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/AppleClang-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Borland-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Bruce-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Clang-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Clang-DetermineCompilerInternal.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Compaq-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Cray-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/CrayClang-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Embarcadero-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Fujitsu-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/GHS-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/GNU-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/HP-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/HP-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/IAR-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Intel-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/LCC-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/MSVC-C.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/MSVC-CXX.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/MSVC-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/MSVC.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/NVHPC-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/NVIDIA-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/OrangeC-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/PGI-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/PathScale-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/SCO-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/SDCC-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/SunPro-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/TI-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Tasking-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/Watcom-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/XL-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/XL-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/XLClang-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/zOS-C-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/CompilerId/VS-10.vcxproj.in -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/GNUInstallDirs.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Internal/FeatureTesting.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Platform/Windows-Determine-CXX.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Platform/Windows-Initialize.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Platform/Windows-MSVC-C.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Platform/Windows-MSVC-CXX.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Platform/Windows-MSVC.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Platform/Windows.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/Platform/WindowsPaths.cmake -F:/App/VisualStudio/IDE/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/WriteBasicConfigVersionFile.cmake -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/CMakeLists.txt -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCCompiler.cmake -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeCXXCompiler.cmake -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeRCCompiler.cmake -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/3.28.0-msvc1/CMakeSystem.cmake -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel-config.cmake.in -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel.pc.in diff --git a/m_packages/squirrel/build/CMakeFiles/generate.stamp.list b/m_packages/squirrel/build/CMakeFiles/generate.stamp.list deleted file mode 100644 index 1398424e..00000000 --- a/m_packages/squirrel/build/CMakeFiles/generate.stamp.list +++ /dev/null @@ -1,4 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/generate.stamp -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp diff --git a/m_packages/squirrel/build/INSTALL.vcxproj b/m_packages/squirrel/build/INSTALL.vcxproj deleted file mode 100644 index 4b75d440..00000000 --- a/m_packages/squirrel/build/INSTALL.vcxproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9} - Win32Proj - 10.0.22621.0 - x64 - INSTALL - NoUpgrade - - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\INSTALL_force - false - false - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {3A945C97-C785-35A2-B03C-822543E0A519} - ALL_BUILD - false - Never - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/INSTALL.vcxproj.filters b/m_packages/squirrel/build/INSTALL.vcxproj.filters deleted file mode 100644 index 90d40387..00000000 --- a/m_packages/squirrel/build/INSTALL.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - CMake Rules - - - - - {8BED4A11-8ACD-34FD-9D19-3930C61B3F88} - - - diff --git a/m_packages/squirrel/build/ZERO_CHECK.vcxproj b/m_packages/squirrel/build/ZERO_CHECK.vcxproj deleted file mode 100644 index 243c2d76..00000000 --- a/m_packages/squirrel/build/ZERO_CHECK.vcxproj +++ /dev/null @@ -1,178 +0,0 @@ - - - - x64 - - - false - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - Win32Proj - 10.0.22621.0 - x64 - ZERO_CHECK - NoUpgrade - - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - %(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - - - Always - true - Checking Build System - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel.sln -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sq\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sqstdlib\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel\CMakeLists.txt;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - true - Checking Build System - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel.sln -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sq\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sqstdlib\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel\CMakeLists.txt;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - true - Checking Build System - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel.sln -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sq\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sqstdlib\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel\CMakeLists.txt;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - true - Checking Build System - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel.sln -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCCompilerABI.c;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXCompilerABI.cpp;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCXXInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCommonLanguageInclude.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeCompilerIdDetection.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompileFeatures.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerABI.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineCompilerId.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeDetermineSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeFindBinUtils.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeGenericSystem.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeInitializeConfigs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeLanguageInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakePackageConfigHelpers.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitIncludeInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseImplicitLinkInfo.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeParseLibraryArchitecture.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCCompiler.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeRCInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystem.cmake.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInformation.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeSystemSpecificInitialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCXXCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestCompilerCommon.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CMakeTestRCCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ADSP-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMCC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\ARMClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\AppleClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Borland-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Bruce-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CMakeCommonCompilerMacros.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Clang-DetermineCompilerInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Comeau-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Compaq-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Cray-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\CrayClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Embarcadero-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Fujitsu-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\FujitsuClang-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GHS-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\GNU-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\HP-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IAR-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-C-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMCPP-CXX-DetermineVersionInternal.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IBMClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Intel-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\IntelLLVM-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\LCC-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVHPC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\NVIDIA-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OpenWatcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\OrangeC-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PGI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\PathScale-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SCO-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SDCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\SunPro-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TI-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Tasking-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\TinyCC-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\VisualAge-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\Watcom-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XL-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\XLClang-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-C-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Compiler\zOS-CXX-DetermineCompiler.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\CompilerId\VS-10.vcxproj.in;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\GNUInstallDirs.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Internal\FeatureTesting.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Determine-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-Initialize.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-C.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC-CXX.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows-MSVC.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\Windows.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\Platform\WindowsPaths.cmake;F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.28\Modules\WriteBasicConfigVersionFile.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeCXXCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeRCCompiler.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\3.28.0-msvc1\CMakeSystem.cmake;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sq\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\sqstdlib\CMakeLists.txt;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel-config.cmake.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel.pc.in;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\squirrel\CMakeLists.txt;%(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp;F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - - - - - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/ZERO_CHECK.vcxproj.filters b/m_packages/squirrel/build/ZERO_CHECK.vcxproj.filters deleted file mode 100644 index 8962805c..00000000 --- a/m_packages/squirrel/build/ZERO_CHECK.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - CMake Rules - - - - - {8BED4A11-8ACD-34FD-9D19-3930C61B3F88} - - - diff --git a/m_packages/squirrel/build/cmake_install.cmake b/m_packages/squirrel/build/cmake_install.cmake deleted file mode 100644 index 87f8abbc..00000000 --- a/m_packages/squirrel/build/cmake_install.cmake +++ /dev/null @@ -1,113 +0,0 @@ -# Install script for directory: F:/Magic_Game/project/Magic_Game/m_packages/squirrel - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/squirrel") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Release") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Is this installation the result of a crosscompile? -if(NOT DEFINED CMAKE_CROSSCOMPILING) - set(CMAKE_CROSSCOMPILING "FALSE") -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Development" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE FILE FILES - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/sqconfig.h" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/squirrel.h" - ) -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Development" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE FILE FILES - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/sqstdaux.h" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/sqstdblob.h" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/sqstdio.h" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/sqstdmath.h" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/sqstdstring.h" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/include/sqstdsystem.h" - ) -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Development" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel" TYPE FILE FILES - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/cmake/squirrel/squirrel-config-version.cmake" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/cmake/squirrel/squirrel-config.cmake" - ) -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Development" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" TYPE FILE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel.pc") -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Development" OR NOT CMAKE_INSTALL_COMPONENT) - if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel/squirrel-targets.cmake") - file(DIFFERENT _cmake_export_file_changed FILES - "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel/squirrel-targets.cmake" - "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets.cmake") - if(_cmake_export_file_changed) - file(GLOB _cmake_old_config_files "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel/squirrel-targets-*.cmake") - if(_cmake_old_config_files) - string(REPLACE ";" ", " _cmake_old_config_files_text "${_cmake_old_config_files}") - message(STATUS "Old export file \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel/squirrel-targets.cmake\" will be replaced. Removing files [${_cmake_old_config_files_text}].") - unset(_cmake_old_config_files_text) - file(REMOVE ${_cmake_old_config_files}) - endif() - unset(_cmake_old_config_files) - endif() - unset(_cmake_export_file_changed) - endif() - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel" TYPE FILE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets.cmake") - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel" TYPE FILE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-debug.cmake") - endif() - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel" TYPE FILE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-minsizerel.cmake") - endif() - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel" TYPE FILE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-relwithdebinfo.cmake") - endif() - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/squirrel" TYPE FILE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/CMakeFiles/Export/dafcadaba40601724742fc9ee142f030/squirrel-targets-release.cmake") - endif() -endif() - -if(NOT CMAKE_INSTALL_LOCAL_ONLY) - # Include the install script for each subdirectory. - include("F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/cmake_install.cmake") - include("F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/cmake_install.cmake") - include("F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/cmake_install.cmake") - -endif() - -if(CMAKE_INSTALL_COMPONENT) - set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") -else() - set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") -endif() - -string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT - "${CMAKE_INSTALL_MANIFEST_FILES}") -file(WRITE "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/${CMAKE_INSTALL_MANIFEST}" - "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp b/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp deleted file mode 100644 index 9b5f49fa..00000000 --- a/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp +++ /dev/null @@ -1 +0,0 @@ -# CMake generation timestamp file for this directory. diff --git a/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp.depend b/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp.depend deleted file mode 100644 index f78e38ed..00000000 --- a/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp.depend +++ /dev/null @@ -1,2 +0,0 @@ -# CMake generation dependency list for this directory. -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt diff --git a/m_packages/squirrel/build/sq/INSTALL.vcxproj b/m_packages/squirrel/build/sq/INSTALL.vcxproj deleted file mode 100644 index 9bea8aec..00000000 --- a/m_packages/squirrel/build/sq/INSTALL.vcxproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9} - Win32Proj - 10.0.22621.0 - x64 - INSTALL - NoUpgrade - - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\INSTALL_force - false - false - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {3A945C97-C785-35A2-B03C-822543E0A519} - ALL_BUILD - false - Never - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/sq/INSTALL.vcxproj.filters b/m_packages/squirrel/build/sq/INSTALL.vcxproj.filters deleted file mode 100644 index 336e5e7e..00000000 --- a/m_packages/squirrel/build/sq/INSTALL.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - CMake Rules - - - - - {8BED4A11-8ACD-34FD-9D19-3930C61B3F88} - - - diff --git a/m_packages/squirrel/build/sq/cmake_install.cmake b/m_packages/squirrel/build/sq/cmake_install.cmake deleted file mode 100644 index 19657808..00000000 --- a/m_packages/squirrel/build/sq/cmake_install.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# Install script for directory: F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/squirrel") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Release") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Is this installation the result of a crosscompile? -if(NOT DEFINED CMAKE_CROSSCOMPILING) - set(CMAKE_CROSSCOMPILING "FALSE") -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Runtime" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/sq.exe") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/sq.exe") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/sq.exe") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/sq.exe") - endif() -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Runtime" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/sq_static.exe") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/sq_static.exe") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/sq_static.exe") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/sq_static.exe") - endif() -endif() - diff --git a/m_packages/squirrel/build/sq/sq.vcxproj b/m_packages/squirrel/build/sq/sq.vcxproj deleted file mode 100644 index 353449e3..00000000 --- a/m_packages/squirrel/build/sq/sq.vcxproj +++ /dev/null @@ -1,337 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184} - Win32Proj - 10.0.22621.0 - x64 - sq - NoUpgrade - - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Debug\ - sq.dir\Debug\ - sq - .exe - true - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Release\ - sq.dir\Release\ - sq - .exe - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\MinSizeRel\ - sq.dir\MinSizeRel\ - sq - .exe - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\RelWithDebInfo\ - sq.dir\RelWithDebInfo\ - sq - .exe - true - true - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - EnableFastChecks - ProgramDatabase - - - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\Debug\sqstdlib.lib;..\lib\Debug\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/sq.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/sq.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - - - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\Release\sqstdlib.lib;..\lib\Release\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/sq.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/sq.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - - - OnlyExplicitInline - MinSpace - NotUsing - MultiThreadedDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\MinSizeRel\sqstdlib.lib;..\lib\MinSizeRel\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/sq.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/sq.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - ProgramDatabase - - - OnlyExplicitInline - MaxSpeed - NotUsing - MultiThreadedDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\RelWithDebInfo\sqstdlib.lib;..\lib\RelWithDebInfo\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/sq.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/sq.pdb - Console - - - false - - - - - Always - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - - - - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {A08064B5-BCE0-3321-89AE-9702449A7DAB} - sqstdlib - - - {CDEEC194-9F6C-3A7B-9A26-4388BA201311} - squirrel - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/sq/sq.vcxproj.filters b/m_packages/squirrel/build/sq/sq.vcxproj.filters deleted file mode 100644 index 461e52c3..00000000 --- a/m_packages/squirrel/build/sq/sq.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Source Files - - - - - - - - {7A0E404A-E4A4-3B73-9CEE-DA8D8A901BD1} - - - diff --git a/m_packages/squirrel/build/sq/sq_static.vcxproj b/m_packages/squirrel/build/sq/sq_static.vcxproj deleted file mode 100644 index c1bc043d..00000000 --- a/m_packages/squirrel/build/sq/sq_static.vcxproj +++ /dev/null @@ -1,337 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {7453F643-9077-3653-9215-251A8BBC9911} - Win32Proj - 10.0.22621.0 - x64 - sq_static - NoUpgrade - - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Debug\ - sq_static.dir\Debug\ - sq_static - .exe - true - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Release\ - sq_static.dir\Release\ - sq_static - .exe - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\MinSizeRel\ - sq_static.dir\MinSizeRel\ - sq_static - .exe - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\RelWithDebInfo\ - sq_static.dir\RelWithDebInfo\ - sq_static - .exe - true - true - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - EnableFastChecks - ProgramDatabase - - - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\Debug\squirrel_static.lib;..\lib\Debug\sqstdlib_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/sq_static.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/sq_static.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - - - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\Release\squirrel_static.lib;..\lib\Release\sqstdlib_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/sq_static.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/sq_static.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - - - OnlyExplicitInline - MinSpace - NotUsing - MultiThreadedDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\MinSizeRel\squirrel_static.lib;..\lib\MinSizeRel\sqstdlib_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/sq_static.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/sq_static.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - ProgramDatabase - - - OnlyExplicitInline - MaxSpeed - NotUsing - MultiThreadedDLL - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - ..\lib\RelWithDebInfo\squirrel_static.lib;..\lib\RelWithDebInfo\sqstdlib_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/sq_static.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/sq_static.pdb - Console - - - false - - - - - Always - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sq/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sq/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sq\CMakeFiles\generate.stamp - false - - - - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {55256B84-34E3-30E3-8A7C-2F5F832AEA13} - sqstdlib_static - - - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD} - squirrel_static - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/sq/sq_static.vcxproj.filters b/m_packages/squirrel/build/sq/sq_static.vcxproj.filters deleted file mode 100644 index 461e52c3..00000000 --- a/m_packages/squirrel/build/sq/sq_static.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Source Files - - - - - - - - {7A0E404A-E4A4-3B73-9CEE-DA8D8A901BD1} - - - diff --git a/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp b/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp deleted file mode 100644 index 9b5f49fa..00000000 --- a/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp +++ /dev/null @@ -1 +0,0 @@ -# CMake generation timestamp file for this directory. diff --git a/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp.depend b/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp.depend deleted file mode 100644 index e8885eaf..00000000 --- a/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp.depend +++ /dev/null @@ -1,2 +0,0 @@ -# CMake generation dependency list for this directory. -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt diff --git a/m_packages/squirrel/build/sqstdlib/INSTALL.vcxproj b/m_packages/squirrel/build/sqstdlib/INSTALL.vcxproj deleted file mode 100644 index a341692c..00000000 --- a/m_packages/squirrel/build/sqstdlib/INSTALL.vcxproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9} - Win32Proj - 10.0.22621.0 - x64 - INSTALL - NoUpgrade - - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\INSTALL_force - false - false - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {3A945C97-C785-35A2-B03C-822543E0A519} - ALL_BUILD - false - Never - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/sqstdlib/INSTALL.vcxproj.filters b/m_packages/squirrel/build/sqstdlib/INSTALL.vcxproj.filters deleted file mode 100644 index b7acf892..00000000 --- a/m_packages/squirrel/build/sqstdlib/INSTALL.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - CMake Rules - - - - - {8BED4A11-8ACD-34FD-9D19-3930C61B3F88} - - - diff --git a/m_packages/squirrel/build/sqstdlib/cmake_install.cmake b/m_packages/squirrel/build/sqstdlib/cmake_install.cmake deleted file mode 100644 index 02a52463..00000000 --- a/m_packages/squirrel/build/sqstdlib/cmake_install.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# Install script for directory: F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/squirrel") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Release") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Is this installation the result of a crosscompile? -if(NOT DEFINED CMAKE_CROSSCOMPILING) - set(CMAKE_CROSSCOMPILING "FALSE") -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Libraries" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/sqstdlib.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/sqstdlib.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/sqstdlib.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/sqstdlib.lib") - endif() -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Libraries" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/sqstdlib.dll") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/sqstdlib.dll") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/sqstdlib.dll") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/sqstdlib.dll") - endif() -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Development" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/sqstdlib_static.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/sqstdlib_static.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/sqstdlib_static.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/sqstdlib_static.lib") - endif() -endif() - diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/objects.txt b/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/objects.txt deleted file mode 100644 index 5dbf1230..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/objects.txt +++ /dev/null @@ -1,8 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdaux.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdblob.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdio.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdmath.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdrex.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdstream.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdstring.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/sqstdsystem.obj diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/objects.txt b/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/objects.txt deleted file mode 100644 index 6e036bf9..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/objects.txt +++ /dev/null @@ -1,8 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdaux.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdblob.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdio.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdmath.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdrex.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdstream.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdstring.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/sqstdsystem.obj diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/objects.txt b/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/objects.txt deleted file mode 100644 index 916240c2..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/objects.txt +++ /dev/null @@ -1,8 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdaux.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdblob.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdio.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdmath.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdrex.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdstream.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdstring.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/sqstdsystem.obj diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/objects.txt b/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/objects.txt deleted file mode 100644 index ffd80f0e..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/objects.txt +++ /dev/null @@ -1,8 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdaux.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdblob.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdio.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdmath.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdrex.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdstream.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdstring.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/sqstdsystem.obj diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib.vcxproj b/m_packages/squirrel/build/sqstdlib/sqstdlib.vcxproj deleted file mode 100644 index af953382..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib.vcxproj +++ /dev/null @@ -1,413 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {A08064B5-BCE0-3321-89AE-9702449A7DAB} - Win32Proj - 10.0.22621.0 - x64 - sqstdlib - NoUpgrade - - - - DynamicLibrary - MultiByte - v143 - - - DynamicLibrary - MultiByte - v143 - - - DynamicLibrary - MultiByte - v143 - - - DynamicLibrary - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Debug\ - sqstdlib.dir\Debug\ - sqstdlib - .dll - true - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Release\ - sqstdlib.dir\Release\ - sqstdlib - .dll - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\MinSizeRel\ - sqstdlib.dir\MinSizeRel\ - sqstdlib - .dll - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\RelWithDebInfo\ - sqstdlib.dir\RelWithDebInfo\ - sqstdlib - .dll - true - true - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - EnableFastChecks - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug";sqstdlib_EXPORTS - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\";sqstdlib_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - ..\lib\Debug\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/sqstdlib.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Debug/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/sqstdlib.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release";sqstdlib_EXPORTS - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\";sqstdlib_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - ..\lib\Release\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/sqstdlib.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/Release/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/sqstdlib.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - OnlyExplicitInline - MinSpace - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel";sqstdlib_EXPORTS - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\";sqstdlib_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - ..\lib\MinSizeRel\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/sqstdlib.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/MinSizeRel/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/sqstdlib.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - ProgramDatabase - Sync - OnlyExplicitInline - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo";sqstdlib_EXPORTS - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\";sqstdlib_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - ..\lib\RelWithDebInfo\squirrel.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/sqstdlib.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/sqstdlib.dir/RelWithDebInfo/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/sqstdlib.pdb - Console - - - false - - - - - Always - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - - - - - - - - - - - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {CDEEC194-9F6C-3A7B-9A26-4388BA201311} - squirrel - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib.vcxproj.filters b/m_packages/squirrel/build/sqstdlib/sqstdlib.vcxproj.filters deleted file mode 100644 index 7ec6b317..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib.vcxproj.filters +++ /dev/null @@ -1,37 +0,0 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - {7A0E404A-E4A4-3B73-9CEE-DA8D8A901BD1} - - - diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdaux.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdaux.obj deleted file mode 100644 index c333a703..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdaux.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdblob.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdblob.obj deleted file mode 100644 index c9b54e30..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdblob.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdio.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdio.obj deleted file mode 100644 index 947e60ea..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdio.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.Build.CppClean.log b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.Build.CppClean.log deleted file mode 100644 index ddcfb266..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.Build.CppClean.log +++ /dev/null @@ -1,20 +0,0 @@ -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdsystem.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdstring.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdstream.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdrex.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdmath.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdio.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdblob.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdaux.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\cmakefiles\generate.stamp -f:\magic_game\project\magic_game\m_packages\squirrel\build\lib\release\sqstdlib_static.lib -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\cl.command.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\cl.items.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\cl.read.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\cl.write.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\custombuild.command.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\custombuild.read.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\custombuild.write.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\lib-link.read.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\lib-link.write.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\sqstdlib\sqstdlib_static.dir\release\sqstdlib_static.tlog\lib.command.1.tlog diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.lib.recipe b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.lib.recipe deleted file mode 100644 index a53f9611..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.lib.recipe +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.log b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.log deleted file mode 100644 index bc4d7978..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.log +++ /dev/null @@ -1,10 +0,0 @@ - sqstdaux.cpp - sqstdblob.cpp - sqstdio.cpp - sqstdmath.cpp - sqstdrex.cpp - sqstdstream.cpp - sqstdstring.cpp - sqstdsystem.cpp - 正在生成代码... - sqstdlib_static.vcxproj -> F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\Release\sqstdlib_static.lib diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.command.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.command.1.tlog deleted file mode 100644 index adea81ff..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.command.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.read.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.read.1.tlog deleted file mode 100644 index ec72621d..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.read.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.write.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.write.1.tlog deleted file mode 100644 index 687cfdc2..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CL.write.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.command.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.command.1.tlog deleted file mode 100644 index b7f3569b..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.command.1.tlog +++ /dev/null @@ -1,10 +0,0 @@ -^F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\SQSTDLIB\CMAKELISTS.TXT -setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.read.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.read.1.tlog deleted file mode 100644 index 93eabf47..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -^F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\SQSTDLIB\CMAKELISTS.TXT diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.write.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.write.1.tlog deleted file mode 100644 index 36aa3696..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/CustomBuild.write.1.tlog +++ /dev/null @@ -1,2 +0,0 @@ -^F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\SQSTDLIB\CMAKELISTS.TXT -F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\BUILD\SQSTDLIB\CMAKEFILES\GENERATE.STAMP diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib-link.read.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib-link.read.1.tlog deleted file mode 100644 index 2d7ea0fa..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib-link.read.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib-link.write.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib-link.write.1.tlog deleted file mode 100644 index 07764ce1..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib-link.write.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib.command.1.tlog b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib.command.1.tlog deleted file mode 100644 index eca6f524..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/Lib.command.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/sqstdlib_static.lastbuildstate b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/sqstdlib_static.lastbuildstate deleted file mode 100644 index 6de37a3d..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.tlog/sqstdlib_static.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0: -Release|x64|F:\Magic_Game\project\Magic_Game\| diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.vcxproj.FileListAbsolute.txt b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdlib_static.vcxproj.FileListAbsolute.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdmath.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdmath.obj deleted file mode 100644 index 53eefc27..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdmath.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdrex.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdrex.obj deleted file mode 100644 index f95f6a6d..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdrex.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdstream.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdstream.obj deleted file mode 100644 index ab76497f..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdstream.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdstring.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdstring.obj deleted file mode 100644 index b174fdc5..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdstring.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdsystem.obj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdsystem.obj deleted file mode 100644 index de220cf0..00000000 Binary files a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.dir/Release/sqstdsystem.obj and /dev/null differ diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.vcxproj b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.vcxproj deleted file mode 100644 index 6e29dbeb..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.vcxproj +++ /dev/null @@ -1,288 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {C76C34C2-5D15-3AC8-9F90-65164B0953F5} - Win32Proj - 10.0.22621.0 - x64 - sqstdlib_static - NoUpgrade - - - - StaticLibrary - MultiByte - v143 - - - StaticLibrary - Unicode - v143 - - - StaticLibrary - MultiByte - v143 - - - StaticLibrary - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\Debug\ - sqstdlib_static.dir\Debug\ - sqstdlib_static - .lib - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\Release\ - sqstdlib_static.dir\Release\ - sqstdlib_static - .lib - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\MinSizeRel\ - sqstdlib_static.dir\MinSizeRel\ - sqstdlib_static - .lib - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\RelWithDebInfo\ - sqstdlib_static.dir\RelWithDebInfo\ - sqstdlib_static - .lib - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - EnableFastChecks - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - OnlyExplicitInline - MinSpace - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - ProgramDatabase - Sync - OnlyExplicitInline - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - Always - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/sqstdlib/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/sqstdlib/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\sqstdlib\CMakeFiles\generate.stamp - false - - - - - - - - - - - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.vcxproj.filters b/m_packages/squirrel/build/sqstdlib/sqstdlib_static.vcxproj.filters deleted file mode 100644 index 7ec6b317..00000000 --- a/m_packages/squirrel/build/sqstdlib/sqstdlib_static.vcxproj.filters +++ /dev/null @@ -1,37 +0,0 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - {7A0E404A-E4A4-3B73-9CEE-DA8D8A901BD1} - - - diff --git a/m_packages/squirrel/build/squirrel.pc b/m_packages/squirrel/build/squirrel.pc deleted file mode 100644 index 124aaae4..00000000 --- a/m_packages/squirrel/build/squirrel.pc +++ /dev/null @@ -1,12 +0,0 @@ -prefix=C:/Program Files (x86)/squirrel -libdir=C:/Program Files (x86)/squirrel/lib -includedir=C:/Program Files (x86)/squirrel/include - -Name: squirrel -Version: 3.2 -Description: The Squirrel programming language -URL: http://squirrel-lang.org/ -Requires: -Provides: squirrel3 = 3.2 -Libs: -L${libdir} -lsquirrel -lsqstdlib -Cflags: -I${includedir} diff --git a/m_packages/squirrel/build/squirrel.sln b/m_packages/squirrel/build/squirrel.sln deleted file mode 100644 index 9b722535..00000000 --- a/m_packages/squirrel/build/squirrel.sln +++ /dev/null @@ -1,142 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxproj", "{3A945C97-C785-35A2-B03C-822543E0A519}" - ProjectSection(ProjectDependencies) = postProject - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184} = {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184} - {7453F643-9077-3653-9215-251A8BBC9911} = {7453F643-9077-3653-9215-251A8BBC9911} - {A08064B5-BCE0-3321-89AE-9702449A7DAB} = {A08064B5-BCE0-3321-89AE-9702449A7DAB} - {55256B84-34E3-30E3-8A7C-2F5F832AEA13} = {55256B84-34E3-30E3-8A7C-2F5F832AEA13} - {CDEEC194-9F6C-3A7B-9A26-4388BA201311} = {CDEEC194-9F6C-3A7B-9A26-4388BA201311} - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD} = {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INSTALL", "INSTALL.vcxproj", "{AF93E204-4CB9-36C3-A8ED-0C75A362B3A9}" - ProjectSection(ProjectDependencies) = postProject - {3A945C97-C785-35A2-B03C-822543E0A519} = {3A945C97-C785-35A2-B03C-822543E0A519} - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "ZERO_CHECK.vcxproj", "{0D0E785A-573C-3CD8-ADD4-F64DA735CD04}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sq", "sq\sq.vcxproj", "{BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}" - ProjectSection(ProjectDependencies) = postProject - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - {A08064B5-BCE0-3321-89AE-9702449A7DAB} = {A08064B5-BCE0-3321-89AE-9702449A7DAB} - {CDEEC194-9F6C-3A7B-9A26-4388BA201311} = {CDEEC194-9F6C-3A7B-9A26-4388BA201311} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sq_static", "sq\sq_static.vcxproj", "{7453F643-9077-3653-9215-251A8BBC9911}" - ProjectSection(ProjectDependencies) = postProject - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - {55256B84-34E3-30E3-8A7C-2F5F832AEA13} = {55256B84-34E3-30E3-8A7C-2F5F832AEA13} - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD} = {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqstdlib", "sqstdlib\sqstdlib.vcxproj", "{A08064B5-BCE0-3321-89AE-9702449A7DAB}" - ProjectSection(ProjectDependencies) = postProject - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - {CDEEC194-9F6C-3A7B-9A26-4388BA201311} = {CDEEC194-9F6C-3A7B-9A26-4388BA201311} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqstdlib_static", "sqstdlib\sqstdlib_static.vcxproj", "{55256B84-34E3-30E3-8A7C-2F5F832AEA13}" - ProjectSection(ProjectDependencies) = postProject - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "squirrel", "squirrel\squirrel.vcxproj", "{CDEEC194-9F6C-3A7B-9A26-4388BA201311}" - ProjectSection(ProjectDependencies) = postProject - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "squirrel_static", "squirrel\squirrel_static.vcxproj", "{29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}" - ProjectSection(ProjectDependencies) = postProject - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} = {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - MinSizeRel|x64 = MinSizeRel|x64 - RelWithDebInfo|x64 = RelWithDebInfo|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3A945C97-C785-35A2-B03C-822543E0A519}.Debug|x64.ActiveCfg = Debug|x64 - {3A945C97-C785-35A2-B03C-822543E0A519}.Debug|x64.Build.0 = Debug|x64 - {3A945C97-C785-35A2-B03C-822543E0A519}.Release|x64.ActiveCfg = Release|x64 - {3A945C97-C785-35A2-B03C-822543E0A519}.Release|x64.Build.0 = Release|x64 - {3A945C97-C785-35A2-B03C-822543E0A519}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {3A945C97-C785-35A2-B03C-822543E0A519}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {3A945C97-C785-35A2-B03C-822543E0A519}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {3A945C97-C785-35A2-B03C-822543E0A519}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9}.Debug|x64.ActiveCfg = Debug|x64 - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9}.Release|x64.ActiveCfg = Release|x64 - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.Debug|x64.ActiveCfg = Debug|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.Debug|x64.Build.0 = Debug|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.Release|x64.ActiveCfg = Release|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.Release|x64.Build.0 = Release|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.Debug|x64.ActiveCfg = Debug|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.Debug|x64.Build.0 = Debug|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.Release|x64.ActiveCfg = Release|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.Release|x64.Build.0 = Release|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {BB5A9E7D-CC15-3D76-A0BF-8E2B05854184}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.Debug|x64.ActiveCfg = Debug|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.Debug|x64.Build.0 = Debug|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.Release|x64.ActiveCfg = Release|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.Release|x64.Build.0 = Release|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {7453F643-9077-3653-9215-251A8BBC9911}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.Debug|x64.ActiveCfg = Debug|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.Debug|x64.Build.0 = Debug|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.Release|x64.ActiveCfg = Release|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.Release|x64.Build.0 = Release|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {A08064B5-BCE0-3321-89AE-9702449A7DAB}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.Debug|x64.ActiveCfg = Debug|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.Debug|x64.Build.0 = Debug|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.Release|x64.ActiveCfg = Release|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.Release|x64.Build.0 = Release|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {55256B84-34E3-30E3-8A7C-2F5F832AEA13}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.Debug|x64.ActiveCfg = Debug|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.Debug|x64.Build.0 = Debug|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.Release|x64.ActiveCfg = Release|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.Release|x64.Build.0 = Release|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {CDEEC194-9F6C-3A7B-9A26-4388BA201311}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.Debug|x64.ActiveCfg = Debug|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.Debug|x64.Build.0 = Debug|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.Release|x64.ActiveCfg = Release|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.Release|x64.Build.0 = Release|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {29651940-AE1F-3D21-9FE9-9EF5A28FA8FD}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {897A6388-1397-37CC-80E6-81EB51FF4D79} - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp b/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp deleted file mode 100644 index 9b5f49fa..00000000 --- a/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp +++ /dev/null @@ -1 +0,0 @@ -# CMake generation timestamp file for this directory. diff --git a/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp.depend b/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp.depend deleted file mode 100644 index 60f4619f..00000000 --- a/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp.depend +++ /dev/null @@ -1,2 +0,0 @@ -# CMake generation dependency list for this directory. -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt diff --git a/m_packages/squirrel/build/squirrel/INSTALL.vcxproj b/m_packages/squirrel/build/squirrel/INSTALL.vcxproj deleted file mode 100644 index b627529e..00000000 --- a/m_packages/squirrel/build/squirrel/INSTALL.vcxproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {AF93E204-4CB9-36C3-A8ED-0C75A362B3A9} - Win32Proj - 10.0.22621.0 - x64 - INSTALL - NoUpgrade - - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - Utility - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - Always - - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - - - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\INSTALL_force - false - false - true - - setlocal -cd . -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\INSTALL_force - false - false - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - {3A945C97-C785-35A2-B03C-822543E0A519} - ALL_BUILD - false - Never - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/squirrel/INSTALL.vcxproj.filters b/m_packages/squirrel/build/squirrel/INSTALL.vcxproj.filters deleted file mode 100644 index 9a73b4aa..00000000 --- a/m_packages/squirrel/build/squirrel/INSTALL.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - CMake Rules - - - - - {8BED4A11-8ACD-34FD-9D19-3930C61B3F88} - - - diff --git a/m_packages/squirrel/build/squirrel/cmake_install.cmake b/m_packages/squirrel/build/squirrel/cmake_install.cmake deleted file mode 100644 index 9aa7118b..00000000 --- a/m_packages/squirrel/build/squirrel/cmake_install.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# Install script for directory: F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/squirrel") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Release") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Is this installation the result of a crosscompile? -if(NOT DEFINED CMAKE_CROSSCOMPILING) - set(CMAKE_CROSSCOMPILING "FALSE") -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Libraries" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/squirrel.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/squirrel.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/squirrel.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/squirrel.lib") - endif() -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Libraries" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/squirrel.dll") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/squirrel.dll") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/squirrel.dll") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE SHARED_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/squirrel.dll") - endif() -endif() - -if(CMAKE_INSTALL_COMPONENT STREQUAL "Development" OR NOT CMAKE_INSTALL_COMPONENT) - if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/squirrel_static.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/squirrel_static.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/squirrel_static.lib") - elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/squirrel_static.lib") - endif() -endif() - diff --git a/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/objects.txt b/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/objects.txt deleted file mode 100644 index b1159400..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/objects.txt +++ /dev/null @@ -1,12 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqapi.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqbaselib.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqclass.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqcompiler.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqdebug.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqfuncstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqlexer.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqmem.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqobject.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqtable.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/sqvm.obj diff --git a/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/objects.txt b/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/objects.txt deleted file mode 100644 index 36a0efac..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/objects.txt +++ /dev/null @@ -1,12 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqapi.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqbaselib.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqclass.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqcompiler.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqdebug.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqfuncstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqlexer.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqmem.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqobject.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqtable.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/sqvm.obj diff --git a/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/objects.txt b/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/objects.txt deleted file mode 100644 index 76b412ed..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/objects.txt +++ /dev/null @@ -1,12 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqapi.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqbaselib.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqclass.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqcompiler.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqdebug.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqfuncstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqlexer.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqmem.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqobject.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqtable.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/sqvm.obj diff --git a/m_packages/squirrel/build/squirrel/squirrel.dir/Release/objects.txt b/m_packages/squirrel/build/squirrel/squirrel.dir/Release/objects.txt deleted file mode 100644 index 85a572b9..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel.dir/Release/objects.txt +++ /dev/null @@ -1,12 +0,0 @@ -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqapi.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqbaselib.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqclass.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqcompiler.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqdebug.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqfuncstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqlexer.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqmem.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqobject.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqstate.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqtable.obj -F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/sqvm.obj diff --git a/m_packages/squirrel/build/squirrel/squirrel.vcxproj b/m_packages/squirrel/build/squirrel/squirrel.vcxproj deleted file mode 100644 index 525caa14..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel.vcxproj +++ /dev/null @@ -1,413 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {CDEEC194-9F6C-3A7B-9A26-4388BA201311} - Win32Proj - 10.0.22621.0 - x64 - squirrel - NoUpgrade - - - - DynamicLibrary - MultiByte - v143 - - - DynamicLibrary - MultiByte - v143 - - - DynamicLibrary - MultiByte - v143 - - - DynamicLibrary - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Debug\ - squirrel.dir\Debug\ - squirrel - .dll - true - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\Release\ - squirrel.dir\Release\ - squirrel - .dll - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\MinSizeRel\ - squirrel.dir\MinSizeRel\ - squirrel - .dll - false - true - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\bin\RelWithDebInfo\ - squirrel.dir\RelWithDebInfo\ - squirrel - .dll - true - true - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - EnableFastChecks - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug";squirrel_EXPORTS - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\";squirrel_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Debug/squirrel.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Debug/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Debug/squirrel.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release";squirrel_EXPORTS - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\";squirrel_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/Release/squirrel.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/Release/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/Release/squirrel.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - OnlyExplicitInline - MinSpace - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel";squirrel_EXPORTS - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\";squirrel_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/MinSizeRel/squirrel.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/MinSizeRel/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/MinSizeRel/squirrel.pdb - Console - - - false - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - ProgramDatabase - Sync - OnlyExplicitInline - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo";squirrel_EXPORTS - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\";squirrel_EXPORTS - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - Always - Auto build dll exports - setlocal -cd F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel -if %errorlevel% neq 0 goto :cmEnd -F: -if %errorlevel% neq 0 goto :cmEnd -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E __create_def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/exports.def F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo//objects.txt -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x64 - true - %(IgnoreSpecificDefaultLibraries) - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/lib/RelWithDebInfo/squirrel.lib - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/squirrel.dir/RelWithDebInfo/exports.def - F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/bin/RelWithDebInfo/squirrel.pdb - Console - - - false - - - - - Always - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - - - - - - - - - - - - - - - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/squirrel/squirrel.vcxproj.filters b/m_packages/squirrel/build/squirrel/squirrel.vcxproj.filters deleted file mode 100644 index 905eea13..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel.vcxproj.filters +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - {7A0E404A-E4A4-3B73-9CEE-DA8D8A901BD1} - - - diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqapi.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqapi.obj deleted file mode 100644 index 63acd97f..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqapi.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqbaselib.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqbaselib.obj deleted file mode 100644 index a87edcaa..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqbaselib.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqclass.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqclass.obj deleted file mode 100644 index 881a332b..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqclass.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqcompiler.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqcompiler.obj deleted file mode 100644 index aee913f0..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqcompiler.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqdebug.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqdebug.obj deleted file mode 100644 index bb16dc8a..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqdebug.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqfuncstate.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqfuncstate.obj deleted file mode 100644 index b69a4437..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqfuncstate.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqlexer.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqlexer.obj deleted file mode 100644 index cdd8e8aa..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqlexer.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqmem.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqmem.obj deleted file mode 100644 index 41f196bc..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqmem.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqobject.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqobject.obj deleted file mode 100644 index 68eab63e..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqobject.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqstate.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqstate.obj deleted file mode 100644 index 900adc81..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqstate.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqtable.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqtable.obj deleted file mode 100644 index 0f2de859..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqtable.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.Build.CppClean.log b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.Build.CppClean.log deleted file mode 100644 index 38a3aab5..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.Build.CppClean.log +++ /dev/null @@ -1,24 +0,0 @@ -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqvm.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqtable.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqstate.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqobject.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqmem.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqlexer.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqfuncstate.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqdebug.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqcompiler.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqclass.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqbaselib.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\sqapi.obj -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\cmakefiles\generate.stamp -f:\magic_game\project\magic_game\m_packages\squirrel\build\lib\release\squirrel_static.lib -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\cl.command.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\cl.items.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\cl.read.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\cl.write.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\custombuild.command.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\custombuild.read.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\custombuild.write.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\lib-link.read.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\lib-link.write.1.tlog -f:\magic_game\project\magic_game\m_packages\squirrel\build\squirrel\squirrel_static.dir\release\squirrel_static.tlog\lib.command.1.tlog diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.lib.recipe b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.lib.recipe deleted file mode 100644 index a53f9611..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.lib.recipe +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.log b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.log deleted file mode 100644 index fc4ba593..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.log +++ /dev/null @@ -1,14 +0,0 @@ - sqapi.cpp - sqbaselib.cpp - sqclass.cpp - sqcompiler.cpp - sqdebug.cpp - sqfuncstate.cpp - sqlexer.cpp - sqmem.cpp - sqobject.cpp - sqstate.cpp - sqtable.cpp - sqvm.cpp - 正在生成代码... - squirrel_static.vcxproj -> F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\Release\squirrel_static.lib diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.command.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.command.1.tlog deleted file mode 100644 index 73cef2eb..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.command.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.read.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.read.1.tlog deleted file mode 100644 index f8538f6f..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.read.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.write.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.write.1.tlog deleted file mode 100644 index 04e501eb..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CL.write.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.command.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.command.1.tlog deleted file mode 100644 index 6f3f7b4f..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.command.1.tlog +++ /dev/null @@ -1,10 +0,0 @@ -^F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\SQUIRREL\CMAKELISTS.TXT -setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.read.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.read.1.tlog deleted file mode 100644 index e57eb96e..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -^F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\SQUIRREL\CMAKELISTS.TXT diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.write.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.write.1.tlog deleted file mode 100644 index 0bca78dc..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/CustomBuild.write.1.tlog +++ /dev/null @@ -1,2 +0,0 @@ -^F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\SQUIRREL\CMAKELISTS.TXT -F:\MAGIC_GAME\PROJECT\MAGIC_GAME\M_PACKAGES\SQUIRREL\BUILD\SQUIRREL\CMAKEFILES\GENERATE.STAMP diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib-link.read.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib-link.read.1.tlog deleted file mode 100644 index 219dd000..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib-link.read.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib-link.write.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib-link.write.1.tlog deleted file mode 100644 index 43c8fd24..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib-link.write.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib.command.1.tlog b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib.command.1.tlog deleted file mode 100644 index 9fe9502b..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/Lib.command.1.tlog and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/squirrel_static.lastbuildstate b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/squirrel_static.lastbuildstate deleted file mode 100644 index 6de37a3d..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.tlog/squirrel_static.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0: -Release|x64|F:\Magic_Game\project\Magic_Game\| diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.vcxproj.FileListAbsolute.txt b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/squirrel_static.vcxproj.FileListAbsolute.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqvm.obj b/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqvm.obj deleted file mode 100644 index 7c5affc7..00000000 Binary files a/m_packages/squirrel/build/squirrel/squirrel_static.dir/Release/sqvm.obj and /dev/null differ diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.vcxproj b/m_packages/squirrel/build/squirrel/squirrel_static.vcxproj deleted file mode 100644 index 591cb5b2..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.vcxproj +++ /dev/null @@ -1,292 +0,0 @@ - - - - x64 - - - - Debug - x64 - - - Release - x64 - - - MinSizeRel - x64 - - - RelWithDebInfo - x64 - - - - {172DF2BE-82A2-31EB-B041-9CBA46E8E9A3} - Win32Proj - 10.0.22621.0 - x64 - squirrel_static - NoUpgrade - - - - StaticLibrary - MultiByte - v143 - - - StaticLibrary - Unicode - v143 - - - StaticLibrary - MultiByte - v143 - - - StaticLibrary - MultiByte - v143 - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\Debug\ - squirrel_static.dir\Debug\ - squirrel_static - .lib - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\Release\ - squirrel_static.dir\Release\ - squirrel_static - .lib - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\MinSizeRel\ - squirrel_static.dir\MinSizeRel\ - squirrel_static - .lib - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\lib\RelWithDebInfo\ - squirrel_static.dir\RelWithDebInfo\ - squirrel_static - .lib - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - EnableFastChecks - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - Sync - OnlyExplicitInline - MinSpace - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel" - $(IntDir) - - - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(IntDir) - ProgramDatabase - Sync - OnlyExplicitInline - MaxSpeed - NotUsing - MultiThreadedDLL - true - false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo" - $(IntDir) - - - %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_SQ64;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\" - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - - - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\include;%(AdditionalIncludeDirectories) - $(ProjectDir)/$(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - %(AdditionalOptions) /machine:x64 - - - - - Always - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - Building Custom Rule F:/Magic_Game/project/Magic_Game/m_packages/squirrel/squirrel/CMakeLists.txt - setlocal -F:\App\VisualStudio\IDE\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -SF:/Magic_Game/project/Magic_Game/m_packages/squirrel -BF:/Magic_Game/project/Magic_Game/m_packages/squirrel/build --check-stamp-file F:/Magic_Game/project/Magic_Game/m_packages/squirrel/build/squirrel/CMakeFiles/generate.stamp -if %errorlevel% neq 0 goto :cmEnd -:cmEnd -endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone -:cmErrorLevel -exit /b %1 -:cmDone -if %errorlevel% neq 0 goto :VCEnd - %(AdditionalInputs) - F:\Magic_Game\project\Magic_Game\m_packages\squirrel\build\squirrel\CMakeFiles\generate.stamp - false - - - - - - - - - - - - - - - - - - - {0D0E785A-573C-3CD8-ADD4-F64DA735CD04} - ZERO_CHECK - false - Never - - - - - - \ No newline at end of file diff --git a/m_packages/squirrel/build/squirrel/squirrel_static.vcxproj.filters b/m_packages/squirrel/build/squirrel/squirrel_static.vcxproj.filters deleted file mode 100644 index 905eea13..00000000 --- a/m_packages/squirrel/build/squirrel/squirrel_static.vcxproj.filters +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - {7A0E404A-E4A4-3B73-9CEE-DA8D8A901BD1} - - - diff --git a/m_packages/squirrel/doc/Makefile b/m_packages/squirrel/doc/Makefile deleted file mode 100644 index b01e98db..00000000 --- a/m_packages/squirrel/doc/Makefile +++ /dev/null @@ -1,216 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/testy_sphinxy.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/testy_sphinxy.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/testy_sphinxy" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/testy_sphinxy" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/m_packages/squirrel/doc/make.bat b/m_packages/squirrel/doc/make.bat deleted file mode 100644 index a32fa10a..00000000 --- a/m_packages/squirrel/doc/make.bat +++ /dev/null @@ -1,263 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source -set I18NSPHINXOPTS=%SPHINXOPTS% source -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. xml to make Docutils-native XML files - echo. pseudoxml to make pseudoxml-XML files for display purposes - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - echo. coverage to run coverage check of the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - - -REM Check if sphinx-build is available and fallback to Python version if any -%SPHINXBUILD% 1>NUL 2>NUL -if errorlevel 9009 goto sphinx_python -goto sphinx_ok - -:sphinx_python - -set SPHINXBUILD=python -m sphinx.__init__ -%SPHINXBUILD% 2> nul -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -:sphinx_ok - - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\testy_sphinxy.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\testy_sphinxy.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdf" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf - cd %~dp0 - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdfja" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf-ja - cd %~dp0 - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -if "%1" == "coverage" ( - %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage - if errorlevel 1 exit /b 1 - echo. - echo.Testing of coverage in the sources finished, look at the ^ -results in %BUILDDIR%/coverage/python.txt. - goto end -) - -if "%1" == "xml" ( - %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The XML files are in %BUILDDIR%/xml. - goto end -) - -if "%1" == "pseudoxml" ( - %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. - goto end -) - -:end diff --git a/m_packages/squirrel/doc/source/_static/nut.ico b/m_packages/squirrel/doc/source/_static/nut.ico deleted file mode 100644 index c28977b0..00000000 Binary files a/m_packages/squirrel/doc/source/_static/nut.ico and /dev/null differ diff --git a/m_packages/squirrel/doc/source/_static/simple_nut.png b/m_packages/squirrel/doc/source/_static/simple_nut.png deleted file mode 100644 index 4c0e8a20..00000000 Binary files a/m_packages/squirrel/doc/source/_static/simple_nut.png and /dev/null differ diff --git a/m_packages/squirrel/doc/source/conf.py b/m_packages/squirrel/doc/source/conf.py deleted file mode 100644 index 61172e63..00000000 --- a/m_packages/squirrel/doc/source/conf.py +++ /dev/null @@ -1,288 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Squirrel documentation build configuration file, created by -# sphinx-quickstart on Sun Jan 31 00:26:52 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os -import time - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Squirrel documentation' -copyright = '2003-%s, Alberto Demichelis' % time.strftime('%Y') -author = u'Alberto Demichelis' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = u'3.2' -# The full version, including alpha/beta/rc tags. -release = u'3.2 stable' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'sphinx_rtd_theme' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -html_logo = 'simple_nut.png' - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -html_favicon = 'nut.ico' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -#html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'squirrel_doc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -_stdauthor = r'Alberto Demichelis' -latex_documents = [ - ('reference/index', 'reference.tex', - 'Squirrel Reference Manual', _stdauthor, 'manual'), - ('stdlib/index', 'stdlib.tex', - 'Squirrel Standard Library', _stdauthor, 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'Squirrel', u'Squirrel Documentation', - [author], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'Squirrel', u'Squirrel Documentation', - author, 'Squirrel', 'The Programming Language.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False diff --git a/m_packages/squirrel/doc/source/index.rst b/m_packages/squirrel/doc/source/index.rst deleted file mode 100644 index 0cc1bb4d..00000000 --- a/m_packages/squirrel/doc/source/index.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. Squirrel documentation master file, created by - sphinx-quickstart on Sun Jan 31 00:26:52 2016. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Squirrel's documentation -========================================= - -Contents: - -.. toctree:: - :maxdepth: 1 - - reference/index.rst - stdlib/index.rst - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`search` - - diff --git a/m_packages/squirrel/doc/source/nut.ico b/m_packages/squirrel/doc/source/nut.ico deleted file mode 100644 index c28977b0..00000000 Binary files a/m_packages/squirrel/doc/source/nut.ico and /dev/null differ diff --git a/m_packages/squirrel/doc/source/reference/api/bytecode_serialization.rst b/m_packages/squirrel/doc/source/reference/api/bytecode_serialization.rst deleted file mode 100644 index 0e1f586a..00000000 --- a/m_packages/squirrel/doc/source/reference/api/bytecode_serialization.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. _api_ref_bytecode_serialization: - -====================== -Bytecode serialization -====================== - -.. _sq_readclosure: - -.. c:function:: SQRESULT sq_readclosure(HSQUIRRELVM v, SQREADFUNC readf, SQUserPointer up) - - :param HSQUIRRELVM v: the target VM - :param SQREADFUNC readf: pointer to a read function that will be invoked by the vm during the serialization. - :param SQUserPointer up: pointer that will be passed to each call to the read function - :returns: a SQRESULT - -serialize (read) a closure and pushes it on top of the stack, the source is user defined through a read callback. - - - - - -.. _sq_writeclosure: - -.. c:function:: SQRESULT sq_writeclosure(HSQUIRRELVM v, SQWRITEFUNC writef, SQUserPointer up) - - :param HSQUIRRELVM v: the target VM - :param SQWRITEFUNC writef: pointer to a write function that will be invoked by the vm during the serialization. - :param SQUserPointer up: pointer that will be passed to each call to the write function - :returns: a SQRESULT - :remarks: closures with free variables cannot be serialized - -serializes(writes) the closure on top of the stack, the destination is user defined through a write callback. diff --git a/m_packages/squirrel/doc/source/reference/api/calls.rst b/m_packages/squirrel/doc/source/reference/api/calls.rst deleted file mode 100644 index 17a4f2c2..00000000 --- a/m_packages/squirrel/doc/source/reference/api/calls.rst +++ /dev/null @@ -1,130 +0,0 @@ -.. _api_ref_calls: - -===== -Calls -===== - -.. _sq_call: - -.. c:function:: SQRESULT sq_call(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerror) - - :param HSQUIRRELVM v: the target VM - :param SQInteger params: number of parameters of the function - :param SQBool retval: if true the function will push the return value in the stack - :param SQBool raiseerror: if true, if a runtime error occurs during the execution of the call, the vm will invoke the error handler. - :returns: a SQRESULT - -calls a closure or a native closure. The function pops all the parameters and leave the closure in the stack; if retval is true the return value of the closure is pushed. If the execution of the function is suspended through sq_suspendvm(), the closure and the arguments will not be automatically popped from the stack. - -When using to create an instance, push a dummy parameter to be filled with the newly-created instance for the constructor's 'this' parameter. - - - -.. _sq_getcallee: - -.. c:function:: SQRESULT sq_getcallee(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: a SQRESULT - -push in the stack the currently running closure. - - - - - -.. _sq_getlasterror: - -.. c:function:: SQRESULT sq_getlasterror(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: a SQRESULT - :remarks: the pushed error descriptor can be any valid squirrel type. - -pushes the last error in the stack. - - - - - -.. _sq_getlocal: - -.. c:function:: const SQChar * sq_getlocal(HSQUIRRELVM v, SQUnsignedInteger level, SQUnsignedInteger nseq) - - :param HSQUIRRELVM v: the target VM - :param SQUnsignedInteger level: the function index in the calls stack, 0 is the current function - :param SQUnsignedInteger nseq: the index of the local variable in the stack frame (0 is 'this') - :returns: the name of the local variable if a variable exists at the given level/seq otherwise NULL. - -Returns the name of a local variable given stackframe and sequence in the stack and pushes is current value. Free variables are treated as local variables, by sq_getlocal(), and will be returned as they would be at the base of the stack, just before the real local variables. - - - - - -.. _sq_reseterror: - -.. c:function:: void sq_reseterror(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - -reset the last error in the virtual machine to null - - - - - -.. _sq_resume: - -.. c:function:: SQRESULT sq_resume(HSQUIRRELVM v, SQBool retval, SQBool raiseerror) - - :param HSQUIRRELVM v: the target VM - :param SQBool retval: if true the function will push the return value in the stack - :param SQBool raiseerror: if true, if a runtime error occurs during the execution of the call, the vm will invoke the error handler. - :returns: a SQRESULT - :remarks: if retval != 0 the return value of the generator is pushed. - -resumes the generator at the top position of the stack. - - -.. _sq_tailcall: - -.. c:function:: SQRESULT sq_tailcall(HSQUIRRELVM v, SQInteger nparams) - - :param HSQUIRRELVM v: the target VM - :param SQInteger params: number of parameters of the function - - Calls a closure and removes the caller function from the call stack. - This function must be invoke from a native closure and - he return value of sq_tailcall must be returned by the caller function(see example). - -*.eg* - -:: - - SQInteger tailcall_something_example(HSQUIRRELVM v) - { - //push closure and parameters here - ... - return sq_tailcall(v,2); - } - -.. _sq_throwerror: - -.. c:function:: SQRESULT sq_throwerror(HSQUIRRELVM v, const SQChar * err) - - :param HSQUIRRELVM v: the target VM - :param SQChar * err: the description of the error that has to be thrown - :returns: the value that has to be returned by a native closure in order to throw an exception in the virtual machine. - -sets the last error in the virtual machine and returns the value that has to be returned by a native closure in order to trigger an exception in the virtual machine. - - -.. _sq_throwobject: - -.. c:function:: SQRESULT sq_throwobject(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: the value that has to be returned by a native closure in order to throw an exception in the virtual machine. - -pops a value from the stack sets it as the last error in the virtual machine. Returns the value that has to be returned by a native closure in order to trigger an exception in the virtual machine (aka SQ_ERROR). diff --git a/m_packages/squirrel/doc/source/reference/api/compiler.rst b/m_packages/squirrel/doc/source/reference/api/compiler.rst deleted file mode 100644 index edb55298..00000000 --- a/m_packages/squirrel/doc/source/reference/api/compiler.rst +++ /dev/null @@ -1,79 +0,0 @@ -.. _api_ref_compiler: - -======== -Compiler -======== - -.. _sq_compile: - -.. c:function:: SQRESULT sq_compile(HSQUIRRELVM v, HSQLEXREADFUNC read, SQUserPointer p, const SQChar * sourcename, SQBool raiseerror) - - :param HSQUIRRELVM v: the target VM - :param HSQLEXREADFUNC read: a pointer to a read function that will feed the compiler with the program. - :param SQUserPointer p: a user defined pointer that will be passed by the compiler to the read function at each invocation. - :param SQChar * sourcename: the symbolic name of the program (used only for more meaningful runtime errors) - :param SQBool raiseerror: if this value is true the compiler error handler will be called in case of an error - :returns: a SQRESULT. If the sq_compile fails nothing is pushed in the stack. - :remarks: in case of an error the function will call the function set by sq_setcompilererrorhandler(). - -compiles a squirrel program; if it succeeds, push the compiled script as function in the stack. - - - - - -.. _sq_compilebuffer: - -.. c:function:: SQRESULT sq_compilebuffer(HSQUIRRELVM v, const SQChar* s, SQInteger size, const SQChar * sourcename, SQBool raiseerror) - - :param HSQUIRRELVM v: the target VM - :param SQChar * s: a pointer to the buffer that has to be compiled. - :param SQInteger size: size in characters of the buffer passed in the parameter 's'. - :param SQChar * sourcename: the symbolic name of the program (used only for more meaningful runtime errors) - :param SQBool raiseerror: if this value true the compiler error handler will be called in case of an error - :returns: a SQRESULT. If the sq_compilebuffer fails nothing is pushed in the stack. - :remarks: in case of an error the function will call the function set by sq_setcompilererrorhandler(). - -compiles a squirrel program from a memory buffer; if it succeeds, push the compiled script as function in the stack. - - - - - -.. _sq_enabledebuginfo: - -.. c:function:: void sq_enabledebuginfo(HSQUIRRELVM v, SQBool enable) - - :param HSQUIRRELVM v: the target VM - :param SQBool enable: if true enables the debug info generation, if == 0 disables it. - :remarks: The function affects all threads as well. - -enable/disable the debug line information generation at compile time. - - - - - -.. _sq_notifyallexceptions: - -.. c:function:: void sq_notifyallexceptions(HSQUIRRELVM v, SQBool enable) - - :param HSQUIRRELVM v: the target VM - :param SQBool enable: if true enables the error callback notification of handled exceptions. - :remarks: By default the VM will invoke the error callback only if an exception is not handled (no try/catch traps are present in the call stack). If notifyallexceptions is enabled, the VM will call the error callback for any exception even if between try/catch blocks. This feature is useful for implementing debuggers. - -enable/disable the error callback notification of handled exceptions. - - - - - -.. _sq_setcompilererrorhandler: - -.. c:function:: void sq_setcompilererrorhandler(HSQUIRRELVM v, SQCOMPILERERROR f) - - :param HSQUIRRELVM v: the target VM - :param SQCOMPILERERROR f: A pointer to the error handler function - :remarks: if the parameter f is NULL no function will be called when a compiler error occurs. The compiler error handler is shared between friend VMs. - -sets the compiler error handler function diff --git a/m_packages/squirrel/doc/source/reference/api/debug_interface.rst b/m_packages/squirrel/doc/source/reference/api/debug_interface.rst deleted file mode 100644 index ac929e14..00000000 --- a/m_packages/squirrel/doc/source/reference/api/debug_interface.rst +++ /dev/null @@ -1,72 +0,0 @@ -.. _api_ref_debug_interface: - -=============== -Debug interface -=============== - -.. _sq_getfunctioninfo: - -.. c:function:: SQRESULT sq_getfunctioninfo(HSQUIRRELVM v, SQInteger level, SQFunctionInfo * fi) - - :param HSQUIRRELVM v: the target VM - :param SQInteger level: calls stack level - :param SQFunctionInfo * fi: pointer to the SQFunctionInfo structure that will store the closure informations - :returns: a SQRESULT. - :remarks: the member 'funcid' of the returned SQFunctionInfo structure is a unique identifier of the function; this can be useful to identify a specific piece of squirrel code in an application like for instance a profiler. this method will fail if the closure in the stack is a native C closure. - - - -*.eg* - -:: - - - typedef struct tagSQFunctionInfo { - SQUserPointer funcid; //unique idetifier for a function (all it's closures will share the same funcid) - const SQChar *name; //function name - const SQChar *source; //function source file name - }SQFunctionInfo; - - - - - - - -.. _sq_setdebughook: - -.. c:function:: void sq_setdebughook(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :remarks: In order to receive a 'per line' callback, is necessary to compile the scripts with the line informations. Without line informations activated, only the 'call/return' callbacks will be invoked. - -pops a closure from the stack an sets it as debug hook. When a debug hook is set it overrides any previously set native or non native hooks. if the hook is null the debug hook will be disabled. - - - - - -.. _sq_setnativedebughook: - -.. c:function:: void sq_setnativedebughook(HSQUIRRELVM v, SQDEBUGHOOK hook) - - :param HSQUIRRELVM v: the target VM - :param SQDEBUGHOOK hook: the native hook function - :remarks: In order to receive a 'per line' callback, is necessary to compile the scripts with the line informations. Without line informations activated, only the 'call/return' callbacks will be invoked. - -sets the native debug hook. When a native hook is set it overrides any previously set native or non native hooks. if the hook is NULL the debug hook will be disabled. - - - - - -.. _sq_stackinfos: - -.. c:function:: SQRESULT sq_stackinfos(HSQUIRRELVM v, SQInteger level, SQStackInfos * si) - - :param HSQUIRRELVM v: the target VM - :param SQInteger level: calls stack level - :param SQStackInfos * si: pointer to the SQStackInfos structure that will store the stack informations - :returns: a SQRESULT. - -retrieve the calls stack informations of a ceratain level in the calls stack. diff --git a/m_packages/squirrel/doc/source/reference/api/garbage_collector.rst b/m_packages/squirrel/doc/source/reference/api/garbage_collector.rst deleted file mode 100644 index cfe03e68..00000000 --- a/m_packages/squirrel/doc/source/reference/api/garbage_collector.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. _api_ref_garbage_collector: - -================= -Garbage Collector -================= - -.. _sq_collectgarbage: - -.. c:function:: SQInteger sq_collectgarbage(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :remarks: this api only works with garbage collector builds (NO_GARBAGE_COLLECTOR is not defined) - -runs the garbage collector and returns the number of reference cycles found (and deleted) - - - - - -.. _sq_resurrectunreachable: - -.. c:function:: SQRESULT sq_resurrectunreachable(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :remarks: this api only works with garbage collector builds (NO_GARBAGE_COLLECTOR is not defined) - -runs the garbage collector and pushes an array in the stack containing all unreachable object found. If no unreachable object is found, null is pushed instead. This function is meant to help debug reference cycles. diff --git a/m_packages/squirrel/doc/source/reference/api/object_creation_and_handling.rst b/m_packages/squirrel/doc/source/reference/api/object_creation_and_handling.rst deleted file mode 100644 index fd009150..00000000 --- a/m_packages/squirrel/doc/source/reference/api/object_creation_and_handling.rst +++ /dev/null @@ -1,696 +0,0 @@ -.. _api_ref_object_creation_and_handling: - -============================ -Object creation and handling -============================ - -.. _sq_bindenv: - -.. c:function:: SQRESULT sq_bindenv(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target closure - :returns: a SQRESULT - :remarks: the cloned closure holds the environment object as weak reference - -pops an object from the stack (must be a table, instance, or class); clones the closure at position idx in the stack and sets the popped object as environment of the cloned closure. Then pushes the new cloned closure on top of the stack. - - - - - -.. _sq_createinstance: - -.. c:function:: SQRESULT sq_createinstance(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target class - :returns: a SQRESULT - :remarks: the function doesn't invoke the instance contructor. To create an instance and automatically invoke its contructor, sq_call must be used instead. - -creates an instance of the class at 'idx' position in the stack. The new class instance is pushed on top of the stack. - - - - - -.. _sq_getbool: - -.. c:function:: SQRESULT sq_getbool(HSQUIRRELVM v, SQInteger idx, SQBool * b) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQBool * b: A pointer to the bool that will store the value - :returns: a SQRESULT - -gets the value of the bool at the idx position in the stack. - - - - - -.. _sq_getbyhandle: - -.. c:function:: SQRESULT sq_getbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE * handle) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack pointing to the class or instance - :param HSQMEMBERHANDLE * handle: a pointer to the member handle - :returns: a SQRESULT - -pushes the value of a class or instance member using a member handle (see sq_getmemberhandle) - - - - - -.. _sq_getclosureinfo: - -.. c:function:: SQRESULT sq_getclosureinfo(HSQUIRRELVM v, SQInteger idx, SQInteger * nparams, SQInteger * nfreevars) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target closure - :param SQInteger * nparams: a pointer to an integer that will store the number of parameters - :param SQInteger * nfreevars: a pointer to an integer that will store the number of free variables - :returns: an SQRESULT - -retrieves number of parameters and number of freevariables from a squirrel closure. - - - - - -.. _sq_getclosurename: - -.. c:function:: SQRESULT sq_getclosurename(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target closure - :returns: an SQRESULT - -pushes the name of the closure at position idx in the stack. Note that the name can be a string or null if the closure is anonymous or a native closure with no name assigned to it. - - - - - -.. _sq_getclosureroot: - -.. c:function:: SQRESULT sq_getclosureroot(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target closure - :returns: an SQRESULT - -pushes the root table of the closure at position idx in the stack - - - - - -.. _sq_getfloat: - -.. c:function:: SQRESULT sq_getfloat(HSQUIRRELVM v, SQInteger idx, SQFloat * f) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQFloat * f: A pointer to the float that will store the value - :returns: a SQRESULT - -gets the value of the float at the idx position in the stack. - - - - - -.. _sq_gethash: - -.. c:function:: SQHash sq_gethash(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :returns: the hash key of the value at the position idx in the stack - :remarks: the hash value function is the same used by the VM. - -returns the hash key of a value at the idx position in the stack. - - - - - -.. _sq_getinstanceup: - -.. c:function:: SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer * up, SQUSerPointer typetag,SQBool throwerror) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQUserPointer * up: a pointer to the userpointer that will store the result - :param SQUSerPointer typetag: the typetag that has to be checked, if this value is set to 0 the typetag is ignored. - :param SQBool throwerror: if SQTrue the function sets the last error string in case of failure - :returns: a SQRESULT - -gets the userpointer of the class instance at position idx in the stack. if the parameter 'typetag' is different than 0, the function checks that the class or a base class of the instance is tagged with the specified tag; if not the function fails. If 'typetag' is 0 the function will ignore the tag check. - - - - - -.. _sq_getinteger: - -.. c:function:: SQRESULT sq_getinteger(HSQUIRRELVM v, SQInteger idx, SQInteger * i) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQInteger * i: A pointer to the integer that will store the value - :returns: a SQRESULT - -gets the value of the integer at the idx position in the stack. - - - - - -.. _sq_getmemberhandle: - -.. c:function:: SQRESULT sq_getmemberhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE * handle) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack pointing to the class - :param HSQMEMBERHANDLE * handle: a pointer to the variable that will store the handle - :returns: a SQRESULT - :remarks: This method works only with classes. A handle retrieved through a class can be later used to set or get values from one of the class instances. Handles retrieved from base classes are still valid in derived classes and respect inheritance rules. - -pops a value from the stack and uses it as index to fetch the handle of a class member. The handle can be later used to set or get the member value using sq_getbyhandle(), sq_setbyhandle(). - - - - - -.. _sq_getreleasehook: - -.. c:function:: SQRELEASEHOOK sq_getreleasehook(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :remarks: if the object that position idx is not an userdata, class instance or class the function returns NULL. - -gets the release hook of the userdata, class instance or class at position idx in the stack. - - - - - -.. _sq_getscratchpad: - -.. c:function:: SQChar * sq_getscratchpad(HSQUIRRELVM v, SQInteger minsize) - - :param HSQUIRRELVM v: the target VM - :param SQInteger minsize: the requested size for the scratchpad buffer - :remarks: the buffer is valid until the next call to sq_getscratchpad - -returns a pointer to a memory buffer that is at least as big as minsize. - - - - - -.. _sq_getsize: - -.. c:function:: SQObjectType sq_getsize(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :returns: the size of the value at the position idx in the stack - :remarks: this function only works with strings, arrays, tables, classes, instances, and userdata if the value is not a valid type, the function will return -1. - -returns the size of a value at the idx position in the stack. If the value is a class or a class instance the size returned is the size of the userdata buffer (see sq_setclassudsize). - - - - - -.. _sq_getstring: - -.. c:function:: SQRESULT sq_getstring(HSQUIRRELVM v, SQInteger idx, const SQChar ** c) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQChar ** c: a pointer to the pointer that will point to the string - :returns: a SQRESULT - -gets a pointer to the string at the idx position in the stack. - - - - - -.. _sq_getstringandsize: - -.. c:function:: SQRESULT sq_getstringandsize(HSQUIRRELVM v, SQInteger idx, const SQChar ** c, SQInteger* size) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQChar ** c: a pointer to the pointer that will point to the string - :param SQInteger * size: a pointer to a SQInteger which will receive the size of the string - :returns: a SQRESULT - -gets a pointer to the string at the idx position in the stack; additionally retrieves its size. - - - - -.. _sq_getthread: - -.. c:function:: SQRESULT sq_getthread(HSQUIRRELVM v, SQInteger idx, HSQUIRRELVM* vm) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param HSQUIRRELVM * vm: A pointer to the variable that will store the thread pointer - :returns: a SQRESULT - -gets a pointer to the thread the idx position in the stack. - - - - - -.. _sq_gettype: - -.. c:function:: SQObjectType sq_gettype(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :returns: the type of the value at the position idx in the stack - -returns the type of the value at the position idx in the stack - - - - - -.. _sq_gettypetag: - -.. c:function:: SQRESULT sq_gettypetag(HSQUIRRELVM v, SQInteger idx, SQUserPointer * typetag) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQUserPointer * typetag: a pointer to the variable that will store the tag - :returns: a SQRESULT - :remarks: the function works also with instances. if the taget object is an instance, the typetag of it's base class is fetched. - -gets the typetag of the object (userdata or class) at position idx in the stack. - - - - - -.. _sq_getuserdata: - -.. c:function:: SQRESULT sq_getuserdata(HSQUIRRELVM v, SQInteger idx, SQUserPointer * p, SQUserPointer * typetag) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQUserPointer * p: A pointer to the userpointer that will point to the userdata's payload - :param SQUserPointer * typetag: A pointer to a SQUserPointer that will store the userdata tag(see sq_settypetag). The parameter can be NULL. - :returns: a SQRESULT - -gets a pointer to the value of the userdata at the idx position in the stack. - - - - - -.. _sq_getuserpointer: - -.. c:function:: SQRESULT sq_getuserpointer(HSQUIRRELVM v, SQInteger idx, SQUserPointer * p) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQUserPointer * p: A pointer to the userpointer that will store the value - :returns: a SQRESULT - -gets the value of the userpointer at the idx position in the stack. - - - - - -.. _sq_newarray: - -.. c:function:: void sq_newarray(HSQUIRRELVM v, SQInteger size) - - :param HSQUIRRELVM v: the target VM - :param SQInteger size: the size of the array that as to be created - -creates a new array and pushes it in the stack - - - - - -.. _sq_newclass: - -.. c:function:: SQRESULT sq_newclass(HSQUIRRELVM v, SQBool hasbase) - - :param HSQUIRRELVM v: the target VM - :param SQBool hasbase: if the parameter is true the function expects a base class on top of the stack. - :returns: a SQRESULT - -creates a new class object. If the parameter 'hasbase' is different than 0, the function pops a class from the stack and inherits the new created class from it. The new class is pushed in the stack. - - - - - -.. _sq_newclosure: - -.. c:function:: void sq_newclosure(HSQUIRRELVM v, HSQFUNCTION func, SQInteger nfreevars) - - :param HSQUIRRELVM v: the target VM - :param HSQFUNCTION func: a pointer to a native-function - :param SQInteger nfreevars: number of free variables(can be 0) - -create a new native closure, pops n values set those as free variables of the new closure, and push the new closure in the stack. - - - - - -.. _sq_newtable: - -.. c:function:: void sq_newtable(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - -creates a new table and pushes it in the stack - - - - - -.. _sq_newtableex: - -.. c:function:: void sq_newtableex(HSQUIRRELVM v, SQInteger initialcapacity) - - :param HSQUIRRELVM v: the target VM - :param SQInteger initialcapacity: number of key/value pairs to preallocate - -creates a new table and pushes it in the stack. This function allows you to specify the initial capacity of the table to prevent unnecessary rehashing when the number of slots required is known at creation-time. - - - - - -.. _sq_newuserdata: - -.. c:function:: SQUserPointer sq_newuserdata(HSQUIRRELVM v, SQUnsignedInteger size) - - :param HSQUIRRELVM v: the target VM - :param SQUnsignedInteger size: the size of the userdata that as to be created in bytes - -creates a new userdata and pushes it in the stack - - - - - -.. _sq_pushbool: - -.. c:function:: void sq_pushbool(HSQUIRRELVM v, SQBool b) - - :param HSQUIRRELVM v: the target VM - :param SQBool b: the bool that has to be pushed(SQTrue or SQFalse) - -pushes a bool into the stack - - - - - -.. _sq_pushfloat: - -.. c:function:: void sq_pushfloat(HSQUIRRELVM v, SQFloat f) - - :param HSQUIRRELVM v: the target VM - :param SQFloat f: the float that has to be pushed - -pushes a float into the stack - - - - - -.. _sq_pushinteger: - -.. c:function:: void sq_pushinteger(HSQUIRRELVM v, SQInteger n) - - :param HSQUIRRELVM v: the target VM - :param SQInteger n: the integer that has to be pushed - -pushes an integer into the stack - - - - - -.. _sq_pushnull: - -.. c:function:: void sq_pushnull(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - -pushes a null value into the stack - - - - - -.. _sq_pushstring: - -.. c:function:: void sq_pushstring(HSQUIRRELVM v, const SQChar * s, SQInteger len) - - :param HSQUIRRELVM v: the target VM - :param SQChar * s: pointer to the string that has to be pushed - :param SQInteger len: length of the string pointed by s - :remarks: if the parameter len is less than 0 the VM will calculate the length using strlen(s) - -pushes a string in the stack - - - - - -.. _sq_pushuserpointer: - -.. c:function:: void sq_pushuserpointer(HSQUIRRELVM v, SQUserPointer p) - - :param HSQUIRRELVM v: the target VM - :param SQUserPointer p: the pointer that as to be pushed - -pushes a userpointer into the stack - - - - - -.. _sq_setbyhandle: - -.. c:function:: SQRESULT sq_setbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE * handle) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack pointing to the class - :param HSQMEMBERHANDLE * handle: a pointer the member handle - :returns: a SQRESULT - -pops a value from the stack and sets it to a class or instance member using a member handle (see sq_getmemberhandle) - - - - - -.. _sq_setclassudsize: - -.. c:function:: SQRESULT sq_setclassudsize(HSQUIRRELVM v, SQInteger idx, SQInteger udsize) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack pointing to the class - :param SQInteger udsize: size in bytes reserved for user data - :returns: a SQRESULT - -Sets the user data size of a class. If a class 'user data size' is greater than 0. When an instance of the class is created additional space will be reserved at the end of the memory chunk where the instance is stored. The userpointer of the instance will also be automatically set to this memory area. This allows you to minimize allocations in applications that have to carry data along with the class instance. - - - - - -.. _sq_setclosureroot: - -.. c:function:: SQRESULT sq_setclosureroot(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target closure - :returns: an SQRESULT - -pops a table from the stack and sets it as root of the closure at position idx in the stack - - - - - -.. _sq_setinstanceup: - -.. c:function:: SQRESULT sq_setinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer up) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQUserPointer up: an arbitrary user pointer - :returns: a SQRESULT - -sets the userpointer of the class instance at position idx in the stack. - - - - - -.. _sq_setnativeclosurename: - -.. c:function:: SQRESULT sq_setnativeclosurename(HSQUIRRELVM v, SQInteger idx, const SQChar * name) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target native closure - :param SQChar * name: the name that has to be set - :returns: an SQRESULT - -sets the name of the native closure at the position idx in the stack. The name of a native closure is purely for debug purposes. The name is retrieved through the function sq_stackinfos() while the closure is in the call stack. - - - - - -.. _sq_setparamscheck: - -.. c:function:: SQRESULT sq_setparamscheck(HSQUIRRELVM v, SQInteger nparamscheck, const SQChar * typemask) - - :param HSQUIRRELVM v: the target VM - :param SQInteger nparamscheck: defines the parameters number check policy (0 disables the param checking). If nparamscheck is greater than 0, the VM ensures that the number of parameters is exactly the number specified in nparamscheck (eg. if nparamscheck == 3 the function can only be called with 3 parameters). If nparamscheck is less than 0 the VM ensures that the closure is called with at least the absolute value of the number specified in nparamcheck (eg. nparamscheck == -3 will check that the function is called with at least 3 parameters). The hidden parameter 'this' is included in this number; free variables aren't. If SQ_MATCHTYPEMASKSTRING is passed instead of the number of parameters, the function will automatically infer the number of parameters to check from the typemask (eg. if the typemask is ".sn", it is like passing 3). - :param SQChar * typemask: defines a mask to validate the parametes types passed to the function. If the parameter is NULL, no typechecking is applied (default). - :remarks: The typemask consists in a zero terminated string that represent the expected parameter type. The types are expressed as follows: 'o' null, 'i' integer, 'f' float, 'n' integer or float, 's' string, 't' table, 'a' array, 'u' userdata, 'c' closure and nativeclosure, 'g' generator, 'p' userpointer, 'v' thread, 'x' instance(class instance), 'y' class, 'b' bool. and '.' any type. The symbol '|' can be used as 'or' to accept multiple types on the same parameter. There isn't any limit on the number of 'or' that can be used. Spaces are ignored so can be inserted between types to increase readability. For instance to check a function that expect a table as 'this' a string as first parameter and a number or a userpointer as second parameter, the string would be "tsn|p" (table,string,number or userpointer). If the parameters mask is contains fewer parameters than 'nparamscheck', the remaining parameters will not be typechecked. - -Sets the parameter validation scheme for the native closure at the top position in the stack. Allows you to validate the number of parameters accepted by the function and optionally their types. If the function call does not comply with the parameter schema set by sq_setparamscheck, an exception is thrown. - -*.eg* - -:: - - //example - SQInteger testy(HSQUIRRELVM v) - { - SQUserPointer p; - const SQChar *s; - SQInteger i; - //no type checking, if the call complies with the mask - //surely the functions will succeed. - sq_getuserdata(v,1,&p,NULL); - sq_getstring(v,2,&s); - sq_getinteger(v,3,&i); - //... do something - return 0; - } - - //the reg code - - //....stuff - sq_newclosure(v,testy,0); - //expects exactly 3 parameters(userdata,string,number) - sq_setparamscheck(v,3,_SC("usn")); - //....stuff - - - - - - -.. _sq_setreleasehook: - -.. c:function:: void sq_setreleasehook(HSQUIRRELVM v, SQInteger idx, SQRELEASEHOOK hook) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQRELEASEHOOK hook: a function pointer to the hook(see sample below) - :remarks: the function hook is called by the VM before the userdata memory is deleted. - -sets the release hook of the userdata, class instance, or class at position idx in the stack. - -*.eg* - -:: - - - /* tyedef SQInteger (*SQRELEASEHOOK)(SQUserPointer,SQInteger size); */ - - SQInteger my_release_hook(SQUserPointer p,SQInteger size) - { - /* do something here */ - return 1; - } - - - - - - -.. _sq_settypetag: - -.. c:function:: SQRESULT sq_settypetag(HSQUIRRELVM v, SQInteger idx, SQUserPointer typetag) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQUserPointer typetag: an arbitrary SQUserPointer - :returns: a SQRESULT - -sets the typetag of the object (userdata or class) at position idx in the stack. - - - - - -.. _sq_tobool: - -.. c:function:: void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool * b) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :param SQBool * b: A pointer to the bool that will store the value - :remarks: if the object is not a bool the function converts the value to bool according to squirrel's rules. For instance the number 1 will result in true, and the number 0 in false. - -gets the value at position idx in the stack as bool. - - - - - -.. _sq_tostring: - -.. c:function:: void sq_tostring(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - -converts the object at position idx in the stack to string and pushes the resulting string in the stack. - - - - - -.. _sq_typeof: - -.. c:function:: SQObjectType sq_typeof(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: an index in the stack - :returns: a SQRESULT - -pushes the type name of the value at the position idx in the stack. It also invokes the _typeof metamethod for tables and class instances that implement it; in that case the pushed object could be something other than a string (is up to the _typeof implementation). - - - diff --git a/m_packages/squirrel/doc/source/reference/api/object_manipulation.rst b/m_packages/squirrel/doc/source/reference/api/object_manipulation.rst deleted file mode 100644 index d5eb1e25..00000000 --- a/m_packages/squirrel/doc/source/reference/api/object_manipulation.rst +++ /dev/null @@ -1,451 +0,0 @@ -.. _api_ref_object_manipulation: - -==================== -Object manipulation -==================== - -.. _sq_arrayappend: - -.. c:function:: SQRESULT sq_arrayappend(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target array in the stack - :returns: a SQRESULT - :remarks: Only works on arrays. - -pops a value from the stack and pushes it in the back of the array at the position idx in the stack. - - - - - -.. _sq_arrayinsert: - -.. c:function:: SQRESULT sq_arrayinsert(HSQUIRRELVM v, SQInteger idx, SQInteger destpos) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target array in the stack - :param SQInteger destpos: the position in the array where the item has to be inserted - :returns: a SQRESULT - :remarks: Only works on arrays. - -pops a value from the stack and inserts it in an array at the specified position - - - - - -.. _sq_arraypop: - -.. c:function:: SQRESULT sq_arraypop(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target array in the stack - :returns: a SQRESULT - :remarks: Only works on arrays. - -pops a value from the back of the array at the position idx in the stack. - - - - - -.. _sq_arrayremove: - -.. c:function:: SQRESULT sq_arrayremove(HSQUIRRELVM v, SQInteger idx, SQInteger itemidx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target array in the stack - :param SQInteger itemidx: the index of the item in the array that has to be removed - :returns: a SQRESULT - :remarks: Only works on arrays. - -removes an item from an array - - - - - -.. _sq_arrayresize: - -.. c:function:: SQRESULT sq_arrayresize(HSQUIRRELVM v, SQInteger idx, SQInteger newsize) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target array in the stack - :param SQInteger newsize: requested size of the array - :returns: a SQRESULT - :remarks: Only works on arrays. If newsize if greater than the current size the new array slots will be filled with nulls. - -resizes the array at the position idx in the stack. - - - - - -.. _sq_arrayreverse: - -.. c:function:: SQRESULT sq_arrayreverse(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target array in the stack - :returns: a SQRESULT - :remarks: Only works on arrays. - -reverses an array in place. - - - - - -.. _sq_clear: - -.. c:function:: SQRESULT sq_clear(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - :remarks: Only works on tables and arrays. - -clears all the elements of the table/array at position idx in the stack. - - - - - -.. _sq_clone: - -.. c:function:: SQRESULT sq_clone(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - -pushes a clone of the table, array, or class instance at the position idx. - - - - - -.. _sq_createslot: - -.. c:function:: SQRESULT sq_createslot(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target table in the stack - :returns: a SQRESULT - :remarks: invoke the _newslot metamethod in the table delegate. it only works on tables. [this function is deperecated since version 2.0.5 use sq_newslot() instead] - -pops a key and a value from the stack and performs a set operation on the table or class that is at position idx in the stack; if the slot does not exist, it will be created. - - - - - -.. _sq_deleteslot: - -.. c:function:: SQRESULT sq_deleteslot(HSQUIRRELVM v, SQInteger idx, SQBool pushval) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target table in the stack - :param SQBool pushval: if this param is true the function will push the value of the deleted slot. - :returns: a SQRESULT - :remarks: invoke the _delslot metamethod in the table delegate. it only works on tables. - -pops a key from the stack and delete the slot indexed by it from the table at position idx in the stack; if the slot does not exist, nothing happens. - - - - - -.. _sq_get: - -.. c:function:: SQRESULT sq_get(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - :remarks: this call will invokes the delegation system like a normal dereference it only works on tables, arrays, classes, instances and userdata; if the function fails, nothing will be pushed in the stack. - -pops a key from the stack and performs a get operation on the object at the position idx in the stack; and pushes the result in the stack. - - - - - -.. _sq_getattributes: - -.. c:function:: SQRESULT sq_getattributes(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target class in the stack - :returns: a SQRESULT - -Gets the attribute of a class member. The function pops a key from the stack and pushes the attribute of the class member indexed by they key from a class at position idx in the stack. If key is null the function gets the class level attribute. - - - - - -.. _sq_getbase: - -.. c:function:: SQRESULT sq_getbase(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target class in the stack - :returns: a SQRESULT - -pushes the base class of the 'class' at stored position idx in the stack. - - - - - -.. _sq_getclass: - -.. c:function:: SQRESULT sq_getclass(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target class instance in the stack - :returns: a SQRESULT - -pushes the class of the 'class instance' at stored position idx in the stack. - - - - - -.. _sq_getdelegate: - -.. c:function:: SQRESULT sq_getdelegate(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - -pushes the current delegate of the object at the position idx in the stack. - - - - - -.. _sq_getfreevariable: - -.. c:function:: const SQChar * sq_getfreevariable(HSQUIRRELVM v, SQInteger idx, SQInteger nval) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack(closure) - :param SQInteger nval: 0 based index of the free variable(relative to the closure). - :returns: the name of the free variable for pure squirrel closures. NULL in case of error or if the index of the variable is out of range. In case the target closure is a native closure, the return name is always "@NATIVE". - :remarks: The function works for both squirrel closure and native closure. - -gets the value of the free variable of the closure at the position idx in the stack. - - - - - -.. _sq_getweakrefval: - -.. c:function:: SQRESULT sq_getweakrefval(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target weak reference - :returns: a SQRESULT - :remarks: if the function fails, nothing is pushed in the stack. - -pushes the object pointed by the weak reference at position idx in the stack. - - - - - -.. _sq_instanceof: - -.. c:function:: SQBool sq_instanceof(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: SQTrue if the instance at position -1 in the stack is an instance of the class object at position -2 in the stack. - :remarks: The function doesn't pop any object from the stack. - -Determines if an object is an instance of a certain class. Expects an instance and a class in the stack. - - - - - -.. _sq_newmember: - -.. c:function:: SQRESULT sq_newmember(HSQUIRRELVM v, SQInteger idx, SQBool bstatic) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target table in the stack - :param SQBool bstatic: if SQTrue creates a static member. - :returns: a SQRESULT - :remarks: Invokes the _newmember metamethod in the class. it only works on classes. - -pops a key, a value and an object (which will be set as attribute of the member) from the stack and performs a new slot operation on the class that is at position idx in the stack; if the slot does not exist, it will be created. - - - - - -.. _sq_newslot: - -.. c:function:: SQRESULT sq_newslot(HSQUIRRELVM v, SQInteger idx, SQBool bstatic) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target table in the stack - :param SQBool bstatic: if SQTrue creates a static member. This parameter is only used if the target object is a class. - :returns: a SQRESULT - :remarks: Invokes the _newslot metamethod in the table delegate. it only works on tables and classes. - -pops a key and a value from the stack and performs a set operation on the table or class that is at position idx in the stack, if the slot does not exist it will be created. - - - - - -.. _sq_next: - -.. c:function:: SQRESULT sq_next(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - -Pushes in the stack the next key and value of an array, table, or class slot. To start the iteration this function expects a null value on top of the stack; at every call the function will substitute the null value with an iterator and push key and value of the container slot. Every iteration the application has to pop the previous key and value but leave the iterator(that is used as reference point for the next iteration). The function will fail when all slots have been iterated(see Tables and arrays manipulation). - - - - - -.. _sq_rawdeleteslot: - -.. c:function:: SQRESULT sq_rawdeleteslot(HSQUIRRELVM v, SQInteger idx, SQBool pushval) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target table in the stack - :param SQBool pushval: if this param is true the function will push the value of the deleted slot. - :returns: a SQRESULT - -Deletes a slot from a table without employing the _delslot metamethod. Pops a key from the stack and delete the slot indexed by it from the table at position idx in the stack; if the slot does not exist nothing happens. - - - - - -.. _sq_rawget: - -.. c:function:: SQRESULT sq_rawget(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - :remarks: Only works on tables and arrays. - -pops a key from the stack and performs a get operation on the object at position idx in the stack, without employing delegation or metamethods. - - - - - -.. _sq_rawnewmember: - -.. c:function:: SQRESULT sq_rawnewmember(HSQUIRRELVM v, SQInteger idx, SQBool bstatic) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target table in the stack - :param SQBool bstatic: if SQTrue creates a static member. - :returns: a SQRESULT - :remarks: it only works on classes. - -pops a key, a value and an object(that will be set as attribute of the member) from the stack and performs a new slot operation on the class that is at position idx in the stack; if the slot does not exist it will be created. - - - - - -.. _sq_rawset: - -.. c:function:: SQRESULT sq_rawset(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - :remarks: it only works on tables and arrays. if the function fails nothing will be pushed in the stack. - -pops a key and a value from the stack and performs a set operation on the object at position idx in the stack, without employing delegation or metamethods. - - - - - -.. _sq_set: - -.. c:function:: SQRESULT sq_set(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - :remarks: this call will invoke the delegation system like a normal assignment, it only works on tables, arrays and userdata. - -pops a key and a value from the stack and performs a set operation on the object at position idx in the stack. - - - - - -.. _sq_setattributes: - -.. c:function:: SQRESULT sq_setattributes(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target class in the stack. - :returns: a SQRESULT - -Sets the attribute of a class member. The function pops a key and a value from the stack and sets the attribute (indexed by the key) on the class at position idx in the stack. If key is null the function sets the class level attribute. If the function succeed, the old attribute value is pushed in the stack. - - - - - -.. _sq_setdelegate: - -.. c:function:: SQRESULT sq_setdelegate(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :returns: a SQRESULT - :remarks: to remove the delegate from an object, set a null value. - -pops a table from the stack and sets it as the delegate of the object at the position idx in the stack. - - - - - -.. _sq_setfreevariable: - -.. c:function:: SQRESULT sq_setfreevariable(HSQUIRRELVM v, SQInteger idx, SQInteger nval) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :param SQInteger nval: 0 based index of the free variable(relative to the closure). - :returns: a SQRESULT - -pops a value from the stack and sets it as a free variable of the closure at the position idx in the stack. - - - - - -.. _sq_weakref: - -.. c:function:: void sq_weakref(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index to the target object in the stack - :returns: a SQRESULT - :remarks: if the object at idx position is one of (integer, float, bool, null), the object itself is pushed instead of a weak ref. - -pushes a weak reference to the object at position idx in the stack. diff --git a/m_packages/squirrel/doc/source/reference/api/raw_object_handling.rst b/m_packages/squirrel/doc/source/reference/api/raw_object_handling.rst deleted file mode 100644 index 9bf17651..00000000 --- a/m_packages/squirrel/doc/source/reference/api/raw_object_handling.rst +++ /dev/null @@ -1,163 +0,0 @@ -.. _api_ref_raw_object_handling: - -=================== -Raw object handling -=================== - -.. _sq_addref: - -.. c:function:: void sq_addref(HSQUIRRELVM v, HSQOBJECT * po) - - :param HSQUIRRELVM v: the target VM - :param HSQOBJECT * po: pointer to an object handler - -adds a reference to an object handler. - - - - - -.. _sq_getobjtypetag: - -.. c:function:: SQRESULT sq_getobjtypetag(HSQOBJECT * o, SQUserPointer * typetag) - - :param HSQOBJECT * o: pointer to an object handler - :param SQUserPointer * typetag: a pointer to the variable that will store the tag - :returns: a SQRESULT - :remarks: the function works also with instances. if the target object is an instance, the typetag of it's base class is fetched. - -gets the typetag of a raw object reference(userdata or class). - - - - - -.. _sq_getrefcount: - -.. c:function:: SQUnsignedInteger sq_getrefcount(HSQUIRRELVM v, HSQOBJECT * po) - - :param HSQUIRRELVM v: the target VM - :param HSQOBJECT * po: object handler - -returns the number of references of a given object. - - - - - -.. _sq_getstackobj: - -.. c:function:: SQRESULT sq_getstackobj(HSQUIRRELVM v, SQInteger idx, HSQOBJECT * po) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: index of the target object in the stack - :param HSQOBJECT * po: pointer to an object handler - :returns: a SQRESULT - -gets an object from the stack and stores it in a object handler. - - - - - -.. _sq_objtobool: - -.. c:function:: SQBool sq_objtobool(HSQOBJECT * po) - - :param HSQOBJECT * po: pointer to an object handler - :remarks: If the object is not a bool will always return false. - -return the bool value of a raw object reference. - - - - - -.. _sq_objtofloat: - -.. c:function:: SQFloat sq_objtofloat(HSQOBJECT * po) - - :param HSQOBJECT * po: pointer to an object handler - :remarks: If the object is an integer will convert it to float. If the object is not a number will always return 0. - -return the float value of a raw object reference. - - - - - -.. _sq_objtointeger: - -.. c:function:: SQInteger sq_objtointeger(HSQOBJECT * po) - - :param HSQOBJECT * po: pointer to an object handler - :remarks: If the object is a float will convert it to integer. If the object is not a number will always return 0. - -return the integer value of a raw object reference. - - - - - -.. _sq_objtostring: - -.. c:function:: const SQChar* sq_objtostring(HSQOBJECT * po) - - :param HSQOBJECT * po: pointer to an object handler - :remarks: If the object doesn't reference a string it returns NULL. - -return the string value of a raw object reference. - - - - - -.. _sq_objtouserpointer: - -.. c:function:: SQUserPointer sq_objtouserpointer(HSQOBJECT * po) - - :param HSQOBJECT * po: pointer to an object handler - :remarks: If the object doesn't reference a userpointer it returns NULL. - -return the userpointer value of a raw object reference. - - - - - -.. _sq_pushobject: - -.. c:function:: void sq_pushobject(HSQUIRRELVM v, HSQOBJECT obj) - - :param HSQUIRRELVM v: the target VM - :param HSQOBJECT obj: object handler - -push an object referenced by an object handler into the stack. - - - - - -.. _sq_release: - -.. c:function:: SQBool sq_release(HSQUIRRELVM v, HSQOBJECT * po) - - :param HSQUIRRELVM v: the target VM - :param HSQOBJECT * po: pointer to an object handler - :returns: SQTrue if the object handler released has lost all is references(the ones added with sq_addref). SQFalse otherwise. - :remarks: the function will reset the object handler to null when it loses all references. - -remove a reference from an object handler. - - - - - -.. _sq_resetobject: - -.. c:function:: void sq_resetobject(HSQOBJECT * po) - - :param HSQOBJECT * po: pointer to an object handler - :remarks: Every object handler has to be initialized with this function. - -resets(initialize) an object handler. diff --git a/m_packages/squirrel/doc/source/reference/api/stack_operations.rst b/m_packages/squirrel/doc/source/reference/api/stack_operations.rst deleted file mode 100644 index 3f59bb2d..00000000 --- a/m_packages/squirrel/doc/source/reference/api/stack_operations.rst +++ /dev/null @@ -1,107 +0,0 @@ -.. _api_ref_stack_operations: - -================ -Stack Operations -================ - -.. _sq_cmp: - -.. c:function:: SQInteger sq_cmp(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: > 0 if obj1>obj2 - :returns: == 0 if obj1==obj2 - :returns: < 0 if obj1 0. :: - - sq_pushroottable(v); - sq_pushstring(v,"foo",-1); - sq_get(v,-2); //get the function from the root table - sq_pushroottable(v); //'this' (function environment object) - sq_pushinteger(v,1); - sq_pushfloat(v,2.0); - sq_pushstring(v,"three",-1); - sq_call(v,4,SQFalse,SQFalse); - sq_pop(v,2); //pops the roottable and the function - -this is equivalent to the following Squirrel code:: - - foo(1,2.0,"three"); - -If a runtime error occurs (or a exception is thrown) during the squirrel code execution -the sq_call will fail. diff --git a/m_packages/squirrel/doc/source/reference/embedding/compiling_a_script.rst b/m_packages/squirrel/doc/source/reference/embedding/compiling_a_script.rst deleted file mode 100644 index 88c15c86..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/compiling_a_script.rst +++ /dev/null @@ -1,58 +0,0 @@ -.. embedding_compiling_a_script: - -================== -Compiling a script -================== - -You can compile a Squirrel script with the function *sq_compile*.:: - - typedef SQInteger (*SQLEXREADFUNC)(SQUserPointer userdata); - - SQRESULT sq_compile(HSQUIRRELVM v,SQLEXREADFUNC read,SQUserPointer p, - const SQChar *sourcename,SQBool raiseerror); - -In order to compile a script is necessary for the host application to implement a reader -function (SQLEXREADFUNC); this function is used to feed the compiler with the script -data. -The function is called every time the compiler needs a character; It has to return a -character code if succeed or 0 if the source is finished. - -If sq_compile succeeds, the compiled script will be pushed as Squirrel function in the -stack. - -.. :note:: - In order to execute the script, the function generated by *sq_compile()* has - to be called through *sq_call()* - -Here an example of a 'read' function that read from a file: :: - - SQInteger file_lexfeedASCII(SQUserPointer file) - { - int ret; - char c; - if( ( ret=fread(&c,sizeof(c),1,(FILE *)file )>0) ) - return c; - return 0; - } - - int compile_file(HSQUIRRELVM v,const char *filename) - { - FILE *f=fopen(filename,"rb"); - if(f) - { - sq_compile(v,file_lexfeedASCII,f,filename,1); - fclose(f); - return 1; - } - return 0; - } - -When the compiler fails for a syntax error it will try to call the 'compiler error handler'; -this function must be declared as follow: :: - - typedef void (*SQCOMPILERERROR)(HSQUIRRELVM /*v*/,const SQChar * /*desc*/,const SQChar * /*source*/, - SQInteger /*line*/,SQInteger /*column*/); - -and can be set with the following API call:: - - void sq_setcompilererrorhandler(HSQUIRRELVM v,SQCOMPILERERROR f); diff --git a/m_packages/squirrel/doc/source/reference/embedding/creating_a_c_function.rst b/m_packages/squirrel/doc/source/reference/embedding/creating_a_c_function.rst deleted file mode 100644 index 43772f38..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/creating_a_c_function.rst +++ /dev/null @@ -1,106 +0,0 @@ -.. _embedding_creating_a_c_function: - -=================== -Create a C function -=================== - -A native C function must have the following prototype: :: - - typedef SQInteger (*SQFUNCTION)(HSQUIRRELVM); - -The parameters is an handle to the calling VM and the return value is an integer -respecting the following rules: - -* 1 if the function returns a value -* 0 if the function does not return a value -* SQ_ERROR runtime error is thrown - -In order to obtain a new callable squirrel function from a C function pointer, is necessary -to call sq_newclosure() passing the C function to it; the new Squirrel function will be -pushed in the stack. - -When the function is called, the stackbase is the first parameter of the function and the -top is the last. In order to return a value the function has to push it in the stack and -return 1. - -Function parameters are in the stack from position 1 ('this') to *n*. -*sq_gettop()* can be used to determinate the number of parameters. - -If the function has free variables, those will be in the stack after the explicit parameters -an can be handled as normal parameters. Note also that the value returned by *sq_gettop()* will be -affected by free variables. *sq_gettop()* will return the number of parameters plus -number of free variables. - -Here an example, the following function print the value of each argument and return the -number of arguments. :: - - SQInteger print_args(HSQUIRRELVM v) - { - SQInteger nargs = sq_gettop(v); //number of arguments - for(SQInteger n=1;n<=nargs;n++) - { - printf("arg %d is ",n); - switch(sq_gettype(v,n)) - { - case OT_NULL: - printf("null"); - break; - case OT_INTEGER: - printf("integer"); - break; - case OT_FLOAT: - printf("float"); - break; - case OT_STRING: - printf("string"); - break; - case OT_TABLE: - printf("table"); - break; - case OT_ARRAY: - printf("array"); - break; - case OT_USERDATA: - printf("userdata"); - break; - case OT_CLOSURE: - printf("closure(function)"); - break; - case OT_NATIVECLOSURE: - printf("native closure(C function)"); - break; - case OT_GENERATOR: - printf("generator"); - break; - case OT_USERPOINTER: - printf("userpointer"); - break; - case OT_CLASS: - printf("class"); - break; - case OT_INSTANCE: - printf("instance"); - break; - case OT_WEAKREF: - printf("weak reference"); - break; - default: - return sq_throwerror(v,"invalid param"); //throws an exception - } - } - printf("\n"); - sq_pushinteger(v,nargs); //push the number of arguments as return value - return 1; //1 because 1 value is returned - } - -Here an example of how to register a function:: - - SQInteger register_global_func(HSQUIRRELVM v,SQFUNCTION f,const char *fname) - { - sq_pushroottable(v); - sq_pushstring(v,fname,-1); - sq_newclosure(v,f,0); //create a new function - sq_newslot(v,-3,SQFalse); - sq_pop(v,1); //pops the root table - return 0; - } diff --git a/m_packages/squirrel/doc/source/reference/embedding/debug_interface.rst b/m_packages/squirrel/doc/source/reference/embedding/debug_interface.rst deleted file mode 100644 index 3d38bf27..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/debug_interface.rst +++ /dev/null @@ -1,58 +0,0 @@ -.. _embedding_debug_interface: - -=============== -Debug Interface -=============== - -The squirrel VM exposes a very simple debug interface that allows to easily built a full -featured debugger. -Through the functions sq_setdebughook and sq_setnativedebughook is possible in fact to set a callback function that -will be called every time the VM executes an new line of a script or if a function get -called/returns. The callback will pass as argument the current line the current source and the -current function name (if any).:: - - SQUIRREL_API void sq_setdebughook(HSQUIRRELVM v); - -or :: - - SQUIRREL_API void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook); - -The following code shows how a debug hook could look like(obviously is possible to -implement this function in C as well). :: - - function debughook(event_type,sourcefile,line,funcname) - { - local fname=funcname?funcname:"unknown"; - local srcfile=sourcefile?sourcefile:"unknown" - switch (event_type) { - case 'l': //called every line(that contains some code) - ::print("LINE line [" + line + "] func [" + fname + "]"); - ::print("file [" + srcfile + "]\n"); - break; - case 'c': //called when a function has been called - ::print("LINE line [" + line + "] func [" + fname + "]"); - ::print("file [" + srcfile + "]\n"); - break; - case 'r': //called when a function returns - ::print("LINE line [" + line + "] func [" + fname + "]"); - ::print("file [" + srcfile + "]\n"); - break; - } - } - -The parameter *event_type* can be 'l' ,'c' or 'r' ; a hook with a 'l' event is called for each line that -gets executed, 'c' every time a function gets called and 'r' every time a function returns. - -A full-featured debugger always allows displaying local variables and calls stack. -The call stack information are retrieved through sq_getstackinfos():: - - SQInteger sq_stackinfos(HSQUIRRELVM v,SQInteger level,SQStackInfos *si); - -While the local variables info through sq_getlocal():: - - SQInteger sq_getlocal(HSQUIRRELVM v,SQUnsignedInteger level,SQUnsignedInteger nseq); - -In order to receive line callbacks the scripts have to be compiled with debug infos enabled -this is done through sq_enabledebuginfo(); :: - - void sq_enabledebuginfo(HSQUIRRELVM v, SQInteger debuginfo); diff --git a/m_packages/squirrel/doc/source/reference/embedding/error_conventions.rst b/m_packages/squirrel/doc/source/reference/embedding/error_conventions.rst deleted file mode 100644 index f86e7416..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/error_conventions.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. _embedding_error_convetions: - - -======================== -Error Conventions -======================== - -.. index:: - single: Error Conventions - -Most of the functions in the API return a SQRESULT value; SQRESULT indicates if a -function completed successfully or not. -The macros SQ_SUCCEEDED() and SQ_FAILED() are used to test the result of a function.:: - - if(SQ_FAILED(sq_getstring(v,-1,&s))) - printf("getstring failed"); diff --git a/m_packages/squirrel/doc/source/reference/embedding/memory_management.rst b/m_packages/squirrel/doc/source/reference/embedding/memory_management.rst deleted file mode 100644 index ad0fb082..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/memory_management.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. _embedding_memory_management: - -======================== -Memory Management -======================== - -.. index:: single: Memory Management - -Squirrel uses reference counting (RC) as primary system for memory management; -however, the virtual machine (VM) has an auxiliary -mark and sweep garbage collector that can be invoked on demand. - -There are 2 possible compile time options: - - * The default configuration consists in RC plus a mark and sweep garbage collector. - The host program can call the function sq_collectgarbage() and perform a garbage collection cycle - during the program execution. The garbage collector isn't invoked by the VM and has to - be explicitly called by the host program. - - * The second a situation consists in RC only(define NO_GARBAGE_COLLECTOR); in this case is impossible for - the VM to detect reference cycles, so is the programmer that has to solve them explicitly in order to - avoid memory leaks. - -The only advantage introduced by the second option is that saves 2 additional -pointers that have to be stored for each object in the default configuration with -garbage collector(8 bytes for 32 bits systems). -The types involved are: tables, arrays, functions, threads, userdata and generators; all other -types are untouched. These options do not affect execution speed. diff --git a/m_packages/squirrel/doc/source/reference/embedding/references_from_c.rst b/m_packages/squirrel/doc/source/reference/embedding/references_from_c.rst deleted file mode 100644 index ba84042c..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/references_from_c.rst +++ /dev/null @@ -1,21 +0,0 @@ -.. embedding_references_from_c: - -======================================================== -Mantaining references to Squirrel values from the C API -======================================================== - -Squirrel allows to reference values through the C API; the function sq_getstackobj() gets -a handle to a squirrel object(any type). The object handle can be used to control the lifetime -of an object by adding or removing references to it( see sq_addref() and sq_release()). -The object can be also re-pushed in the VM stack using sq_pushobject().:: - - HSQOBJECT obj; - - sq_resetobject(&obj); //initialize the handle - sq_getstackobj(v,-2,&obj); //retrieve an object handle from the pos -2 - sq_addref(v,&obj); //adds a reference to the object - - ... //do stuff - - sq_pushobject(v,obj); //push the object in the stack - sq_release(v,&obj); //relese the object diff --git a/m_packages/squirrel/doc/source/reference/embedding/runtime_error_handling.rst b/m_packages/squirrel/doc/source/reference/embedding/runtime_error_handling.rst deleted file mode 100644 index b956e4be..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/runtime_error_handling.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. _embedding_runtime_error_handling: - -====================== -Runtime error handling -====================== - -When an exception is not handled by Squirrel code with a try/catch statement, a runtime -error is raised and the execution of the current program is interrupted. It is possible to -set a call back function to intercept the runtime error from the host program; this is -useful to show meaningful errors to the script writer and for implementing visual -debuggers. -The following API call pops a Squirrel function from the stack and sets it as error handler.:: - - SQUIRREL_API void sq_seterrorhandler(HSQUIRRELVM v); - -The error handler is called with 2 parameters, an environment object (this) and a object. -The object can be any squirrel type. diff --git a/m_packages/squirrel/doc/source/reference/embedding/tables_and_arrays_manipulation.rst b/m_packages/squirrel/doc/source/reference/embedding/tables_and_arrays_manipulation.rst deleted file mode 100644 index 8378a102..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/tables_and_arrays_manipulation.rst +++ /dev/null @@ -1,70 +0,0 @@ -.. _embedding_tables_and_arrays_manipulation: - -============================== -Tables and arrays manipulation -============================== - -A new table is created calling sq_newtable, this function pushes a new table in the stack.:: - - void sq_newtable(HSQUIRRELVM v); - -To create a new slot:: - - SQRESULT sq_newslot(HSQUIRRELVM v,SQInteger idx,SQBool bstatic); - -To set or get the table delegate:: - - SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx); - SQRESULT sq_getdelegate(HSQUIRRELVM v,SQInteger idx); - - -A new array is created calling sq_newarray, the function pushes a new array in the -stack; if the parameters size is bigger than 0 the elements are initialized to null.:: - - void sq_newarray (HSQUIRRELVM v,SQInteger size); - -To append a value to the back of the array:: - - SQRESULT sq_arrayappend(HSQUIRRELVM v,SQInteger idx); - -To remove a value from the back of the array:: - - SQRESULT sq_arraypop(HSQUIRRELVM v,SQInteger idx,SQInteger pushval); - -To resize the array:: - - SQRESULT sq_arrayresize(HSQUIRRELVM v,SQInteger idx,SQInteger newsize); - -To retrieve the size of a table or an array you must use sq_getsize():: - - SQInteger sq_getsize(HSQUIRRELVM v,SQInteger idx); - -To set a value in an array or table:: - - SQRESULT sq_set(HSQUIRRELVM v,SQInteger idx); - -To get a value from an array or table:: - - SQRESULT sq_get(HSQUIRRELVM v,SQInteger idx); - -To get or set a value from a table without employing delegation:: - - SQRESULT sq_rawget(HSQUIRRELVM v,SQInteger idx); - SQRESULT sq_rawset(HSQUIRRELVM v,SQInteger idx); - -To iterate a table or an array:: - - SQRESULT sq_next(HSQUIRRELVM v,SQInteger idx); - -Here an example of how to perform an iteration: :: - - //push your table/array here - sq_pushnull(v) //null iterator - while(SQ_SUCCEEDED(sq_next(v,-2))) - { - //here -1 is the value and -2 is the key - - sq_pop(v,2); //pops key and val before the nex iteration - } - - sq_pop(v,1); //pops the null iterator diff --git a/m_packages/squirrel/doc/source/reference/embedding/the_registry_table.rst b/m_packages/squirrel/doc/source/reference/embedding/the_registry_table.rst deleted file mode 100644 index 4aa5f782..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/the_registry_table.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. _embedding_the_registry_table: - -================== -The registry table -================== - -The registry table is an hidden table shared between vm and all his thread(friend vms). -This table is accessible only through the C API and is meant to be an utility structure -for native C library implementation. -For instance the sqstdlib(squirrel standard library)uses it to store configuration and shared objects -delegates. -The registry is accessible through the API call *sq_pushregistrytable()*.:: - - void sq_pushregistrytable(HSQUIRRELVM v); diff --git a/m_packages/squirrel/doc/source/reference/embedding/the_stack.rst b/m_packages/squirrel/doc/source/reference/embedding/the_stack.rst deleted file mode 100644 index 9c5f9aef..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/the_stack.rst +++ /dev/null @@ -1,104 +0,0 @@ -.. _embedding_the_stack: - - -========== -The Stack -========== - -Squirrel exchanges values with the virtual machine through a stack. This mechanism has -been inherited from the language Lua. -For instance to call a Squirrel function from C it is necessary to push the function and the -arguments in the stack and then invoke the function; also when Squirrel calls a C -function the parameters will be in the stack as well. - -------------- -Stack indexes -------------- - -Many API functions can arbitrarily refer to any element in the stack through an index. -The stack indexes follow those conventions: - -* 1 is the stack base -* Negative indexes are considered an offset from top of the stack. For instance -1 isthe top of the stack. -* 0 is an invalid index - -Here an example (let's pretend that this table is the VM stack) - -+------------+--------------------+--------------------+ -| **STACK** | **positive index** | **negative index** | -+============+====================+====================+ -| "test" | 4 | -1(top) | -+------------+--------------------+--------------------+ -| 1 | 3 | -2 | -+------------+--------------------+--------------------+ -| 0.5 | 2 | -3 | -+------------+--------------------+--------------------+ -| "foo" | 1(base) | -4 | -+------------+--------------------+--------------------+ - -In this case, the function *sq_gettop* would return 4; - ------------------- -Stack manipulation ------------------- - -The API offers several functions to push and retrieve data from the Squirrel stack. - -To push a value that is already present in the stack in the top position:: - - void sq_push(HSQUIRRELVM v,SQInteger idx); - -To pop an arbitrary number of elements:: - - void sq_pop(HSQUIRRELVM v,SQInteger nelemstopop); - -To remove an element from the stack:: - - void sq_remove(HSQUIRRELVM v,SQInteger idx); - -To retrieve the top index (and size) of the current -virtual stack you must call *sq_gettop* :: - - SQInteger sq_gettop(HSQUIRRELVM v); - -To force the stack to a certain size you can call *sq_settop* :: - - void sq_settop(HSQUIRRELVM v,SQInteger newtop); - -If the newtop is bigger than the previous one, the new positions in the stack will be -filled with null values. - -The following function pushes a C value into the stack:: - - void sq_pushstring(HSQUIRRELVM v,const SQChar *s,SQInteger len); - void sq_pushfloat(HSQUIRRELVM v,SQFloat f); - void sq_pushinteger(HSQUIRRELVM v,SQInteger n); - void sq_pushuserpointer(HSQUIRRELVM v,SQUserPointer p); - void sq_pushbool(HSQUIRRELVM v,SQBool b); - -this function pushes a null into the stack:: - - void sq_pushnull(HSQUIRRELVM v); - -returns the type of the value in a arbitrary position in the stack:: - - SQObjectType sq_gettype(HSQUIRRELVM v,SQInteger idx); - -the result can be one of the following values: :: - - OT_NULL,OT_INTEGER,OT_FLOAT,OT_STRING,OT_TABLE,OT_ARRAY,OT_USERDATA, - OT_CLOSURE,OT_NATIVECLOSURE,OT_GENERATOR,OT_USERPOINTER,OT_BOOL,OT_INSTANCE,OT_CLASS,OT_WEAKREF - -The following functions convert a squirrel value in the stack to a C value:: - - SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c); - SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger size); - SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i); - SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f); - SQRESULT sq_getuserpointer(HSQUIRRELVM v,SQInteger idx,SQUserPointer *p); - SQRESULT sq_getuserdata(HSQUIRRELVM v,SQInteger idx,SQUserPointer *p,SQUserPointer *typetag); - SQRESULT sq_getbool(HSQUIRRELVM v,SQInteger idx,SQBool *p); - -The function sq_cmp compares 2 values from the stack and returns their relation (like strcmp() in ANSI C).:: - - SQInteger sq_cmp(HSQUIRRELVM v); diff --git a/m_packages/squirrel/doc/source/reference/embedding/userdata_and_userpointers.rst b/m_packages/squirrel/doc/source/reference/embedding/userdata_and_userpointers.rst deleted file mode 100644 index 81e14f03..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/userdata_and_userpointers.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. _embedding_userdata_and_userpointers: - -========================= -Userdata and UserPointers -========================= - -Squirrel allows the host application put arbitrary data chunks into a Squirrel value, this is -possible through the data type userdata.:: - - SQUserPointer sq_newuserdata(HSQUIRRELVM v,SQUnsignedInteger size); - -When the function *sq_newuserdata* is called, Squirrel allocates a new userdata with the -specified size, returns a pointer to his payload buffer and push the object in the stack; at -this point the application can do whatever it want with this memory chunk, the VM will -automatically take cake of the memory deallocation like for every other built-in type. -A userdata can be passed to a function or stored in a table slot. By default Squirrel -cannot manipulate directly userdata; however is possible to assign a delegate to it and -define a behavior like it would be a table. -Because the application would want to do something with the data stored in a userdata -object when it get deleted, is possible to assign a callback that will be called by the VM -just before deleting a certain userdata. -This is done through the API call *sq_setreleasehook*.:: - - typedef SQInteger (*SQRELEASEHOOK)(SQUserPointer,SQInteger size); - - void sq_setreleasehook(HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook); - -Another kind of userdata is the userpointer; this type is not a memory chunk like the -normal userdata, but just a 'void*' pointer. It cannot have a delegate and is passed by -value, so pushing a userpointer doesn't cause any memory allocation.:: - - void sq_pushuserpointer(HSQUIRRELVM v,SQUserPointer p); - diff --git a/m_packages/squirrel/doc/source/reference/embedding/vm_initialization.rst b/m_packages/squirrel/doc/source/reference/embedding/vm_initialization.rst deleted file mode 100644 index 03fba06c..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding/vm_initialization.rst +++ /dev/null @@ -1,21 +0,0 @@ -.. _embedding_vm_initialization: - -============================== -Virtual Machine Initialization -============================== - -The first thing that a host application has to do, is create a virtual machine. -The host application can create any number of virtual machines through the function -*sq_open()*. -Every single VM that was created using *sq_open()* has to be released with the function *sq_close()* when it is no -longer needed.:: - - int main(int argc, char* argv[]) - { - HSQUIRRELVM v; - v = sq_open(1024); //creates a VM with initial stack size 1024 - - //do some stuff with squirrel here - - sq_close(v); - } diff --git a/m_packages/squirrel/doc/source/reference/embedding_squirrel.rst b/m_packages/squirrel/doc/source/reference/embedding_squirrel.rst deleted file mode 100644 index dc8d7fb1..00000000 --- a/m_packages/squirrel/doc/source/reference/embedding_squirrel.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. _embedding_squirrel: - -*************************** - Embedding Squirrel -*************************** - -*This section describes how to embed Squirrel in a host application, -C language knowledge is required to understand this part of the manual.* - -Because of his nature of extension language, Squirrel's compiler and virtual machine -are implemented as C library. The library exposes a set of functions to compile scripts, -call functions, manipulate data and extend the virtual machine. -All declarations needed for embedding the language in an application are in the header file 'squirrel.h'. - -.. toctree:: - embedding/memory_management.rst - embedding/build_configuration.rst - embedding/error_conventions.rst - embedding/vm_initialization.rst - embedding/the_stack.rst - embedding/runtime_error_handling.rst - embedding/compiling_a_script.rst - embedding/calling_a_function.rst - embedding/creating_a_c_function.rst - embedding/tables_and_arrays_manipulation.rst - embedding/userdata_and_userpointers.rst - embedding/the_registry_table.rst - embedding/references_from_c.rst - embedding/debug_interface.rst diff --git a/m_packages/squirrel/doc/source/reference/index.rst b/m_packages/squirrel/doc/source/reference/index.rst deleted file mode 100644 index ff4a1cc7..00000000 --- a/m_packages/squirrel/doc/source/reference/index.rst +++ /dev/null @@ -1,34 +0,0 @@ -.. _reference: - -################################# - Squirrel 3.2 Reference Manual -################################# - -Copyright (c) 2003-2022 Alberto Demichelis - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -.. toctree:: - :maxdepth: 3 - :numbered: - - introduction.rst - language.rst - embedding_squirrel.rst - api_reference.rst diff --git a/m_packages/squirrel/doc/source/reference/introduction.rst b/m_packages/squirrel/doc/source/reference/introduction.rst deleted file mode 100644 index bc83447f..00000000 --- a/m_packages/squirrel/doc/source/reference/introduction.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. _introduction: - -************ -Introduction -************ - -.. index:: - single: introduction - -Squirrel is a high-level, imperative-OO programming language, designed to be a powerful -scripting tool that fits within the size, memory bandwidth, and real-time requirements of -applications like games. -Squirrel offers a wide range of features like dynamic typing, delegation, higher -order functions, generators, tail recursion, exception handling, automatic memory -management while fitting both compiler and virtual machine into about 6k lines of C++ -code. diff --git a/m_packages/squirrel/doc/source/reference/language.rst b/m_packages/squirrel/doc/source/reference/language.rst deleted file mode 100644 index 35621196..00000000 --- a/m_packages/squirrel/doc/source/reference/language.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _thelanguage: - -*************************** - The language -*************************** - -.. toctree:: - language/lexical_structure.rst - language/datatypes.rst - language/execution_context.rst - language/statements.rst - language/expressions.rst - language/tables.rst - language/arrays.rst - language/functions.rst - language/classes.rst - language/generators.rst - language/constants_and_enumerations.rst - language/threads.rst - language/weak_references.rst - language/delegation.rst - language/metamethods.rst - language/builtin_functions.rst diff --git a/m_packages/squirrel/doc/source/reference/language/arrays.rst b/m_packages/squirrel/doc/source/reference/language/arrays.rst deleted file mode 100644 index ddf5114f..00000000 --- a/m_packages/squirrel/doc/source/reference/language/arrays.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. _arrays: - - -================= -Arrays -================= - -.. index:: - single: Arrays - -An array is a sequence of values indexed by a integer number from 0 to the size of the -array minus 1. Arrays elements can be obtained through their index.:: - - local a=["I'm a string", 123] - print(typeof a[0]) //prints "string" - print(typeof a[1]) //prints "integer" - -Resizing, insertion, deletion of arrays and arrays elements is done through a set of -standard functions (see :ref:`built-in functions `). diff --git a/m_packages/squirrel/doc/source/reference/language/builtin_functions.rst b/m_packages/squirrel/doc/source/reference/language/builtin_functions.rst deleted file mode 100644 index 2f64105b..00000000 --- a/m_packages/squirrel/doc/source/reference/language/builtin_functions.rst +++ /dev/null @@ -1,693 +0,0 @@ -.. _builtin_functions: - - -================== -Built-in Functions -================== - -.. index:: - single: Built-in Functions - pair: Global Symbols; Built-in Functions - - -^^^^^^^^^^^^^^ -Global Symbols -^^^^^^^^^^^^^^ - -.. js:function:: array(size,[fill]) - -creates and returns array of a specified size. If the optional parameter fill is specified its value will be used to fill the new array's slots. If the fill parameter is omitted, null is used instead. - -.. js:function:: seterrorhandler(func) - - -sets the runtime error handler - -.. js:function:: callee() - - -returns the currently running closure - -.. js:function:: setdebughook(hook_func) - - -sets the debug hook - -.. js:function:: enabledebuginfo(enable) - -enable/disable the debug line information generation at compile time. enable != null enables. enable == null disables. - -.. js:function:: getroottable() - -returns the root table of the VM. - -.. js:function:: setroottable(table) - -sets the root table of the VM. And returns the previous root table. - -.. js:function:: getconsttable() - -returns the const table of the VM. - -.. js:function:: setconsttable(table) - -sets the const table of the VM; returns the previous const table. - -.. js:function:: assert(exp, [message]) - -throws an exception if exp is null or false. Throws "assertion failed" string by default, or message if specified. - -.. js:function:: print(x) - -prints x to the standard output - -.. js:function:: error(x) - -prints x in the standard error output - -.. js:function:: compilestring(string,[buffername]) - -compiles a string containing a squirrel script into a function and returns it:: - - local compiledscript=compilestring("::print(\"ciao\")"); - //run the script - compiledscript(); - -.. js:function:: collectgarbage() - - Runs the garbage collector and returns the number of reference cycles found (and deleted). This function only works on garbage collector builds. - -.. js:function:: resurrectunreachable() - -Runs the garbage collector and returns an array containing all unreachable object found. If no unreachable object is found, null is returned instead. This function is meant to help debugging reference cycles. This function only works on garbage collector builds. - -.. js:function:: type(obj) - -return the 'raw' type of an object without invoking the metamethod '_typeof'. - -.. js:function:: getstackinfos(level) - -returns the stack informations of a given call stack level. returns a table formatted as follow: :: - - { - func="DoStuff", //function name - - src="test.nut", //source file - - line=10, //line number - - locals = { //a table containing the local variables - - a=10, - - testy="I'm a string" - } - } - -level = 0 is getstackinfos() itself! level = 1 is the current function, level = 2 is the caller of the current function, and so on. If the stack level doesn't exist the function returns null. - -.. js:function:: newthread(threadfunc) - -creates a new cooperative thread object(coroutine) and returns it - -.. js:data:: _versionnumber_ - -integer values describing the version of VM and compiler. e.g. for Squirrel 3.0.1 this value will be 301 - -.. js:data:: _version_ - -string values describing the version of VM and compiler. - -.. js:data:: _charsize_ - -size in bytes of the internal VM representation for characters(1 for ASCII builds 2 for UNICODE builds). - -.. js:data:: _intsize_ - -size in bytes of the internal VM representation for integers(4 for 32bits builds 8 for 64bits builds). - -.. js:data:: _floatsize_ - -size in bytes of the internal VM representation for floats(4 for single precision builds 8 for double precision builds). - ------------------ -Default delegates ------------------ - -Except null and userdata every squirrel object has a default delegate containing a set of functions to manipulate and retrieve information from the object itself. - -^^^^^^^^ -Integer -^^^^^^^^ - -.. js:function:: integer.tofloat() - -convert the number to float and returns it - - -.. js:function:: integer.tostring() - -converts the number to string and returns it - - -.. js:function:: integer.tointeger() - -dummy function; returns the value of the integer. - - -.. js:function:: integer.tochar() - -returns a string containing a single character represented by the integer. - - -.. js:function:: integer.weakref() - -dummy function; returns the integer itself. - -^^^^^ -Float -^^^^^ - -.. js:function:: float.tofloat() - -returns the value of the float(dummy function) - - -.. js:function:: float.tointeger() - -converts the number to integer and returns it - - -.. js:function:: float.tostring() - -converts the number to string and returns it - - -.. js:function:: float.tochar() - -returns a string containing a single character represented by the integer part of the float. - - -.. js:function:: float.weakref() - -dummy function; returns the float itself. - -^^^^ -Bool -^^^^ - -.. js:function:: bool.tofloat() - -returns 1.0 for true 0.0 for false - - -.. js:function:: bool.tointeger() - -returns 1 for true 0 for false - - -.. js:function:: bool.tostring() - -returns "true" for true and "false" for false - - -.. js:function:: bool.weakref() - -dummy function; returns the bool itself. - -^^^^^^ -String -^^^^^^ - -.. js:function:: string.len() - -returns the string length - - -.. js:function:: string.tointeger([base]) - -Converts the string to integer and returns it. An optional parameter base can be specified--if a base is not specified, it defaults to base 10. - - -.. js:function:: string.tofloat() - -converts the string to float and returns it - - -.. js:function:: string.tostring() - -returns the string (really, a dummy function) - - -.. js:function:: string.slice(start,[end]) - -returns a section of the string as new string. Copies from start to the end (not included). If start is negative the index is calculated as length + start, if end is negative the index is calculated as length + end. If end is omitted end is equal to the string length. - - -.. js:function:: string.find(substr,[startidx]) - -Searches a sub string (substr) starting from the index startidx and returns the index of its first occurrence. If startidx is omitted the search operation starts from the beginning of the string. The function returns null if substr is not found. - - -.. js:function:: string.tolower() - -returns a lowercase copy of the string. - - -.. js:function:: string.toupper() - -returns a uppercase copy of the string. - - -.. js:function:: string.weakref() - -returns a weak reference to the object. - -^^^^^ -Table -^^^^^ - -.. js:function:: table.len() - -returns the number of slots contained in a table - - -.. js:function:: table.rawget(key) - -tries to get a value from the slot 'key' without employing delegation - - -.. js:function:: table.rawset(key,val) - -Sets the slot 'key' with the value 'val' without employing delegation. If the slot does not exists, it will be created. Returns table itself. - - -.. js:function:: table.rawdelete() - -Deletes the slot key without employing delegation and returns its value. If the slot does not exists, returns null. - - -.. js:function:: table.rawin(key) - -returns true if the slot 'key' exists. the function has the same effect as the operator 'in' but does not employ delegation. - - -.. js:function:: table.weakref() - -returns a weak reference to the object. - - -.. js:function:: table.tostring() - -Tries to invoke the _tostring metamethod. If that fails, it returns "(table : pointer)". - - -.. js:function:: table.clear() - -removes all the slots from the table. Returns table itself. - - -.. js:function:: table.setdelegate(table) - -Sets the delegate of the table. To remove a delegate, 'null' must be passed to the function. The function returns the table itself (e.g. a.setdelegate(b) -- in this case 'a' is the return value). - - -.. js:function:: table.getdelegate() - -returns the table's delegate or null if no delegate was set. - - -.. js:function:: table.filter(func(key,val)) - -Creates a new table with all values that pass the test implemented by the provided function. In detail, it creates a new table, invokes the specified function for each key-value pair in the original table; if the function returns 'true', then the value is added to the newly created table at the same key. - -.. js:function:: table.keys() - -returns an array containing all the keys of the table slots. - -.. js:function:: table.values() - -returns an array containing all the values of the table slots. - -^^^^^^ -Array -^^^^^^ - -.. js:function:: array.len() - -returns the length of the array - - -.. js:function:: array.append(val) - -appends the value 'val' at the end of the array. Returns array itself. - - -.. js:function:: array.push(val) - -appends the value 'val' at the end of the array. Returns array itself. - - -.. js:function:: array.extend(array) - -Extends the array by appending all the items in the given array. Returns array itself. - - -.. js:function:: array.pop() - -removes a value from the back of the array and returns it. - - -.. js:function:: array.top() - -returns the value of the array with the higher index - - -.. js:function:: array.insert(idx,val) - -inserts the value 'val' at the position 'idx' in the array. Returns array itself. - - -.. js:function:: array.remove(idx) - -removes the value at the position 'idx' in the array and returns its value. - - -.. js:function:: array.resize(size,[fill]) - -Resizes the array. If the optional parameter 'fill' is specified, its value will be used to fill the new array's slots when the size specified is bigger than the previous size. If the fill parameter is omitted, null is used instead. Returns array itself. - - -.. js:function:: array.sort([compare_func]) - -Sorts the array in-place. A custom compare function can be optionally passed. The function prototype as to be the following.:: - - function custom_compare(a,b) - { - if(a>b) return 1 - else if(a :: - - arr.sort(@(a,b) a <=> b); - -Returns array itself. - -.. js:function:: array.reverse() - -reverse the elements of the array in place. Returns array itself. - - -.. js:function:: array.slice(start,[end]) - -Returns a section of the array as new array. Copies from start to the end (not included). If start is negative the index is calculated as length + start, if end is negative the index is calculated as length + end. If end is omitted end is equal to the array length. - - -.. js:function:: array.weakref() - -returns a weak reference to the object. - - -.. js:function:: array.tostring() - -returns the string "(array : pointer)". - - -.. js:function:: array.clear() - -removes all the items from the array - - -.. js:function:: array.map(func(item_value, [item_index], [array_ref])) - -Creates a new array of the same size. For each element in the original array invokes the function 'func' and assigns the return value of the function to the corresponding element of the newly created array. -Provided func can accept up to 3 arguments: array item value (required), array item index (optional), reference to array itself (optional). - - -.. js:function:: array.apply(func([item_value, [item_index], [array_ref])) - -for each element in the array invokes the function 'func' and replace the original value of the element with the return value of the function. - - -.. js:function:: array.reduce(func(prevval,curval), [initializer]) - -Reduces an array to a single value. For each element in the array invokes the function 'func' passing -the initial value (or value from the previous callback call) and the value of the current element. -The return value of the function is then used as 'prevval' for the next element. -If the optional initializer is present, it is placed before the items of the array in the calculation, -and serves as a default when the sequence is empty. -If initializer is not given then for sequence contains only one item, reduce() returns the first item, -and for empty sequence returns null. - -Given an sequence with 2 or more elements (including initializer) calls the function with the first two elements as the parameters, -gets that result, then calls the function with that result and the third element, gets that result, -calls the function with that result and the fourth parameter and so on until all element have been processed. -Finally, returns the return value of the last invocation of func. - - -.. js:function:: array.filter(func(index,val)) - -Creates a new array with all elements that pass the test implemented by the provided function. In detail, it creates a new array, for each element in the original array invokes the specified function passing the index of the element and it's value; if the function returns 'true', then the value of the corresponding element is added on the newly created array. - - -.. js:function:: array.find(value) - -Performs a linear search for the value in the array. Returns the index of the value if it was found null otherwise. - -^^^^^^^^ -Function -^^^^^^^^ - -.. js:function:: function.call(_this,args...) - -calls the function with the specified environment object('this') and parameters - - -.. js:function:: function.pcall(_this,args...) - -calls the function with the specified environment object('this') and parameters, this function will not invoke the error callback in case of failure(pcall stays for 'protected call') - - -.. js:function:: function.acall(array_args) - -calls the function with the specified environment object('this') and parameters. The function accepts an array containing the parameters that will be passed to the called function.Where array_args has to contain the required 'this' object at the [0] position. - - -.. js:function:: function.pacall(array_args) - -calls the function with the specified environment object('this') and parameters. The function accepts an array containing the parameters that will be passed to the called function.Where array_args has to contain the required 'this' object at the [0] position. This function will not invoke the error callback in case of failure(pacall stays for 'protected array call') - - -.. js:function:: function.weakref() - -returns a weak reference to the object. - - -.. js:function:: function.tostring() - -returns the string "(closure : pointer)". - - -.. js:function:: function.setroot(table) - -sets the root table of a closure - - -.. js:function:: function.getroot() - -returns the root table of the closure - - -.. js:function:: function.bindenv(env) - -clones the function(aka closure) and bind the environment object to it(table,class or instance). the this parameter of the newly create function will always be set to env. Note that the created function holds a weak reference to its environment object so cannot be used to control its lifetime. - - -.. js:function:: function.getinfos() - -returns a table containing informations about the function, like parameters, name and source name; :: - - //the data is returned as a table is in form - //pure squirrel function - { - native = false - name = "zefuncname" - src = "/somthing/something.nut" - parameters = ["a","b","c"] - defparams = [1,"def"] - varargs = 2 - } - //native C function - { - native = true - name = "zefuncname" - paramscheck = 2 - typecheck = [83886082,83886384] //this is the typemask (see C defines OT_INTEGER,OT_FLOAT etc...) - } - - - -^^^^^ -Class -^^^^^ - -.. js:function:: class.instance() - -returns a new instance of the class. this function does not invoke the instance constructor. The constructor must be explicitly called (eg. class_inst.constructor(class_inst) ). - - -.. js:function:: class.getattributes(membername) - -returns the attributes of the specified member. if the parameter member is null the function returns the class level attributes. - - -.. js:function:: class.setattributes(membername,attr) - -sets the attribute of the specified member and returns the previous attribute value. if the parameter member is null the function sets the class level attributes. - - -.. js:function:: class.rawin(key) - -returns true if the slot 'key' exists. the function has the same effect as the operator 'in' but does not employ delegation. - - -.. js:function:: class.weakref() - -returns a weak reference to the object. - - -.. js:function:: class.tostring() - -returns the string "(class : pointer)". - - -.. js:function:: class.rawget(key) - -tries to get a value from the slot 'key' without employing delegation - - -.. js:function:: class.rawset(key,val) - -sets the slot 'key' with the value 'val' without employing delegation. If the slot does not exists, it will be created. - - -.. js:function:: class.newmember(key,val,[attrs],[bstatic]) - -sets/adds the slot 'key' with the value 'val' and attributes 'attrs' and if present invokes the _newmember metamethod. If bstatic is true the slot will be added as static. If the slot does not exists , it will be created. - - -.. js:function:: class.rawnewmember(key,val,[attrs],[bstatic]) - -sets/adds the slot 'key' with the value 'val' and attributes 'attrs'. If bstatic is true the slot will be added as static. If the slot does not exist, it will be created. It doesn't invoke any metamethod. - -^^^^^^^^^^^^^^ -Class Instance -^^^^^^^^^^^^^^ - -.. js:function:: instance.getclass() - -returns the class that created the instance. - - -.. js:function:: instance.rawin(key) - - :param key: ze key - -returns true if the slot 'key' exists. the function has the same effect as the operator 'in' but does not employ delegation. - - -.. js:function:: instance.weakref() - -returns a weak reference to the object. - - -.. js:function:: instance.tostring() - -tries to invoke the _tostring metamethod, if failed. returns "(instance : pointer)". - - -.. js:function:: instance.rawget(key) - -tries to get a value from the slot 'key' without employing delegation - - -.. js:function:: instance.rawset(key,val) - -sets the slot 'key' with the value 'val' without employing delegation. If the slot does not exists, it will be created. - -^^^^^^^^^^^^^^ -Generator -^^^^^^^^^^^^^^ - - -.. js:function:: generator.getstatus() - -returns the status of the generator as string : "running", "dead" or "suspended". - - -.. js:function:: generator.weakref() - -returns a weak reference to the object. - - -.. js:function:: generator.tostring() - -returns the string "(generator : pointer)". - -^^^^^^^^^^^^^^ -Thread -^^^^^^^^^^^^^^ - -.. js:function:: thread.call(...) - -starts the thread with the specified parameters - - -.. js:function:: thread.wakeup([wakeupval]) - -wakes up a suspended thread, accepts a optional parameter that will be used as return value for the function that suspended the thread(usually suspend()) - - -.. js:function:: thread.wakeupthrow(objtothrow,[propagateerror = true]) - -wakes up a suspended thread, throwing an exception in the awaken thread, throwing the object 'objtothrow'. - - -.. js:function:: thread.getstatus() - -returns the status of the thread ("idle","running","suspended") - - -.. js:function:: thread.weakref() - -returns a weak reference to the object. - - -.. js:function:: thread.tostring() - -returns the string "(thread : pointer)". - - -.. js:function:: thread.getstackinfos(stacklevel) - -returns the stack frame informations at the given stack level (0 is the current function 1 is the caller and so on). - -^^^^^^^^^^^^^^ -Weak Reference -^^^^^^^^^^^^^^ - -.. js:function:: weakreference.ref() - -returns the object that the weak reference is pointing at; null if the object that was point at was destroyed. - - -.. js:function:: weakreference.weakref() - -returns a weak reference to the object. - - -.. js:function:: weakreference.tostring() - -returns the string "(weakref : pointer)". diff --git a/m_packages/squirrel/doc/source/reference/language/classes.rst b/m_packages/squirrel/doc/source/reference/language/classes.rst deleted file mode 100644 index b9256c3f..00000000 --- a/m_packages/squirrel/doc/source/reference/language/classes.rst +++ /dev/null @@ -1,429 +0,0 @@ -.. _classes: - - -================= -Classes -================= - -.. index:: - single: Classes - -Squirrel implements a class mechanism similar to languages like Java/C++/etc... -however because of its dynamic nature it differs in several aspects. -Classes are first class objects like integer or strings and can be stored in -table slots local variables, arrays and passed as function parameters. - ------------------ -Class Declaration ------------------ - -.. index:: - pair: declaration; Class - single: Class Declaration - -A class object is created through the keyword 'class' . The class object follows -the same declaration syntax of a table(see :ref:`Tables `) with the only difference -of using ';' as optional separator rather than ','. - -For instance: :: - - class Foo { - //constructor - constructor(a) - { - testy = ["stuff",1,2,3,a]; - } - //member function - function PrintTesty() - { - foreach(i,val in testy) - { - ::print("idx = "+i+" = "+val+" \n"); - } - } - //property - testy = null; - - } - -the previous code example is a syntactic sugar for: :: - - Foo <- class { - //constructor - constructor(a) - { - testy = ["stuff",1,2,3,a]; - } - //member function - function PrintTesty() - { - foreach(i,val in testy) - { - ::print("idx = "+i+" = "+val+" \n"); - } - } - //property - testy = null; - - } - -in order to emulate namespaces, it is also possible to declare something like this:: - - //just 2 regular nested tables - FakeNamespace <- { - Utils = {} - } - - class FakeNamespace.Utils.SuperClass { - constructor() - { - ::print("FakeNamespace.Utils.SuperClass") - } - function DoSomething() - { - ::print("DoSomething()") - } - } - - function FakeNamespace::Utils::SuperClass::DoSomethingElse() - { - ::print("FakeNamespace::Utils::SuperClass::DoSomethingElse()") - } - - local testy = FakeNamespace.Utils.SuperClass(); - testy.DoSomething(); - testy.DoSomethingElse(); - -After its declaration, methods or properties can be added or modified by following -the same rules that apply to a table(operator ``<-``).:: - - //adds a new property - Foo.stuff <- 10; - - //modifies the default value of an existing property - Foo.testy <- "I'm a string"; - - //adds a new method - function Foo::DoSomething(a,b) - { - return a+b; - } - -After a class is instantiated is no longer possible to add new properties however is possible to add or replace methods. - -^^^^^^^^^^^^^^^^ -Static variables -^^^^^^^^^^^^^^^^ - -.. index:: - pair: static variables; Class - single: Static variables - -Squirrel's classes support static member variables. A static variable shares its value -between all instances of the class. Statics are declared by prefixing the variable declaration -with the keyword ``static``; the declaration must be in the class body. - -.. note:: Statics are read-only. - -:: - - class Foo { - constructor() - { - //..stuff - } - name = "normal variable"; - //static variable - static classname = "The class name is foo"; - }; - -^^^^^^^^^^^^^^^^ -Class Attributes -^^^^^^^^^^^^^^^^ - -.. index:: - pair: attributes; Class - single: Class Attributes - -Classes allow to associate attributes to it's members. Attributes are a form of metadata -that can be used to store application specific informations, like documentations -strings, properties for IDEs, code generators etc... -Class attributes are declared in the class body by preceding the member declaration and -are delimited by the symbol ````. -Here an example: :: - - class Foo { - //attributes of PrintTesty - function PrintTesty() - { - foreach(i,val in testy) - { - ::print("idx = "+i+" = "+val+" \n"); - } - } - //attributes of testy - testy = null; - } - -Attributes are, matter of fact, a table. Squirrel uses ```` syntax -instead of curly brackets ``{}`` for the attribute declaration to increase readability. - -This means that all rules that apply to tables apply to attributes. - -Attributes can be retrieved through the built-in function ``classobj.getattributes(membername)`` (see :ref:`built-in functions `). -and can be modified/added through the built-in function ``classobj.setattributes(membername,val)``. - -the following code iterates through the attributes of all Foo members.:: - - foreach(member,val in Foo) - { - ::print(member+"\n"); - local attr; - if((attr = Foo.getattributes(member)) != null) { - foreach(i,v in attr) - { - ::print("\t"+i+" = "+(typeof v)+"\n"); - } - } - else { - ::print("\t\n") - } - } - ------------------ -Class Instances ------------------ - -.. index:: - pair: instances; Class - single: Class Instances - -The class objects inherits several of the table's feature with the difference that multiple instances of the -same class can be created. -A class instance is an object that share the same structure of the table that created it but -holds is own values. -Class *instantiation* uses function notation. -A class instance is created by calling a class object. Can be useful to imagine a class like a function -that returns a class instance.:: - - //creates a new instance of Foo - local inst = Foo(); - -When a class instance is created its member are initialized *with the same value* specified in the -class declaration. The values are copied verbatim, *no cloning is performed* even if the value is a container or a class instances. - -.. note:: FOR C# and Java programmers: - - Squirrel doesn't clone member's default values nor executes the member declaration for each instance(as C# or java). - - So consider this example: :: - - class Foo { - myarray = [1,2,3] - mytable = {} - } - - local a = Foo(); - local b = Foo(); - - In the snippet above both instances will refer to the same array and same table.To achieve what a C# or Java programmer would - expect, the following approach should be taken. :: - - class Foo { - myarray = null - mytable = null - constructor() - { - myarray = [1,2,3] - mytable = {} - } - } - - local a = Foo(); - local b = Foo(); - -When a class defines a method called 'constructor', the class instantiation operation will -automatically invoke it for the newly created instance. -The constructor method can have parameters, this will impact on the number of parameters -that the *instantiation operation* will require. -Constructors, as normal functions, can have variable number of parameters (using the parameter ``...``).:: - - class Rect { - constructor(w,h) - { - width = w; - height = h; - } - x = 0; - y = 0; - width = null; - height = null; - } - - //Rect's constructor has 2 parameters so the class has to be 'called' - //with 2 parameters - local rc = Rect(100,100); - -After an instance is created, its properties can be set or fetched following the -same rules that apply to tables. Methods cannot be set. - -Instance members cannot be removed. - -The class object that created a certain instance can be retrieved through the built-in function -``instance.getclass()`` (see :ref:`built-in functions `) - -The operator ``instanceof`` tests if a class instance is an instance of a certain class.:: - - local rc = Rect(100,100); - if(rc instanceof ::Rect) { - ::print("It's a rect"); - } - else { - ::print("It isn't a rect"); - } - -.. note:: Since Squirrel 3.x instanceof doesn't throw an exception if the left expression is not a class, it simply fails - --------------- -Inheritance --------------- - -.. index:: - pair: inheritance; Class - single: Inheritance - -Squirrel's classes support single inheritance by adding the keyword ``extends``, followed -by an expression, in the class declaration. -The syntax for a derived class is the following: :: - - class SuperFoo extends Foo { - function DoSomething() { - ::print("I'm doing something"); - } - } - -When a derived class is declared, Squirrel first copies all base's members in the -new class then proceeds with evaluating the rest of the declaration. - -A derived class inherit all members and properties of it's base, if the derived class -overrides a base function the base implementation is shadowed. -It's possible to access a overridden method of the base class by fetching the method from -through the 'base' keyword. - -Here an example: :: - - class Foo { - function DoSomething() { - ::print("I'm the base"); - } - }; - - class SuperFoo extends Foo { - //overridden method - function DoSomething() { - //calls the base method - base.DoSomething(); - ::print("I'm doing something"); - } - } - -Same rule apply to the constructor. The constructor is a regular function (apart from being automatically invoked on construction).:: - - class BaseClass { - constructor() - { - ::print("Base constructor\n"); - } - } - - class ChildClass extends BaseClass { - constructor() - { - base.constructor(); - ::print("Child constructor\n"); - } - } - - local test = ChildClass(); - -The base class of a derived class can be retrieved through the built-in method ``getbase()``.:: - - local thebaseclass = SuperFoo.getbase(); - -Note that because methods do not have special protection policies when calling methods of the same -objects, a method of a base class that calls a method of the same class can end up calling a overridden method of the derived class. - -A method of a base class can be explicitly invoked by a method of a derived class though the keyword ``base`` (as in base.MyMethod() ).:: - - class Foo { - function DoSomething() { - ::print("I'm the base"); - } - function DoIt() - { - DoSomething(); - } - }; - - class SuperFoo extends Foo { - //overridden method - function DoSomething() { - ::print("I'm the derived"); - - } - function DoIt() { - base.DoIt(); - } - } - - //creates a new instance of SuperFoo - local inst = SuperFoo(); - - //prints "I'm the derived" - inst.DoIt(); - ----------------------- -Metamethods ----------------------- - -.. index:: - pair: metamethods; Class - single: Class metamethods - -Class instances allow the customization of certain aspects of the -their semantics through metamethods(see see :ref:`Metamethods `). -For C++ programmers: "metamethods behave roughly like overloaded operators". -The metamethods supported by classes are ``_add, _sub, _mul, _div, _unm, _modulo, -_set, _get, _typeof, _nexti, _cmp, _call, _delslot, _tostring`` - -Class objects instead support only 2 metamethods : ``_newmember`` and ``_inherited`` - -the following example show how to create a class that implements the metamethod ``_add``.:: - - class Vector3 { - constructor(...) - { - if(vargv.len() >= 3) { - x = vargv[0]; - y = vargv[1]; - z = vargv[2]; - } - } - function _add(other) - { - return ::Vector3(x+other.x,y+other.y,z+other.z); - } - - x = 0; - y = 0; - z = 0; - } - - local v0 = Vector3(1,2,3) - local v1 = Vector3(11,12,13) - local v2 = v0 + v1; - ::print(v2.x+","+v2.y+","+v2.z+"\n"); - -Since version 2.1, classes support 2 metamethods ``_inherited`` and ``_newmember``. -``_inherited`` is invoked when a class inherits from the one that implements ``_inherited``. -``_newmember`` is invoked for each member that is added to the class(at declaration time). diff --git a/m_packages/squirrel/doc/source/reference/language/constants_and_enumerations.rst b/m_packages/squirrel/doc/source/reference/language/constants_and_enumerations.rst deleted file mode 100644 index 77fd9bc2..00000000 --- a/m_packages/squirrel/doc/source/reference/language/constants_and_enumerations.rst +++ /dev/null @@ -1,97 +0,0 @@ -.. _constants_and_enumerations: - - -======================== -Constants & Enumerations -======================== - -.. index:: - single: Constants & Enumerations - - - -Squirrel allows to bind constant values to an identifier that will be evaluated compile-time. -This is achieved though constants and Enumerations. - ---------------- -Constants ---------------- - -.. index:: - single: Constants - -Constants bind a specific value to an identifier. Constants are similar to -global values, except that they are evaluated compile time and their value cannot be changed. - -constants values can only be integers, floats or string literals. No expression are allowed. -are declared with the following syntax.:: - - const foobar = 100; - const floatbar = 1.2; - const stringbar = "I'm a constant string"; - -constants are always globally scoped, from the moment they are declared, any following code -can reference them. -Constants will shadow any global slot with the same name( the global slot will remain visible by using the ``::`` syntax).:: - - local x = foobar * 2; - ---------------- -Enumerations ---------------- - -.. index:: - single: Enumerations - -As Constants, Enumerations bind a specific value to a name. Enumerations are also evaluated at compile time -and their value cannot be changed. - -An enum declaration introduces a new enumeration into the program. -Enumeration values can only be integers, floats or string literals. No expression are allowed.:: - - enum Stuff { - first, //this will be 0 - second, //this will be 1 - third //this will be 2 - } - -or:: - - enum Stuff { - first = 10 - second = "string" - third = 1.2 - } - -An enum value is accessed in a manner that's similar to accessing a static class member. -The name of the member must be qualified with the name of the enumeration, for example ``Stuff.second`` -Enumerations will shadow any global slot with the same name( the global slot will remain visible by using the ``::`` syntax).:: - - local x = Stuff.first * 2; - --------------------- -Implementation notes --------------------- - -Enumerations and Constants are a compile-time feature. Only integers, string and floats can be declared as const/enum; -No expressions are allowed(because they would have to be evaluated compile time). -When a const or an enum is declared, it is added compile time to the ``consttable``. This table is stored in the VM shared state -and is shared by the VM and all its threads. -The ``consttable`` is a regular squirrel table; In the same way as the ``roottable`` -it can be modified runtime. -You can access the ``consttable`` through the built-in function ``getconsttable()`` -and also change it through the built-in function ``setconsttable()`` - -here some example: :: - - //creates a constant - getconsttable()["something"] <- 10" - //creates an enumeration - getconsttable()["somethingelse"] <- { a = "10", c = "20", d = "200"}; - //deletes the constant - delete getconsttable()["something"] - //deletes the enumeration - delete getconsttable()["somethingelse"] - -This system allows to procedurally declare constants and enumerations, it is also possible to assign any squirrel type -to a constant/enumeration(function,classes etc...). However this will make serialization of a code chunk impossible. diff --git a/m_packages/squirrel/doc/source/reference/language/datatypes.rst b/m_packages/squirrel/doc/source/reference/language/datatypes.rst deleted file mode 100644 index 843ed8b3..00000000 --- a/m_packages/squirrel/doc/source/reference/language/datatypes.rst +++ /dev/null @@ -1,162 +0,0 @@ -.. _datatypes_and_values: - -===================== -Values and Data types -===================== - -While Squirrel is a dynamically typed language and variables do not -have a type, different operations may interpret the variable as -containing a type. Squirrel's basic types are integer, float, string, -null, table, array, function, generator, class, instance, bool, thread -and userdata. - -.. _userdata-index: - --------- -Integer --------- - -An Integer represents a 32 bit (or better) signed number.:: - - local a = 123 //decimal - local b = 0x0012 //hexadecimal - local c = 075 //octal - local d = 'w' //char code - --------- -Float --------- - -A float represents a 32 bit (or better) floating point number.:: - - local a=1.0 - local b=0.234 - --------- -String --------- - -Strings are an immutable sequence of characters. In order to modify a -string is it necessary create a new one. - -Squirrel's strings are similar to strings in C or C++. They are -delimited by quotation marks(``"``) and can contain escape -sequences (``\t``, ``\a``, ``\b``, ``\n``, ``\r``, ``\v``, ``\f``, -``\\``, ``\"``, ``\'``, ``\0``, ``\x``, ``\u`` and -``\U``). - -Verbatim string literals do not interpret escape sequences. They begin -with ``@"`` and end with the matching quote. Verbatim string literals -also can extend over a line break. If they do, they include any white -space characters between the quotes: :: - - local a = "I'm a wonderful string\n" - // has a newline at the end of the string - local x = @"I'm a verbatim string\n" - // the \n is literal, similar to "\\n" in a regular string. - -However, a doubled quotation mark within a verbatim string is replaced -by a single quotation mark: :: - - local multiline = @" - this is a multiline string - it will ""embed"" all the new line - characters - " - --------- -Null --------- - -The null value is a primitive value that represents the null, empty, or non-existent -reference. The type Null has exactly one value, called null.:: - - local a = null - --------- -Bool --------- - -Bool is a double-valued (Boolean) data type. Its literals are ``true`` -and ``false``. A bool value expresses the validity of a condition -(tells whether the condition is true or false).:: - - local a = true; - --------- -Table --------- - -Tables are associative containers implemented as a set of key/value pairs -called slots.:: - - local t={} - local test= - { - a=10 - b=function(a) { return a+1; } - } - --------- -Array --------- - -Arrays are simple sequence of objects. Their size is dynamic and their index always starts from 0.:: - - local a = ["I'm","an","array"] - local b = [null] - b[0] = a[2]; - --------- -Function --------- - -Functions are similar to those in other C-like languages with a few key differences (see below). - --------- -Class --------- - -Classes are associative containers implemented as sets of key/value -pairs. Classes are created through a 'class expression' or a 'class -statement'. class members can be inherited from another class object -at creation time. After creation, members can be added until an -instance of the class is created. - --------------- -Class Instance --------------- - -Class instances are created by calling a *class object*. Instances, as -tables, are implemented as sets of key/value pairs. Instance members -cannot be dynamically added or removed; however the value of the -members can be changed. - ---------- -Generator ---------- - -Generators are functions that can be suspended with the statement -'yield' and resumed later (see :ref:`Generators `). - ---------- -Userdata ---------- - -Userdata objects are blobs of memory or pointers defined by the host -application but stored within Squirrel variables (See :ref:`Userdata -and UserPointers `). - ---------- -Thread ---------- - -Threads are objects representing a cooperative thread of execution, -also known as coroutines. - --------------- -Weak Reference --------------- - -Weak References are objects that point to another (non-scalar) object but do not own a strong reference to it. -(See :ref:`Weak References `). diff --git a/m_packages/squirrel/doc/source/reference/language/delegation.rst b/m_packages/squirrel/doc/source/reference/language/delegation.rst deleted file mode 100644 index 63607d5c..00000000 --- a/m_packages/squirrel/doc/source/reference/language/delegation.rst +++ /dev/null @@ -1,35 +0,0 @@ -.. _delegation: - - -======================== -Delegation -======================== - -.. index:: - single: Delegation - -Squirrel supports implicit delegation. Every table or userdata can have a parent table -(delegate). A parent table is a normal table that allows the definition of special behaviors -for his child. -When a table (or userdata) is indexed with a key that doesn't correspond to one of its -slots, the interpreter automatically delegates the get (or set) operation to its parent.:: - - Entity <- { - } - - function Entity::DoStuff() - { - ::print(_name); - } - - local newentity = { - _name="I'm the new entity" - } - newentity.setdelegate(Entity) - - newentity.DoStuff(); //prints "I'm the new entity" - -The delegate of a table can be retreived through built-in method ``table.getdelegate()``.:: - - local thedelegate = newentity.getdelegate(); - diff --git a/m_packages/squirrel/doc/source/reference/language/execution_context.rst b/m_packages/squirrel/doc/source/reference/language/execution_context.rst deleted file mode 100644 index 47ef3209..00000000 --- a/m_packages/squirrel/doc/source/reference/language/execution_context.rst +++ /dev/null @@ -1,95 +0,0 @@ -.. _executioncontext: - -======================= -Execution Context -======================= - -.. index:: - single: execution context - -The execution context is the union of the function stack frame and the function -environment object(this) and the function root(root table). -The stack frame is the portion of stack where the local variables declared in its body are -stored. -The environment object is an implicit parameter that is automatically passed by the -function caller (see see :ref:`functions `). -The root table is a table associated to the function during its creation. -The root table value of a function is the root table of the VM at the function creation. -The root table of function can also be changed after creation with closure.setroot(). -During the execution, the body of a function can only transparently refer to his execution -context. -This mean that a single identifier can refer to a local variable, to an environment object slot -or to the slot of the closure root table; -The environment object can be explicitly accessed by the keyword ``this``. -The closure root table can be explicitly accessed through the operator ``::`` (see :ref:`Variables `). - -.. _variables: - ------------------ -Variables ------------------ - -There are two types of variables in Squirrel, local variables and tables/arrays slots. -Because global variables(variables stored in the root of a closure) are stored in a table, they are table slots. - -A single identifier refers to a local variable or a slot in the environment object.:: - - derefexp := id; - -:: - - _table["foo"] - _array[10] - -with tables we can also use the '.' syntax:: - - derefexp := exp '.' id - -:: - - _table.foo - -Squirrel first checks if an identifier is a local variable (function arguments are local -variables) if not looks up the environment object (this) and finally looks up -to the closure root. - -For instance::: - - function testy(arg) - { - local a=10; - print(a); - return arg; - } - -in this case 'foo' will be equivalent to 'this.foo' or this["foo"]. - -Global variables are stored in a table called the root table. Usually in the global scope the -environment object is the root table, but to explicitly access the closure root of the function from -another scope, the slot name must be prefixed with ``'::'`` (``::foo``). - -For instance::: - - function testy(arg) - { - local a=10; - return arg+::foo; - } - -accesses the variable 'foo' in the closure root table. - -Since Squirrel 3.1 each function has a weak reference to a specific root table, this can differ from the current VM root table.:: - - function test() { - foo = 10; - } - -is equivalent to write:: - - function test() { - if("foo" in this) { - this.foo = 10; - }else { - ::foo = 10; - } - } diff --git a/m_packages/squirrel/doc/source/reference/language/expressions.rst b/m_packages/squirrel/doc/source/reference/language/expressions.rst deleted file mode 100644 index 7574be83..00000000 --- a/m_packages/squirrel/doc/source/reference/language/expressions.rst +++ /dev/null @@ -1,374 +0,0 @@ -.. _expressions: - - -================= -Expressions -================= - -.. index:: - single: Expressions - ----------------- -Assignment ----------------- - -.. index:: - single: assignment(=) - single: new slot(<-) - -:: - - exp := derefexp '=' exp - exp:= derefexp '<-' exp - -squirrel implements 2 kind of assignment: the normal assignment(=):: - - a = 10; - -and the "new slot" assignment.:: - - a <- 10; - -The new slot expression allows to add a new slot into a table(see :ref:`Tables `). If the slot -already exists in the table it behaves like a normal assignment. - ----------------- -Operators ----------------- - -.. index:: - single: Operators - -^^^^^^^^^^^^^ -?: Operator -^^^^^^^^^^^^^ - -.. index:: - pair: ?: Operator; Operators - -:: - - exp := exp_cond '?' exp1 ':' exp2 - -conditionally evaluate an expression depending on the result of an expression. - -^^^^^^^^^^^^^ -Arithmetic -^^^^^^^^^^^^^ - -.. index:: - pair: Arithmetic Operators; Operators - -:: - - exp:= 'exp' op 'exp' - -Squirrel supports the standard arithmetic operators ``+, -, *, / and %``. -Other than that is also supports compact operators (``+=,-=,*=,/=,%=``) and -increment and decrement operators(++ and --);:: - - a += 2; - //is the same as writing - a = a + 2; - x++ - //is the same as writing - x = x + 1 - -All operators work normally with integers and floats; if one operand is an integer and one -is a float the result of the expression will be float. -The + operator has a special behavior with strings; if one of the operands is a string the -operator + will try to convert the other operand to string as well and concatenate both -together. For instances and tables, ``_tostring`` is invoked. - -^^^^^^^^^^^^^ -Relational -^^^^^^^^^^^^^ - -.. index:: - pair: Relational Operators; Operators - -:: - - exp:= 'exp' op 'exp' - -Relational operators in Squirrel are : ``==, <, <=, <, <=, !=`` - -These operators return true if the expression is false and a value different than true if the -expression is true. Internally the VM uses the integer 1 as true but this could change in -the future. - -^^^^^^^^^^^^^^ -3 ways compare -^^^^^^^^^^^^^^ - -.. index:: - pair: 3 ways compare operator; Operators - -:: - - exp:= 'exp' <=> 'exp' - -the 3 ways compare operator <=> compares 2 values A and B and returns an integer less than 0 -if A < B, 0 if A == B and an integer greater than 0 if A > B. - -^^^^^^^^^^^^^^ -Logical -^^^^^^^^^^^^^^ - -.. index:: - pair: Logical operators; Operators - -:: - - exp := exp op exp - exp := '!' exp - -Logical operators in Squirrel are : ``&&, ||, !`` - -The operator ``&&`` (logical and) returns null if its first argument is null, otherwise returns -its second argument. -The operator ``||`` (logical or) returns its first argument if is different than null, otherwise -returns the second argument. - -The '!' operator will return null if the given value to negate was different than null, or a -value different than null if the given value was null. - -^^^^^^^^^^^^^^^ -in operator -^^^^^^^^^^^^^^^ - -.. index:: - pair: in operator; Operators - -:: - - exp:= keyexp 'in' tableexp - -Tests the existence of a slot in a table. -Returns true if *keyexp* is a valid key in *tableexp* :: - - local t= - { - foo="I'm foo", - [123]="I'm not foo" - } - - if("foo" in t) dostuff("yep"); - if(123 in t) dostuff(); - -^^^^^^^^^^^^^^^^^^^ -instanceof operator -^^^^^^^^^^^^^^^^^^^ - -.. index:: - pair: instanceof operator; Operators - -:: - - exp:= instanceexp 'instanceof' classexp - -Tests if a class instance is an instance of a certain class. -Returns true if *instanceexp* is an instance of *classexp*. - -^^^^^^^^^^^^^^^^^^^ -typeof operator -^^^^^^^^^^^^^^^^^^^ - -.. index:: - pair: typeof operator; Operators - -:: - - exp:= 'typeof' exp - -returns the type name of a value as string.:: - - local a={},b="squirrel" - print(typeof a); //will print "table" - print(typeof b); //will print "string" - -^^^^^^^^^^^^^^^^^^^ -Comma operator -^^^^^^^^^^^^^^^^^^^ - -.. index:: - pair: Comma operator; Operators - -:: - - exp:= exp ',' exp - -The comma operator evaluates two expression left to right, the result of the operator is -the result of the expression on the right; the result of the left expression is discarded.:: - - local j=0,k=0; - for(local i=0; i<10; i++ , j++) - { - k = i + j; - } - local a,k; - a = (k=1,k+2); //a becomes 3 - -^^^^^^^^^^^^^^^^^^^ -Bitwise Operators -^^^^^^^^^^^^^^^^^^^ - -.. index:: - pair: Bitwise Operators; Operators - -:: - - exp:= 'exp' op 'exp' - exp := '~' exp - -Squirrel supports the standard C-like bitwise operators ``&, |, ^, ~, <<, >>`` plus the unsigned -right shift operator ``>>>``. The unsigned right shift works exactly like the normal right shift operator(``>>``) -except for treating the left operand as an unsigned integer, so is not affected by the sign. Those operators -only work on integer values; passing of any other operand type to these operators will -cause an exception. - -^^^^^^^^^^^^^^^^^^^^^ -Operators precedence -^^^^^^^^^^^^^^^^^^^^^ - -.. index:: - pair: Operators precedence; Operators - -+---------------------------------------+-----------+ -| ``-, ~, !, typeof , ++, --`` | highest | -+---------------------------------------+-----------+ -| ``/, *, %`` | ... | -+---------------------------------------+-----------+ -| ``+, -`` | | -+---------------------------------------+-----------+ -| ``<<, >>, >>>`` | | -+---------------------------------------+-----------+ -| ``<, <=, >, >=, instanceof`` | | -+---------------------------------------+-----------+ -| ``==, !=, <=>`` | | -+---------------------------------------+-----------+ -| ``&`` | | -+---------------------------------------+-----------+ -| ``^`` | | -+---------------------------------------+-----------+ -| ``&&, in`` | | -+---------------------------------------+-----------+ -| ``+=, =, -=, /=, *=, %=`` | ... | -+---------------------------------------+-----------+ -| ``, (comma operator)`` | lowest | -+---------------------------------------+-----------+ - -.. _table_constructor: - ------------------ -Table Constructor ------------------ - -.. index:: - single: Table Contructor - -:: - - tslots := ( 'id' '=' exp | '[' exp ']' '=' exp ) [','] - exp := '{' [tslots] '}' - -Creates a new table.:: - - local a = {} //create an empty table - -A table constructor can also contain slots declaration; With the syntax: :: - - local a = { - slot1 = "I'm the slot value" - } - -An alternative syntax can be:: - - '[' exp1 ']' = exp2 [','] - -A new slot with exp1 as key and exp2 as value is created:: - - local a= - { - [1]="I'm the value" - } - -Both syntaxes can be mixed:: - - local table= - { - a=10, - b="string", - [10]={}, - function bau(a,b) - { - return a+b; - } - } - -The comma between slots is optional. - -^^^^^^^^^^^^^^^^^^^^^^ -Table with JSON syntax -^^^^^^^^^^^^^^^^^^^^^^ - -.. index:: - single: Table with JSON syntax - -Since Squirrel 3.0 is possible to declare a table using JSON syntax(see http://www.wikipedia.org/wiki/JSON). - -the following JSON snippet: :: - - local x = { - "id": 1, - "name": "Foo", - "price": 123, - "tags": ["Bar","Eek"] - } - -is equivalent to the following squirrel code: :: - - local x = { - id = 1, - name = "Foo", - price = 123, - tags = ["Bar","Eek"] - } - ------------------ -clone ------------------ - -.. index:: - single: clone - -:: - - exp:= 'clone' exp - -Clone performs shallow copy of a table, array or class instance (copies all slots in the new object without -recursion). If the source table has a delegate, the same delegate will be assigned as -delegate (not copied) to the new table (see :ref:`Delegation `). - -After the new object is ready the "_cloned" meta method is called (see :ref:`Metamethods `). - -When a class instance is cloned the constructor is not invoked(initializations must rely on ```_cloned``` instead - ------------------ -Array contructor ------------------ - -.. index:: - single: Array constructor - -:: - - exp := '[' [explist] ']' - -Creates a new array.:: - - a <- [] //creates an empty array - -Arrays can be initialized with values during the construction:: - - a <- [1,"string!",[],{}] //creates an array with 4 elements diff --git a/m_packages/squirrel/doc/source/reference/language/functions.rst b/m_packages/squirrel/doc/source/reference/language/functions.rst deleted file mode 100644 index 08eced85..00000000 --- a/m_packages/squirrel/doc/source/reference/language/functions.rst +++ /dev/null @@ -1,355 +0,0 @@ -.. _functions: - - -================= -Functions -================= - -.. index:: - single: Functions - -Functions are first class values like integer or strings and can be stored in table slots, -local variables, arrays and passed as function parameters. -Functions can be implemented in Squirrel or in a native language with calling conventions -compatible with ANSI C. - --------------------- -Function declaration --------------------- - -.. index:: - single: Function Declaration - -Functions are declared through the function expression:: - - local a = function(a, b, c) { return a + b - c; } - -or with the syntactic sugar:: - - function ciao(a,b,c) - { - return a+b-c; - } - -that is equivalent to:: - - this.ciao <- function(a,b,c) - { - return a+b-c; - } - -a local function can be declared with this syntactic sugar:: - - local function tuna(a,b,c) - { - return a+b-c; - } - -that is equivalent to:: - - local tuna = function(a,b,c) - { - return a+b-c; - } - -is also possible to declare something like:: - - T <- {} - function T::ciao(a,b,c) - { - return a+b-c; - } - - //that is equivalent to write - - T.ciao <- function(a,b,c) - { - return a+b-c; - } - - //or - - T <- { - function ciao(a,b,c) - { - return a+b-c; - } - } - -^^^^^^^^^^^^^^^^^^ -Default Paramaters -^^^^^^^^^^^^^^^^^^ - -.. index:: - single: Function Default Paramaters - -Squirrel's functions can have default parameters. - -A function with default parameters is declared as follows: :: - - function test(a,b,c = 10, d = 20) - { - .... - } - -when the function *test* is invoked and the parameter c or d are not specified, -the VM autometically assigns the default value to the unspecified parameter. A default parameter can be -any valid squirrel expression. The expression is evaluated at runtime. - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Function with variable number of paramaters -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. index:: - single: Function with variable number of paramaters - -Squirrel's functions can have variable number of parameters(varargs functions). - -A vararg function is declared by adding three dots (`...`) at the end of its parameter list. - -When the function is called all the extra parameters will be accessible through the *array* -called ``vargv``, that is passed as implicit parameter. - -``vargv`` is a regular squirrel array and can be used accordingly.:: - - function test(a,b,...) - { - for(local i = 0; i< vargv.len(); i++) - { - ::print("varparam "+i+" = "+vargv[i]+"\n"); - } - foreach(i,val in vargv) - { - ::print("varparam "+i+" = "+val+"\n"); - } - } - - test("goes in a","goes in b",0,1,2,3,4,5,6,7,8); - ---------------- -Function calls ---------------- - -.. index:: - single: Function calls - -:: - - exp:= derefexp '(' explist ')' - -The expression is evaluated in this order: derefexp after the explist (arguments) and at -the end the call. - -A function call in Squirrel passes the current environment object *this* as a hidden parameter. -But when the function was immediately indexed from an object, *this* shall be the object -which was indexed, instead. - -If we call a function with the syntax:: - - mytable.foo(x,y) - -the environment object passed to 'foo' as *this* will be 'mytable' (since 'foo' was immediately indexed from 'mytable') - -Whereas with the syntax:: - - foo(x,y) // implicitly equivalent to this.foo(x,y) - -the environment object will be the current *this* (that is, propagated from the caller's *this*). - -It may help to remember the rules in the following way: - - foo(x,y) ---> this.foo(x,y) - table.foo(x,y) ---> call foo with (table,x,y) - -It may also help to consider why it works this way: it's designed to assist with object-oriented style. -When calling 'foo(x,y)' it's assumed you're calling another member of the object (or of the file) and -so should operate on the same object. -When calling 'mytable.foo(x,y)' it's written plainly that you're calling a member of a different object. - ---------------------------------------------- -Raw calls ---------------------------------------------- - -.. index:: - single: Raw calls - -It is possible to call a function overriding the default calling semantics by utilizing the keywork *rawcall*. -Rawcall allows to invoke a function specifying the *this* object explicitly:: - - local retval = rawcall(functionobj,thisobj,parameters); - -for example:: - - local env = {} - function test(a,b) { - return a + b; - } - local ret = rawcall(test,env,1,2) //passes the table env as 'this' to the function test - ---------------------- -Post-call Initializer ---------------------- - -Since version 3.2 Squirrel offers a syntactic sugar to initialize the object returned by a function call(anf class instance creation). -The post-call initializer has the following syntax:: - - function test() { - local retval = { x = 0, y = 0}; - return retval; - } - local ret1 = test() { x = 10, y = 20 } - local ret2 = test() { x = 30, y = 40 } - -that is equivalent to:: - - function test() { - local retval = { x = 0, y = 0}; - return retval; - } - local ret1 = test() { x = 10, y = 20 } - ret1.x = 10; - ret1.y = 20; - local ret2 = test() { x = 30, y = 40 } - ret1.x = 30; - ret1.y = 40; - -this is also usable with classes:: - - class vector3 { - x = 0; - y = 0; - z = 0; - } - local v0 = vector3() { x = 1, y = 2, z = 3 }; - local v2 = vector3() { x = 4, y = 5, z = 6 }; - -and can be nested:: - - class entity { - position = null; - direction = null; - } - local ret = entity() { - position = vector3() { x = 1, y = 2, z = 3 } - direction = vector3() { x = 0, y = 1, z = 0 } - } - ---------------------------------------------- -Binding an environment to a function ---------------------------------------------- - -.. index:: - single: Binding an environment to a function - -while by default a squirrel function call passes as environment object 'this', the object -where the function was indexed from. However, is also possible to statically bind an evironment to a -closure using the following syntax.:: - - function test[env_obj](a,b) { - return a + b; - } - - local test = function[env_obj](a,b) { - return a + b; - } - - local function test[env_obj](a,b) { - return a + b; - } - -It is also possible to statically bind an evironment to a closure using the built-in method ``closure.bindenv(env_obj)``. -The method bindenv() returns a new instance of a closure with the environment bound to it. - -When an environment object is bound to a function, every time the function is invoked, its -'this' parameter will always be the previously bound environent. -This mechanism is useful to implement callbacks systems similar to C# delegates. - -.. note:: The closure keeps a weak reference to the bound environmet object, because of this if - the object is deleted, the next call to the closure will result in a ``null`` - environment object. - ---------------------------------------------- -Lambda Expressions ---------------------------------------------- - -.. index:: - single: Lambda Expressions - -:: - - exp := '@' '(' paramlist ')' exp - -Lambda expressions are a syntactic sugar to quickly define a function that consists of a single expression. -This feature comes handy when functional programming patterns are applied, like map/reduce or passing a compare method to -array.sort(). - -here a lambda expression:: - - local myexp = @(a,b) a + b - -that is equivalent to:: - - local myexp = function(a,b) { return a + b; } - -a more useful usage could be:: - - local arr = [2,3,5,8,3,5,1,2,6]; - arr.sort(@(a,b) a <=> b); - arr.sort(@(a,b) -(a <=> b)); - -that could have been written as:: - - local arr = [2,3,5,8,3,5,1,2,6]; - arr.sort(function(a,b) { return a <=> b; } ); - arr.sort(function(a,b) { return -(a <=> b); } ); - -other than being limited to a single expression lambdas support all features of regular functions. -in fact are implemented as a compile time feature. - ---------------------------------------------- -Free Variables ---------------------------------------------- - -.. index:: - single: Free Variables - -A free variable is a variable external from the function scope as is not a local variable -or parameter of the function. -Free variables reference a local variable from a outer scope. -In the following example the variables 'testy', 'x' and 'y' are bound to the function 'foo'.:: - - local x=10,y=20 - local testy="I'm testy" - - function foo(a,b) - { - ::print(testy); - return a+b+x+y; - } - -A program can read or write a free variable. - ---------------------------------------------- -Tail Recursion ---------------------------------------------- - -.. index:: - single: Tail Recursion - -Tail recursion is a method for partially transforming a recursion in a program into an -iteration: it applies when the recursive calls in a function are the last executed -statements in that function (just before the return). -If this happenes the squirrel interpreter collapses the caller stack frame before the -recursive call; because of that very deep recursions are possible without risk of a stack -overflow.:: - - function loopy(n) - { - if(n>0){ - ::print("n="+n+"\n"); - return loopy(n-1); - } - } - - loopy(1000); - diff --git a/m_packages/squirrel/doc/source/reference/language/generators.rst b/m_packages/squirrel/doc/source/reference/language/generators.rst deleted file mode 100644 index 6c03de9a..00000000 --- a/m_packages/squirrel/doc/source/reference/language/generators.rst +++ /dev/null @@ -1,51 +0,0 @@ -.. _generators: - - -================= -Generators -================= - -.. index:: - single: Generators - -A function that contains a ``yield`` statement is called *'generator function'* . -When a generator function is called, it does not execute the function body, instead it -returns a new suspended generator. -The returned generator can be resumed through the resume statement while it is alive. -The yield keyword, suspends the execution of a generator and optionally returns the -result of an expression to the function that resumed the generator. -The generator dies when it returns, this can happen through an explicit return -statement or by exiting the function body; If an unhandled exception (or runtime error) -occurs while a generator is running, the generator will automatically die. A dead -generator cannot be resumed anymore.:: - - function geny(n) - { - for(local i=1;i<=n;i+=1) - yield i; - return null; - } - - local gtor=geny(10); - local x; - while(x=resume gtor) print(x+"\n"); - -the output of this program will be:: - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - -generators can also be iterated using the foreach statement. When a generator is evaluated -by ``foreach``, the generator will be resumed for each iteration until it returns. The value -returned by the ``return`` statement will be ignored. - -.. note:: A suspended generator will hold a strong reference to all the values stored in it's local variables except the ``this`` - object that is only a weak reference. A running generator hold a strong reference also to the ``this`` object. diff --git a/m_packages/squirrel/doc/source/reference/language/lexical_structure.rst b/m_packages/squirrel/doc/source/reference/language/lexical_structure.rst deleted file mode 100644 index 11fbf35c..00000000 --- a/m_packages/squirrel/doc/source/reference/language/lexical_structure.rst +++ /dev/null @@ -1,156 +0,0 @@ -.. _lexical_structure: - - -================= -Lexical Structure -================= - -.. index:: single: lexical structure - ------------ -Identifiers ------------ - -.. index:: single: identifiers - -Identifiers start with an alphabetic character or the symbol '_' followed by any number -of alphabetic characters, '_' or digits ([0-9]). Squirrel is a case sensitive language -meaning that the lowercase and uppercase representation of the same alphabetic -character are considered different characters. For instance, "foo", "Foo" and "fOo" are -treated as 3 distinct identifiers. - ------------ -Keywords ------------ - -.. index:: single: keywords - -The following words are reserved and cannot be used as identifiers: - -+------------+------------+-----------+------------+------------+-------------+ -| base | break | case | catch | class | clone | -+------------+------------+-----------+------------+------------+-------------+ -| continue | const | default | delete | else | enum | -+------------+------------+-----------+------------+------------+-------------+ -| extends | for | foreach | function | if | in | -+------------+------------+-----------+------------+------------+-------------+ -| local | null | resume | return | switch | this | -+------------+------------+-----------+------------+------------+-------------+ -| throw | try | typeof | while | yield | constructor | -+------------+------------+-----------+------------+------------+-------------+ -| instanceof | true | false | static | __LINE__ | __FILE__ | -+------------+------------+-----------+------------+------------+-------------+ -| rawcall | | | | | | -+------------+------------+-----------+------------+------------+-------------+ - -Keywords are covered in detail later in this document. - ------------ -Operators ------------ - -.. index:: single: operators - -Squirrel recognizes the following operators: - -+----------+----------+----------+----------+----------+----------+----------+----------+ -| ``!`` | ``!=`` | ``||`` | ``==`` | ``&&`` | ``>=`` | ``<=`` | ``>`` | -+----------+----------+----------+----------+----------+----------+----------+----------+ -| ``<=>`` | ``+`` | ``+=`` | ``-`` | ``-=`` | ``/`` | ``/=`` | ``*`` | -+----------+----------+----------+----------+----------+----------+----------+----------+ -| ``*=`` | ``%`` | ``%=`` | ``++`` | ``--`` | ``<-`` | ``=`` | ``&`` | -+----------+----------+----------+----------+----------+----------+----------+----------+ -| ``^`` | ``|`` | ``~`` | ``>>`` | ``<<`` | ``>>>`` | | | -+----------+----------+----------+----------+----------+----------+----------+----------+ - ------------- -Other tokens ------------- - -.. index:: - single: delimiters - single: other tokens - -Other significant tokens are: - -+----------+----------+----------+----------+----------+----------+ -| ``{`` | ``}`` | ``[`` | ``]`` | ``.`` | ``:`` | -+----------+----------+----------+----------+----------+----------+ -| ``::`` | ``'`` | ``;`` | ``"`` | ``@"`` | | -+----------+----------+----------+----------+----------+----------+ - ------------ -Literals ------------ - -.. index:: - single: literals - single: string literals - single: numeric literals - -Squirrel accepts integer numbers, floating point numbers and string literals. - -+-------------------------------+------------------------------------------+ -| ``34`` | Integer number(base 10) | -+-------------------------------+------------------------------------------+ -| ``0xFF00A120`` | Integer number(base 16) | -+-------------------------------+------------------------------------------+ -| ``0753`` | Integer number(base 8) | -+-------------------------------+------------------------------------------+ -| ``'a'`` | Integer number | -+-------------------------------+------------------------------------------+ -| ``1.52`` | Floating point number | -+-------------------------------+------------------------------------------+ -| ``1.e2`` | Floating point number | -+-------------------------------+------------------------------------------+ -| ``1.e-2`` | Floating point number | -+-------------------------------+------------------------------------------+ -| ``"I'm a string"`` | String | -+-------------------------------+------------------------------------------+ -| ``@"I'm a verbatim string"`` | String | -+-------------------------------+------------------------------------------+ -| ``@" I'm a`` | | -| ``multiline verbatim string`` | | -| ``"`` | String | -+-------------------------------+------------------------------------------+ - -Pesudo BNF - -.. productionlist:: - IntegerLiteral : [1-9][0-9]* | '0x' [0-9A-Fa-f]+ | ''' [.]+ ''' | 0[0-7]+ - FloatLiteral : [0-9]+ '.' [0-9]+ - FloatLiteral : [0-9]+ '.' 'e'|'E' '+'|'-' [0-9]+ - StringLiteral: '"'[.]* '"' - VerbatimStringLiteral: '@''"'[.]* '"' - ------------ -Comments ------------ - -.. index:: single: comments - -A comment is text that the compiler ignores but that is useful for programmers. -Comments are normally used to embed annotations in the code. The compiler -treats them as white space. - -A comment can be ``/*`` (slash, asterisk) characters, followed by any -sequence of characters (including new lines), -followed by the ``*/`` characters. This syntax is the same as ANSI C.:: - - /* - this is - a multiline comment. - this lines will be ignored by the compiler - */ - -A comment can also be ``//`` (two slashes) characters, followed by any sequence of -characters. A new line not immediately preceded by a backslash terminates this form of -comment. It is commonly called a *"single-line comment."*:: - - //this is a single line comment. this line will be ignored by the compiler - -The character ``#`` is an alternative syntax for single line comment.:: - - # this is also a single line comment. - -This to facilitate the use of squirrel in UNIX-style shell scripts. diff --git a/m_packages/squirrel/doc/source/reference/language/metamethods.rst b/m_packages/squirrel/doc/source/reference/language/metamethods.rst deleted file mode 100644 index 260b0308..00000000 --- a/m_packages/squirrel/doc/source/reference/language/metamethods.rst +++ /dev/null @@ -1,270 +0,0 @@ -.. _metamethods: - ------------ -Metamethods ------------ - -Metamethods are a mechanism that allows the customization of certain aspects of the -language semantics. Those methods are normal functions placed in a table -parent(delegate) or class declaration; It is possible to change many aspects of a table/class instance behavior by just defining -a metamethod. Class objects (not instances) support only 2 metamethods ``_newmember, _inherited`` . - -For example when we use relational operators other than '==' on 2 tables, the VM will -check if the table has a method in his parent called '_cmp'; if so it will call it to determine -the relation between the tables.:: - - local comparable={ - _cmp = function (other) - { - if(nameother.name)return 1; - return 0; - } - } - - local a={ name="Alberto" }.setdelegate(comparable); - local b={ name="Wouter" }.setdelegate(comparable); - - if(a>b) - print("a>b") - else - print("b<=a"); - -for classes the previous code become: :: - - class Comparable { - constructor(n) - { - name = n; - } - function _cmp(other) - { - if(nameother.name) return 1; - return 0; - } - name = null; - } - - local a = Comparable("Alberto"); - local b = Comparable("Wouter"); - - if(a>b) - print("a>b") - else - print("b<=a"); - -^^^^^ -_set -^^^^^ - -:: - - _set(idx,val) - -invoked when the index idx is not present in the object or in its delegate chain. -``_set`` must 'throw null' to notify that a key wasn't found but the there were not runtime errors (clean failure). -This allows the program to differentiate between a runtime error and a 'index not found'. - -^^^^^ -_get -^^^^^ - -:: - - _get(idx) - -invoked when the index idx is not present in the object or in its delegate chain. -_get must 'throw null' to notify that a key wasn't found but the there were not runtime errors (clean failure). -This allows the program to differentiate between a runtime error and a 'index not found'. - -^^^^^^^^^ -_newslot -^^^^^^^^^ - -:: - - _newslot(key,value) - -invoked when a script tries to add a new slot in a table. - -if the slot already exists in the target table the method will not be invoked also if the -"new slot" operator is used. - -^^^^^^^^^ -_delslot -^^^^^^^^^ - -:: - - _delslot(key) - -invoked when a script deletes a slot from a table. -if the method is invoked squirrel will not try to delete the slot himself - -^^^^^^^^ -_add -^^^^^^^^ - -:: - - _add(other) - -the + operator - -returns this + other - -^^^^^^^^^^^^^^^^^^^^^^^^ -_sub -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _sub(other) - -the - operator (like _add) - -^^^^^^^^^^^^^^^^^^^^^^^^ -_mul -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _mul(other) - -the ``*`` operator (like _add) - -^^^^^^^^^^^^^^^^^^^^^^^^ -_div -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _div(other) - -the ``/`` operator (like _add) - -^^^^^^^^^^^^^^^^^^^^^^^^ -_modulo -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _modulo(other) - -the ``%`` operator (like _add) - -^^^^^^^^^ -_unm -^^^^^^^^^ - -:: - - _unm() - -the unary minus operator - -^^^^^^^^^^^^^^^^^^^^^^^^ -_typeof -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _typeof() - -invoked by the typeof operator on tables, userdata, and class instances. - -Returns the type of ``this`` as string - -^^^^^^^^^^^^^^^^^^^^^^^^ -_cmp -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _cmp(other) - -invoked to emulate the ``< > <= >=`` and ``<=>`` operators - -returns an integer as follow: - -+-----------+----------------------------+ -| returns | relationship | -+===========+============================+ -| > 0 | if ``this`` > ``other`` | -+-----------+----------------------------+ -| 0 | if ``this`` == ``other`` | -+-----------+----------------------------+ -| < 0 | if ``this`` < ``other`` | -+-----------+----------------------------+ - -^^^^^^^^^^^^^^^^^^^^^^^^ -_call -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _call(other) - -invoked when a table, userdata, or class instance is called - -^^^^^^^^^^^^^^^^^^^^^^^^ -_cloned -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _cloned(original) - -invoked when a table or class instance is cloned(in the cloned table) - -^^^^^^^^^^^^^^^^^^^^^^^^ -_nexti -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _nexti(previdx) - -invoked when a userdata or class instance is iterated by a foreach loop. - -If previdx==null it means that it is the first iteration. -The function has to return the index of the 'next' value. - -^^^^^^^^^^^^^^^^^^^^^^^^ -_tostring -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _tostring() - -Invoked when during string concatenation or when the ``print`` function prints a table, instance, or userdata. -The method is also invoked by the sq_tostring() API. - -Must return a string representation of the object. - -^^^^^^^^^^^^^^^^^^^^^^^^ -_inherited -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _inherited(attributes) - -invoked when a class object inherits from the class implementing ``_inherited``. -The ``this`` contains the new class. - -Return value is ignored. - -^^^^^^^^^^^^^^^^^^^^^^^^ -_newmember -^^^^^^^^^^^^^^^^^^^^^^^^ - -:: - - _newmember(index,value,attributes,isstatic) - -invoked for each member declared in a class body (at declaration time). - -If the function is implemented, members will not be added to the class. diff --git a/m_packages/squirrel/doc/source/reference/language/statements.rst b/m_packages/squirrel/doc/source/reference/language/statements.rst deleted file mode 100644 index febde526..00000000 --- a/m_packages/squirrel/doc/source/reference/language/statements.rst +++ /dev/null @@ -1,386 +0,0 @@ -.. _statements: - - -================= -Statements -================= - -.. index:: - single: statements - -A squirrel program is a simple sequence of statements.:: - - stats := stat [';'|'\n'] stats - -Statements in squirrel are comparable to the C-Family languages (C/C++, Java, C# -etc...): assignment, function calls, program flow control structures etc.. plus some -custom statement like yield, table and array constructors (All those will be covered in detail -later in this document). -Statements can be separated with a new line or ';' (or with the keywords case or default if -inside a switch/case statement), both symbols are not required if the statement is -followed by '}'. - ------- -Block ------- - -.. index:: - pair: block; statement - -:: - - stat := '{' stats '}' - -A sequence of statements delimited by curly brackets ({ }) is called block; -a block is a statement itself. - ------------------------ -Control Flow Statements ------------------------ - -.. index:: - single: control flow statements - -squirrel implements the most common control flow statements: ``if, while, do-while, switch-case, for, foreach`` - -^^^^^^^^^^^^^^ -true and false -^^^^^^^^^^^^^^ - -.. index:: - single: true and false - single: true - single: false - -Squirrel has a boolean type (bool) however like C++ it considers null, 0(integer) and 0.0(float) -as *false*, any other value is considered *true*. - -^^^^^^^^^^^^^^^^^ -if/else statement -^^^^^^^^^^^^^^^^^ - -.. index:: - pair: if/else; statement - pair: if; statement - pair: else; statement - -:: - - stat:= 'if' '(' exp ')' stat ['else' stat] - -Conditionally execute a statement depending on the result of an expression.:: - - if(a>b) - a=b; - else - b=a; - //// - if(a==10) - { - b=a+b; - return a; - } - -^^^^^^^^^^^^^^^^^ -while statement -^^^^^^^^^^^^^^^^^ - -.. index:: - pair: while; statement - -:: - - stat:= 'while' '(' exp ')' stat - -Executes a statement while the condition is true.:: - - function testy(n) - { - local a=0; - while(a100) - -^^^^^^^^^^^^^^^^^ -switch statement -^^^^^^^^^^^^^^^^^ - -.. index:: - pair: switch; statement - -:: - - stat := 'switch' ''( exp ')' '{' - 'case' case_exp ':' - stats - ['default' ':' - stats] - '}' - -Switch is a control statement allows multiple selections of code by passing control to one of the -case statements within its body. -The control is transferred to the case label whose case_exp matches with exp if none of -the case match will jump to the default label (if present). -A switch statement can contain any number if case instances, if 2 case have the same -expression result the first one will be taken in account first. The default label is only -allowed once and must be the last one. -A break statement will jump outside the switch block. - ------ -Loops ------ - -.. index:: - single: Loops - -^^^^^^^^ -for -^^^^^^^^ - -.. index:: - pair: for; statement - -:: - - stat:= 'for' '(' [initexp] ';' [condexp] ';' [incexp] ')' statement - -Executes a statement as long as a condition is different than false.:: - - for(local a=0;a<10;a+=1) - print(a+"\n"); - //or - glob <- null - for(glob=0;glob<10;glob+=1){ - print(glob+"\n"); - } - //or - for(;;){ - print(loops forever+"\n"); - } - -^^^^^^^^ -foreach -^^^^^^^^ - -.. index:: - pair: foreach; statement - -:: - - 'foreach' '(' [index_id','] value_id 'in' exp ')' stat - -Executes a statement for every element contained in an array, table, class, string or generator. -If exp is a generator it will be resumed every iteration as long as it is alive; the value will -be the result of 'resume' and the index the sequence number of the iteration starting -from 0.:: - - local a=[10,23,33,41,589,56] - foreach(idx,val in a) - print("index="+idx+" value="+val+"\n"); - //or - foreach(val in a) - print("value="+val+"\n"); - -------- -break -------- - -.. index:: - pair: break; statement - -:: - - stat := 'break' - -The break statement terminates the execution of a loop (for, foreach, while or do/while) -or jumps out of switch statement; - ---------- -continue ---------- - -.. index:: - pair: continue; statement - -:: - - stat := 'continue' - -The continue operator jumps to the next iteration of the loop skipping the execution of -the following statements. - ---------- -return ---------- - -.. index:: - pair: return; statement - -:: - - stat:= return [exp] - -The return statement terminates the execution of the current function/generator and -optionally returns the result of an expression. If the expression is omitted the function -will return null. If the return statement is used inside a generator, the generator will not -be resumable anymore. - ---------- -yield ---------- - -.. index:: - pair: yield; statement - -:: - - stat := yield [exp] - -(see :ref:`Generators `). - - ---------------------------- -Local variables declaration ---------------------------- - -.. index:: - pair: Local variables declaration; statement - -:: - - initz := id [= exp][',' initz] - stat := 'local' initz - -Local variables can be declared at any point in the program; they exist between their -declaration to the end of the block where they have been declared. -*EXCEPTION:* a local declaration statement is allowed as first expression in a for loop.:: - - for(local a=0;a<10;a+=1) - print(a); - --------------------- -Function declaration --------------------- - -.. index:: - pair: Function declaration; statement - -:: - - funcname := id ['::' id] - stat:= 'function' id ['::' id]+ '(' args ')' stat - -creates a new function. - ------------------ -Class declaration ------------------ - -.. index:: - pair: Class declaration; statement - -:: - - memberdecl := id '=' exp [';'] | '[' exp ']' '=' exp [';'] | functionstat | 'constructor' functionexp - stat:= 'class' derefexp ['extends' derefexp] '{' - [memberdecl] - '}' - -creates a new class. - ------------ -try/catch ------------ - -.. index:: - pair: try/catch; statement - -:: - - stat:= 'try' stat 'catch' '(' id ')' stat - -The try statement encloses a block of code in which an exceptional condition can occur, -such as a runtime error or a throw statement. The catch clause provides the exception-handling -code. When a catch clause catches an exception, its id is bound to that -exception. - ------------ -throw ------------ - -.. index:: - pair: throw; statement - -:: - - stat:= 'throw' exp - -Throws an exception. Any value can be thrown. - --------------- -const --------------- - -.. index:: - pair: const; statement - -:: - - stat:= 'const' id '=' 'Integer | Float | StringLiteral - -Declares a constant (see :ref:`Constants & Enumerations `). - --------------- -enum --------------- - -.. index:: - pair: enum; statement - -:: - - enumerations := ( 'id' '=' Integer | Float | StringLiteral ) [','] - stat:= 'enum' id '{' enumerations '}' - -Declares an enumeration (see :ref:`Constants & Enumerations `). - --------------------- -Expression statement --------------------- - -.. index:: - pair: Expression statement; statement - -:: - - stat := exp - -In Squirrel every expression is also allowed as statement, if so, the result of the -expression is thrown away. - diff --git a/m_packages/squirrel/doc/source/reference/language/tables.rst b/m_packages/squirrel/doc/source/reference/language/tables.rst deleted file mode 100644 index eb80a688..00000000 --- a/m_packages/squirrel/doc/source/reference/language/tables.rst +++ /dev/null @@ -1,71 +0,0 @@ -.. _tables: - - -================= -Tables -================= - -.. index:: - single: Tables - -Tables are associative containers implemented as pairs of key/value (called slot); values -can be any possible type and keys any type except 'null'. -Tables are squirrel's skeleton, delegation and many other features are all implemented -through this type; even the environment, where "global" variables are stored, is a table -(known as root table). - ------------------- -Construction ------------------- - -Tables are created through the table constructor (see :ref:`Table constructor `) - ------------------- -Slot creation ------------------- - -.. index:: - single: Slot Creation(table) - -Adding a new slot in a existing table is done through the "new slot" operator ``<-``; this -operator behaves like a normal assignment except that if the slot does not exists it will -be created.:: - - local a = {} - -The following line will cause an exception because the slot named 'newslot' does not exist -in the table 'a':: - - a.newslot = 1234 - -this will succeed: :: - - a.newslot <- 1234; - -or:: - - a[1] <- "I'm the value of the new slot"; - ------------------ -Slot deletion ------------------ - -.. index:: - single: Slot Deletion(table) - - -:: - - exp:= delete derefexp - -Deletion of a slot is done through the keyword delete; the result of this expression will be -the value of the deleted slot.:: - - a <- { - test1=1234 - deleteme="now" - } - - delete a.test1 - print(delete a.deleteme); //this will print the string "now" - diff --git a/m_packages/squirrel/doc/source/reference/language/threads.rst b/m_packages/squirrel/doc/source/reference/language/threads.rst deleted file mode 100644 index efe114ab..00000000 --- a/m_packages/squirrel/doc/source/reference/language/threads.rst +++ /dev/null @@ -1,106 +0,0 @@ -.. _threads: - - -======================== -Threads -======================== - -.. index:: - single: Threads - -Squirrel supports cooperative threads(also known as coroutines). -A cooperative thread is a subroutine that can suspended in mid-execution and provide a value to the -caller without returning program flow, then its execution can be resumed later from the same -point where it was suspended. -At first look a Squirrel thread can be confused with a generator, in fact their behaviour is quite similar. -However while a generator runs in the caller stack and can suspend only the local routine stack a thread -has its own execution stack, global table and error handler; This allows a thread to suspend nested calls and -have it's own error policies. - ------------------- -Using threads ------------------- - -.. index:: - single: Using Threads - -Threads are created through the built-in function 'newthread(func)'; this function -gets as parameter a squirrel function and bind it to the new thread objects (will be the thread body). -The returned thread object is initially in 'idle' state. the thread can be started with the function -'threadobj.call()'; the parameters passed to 'call' are passed to the thread function. - -A thread can be be suspended calling the function suspend(), when this happens the function -that wokeup(or started) the thread returns (If a parameter is passed to suspend() it will -be the return value of the wakeup function , if no parameter is passed the return value will be null). -A suspended thread can be resumed calling the function 'threadobj.wakeup', when this happens -the function that suspended the thread will return(if a parameter is passed to wakeup it will -be the return value of the suspend function, if no parameter is passed the return value will be null). - -A thread terminates when its main function returns or when an unhandled exception occurs during its execution.:: - - function coroutine_test(a,b) - { - ::print(a+" "+b+"\n"); - local ret = ::suspend("suspend 1"); - ::print("the coroutine says "+ret+"\n"); - ret = ::suspend("suspend 2"); - ::print("the coroutine says "+ret+"\n"); - ret = ::suspend("suspend 3"); - ::print("the coroutine says "+ret+"\n"); - return "I'm done" - } - - local coro = ::newthread(coroutine_test); - - local susparam = coro.call("test","coroutine"); //starts the coroutine - - local i = 1; - do - { - ::print("suspend passed ("+susparam+")\n") - susparam = coro.wakeup("ciao "+i); - ++i; - }while(coro.getstatus()=="suspended") - - ::print("return passed ("+susparam+")\n") - -the result of this program will be:: - - test coroutine - suspend passed (suspend 1) - the coroutine says ciao 1 - suspend passed (suspend 2) - the coroutine says ciao 2 - suspend passed (suspend 3) - the coroutine says ciao 3 - return passed (I'm done). - - -the following is an interesting example of how threads and tail recursion -can be combined.:: - - function state1() - { - ::suspend("state1"); - return state2(); //tail call - } - - function state2() - { - ::suspend("state2"); - return state3(); //tail call - } - - function state3() - { - ::suspend("state3"); - return state1(); //tail call - } - - local statethread = ::newthread(state1) - - ::print(statethread.call()+"\n"); - - for(local i = 0; i < 10000; i++) - ::print(statethread.wakeup()+"\n"); - diff --git a/m_packages/squirrel/doc/source/reference/language/weak_references.rst b/m_packages/squirrel/doc/source/reference/language/weak_references.rst deleted file mode 100644 index 5f87bc82..00000000 --- a/m_packages/squirrel/doc/source/reference/language/weak_references.rst +++ /dev/null @@ -1,61 +0,0 @@ -.. _weak_references: - - -======================== -Weak References -======================== - -.. index:: - single: Weak References - - -The weak references allows the programmers to create references to objects without -influencing the lifetime of the object itself. -In squirrel Weak references are first-class objects created through the built-in method obj.weakref(). -All types except null implement the weakref() method; however in bools, integers, and floats the method -simply returns the object itself(this because this types are always passed by value). -When a weak references is assigned to a container (table slot,array,class or -instance) is treated differently than other objects; When a container slot that hold a weak -reference is fetched, it always returns the value pointed by the weak reference instead of the weak -reference object. This allow the programmer to ignore the fact that the value handled is weak. -When the object pointed by weak reference is destroyed, the weak reference is automatically set to null.:: - - local t = {} - local a = ["first","second","third"] - //creates a weakref to the array and assigns it to a table slot - t.thearray <- a.weakref(); - -The table slot 'thearray' contains a weak reference to an array. -The following line prints "first", because tables(and all other containers) always return -the object pointed by a weak ref:: - - print(t.thearray[0]); - -the only strong reference to the array is owned by the local variable 'a', so -because the following line assigns a integer to 'a' the array is destroyed.:: - - a = 123; - -When an object pointed by a weak ref is destroyed the weak ref is automatically set to null, -so the following line will print "null".:: - - ::print(typeof(t.thearray)) - ------------------------------------ -Handling weak references explicitly ------------------------------------ - -If a weak reference is assigned to a local variable, then is treated as any other value.:: - - local t = {} - local weakobj = t.weakref(); - -the following line prints "weakref".:: - - ::print(typeof(weakobj)) - -the object pointed by the weakref can be obtained through the built-in method weakref.ref(). - -The following line prints "table".:: - - ::print(typeof(weakobj.ref())) diff --git a/m_packages/squirrel/doc/source/simple_nut.png b/m_packages/squirrel/doc/source/simple_nut.png deleted file mode 100644 index 4c0e8a20..00000000 Binary files a/m_packages/squirrel/doc/source/simple_nut.png and /dev/null differ diff --git a/m_packages/squirrel/doc/source/stdlib/index.rst b/m_packages/squirrel/doc/source/stdlib/index.rst deleted file mode 100644 index 29b5f9f9..00000000 --- a/m_packages/squirrel/doc/source/stdlib/index.rst +++ /dev/null @@ -1,39 +0,0 @@ -.. _stdlib: - -################################# - Squirrel Standard Library 3.2 -################################# - -Copyright (c) 2003-2022 Alberto Demichelis - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -.. toctree:: - :maxdepth: 1 - :numbered: - - introduction.rst - stdiolib.rst - stdbloblib.rst - stdmathlib.rst - stdsystemlib.rst - stdstringlib.rst - stdauxlib.rst - diff --git a/m_packages/squirrel/doc/source/stdlib/introduction.rst b/m_packages/squirrel/doc/source/stdlib/introduction.rst deleted file mode 100644 index 171e2425..00000000 --- a/m_packages/squirrel/doc/source/stdlib/introduction.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. _stdlib_introduction: - -============ -Introduction -============ - -The squirrel standard libraries consist in a set of modules implemented in C++. -While are not essential for the language, they provide a set of useful services that are -commonly used by a wide range of applications(file I/O, regular expressions, etc...), -plus they offer a foundation for developing additional libraries. - -All libraries are implemented through the squirrel API and the ANSI C runtime library. -The modules are organized in the following way: - -* I/O : input and output -* blob : binary buffers manipilation -* math : basic mathematical routines -* system : system access function -* string : string formatting and manipulation -* aux : auxiliary functions - -The libraries can be registered independently,except for the IO library that depends from the bloblib. diff --git a/m_packages/squirrel/doc/source/stdlib/stdauxlib.rst b/m_packages/squirrel/doc/source/stdlib/stdauxlib.rst deleted file mode 100644 index b800c100..00000000 --- a/m_packages/squirrel/doc/source/stdlib/stdauxlib.rst +++ /dev/null @@ -1,31 +0,0 @@ -.. _stdlib_stdauxlib: - -=============== -The Aux library -=============== - -The aux library implements default handlers for compiler and runtime errors and a stack dumping. - -+++++++++++ -C API -+++++++++++ - -.. _sqstd_seterrorhandlers: - -.. c:function:: void sqstd_seterrorhandlers(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - - initialize compiler and runtime error handlers, the handlers - use the print function set through(:ref:`sq_setprintfunc `) to output - the error. - -.. _sqstd_printcallstack: - -.. c:function:: void sqstd_printcallstack(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - - prints the call stack and stack contents. the function - uses the print function set through(:ref:`sq_setprintfunc `) to output - the stack dump. diff --git a/m_packages/squirrel/doc/source/stdlib/stdbloblib.rst b/m_packages/squirrel/doc/source/stdlib/stdbloblib.rst deleted file mode 100644 index 1d1f8d41..00000000 --- a/m_packages/squirrel/doc/source/stdlib/stdbloblib.rst +++ /dev/null @@ -1,213 +0,0 @@ -.. _stdlib_stdbloblib: - -================== -The Blob library -================== -The blob library implements binary data manipulations routines. The library is -based on `blob objects` that represent a buffer of arbitrary -binary data. - ---------------- -Squirrel API ---------------- - -+++++++++++++++ -Global symbols -+++++++++++++++ - -.. js:function:: castf2i(f) - - casts a float to a int - -.. js:function:: casti2f(n) - - casts a int to a float - -.. js:function:: swap2(n) - - swap the byte order of a number (like it would be a 16bits integer) - -.. js:function:: swap4(n) - - swap the byte order of an integer - -.. js:function:: swapfloat(n) - - swaps the byteorder of a float - -++++++++++++++++++ -The blob class -++++++++++++++++++ - -The blob object is a buffer of arbitrary binary data. The object behaves like -a file stream, it has a read/write pointer and it automatically grows if data -is written out of his boundary. -A blob can also be accessed byte by byte through the `[]` operator. - -.. js:class:: blob(size) - - :param int size: initial size of the blob - - returns a new instance of a blob class of the specified size in bytes - -.. js:function:: blob.eos() - - returns a non null value if the read/write pointer is at the end of the stream. - -.. js:function:: blob.flush() - - flushes the stream.return a value != null if succeded, otherwise returns null - -.. js:function:: blob.len() - - returns the length of the stream - -.. js:function:: blob.readblob(size) - - :param int size: number of bytes to read - - read n bytes from the stream and returns them as blob - -.. js:function:: blob.readn(type) - - :param int type: type of the number to read - - reads a number from the stream according to the type parameter. - - `type` can have the following values: - -+--------------+--------------------------------------------------------------------------------+----------------------+ -| parameter | return description | return type | -+==============+================================================================================+======================+ -| 'l' | processor dependent, 32bits on 32bits processors, 64bits on 64bits processors | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'i' | 32bits number | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 's' | 16bits signed integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'w' | 16bits unsigned integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'c' | 8bits signed integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'b' | 8bits unsigned integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'f' | 32bits float | float | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'd' | 64bits float | float | -+--------------+--------------------------------------------------------------------------------+----------------------+ - -.. js:function:: blob.resize(size) - - :param int size: the new size of the blob in bytes - - resizes the blob to the specified `size` - -.. js:function:: blob.seek(offset [,origin]) - - :param int offset: indicates the number of bytes from `origin`. - :param int origin: origin of the seek - - +--------------+-------------------------------------------+ - | 'b' | beginning of the stream | - +--------------+-------------------------------------------+ - | 'c' | current location | - +--------------+-------------------------------------------+ - | 'e' | end of the stream | - +--------------+-------------------------------------------+ - - Moves the read/write pointer to a specified location. - -.. note:: If origin is omitted the parameter is defaulted as 'b'(beginning of the stream). - -.. js:function:: blob.swap2() - - swaps the byte order of the blob content as it would be an array of `16bits integers` - -.. js:function:: blob.swap4() - - swaps the byte order of the blob content as it would be an array of `32bits integers` - -.. js:function:: blob.tell() - - returns the read/write pointer absolute position - -.. js:function:: blob.writeblob(src) - - :param blob src: the source blob containing the data to be written - - writes a blob in the stream - -.. js:function:: blob.writen(n, type) - - :param number n: the value to be written - :param int type: type of the number to write - - writes a number in the stream formatted according to the `type` parameter - - `type` can have the following values: - -+--------------+--------------------------------------------------------------------------------+ -| parameter | return description | -+==============+================================================================================+ -| 'i' | 32bits number | -+--------------+--------------------------------------------------------------------------------+ -| 's' | 16bits signed integer | -+--------------+--------------------------------------------------------------------------------+ -| 'w' | 16bits unsigned integer | -+--------------+--------------------------------------------------------------------------------+ -| 'c' | 8bits signed integer | -+--------------+--------------------------------------------------------------------------------+ -| 'b' | 8bits unsigned integer | -+--------------+--------------------------------------------------------------------------------+ -| 'f' | 32bits float | -+--------------+--------------------------------------------------------------------------------+ -| 'd' | 64bits float | -+--------------+--------------------------------------------------------------------------------+ - - ------- -C API ------- - -.. _sqstd_register_bloblib: - -.. c:function:: SQRESULT sqstd_register_bloblib(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: an SQRESULT - :remarks: The function aspects a table on top of the stack where to register the global library functions. - - initializes and registers the blob library in the given VM. - -.. _sqstd_getblob: - -.. c:function:: SQRESULT sqstd_getblob(HSQUIRRELVM v, SQInteger idx, SQUserPointer * ptr) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: and index in the stack - :param SQUserPointer * ptr: A pointer to the userpointer that will point to the blob's payload - :returns: an SQRESULT - - retrieve the pointer of a blob's payload from an arbitrary - position in the stack. - -.. _sqstd_getblobsize: - -.. c:function:: SQInteger sqstd_getblobsize(HSQUIRRELVM v, SQInteger idx) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: and index in the stack - :returns: the size of the blob at `idx` position - - retrieves the size of a blob's payload from an arbitrary - position in the stack. - -.. _sqstd_createblob: - -.. c:function:: SQUserPointer sqstd_createblob(HSQUIRRELVM v, SQInteger size) - - :param HSQUIRRELVM v: the target VM - :param SQInteger size: the size of the blob payload that has to be created - :returns: a pointer to the newly created blob payload - - creates a blob with the given payload size and pushes it in the stack. diff --git a/m_packages/squirrel/doc/source/stdlib/stdiolib.rst b/m_packages/squirrel/doc/source/stdlib/stdiolib.rst deleted file mode 100644 index 7ed4c9bd..00000000 --- a/m_packages/squirrel/doc/source/stdlib/stdiolib.rst +++ /dev/null @@ -1,264 +0,0 @@ -.. _stdlib_stdiolib: - -======================== -The Input/Output library -======================== - -the i/o library implements basic input/output routines. - --------------- -Squirrel API --------------- - -++++++++++++++ -Global Symbols -++++++++++++++ - - -.. js:function:: dofile(path, [raiseerror]) - - compiles a squirrel script or loads a precompiled one and executes it. - returns the value returned by the script or null if no value is returned. - if the optional parameter 'raiseerror' is true, the compiler error handler is invoked - in case of a syntax error. If raiseerror is omitted or set to false, the compiler - error handler is not invoked. - When squirrel is compiled in Unicode mode the function can handle different character encodings, - UTF8 with and without prefix and UCS-2 prefixed(both big endian an little endian). - If the source stream is not prefixed UTF8 encoding is used as default. - -.. js:function:: loadfile(path, [raiseerror]) - - compiles a squirrel script or loads a precompiled one an returns it as as function. - if the optional parameter 'raiseerror' is true, the compiler error handler is invoked - in case of a syntax error. If raiseerror is omitted or set to false, the compiler - error handler is not invoked. - When squirrel is compiled in Unicode mode the function can handle different character encodings, - UTF8 with and without prefix and UCS-2 prefixed(both big endian an little endian). - If the source stream is not prefixed UTF8 encoding is used as default. - -.. js:function:: writeclosuretofile(destpath, closure) - - serializes a closure to a bytecode file (destpath). The serialized file can be loaded - using loadfile() and dofile(). - - -.. js:data:: stderr - - File object bound on the os *standard error* stream - -.. js:data:: stdin - - File object bound on the os *standard input* stream - -.. js:data:: stdout - - File object bound on the os *standard output* stream - - -++++++++++++++ -The file class -++++++++++++++ - - The file object implements a stream on a operating system file. - -.. js:class:: file(path, patten) - - It's constructor imitates the behaviour of the C runtime function fopen for eg. :: - - local myfile = file("test.xxx","wb+"); - - creates a file with read/write access in the current directory. - -.. js:function:: file.close() - - closes the file. - -.. js:function:: file.eos() - - returns a non null value if the read/write pointer is at the end of the stream. - -.. js:function:: file.flush() - - flushes the stream.return a value != null if succeeded, otherwise returns null - -.. js:function:: file.len() - - returns the length of the stream - -.. js:function:: file.readblob(size) - - :param int size: number of bytes to read - - read n bytes from the stream and returns them as blob - -.. js:function:: file.readn(type) - - :param int type: type of the number to read - - reads a number from the stream according to the type parameter. - - `type` can have the following values: - -+--------------+--------------------------------------------------------------------------------+----------------------+ -| parameter | return description | return type | -+==============+================================================================================+======================+ -| 'l' | processor dependent, 32bits on 32bits processors, 64bits on 64bits processors | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'i' | 32bits number | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 's' | 16bits signed integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'w' | 16bits unsigned integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'c' | 8bits signed integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'b' | 8bits unsigned integer | integer | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'f' | 32bits float | float | -+--------------+--------------------------------------------------------------------------------+----------------------+ -| 'd' | 64bits float | float | -+--------------+--------------------------------------------------------------------------------+----------------------+ - -.. js:function:: file.resize(size) - - :param int size: the new size of the blob in bytes - - resizes the blob to the specified `size` - -.. js:function:: file.seek(offset [,origin]) - - :param int offset: indicates the number of bytes from `origin`. - :param int origin: origin of the seek - - +--------------+-------------------------------------------+ - | 'b' | beginning of the stream | - +--------------+-------------------------------------------+ - | 'c' | current location | - +--------------+-------------------------------------------+ - | 'e' | end of the stream | - +--------------+-------------------------------------------+ - - Moves the read/write pointer to a specified location. - -.. note:: If origin is omitted the parameter is defaulted as 'b'(beginning of the stream). - -.. js:function:: file.tell() - - returns the read/write pointer absolute position - -.. js:function:: file.writeblob(src) - - :param blob src: the source blob containing the data to be written - - writes a blob in the stream - -.. js:function:: file.writen(n, type) - - :param number n: the value to be written - :param int type: type of the number to write - - writes a number in the stream formatted according to the `type` pamraeter - - `type` can have the following values: - -+--------------+--------------------------------------------------------------------------------+ -| parameter | return description | -+==============+================================================================================+ -| 'i' | 32bits number | -+--------------+--------------------------------------------------------------------------------+ -| 's' | 16bits signed integer | -+--------------+--------------------------------------------------------------------------------+ -| 'w' | 16bits unsigned integer | -+--------------+--------------------------------------------------------------------------------+ -| 'c' | 8bits signed integer | -+--------------+--------------------------------------------------------------------------------+ -| 'b' | 8bits unsigned integer | -+--------------+--------------------------------------------------------------------------------+ -| 'f' | 32bits float | -+--------------+--------------------------------------------------------------------------------+ -| 'd' | 64bits float | -+--------------+--------------------------------------------------------------------------------+ - - --------------- -C API --------------- - -.. _sqstd_register_iolib: - -.. c:function:: SQRESULT sqstd_register_iolib(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: an SQRESULT - :remarks: The function aspects a table on top of the stack where to register the global library functions. - - initialize and register the io library in the given VM. - -++++++++++++++ -File Object -++++++++++++++ - -.. c:function:: SQRESULT sqstd_createfile(HSQUIRRELVM v, SQFILE file, SQBool owns) - - :param HSQUIRRELVM v: the target VM - :param SQFILE file: the stream that will be rapresented by the file object - :param SQBool owns: if different true the stream will be automatically closed when the newly create file object is destroyed. - :returns: an SQRESULT - - creates a file object bound to the SQFILE passed as parameter - and pushes it in the stack - -.. c:function:: SQRESULT sqstd_getfile(HSQUIRRELVM v, SQInteger idx, SQFILE* file) - - :param HSQUIRRELVM v: the target VM - :param SQInteger idx: and index in the stack - :param SQFILE * file: A pointer to a SQFILE handle that will store the result - :returns: an SQRESULT - - retrieve the pointer of a stream handle from an arbitrary - position in the stack. - -++++++++++++++++++++++++++++++++ -Script loading and serialization -++++++++++++++++++++++++++++++++ - -.. c:function:: SQRESULT sqstd_loadfile(HSQUIRRELVM v, const SQChar * filename, SQBool printerror) - - :param HSQUIRRELVM v: the target VM - :param SQChar * filename: path of the script that has to be loaded - :param SQBool printerror: if true the compiler error handler will be called if a error occurs - :returns: an SQRESULT - - Compiles a squirrel script or loads a precompiled one an pushes it as closure in the stack. - When squirrel is compiled in Unicode mode the function can handle different character encodings, - UTF8 with and without prefix and UCS-2 prefixed(both big endian an little endian). - If the source stream is not prefixed UTF8 encoding is used as default. - -.. c:function:: SQRESULT sqstd_dofile(HSQUIRRELVM v, const SQChar * filename, SQBool retval, SQBool printerror) - - :param HSQUIRRELVM v: the target VM - :param SQChar * filename: path of the script that has to be loaded - :param SQBool retval: if true the function will push the return value of the executed script in the stack. - :param SQBool printerror: if true the compiler error handler will be called if a error occurs - :returns: an SQRESULT - :remarks: the function expects a table on top of the stack that will be used as 'this' for the execution of the script. The 'this' parameter is left untouched in the stack. - - Compiles a squirrel script or loads a precompiled one and executes it. - Optionally pushes the return value of the executed script in the stack. - When squirrel is compiled in unicode mode the function can handle different character encodings, - UTF8 with and without prefix and UCS-2 prefixed(both big endian an little endian). - If the source stream is not prefixed, UTF8 encoding is used as default. :: - - sq_pushroottable(v); //push the root table(were the globals of the script will are stored) - sqstd_dofile(v, _SC("test.nut"), SQFalse, SQTrue);// also prints syntax errors if any - -.. c:function:: SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v, const SQChar * filename) - - :param HSQUIRRELVM v: the target VM - :param SQChar * filename: destination path of serialized closure - :returns: an SQRESULT - - serializes the closure at the top position in the stack as bytecode in - the file specified by the parameter filename. If a file with the - same name already exists, it will be overwritten. - diff --git a/m_packages/squirrel/doc/source/stdlib/stdmathlib.rst b/m_packages/squirrel/doc/source/stdlib/stdmathlib.rst deleted file mode 100644 index 5f0b8b49..00000000 --- a/m_packages/squirrel/doc/source/stdlib/stdmathlib.rst +++ /dev/null @@ -1,111 +0,0 @@ -.. _stdlib_stdmathlib: - -================ -The Math library -================ - -the math lib provides basic mathematic routines. The library mimics the -C runtime library implementation. - ------------- -Squirrel API ------------- - -+++++++++++++++ -Global Symbols -+++++++++++++++ - -.. js:function:: abs(x) - - returns the absolute value of `x` as an integer - -.. js:function:: acos(x) - - returns the arccosine of `x` - -.. js:function:: asin(x) - - returns the arcsine of `x` - -.. js:function:: atan(x) - - returns the arctangent of `x` - -.. js:function:: atan2(x,y) - - returns the arctangent of `x/y` - -.. js:function:: ceil(x) - - returns a float value representing the smallest integer that is greater than or equal to `x` - -.. js:function:: cos(x) - - returns the cosine of `x` - -.. js:function:: exp(x) - - returns the exponential value of the float parameter `x` - -.. js:function:: fabs(x) - - returns the absolute value of `x` as a float - -.. js:function:: floor(x) - - returns a float value representing the largest integer that is less than or equal to `x` - -.. js:function:: log(x) - - returns the natural logarithm of `x` - -.. js:function:: log10(x) - - returns the logarithm base-10 of `x` - -.. js:function:: pow(x,y) - - returns `x` raised to the power of `y` - -.. js:function:: rand() - - returns a pseudorandom integer in the range 0 to `RAND_MAX` - -.. js:function:: sin(x) - - rreturns the sine of `x` - -.. js:function:: sqrt(x) - - returns the square root of `x` - -.. js:function:: srand(seed) - - sets the starting point for generating a series of pseudorandom integers - -.. js:function:: tan(x) - - returns the tangent of `x` - -.. js:data:: RAND_MAX - - the maximum value that can be returned by the `rand()` function - -.. js:data:: PI - - The numeric constant pi (3.141592) is the ratio of the circumference of a circle to its diameter - ------------- -C API ------------- - -.. _sqstd_register_mathlib: - -.. c:function:: SQRESULT sqstd_register_mathlib(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: an SQRESULT - :remarks: The function aspects a table on top of the stack where to register the global library functions. - - initializes and register the math library in the given VM. - diff --git a/m_packages/squirrel/doc/source/stdlib/stdstringlib.rst b/m_packages/squirrel/doc/source/stdlib/stdstringlib.rst deleted file mode 100644 index 03da6d9d..00000000 --- a/m_packages/squirrel/doc/source/stdlib/stdstringlib.rst +++ /dev/null @@ -1,323 +0,0 @@ -.. _stdlib_stdstringlib: - -================== -The String library -================== - -the string lib implements string formatting and regular expression matching routines. - --------------- -Squirrel API --------------- - -++++++++++++++ -Global Symbols -++++++++++++++ - -.. js:function:: endswith(str, cmp) - - returns `true` if the end of the string `str` matches a the string `cmp` otherwise returns `false` - -.. js:function:: escape(str) - - Returns a string with backslashes before characters that need to be escaped(`\",\a,\b,\t,\n,\v,\f,\r,\\,\",\',\0,\xnn`). - -.. js:function:: format(formatstr, ...) - - Returns a string formatted according `formatstr` and the optional parameters following it. - The format string follows the same rules as the `printf` family of - standard C functions( the "*" is not supported). :: - - e.g. - sq> print(format("%s %d 0x%02X\n","this is a test :",123,10)); - this is a test : 123 0x0A - -.. js:function:: printf(formatstr, ...) - - Just like calling `print(format(formatstr` as in the example above, but is more convenient AND more efficient. :: - - e.g. - sq> printf("%s %d 0x%02X\n","this is a test :",123,10); - this is a test : 123 0x0A - -.. js:function:: lstrip(str) - - Strips white-space-only characters that might appear at the beginning of the given string - and returns the new stripped string. - -.. js:function:: rstrip(str) - - Strips white-space-only characters that might appear at the end of the given string - and returns the new stripped string. - -.. js:function:: split(str, separators [, skipempty]) - - returns an array of strings split at each point where a separator character occurs in `str`. - The separator is not returned as part of any array element. - The parameter `separators` is a string that specifies the characters as to be used for the splitting. - The parameter `skipempty` is a boolean (default false). If `skipempty` is true, empty strings are not added to array. - - :: - - eg. - local a = split("1.2-3;;4/5",".-/;"); - // the result will be [1,2,3,,4,5] - or - local b = split("1.2-3;;4/5",".-/;",true); - // the result will be [1,2,3,4,5] - - -.. js:function:: startswith(str, cmp) - - returns `true` if the beginning of the string `str` matches the string `cmp`; otherwise returns `false` - -.. js:function:: strip(str) - - Strips white-space-only characters that might appear at the beginning or end of the given string and returns the new stripped string. - -++++++++++++++++++ -The regexp class -++++++++++++++++++ - -.. js:class:: regexp(pattern) - - The regexp object represents a precompiled regular expression pattern. The object is created - through `regexp(pattern)`. - - -+---------------------+--------------------------------------+ -| `\\` | Quote the next metacharacter | -+---------------------+--------------------------------------+ -| `^` | Match the beginning of the string | -+---------------------+--------------------------------------+ -| `.` | Match any character | -+---------------------+--------------------------------------+ -| `$` | Match the end of the string | -+---------------------+--------------------------------------+ -| `|` | Alternation | -+---------------------+--------------------------------------+ -| `(subexp)` | Grouping (creates a capture) | -+---------------------+--------------------------------------+ -| `(?:subexp)` | No Capture Grouping (no capture) | -+---------------------+--------------------------------------+ -| `[]` | Character class | -+---------------------+--------------------------------------+ - -**GREEDY CLOSURES** - -+---------------------+---------------------------------------------+ -| `*` | Match 0 or more times | -+---------------------+---------------------------------------------+ -| `+` | Match 1 or more times | -+---------------------+---------------------------------------------+ -| `?` | Match 1 or 0 times | -+---------------------+---------------------------------------------+ -| `{n}` | Match exactly n times | -+---------------------+---------------------------------------------+ -| `{n,}` | Match at least n times | -+---------------------+---------------------------------------------+ -| `{n,m}` | Match at least n but not more than m times | -+---------------------+---------------------------------------------+ - -**ESCAPE CHARACTERS** - -+---------------------+--------------------------------------+ -| `\\t` | tab (HT, TAB) | -+---------------------+--------------------------------------+ -| `\\n` | newline (LF, NL) | -+---------------------+--------------------------------------+ -| `\\r` | return (CR) | -+---------------------+--------------------------------------+ -| `\\f` | form feed (FF) | -+---------------------+--------------------------------------+ - -**PREDEFINED CLASSES** - -+---------------------+--------------------------------------+ -| `\\l` | lowercase next char | -+---------------------+--------------------------------------+ -| `\\u` | uppercase next char | -+---------------------+--------------------------------------+ -| `\\a` | letters | -+---------------------+--------------------------------------+ -| `\\A` | non letters | -+---------------------+--------------------------------------+ -| `\\w` | alphanumeric `[_0-9a-zA-Z]` | -+---------------------+--------------------------------------+ -| `\\W` | non alphanumeric `[^_0-9a-zA-Z]` | -+---------------------+--------------------------------------+ -| `\\s` | space | -+---------------------+--------------------------------------+ -| `\\S` | non space | -+---------------------+--------------------------------------+ -| `\\d` | digits | -+---------------------+--------------------------------------+ -| `\\D` | non digits | -+---------------------+--------------------------------------+ -| `\\x` | hexadecimal digits | -+---------------------+--------------------------------------+ -| `\\X` | non hexadecimal digits | -+---------------------+--------------------------------------+ -| `\\c` | control characters | -+---------------------+--------------------------------------+ -| `\\C` | non control characters | -+---------------------+--------------------------------------+ -| `\\p` | punctuation | -+---------------------+--------------------------------------+ -| `\\P` | non punctuation | -+---------------------+--------------------------------------+ -| `\\b` | word boundary | -+---------------------+--------------------------------------+ -| `\\B` | non word boundary | -+---------------------+--------------------------------------+ - - -.. js:function:: regexp.capture(str [, start]) - - returns an array of tables containing two indexes ("begin" and "end") of - the first match of the regular expression in the string `str`. - An array entry is created for each captured sub expressions. If no match occurs returns null. - The search starts from the index `start` - of the string; if `start` is omitted the search starts from the beginning of the string. - - The first element of the returned array(index 0) always contains the complete match. - - :: - - local ex = regexp(@"(\d+) ([a-zA-Z]+)(\p)"); - local string = "stuff 123 Test;"; - local res = ex.capture(string); - foreach(i,val in res) - { - print(format("match number[%02d] %s\n", - i,string.slice(val.begin,val.end))); //prints "Test" - } - - ... - will print - match number[00] 123 Test; - match number[01] 123 - match number[02] Test - match number[03] ; - -.. js:function:: regexp.match(str) - - returns a true if the regular expression matches the string - `str`, otherwise returns false. - -.. js:function:: regexp.search(str [, start]) - - returns a table containing two indexes ("begin" and "end") of the first match of the regular expression in - the string `str`, otherwise if no match occurs returns null. The search starts from the index `start` - of the string; if `start` is omitted the search starts from the beginning of the string. - - :: - - local ex = regexp("[a-zA-Z]+"); - local string = "123 Test;"; - local res = ex.search(string); - print(string.slice(res.begin,res.end)); //prints "Test" - -------------- -C API -------------- - -.. _sqstd_register_stringlib: - -.. c:function:: SQRESULT sqstd_register_stringlib(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: an SQRESULT - :remarks: The function aspects a table on top of the stack where to register the global library functions. - - initialize and register the string library in the given VM. - -+++++++++++++ -Formatting -+++++++++++++ - -.. c:function:: SQRESULT sqstd_format(HSQUIRRELVM v, SQInteger nformatstringidx, SQInteger * outlen, SQChar ** output) - - :param HSQUIRRELVM v: the target VM - :param SQInteger nformatstringidx: index in the stack of the format string - :param SQInteger * outlen: a pointer to an integer that will be filled with the length of the newly created string - :param SQChar ** output: a pointer to a string pointer that will receive the newly created string - :returns: an SQRESULT - :remarks: the newly created string is allocated in the scratchpad memory. - - - creates a new string formatted according to the object at position `nformatstringidx` and the optional parameters following it. - The format string follows the same rules as the `printf` family of - standard C functions( the "*" is not supported). - -++++++++++++++++++ -Regular Expessions -++++++++++++++++++ - -.. c:function:: SQRex* sqstd_rex_compile(const SQChar * pattern, const SQChar ** error) - - :param SQChar * pattern: a pointer to a zero terminated string containing the pattern that has to be compiled. - :param SQChar ** error: a pointer to a string pointer that will be set with an error string in case of failure. - :returns: a pointer to the compiled pattern - - compiles an expression and returns a pointer to the compiled version. - in case of failure returns NULL.The returned object has to be deleted - through the function sqstd_rex_free(). - -.. c:function:: void sqstd_rex_free(SQRex * exp) - - :param SQRex * exp: the expression structure that has to be deleted. - - deletes a expression structure created with sqstd_rex_compile() - -.. c:function:: SQBool sqstd_rex_match(SQRex * exp,const SQChar * text) - - :param SQRex * exp: a compiled expression - :param SQChar * text: the string that has to be tested - :returns: SQTrue if successful otherwise SQFalse - - returns SQTrue if the string specified in the parameter text is an - exact match of the expression, otherwise returns SQFalse. - -.. c:function:: SQBool sqstd_rex_search(SQRex * exp, const SQChar * text, const SQChar ** out_begin, const SQChar ** out_end) - - :param SQRex * exp: a compiled expression - :param SQChar * text: the string that has to be tested - :param SQChar ** out_begin: a pointer to a string pointer that will be set with the beginning of the match - :param SQChar ** out_end: a pointer to a string pointer that will be set with the end of the match - :returns: SQTrue if successful otherwise SQFalse - - searches the first match of the expression in the string specified in the parameter text. - if the match is found returns SQTrue and the sets out_begin to the beginning of the - match and out_end at the end of the match; otherwise returns SQFalse. - -.. c:function:: SQBool sqstd_rex_searchrange(SQRex * exp, const SQChar * text_begin, const SQChar * text_end, const SQChar ** out_begin, const SQChar ** out_end) - - :param SQRex * exp: a compiled expression - :param SQChar * text_begin: a pointer to the beginnning of the string that has to be tested - :param SQChar * text_end: a pointer to the end of the string that has to be tested - :param SQChar ** out_begin: a pointer to a string pointer that will be set with the beginning of the match - :param SQChar ** out_end: a pointer to a string pointer that will be set with the end of the match - :returns: SQTrue if successful otherwise SQFalse - - searches the first match of the expression in the string delimited - by the parameter text_begin and text_end. - if the match is found returns SQTrue and sets out_begin to the beginning of the - match and out_end at the end of the match; otherwise returns SQFalse. - -.. c:function:: SQInteger sqstd_rex_getsubexpcount(SQRex * exp) - - :param SQRex * exp: a compiled expression - :returns: the number of sub expressions matched by the expression - - returns the number of sub expressions matched by the expression - -.. c:function:: SQBool sqstd_rex_getsubexp(SQRex * exp, SQInteger n, SQRexMatch * subexp) - - :param SQRex * exp: a compiled expression - :param SQInteger n: the index of the submatch(0 is the complete match) - :param SQRexMatch * a: pointer to structure that will store the result - :returns: the function returns SQTrue if n is a valid index; otherwise SQFalse. - - retrieve the begin and and pointer to the length of the sub expression indexed - by n. The result is passed through the struct SQRexMatch. diff --git a/m_packages/squirrel/doc/source/stdlib/stdsystemlib.rst b/m_packages/squirrel/doc/source/stdlib/stdsystemlib.rst deleted file mode 100644 index 5c565fd6..00000000 --- a/m_packages/squirrel/doc/source/stdlib/stdsystemlib.rst +++ /dev/null @@ -1,82 +0,0 @@ -.. _stdlib_stdsystemlib: - -================== -The System library -================== - -The system library exposes operating system facilities like environment variables, -date time manipulation etc.. - --------------- -Squirrel API --------------- - -++++++++++++++ -Global Symbols -++++++++++++++ - -.. js:function:: clock() - - returns a float representing the number of seconds elapsed since the start of the process - -.. js:function:: date([time [, format]]) - - returns a table containing a date/time split into the slots: - -+-------------+----------------------------------------+ -| sec | Seconds after minute (0 - 59). | -+-------------+----------------------------------------+ -| min | Minutes after hour (0 - 59). | -+-------------+----------------------------------------+ -| hour | Hours since midnight (0 - 23). | -+-------------+----------------------------------------+ -| day | Day of month (1 - 31). | -+-------------+----------------------------------------+ -| month | Month (0 - 11; January = 0). | -+-------------+----------------------------------------+ -| year | Year (current year). | -+-------------+----------------------------------------+ -| wday | Day of week (0 - 6; Sunday = 0). | -+-------------+----------------------------------------+ -| yday | Day of year (0 - 365; January 1 = 0). | -+-------------+----------------------------------------+ - -if `time` is omitted the current time is used. - -if `format` can be 'l' local time or 'u' UTC time, if omitted is defaulted as 'l'(local time). - -.. js:function:: getenv(varaname) - - Returns a string containing the value of the environment variable `varname` - -.. js:function:: remove(path) - - deletes the file specified by `path` - -.. js:function:: rename(oldname, newname) - - renames the file or directory specified by `oldname` to the name given by `newname` - -.. js:function:: system(cmd) - - xecutes the string `cmd` through the os command interpreter. - -.. js:function:: time() - - returns the number of seconds elapsed since midnight 00:00:00, January 1, 1970. - - the result of this function can be formatted through the function `date()` - --------------- -C API --------------- - -.. _sqstd_register_systemlib: - -.. c:function:: SQRESULT sqstd_register_systemlib(HSQUIRRELVM v) - - :param HSQUIRRELVM v: the target VM - :returns: an SQRESULT - :remarks: The function aspects a table on top of the stack where to register the global library functions. - - initialize and register the system library in the given VM. diff --git a/m_packages/squirrel/etc/minimal.c b/m_packages/squirrel/etc/minimal.c deleted file mode 100644 index 0695768b..00000000 --- a/m_packages/squirrel/etc/minimal.c +++ /dev/null @@ -1,78 +0,0 @@ -#include -#include - -#include -#include -#include - -#ifdef _MSC_VER -#pragma comment (lib ,"squirrel.lib") -#pragma comment (lib ,"sqstdlib.lib") -#endif - -#ifdef SQUNICODE - -#define scvprintf vfwprintf -#else - -#define scvprintf vfprintf -#endif - -void printfunc(HSQUIRRELVM v,const SQChar *s,...) -{ - va_list vl; - va_start(vl, s); - scvprintf(stdout, s, vl); - va_end(vl); -} - -void errorfunc(HSQUIRRELVM v,const SQChar *s,...) -{ - va_list vl; - va_start(vl, s); - scvprintf(stderr, s, vl); - va_end(vl); -} - -void call_foo(HSQUIRRELVM v, int n,float f,const SQChar *s) -{ - SQInteger top = sq_gettop(v); //saves the stack size before the call - sq_pushroottable(v); //pushes the global table - sq_pushstring(v,_SC("foo"),-1); - if(SQ_SUCCEEDED(sq_get(v,-2))) { //gets the field 'foo' from the global table - sq_pushroottable(v); //push the 'this' (in this case is the global table) - sq_pushinteger(v,n); - sq_pushfloat(v,f); - sq_pushstring(v,s,-1); - sq_call(v,4,SQFalse,SQTrue); //calls the function - } - sq_settop(v,top); //restores the original stack size -} - -int main(int argc, char* argv[]) -{ - HSQUIRRELVM v; - v = sq_open(1024); // creates a VM with initial stack size 1024 - - //REGISTRATION OF STDLIB - //sq_pushroottable(v); //push the root table where the std function will be registered - //sqstd_register_iolib(v); //registers a library - // ... call here other stdlibs string,math etc... - //sq_pop(v,1); //pops the root table - //END REGISTRATION OF STDLIB - - sqstd_seterrorhandlers(v); //registers the default error handlers - - sq_setprintfunc(v, printfunc,errorfunc); //sets the print function - - sq_pushroottable(v); //push the root table(were the globals of the script will be stored) - if(SQ_SUCCEEDED(sqstd_dofile(v, _SC("test.nut"), SQFalse, SQTrue))) // also prints syntax errors if any - { - call_foo(v,1,2.5,_SC("teststring")); - } - - sq_pop(v,1); //pops the root table - sq_close(v); - - return 0; -} diff --git a/m_packages/squirrel/etc/test.nut b/m_packages/squirrel/etc/test.nut deleted file mode 100644 index 125df32c..00000000 --- a/m_packages/squirrel/etc/test.nut +++ /dev/null @@ -1,4 +0,0 @@ -function foo(i, f, s) -{ - print("Called foo(), i="+i+", f="+f+", s='"+s+"'\n"); -} diff --git a/m_packages/squirrel/include/sqconfig.h b/m_packages/squirrel/include/sqconfig.h deleted file mode 100644 index 58bc9793..00000000 --- a/m_packages/squirrel/include/sqconfig.h +++ /dev/null @@ -1,146 +0,0 @@ - -#ifdef _SQ64 - -#ifdef _MSC_VER -typedef __int64 SQInteger; -typedef unsigned __int64 SQUnsignedInteger; -typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/ -#else -typedef long long SQInteger; -typedef unsigned long long SQUnsignedInteger; -typedef unsigned long long SQHash; /*should be the same size of a pointer*/ -#endif -typedef int SQInt32; -typedef unsigned int SQUnsignedInteger32; -#else -typedef int SQInteger; -typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/ -typedef unsigned int SQUnsignedInteger32; /*must be 32 bits(also on 64bits processors)*/ -typedef unsigned int SQUnsignedInteger; -typedef unsigned int SQHash; /*should be the same size of a pointer*/ -#endif - - -#ifdef SQUSEDOUBLE -typedef double SQFloat; -#else -typedef float SQFloat; -#endif - -#if defined(SQUSEDOUBLE) && !defined(_SQ64) || !defined(SQUSEDOUBLE) && defined(_SQ64) -#ifdef _MSC_VER -typedef __int64 SQRawObjectVal; //must be 64bits -#else -typedef long long SQRawObjectVal; //must be 64bits -#endif -#define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; } -#else -typedef SQUnsignedInteger SQRawObjectVal; //is 32 bits on 32 bits builds and 64 bits otherwise -#define SQ_OBJECT_RAWINIT() -#endif - -#ifndef SQ_ALIGNMENT // SQ_ALIGNMENT shall be less than or equal to SQ_MALLOC alignments, and its value shall be power of 2. -#if defined(SQUSEDOUBLE) || defined(_SQ64) -#define SQ_ALIGNMENT 8 -#else -#define SQ_ALIGNMENT 4 -#endif -#endif - -typedef void* SQUserPointer; -typedef SQUnsignedInteger SQBool; -typedef SQInteger SQRESULT; - -#ifdef SQUNICODE -#include -#include - - -typedef wchar_t SQChar; - - -#define scstrcmp wcscmp -#ifdef _WIN32 -#define scsprintf _snwprintf -#else -#define scsprintf swprintf -#endif -#define scstrlen wcslen -#define scstrtod wcstod -#ifdef _SQ64 -#define scstrtol wcstoll -#else -#define scstrtol wcstol -#endif -#define scstrtoul wcstoul -#define scvsprintf vswprintf -#define scstrstr wcsstr -#define scprintf wprintf - -#ifdef _WIN32 -#define WCHAR_SIZE 2 -#define WCHAR_SHIFT_MUL 1 -#define MAX_CHAR 0xFFFF -#else -#define WCHAR_SIZE 4 -#define WCHAR_SHIFT_MUL 2 -#define MAX_CHAR 0xFFFFFFFF -#endif - -#define _SC(a) L##a - - -#define scisspace iswspace -#define scisdigit iswdigit -#define scisprint iswprint -#define scisxdigit iswxdigit -#define scisalpha iswalpha -#define sciscntrl iswcntrl -#define scisalnum iswalnum - - -#define sq_rsl(l) ((l)<=0) - -#ifdef __GNUC__ -# define SQ_UNUSED_ARG(x) x __attribute__((__unused__)) -#else -# define SQ_UNUSED_ARG(x) x -#endif - -#ifdef __cplusplus -} /*extern "C"*/ -#endif - -#endif /*_SQUIRREL_H_*/ diff --git a/m_packages/squirrel/samples/ackermann.nut b/m_packages/squirrel/samples/ackermann.nut deleted file mode 100644 index 8b18ec21..00000000 --- a/m_packages/squirrel/samples/ackermann.nut +++ /dev/null @@ -1,23 +0,0 @@ -/* -* -* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/) -* -*/ - -function Ack(M, N) { - if (M == 0) return( N + 1 ); - if (N == 0) return( Ack(M - 1, 1) ); - return( Ack(M - 1, Ack(M, (N - 1))) ); -} - -local n; - -if(vargv.len()!=0) { - n = vargv[0].tointeger(); - if(n < 1) n = 1; -} else { - n = 1; -} -print("n="+n+"\n"); -print("Ack(3,"+ n+ "):"+ Ack(3, n)); - diff --git a/m_packages/squirrel/samples/array.nut b/m_packages/squirrel/samples/array.nut deleted file mode 100644 index 0102d62f..00000000 --- a/m_packages/squirrel/samples/array.nut +++ /dev/null @@ -1,29 +0,0 @@ -/* -* -* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/) -* -*/ -local n, i, k; - -if(vargv.len()!=0) { - n = vargv[0].tointeger(); - if(n < 1) n = 1; -} else { - n = 1; -} - -local x = []; x.resize(n); -local y = []; y.resize(n); - -for (i = 0; i < n; i+=1) { - x[i] = i + 1; - y[i] = 0; -} - -for (k = 0 ; k < n; k+=1) { - for (i = n-1; i >= 0; i-=1) { - y[i] = y[i]+ x[i]; - } -} -print(y[0].tostring()+" "+y[n-1]); - diff --git a/m_packages/squirrel/samples/class.nut b/m_packages/squirrel/samples/class.nut deleted file mode 100644 index 2d924602..00000000 --- a/m_packages/squirrel/samples/class.nut +++ /dev/null @@ -1,49 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////// -class BaseVector { - constructor(...) - { - if(vargv.len() >= 3) { - x = vargv[0]; - y = vargv[1]; - z = vargv[2]; - } - } - - - x = 0; - y = 0; - z = 0; -} - -class Vector3 extends BaseVector { - function _add(other) - { - if(other instanceof this.getclass()) - return ::Vector3(x+other.x,y+other.y,z+other.z); - else - throw "wrong parameter"; - } - function Print() - { - ::print(x+","+y+","+z+"\n"); - } -} - -local v0 = Vector3(1,2,3) -local v1 = Vector3(11,12,13) -local v2 = v0 + v1; -v2.Print(); - -FakeNamespace <- { - Utils = {} -} - -class FakeNamespace.Utils.SuperClass { - constructor() - { - ::print("FakeNamespace.Utils.SuperClass") - } -} - -local testy = FakeNamespace.Utils.SuperClass(); diff --git a/m_packages/squirrel/samples/classattributes.nut b/m_packages/squirrel/samples/classattributes.nut deleted file mode 100644 index 4d2d078d..00000000 --- a/m_packages/squirrel/samples/classattributes.nut +++ /dev/null @@ -1,35 +0,0 @@ -class Foo { - //constructor - constructor(a) - { - testy = ["stuff",1,2,3]; - } - //attributes of PrintTesty - - function PrintTesty() - { - foreach(i,val in testy) - { - ::print("idx = "+i+" = "+val+" \n"); - } - } - //attributes of testy - - testy = null; - -} - -foreach(member,val in Foo) -{ - ::print(member+"\n"); - local attr; - if((attr = Foo.getattributes(member)) != null) { - foreach(i,v in attr) - { - ::print("\t"+i+" = "+(typeof v)+"\n"); - } - } - else { - ::print("\t\n") - } -} diff --git a/m_packages/squirrel/samples/coroutines.nut b/m_packages/squirrel/samples/coroutines.nut deleted file mode 100644 index 0cc19920..00000000 --- a/m_packages/squirrel/samples/coroutines.nut +++ /dev/null @@ -1,25 +0,0 @@ -function coroutine_test(a,b) -{ - ::print(a+" "+b+"\n"); - local ret = ::suspend("suspend 1"); - ::print("the coroutine says "+ret+"\n"); - ret = ::suspend("suspend 2"); - ::print("the coroutine says "+ret+"\n"); - ret = ::suspend("suspend 3"); - ::print("the coroutine says "+ret+"\n"); - return "I'm done" -} - -local coro = ::newthread(coroutine_test); - -local susparam = coro.call("test","coroutine"); //starts the coroutine - -local i = 1; -do -{ - ::print("suspend passed ["+susparam+"]\n") - susparam = coro.wakeup("ciao "+i); - ++i; -}while(coro.getstatus()=="suspended") - -::print("return passed ["+susparam+"]\n") diff --git a/m_packages/squirrel/samples/delegation.nut b/m_packages/squirrel/samples/delegation.nut deleted file mode 100644 index 9f208dc4..00000000 --- a/m_packages/squirrel/samples/delegation.nut +++ /dev/null @@ -1,54 +0,0 @@ - -PEntity <- { - name="noname" - pos={x=0,y=0,z=0} - type="entity" - //methamethod - _typeof=function() - { - return type; - } -} - -function PEntity::PrintPos() -{ - ::print("x="+pos.x+" y="+pos.y+" z="+pos.z+"\n"); -} - -function PEntity::new(name,pos) -{ - local newentity=clone ::PEntity; - if(name) - newentity.name=name; - if(pos) - newentity.pos=pos; - return newentity; -} - -PPlayer <- { - model="warrior.mdl" - weapon="fist" - health=100 - armor=0 - //overrides the parent type - type="player" -} - -function PPlayer::new(name,pos) -{ - local p = clone ::PPlayer; - local newplayer = ::PEntity.new(name,pos); - newplayer.setdelegate(p); - return newplayer; -} - -local player=PPlayer.new("godzilla",{x=10,y=20,z=30}); - -::print("PLAYER NAME"+player.name+"\n"); -::print("ENTITY TYPE"+typeof player+"\n"); - -player.PrintPos(); - -player.pos.x=123; - -player.PrintPos(); diff --git a/m_packages/squirrel/samples/fibonacci.nut b/m_packages/squirrel/samples/fibonacci.nut deleted file mode 100644 index c722d1a1..00000000 --- a/m_packages/squirrel/samples/fibonacci.nut +++ /dev/null @@ -1,15 +0,0 @@ -/* -* -* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/) -* -*/ - -function fib(n) -{ - if (n < 2) return 1 - return fib(n-2) + fib(n-1) -} - -local n = vargv.len()!=0?vargv[0].tointeger():1 - -print(fib(n)+"\n") diff --git a/m_packages/squirrel/samples/flow.nut b/m_packages/squirrel/samples/flow.nut deleted file mode 100644 index 635bc89f..00000000 --- a/m_packages/squirrel/samples/flow.nut +++ /dev/null @@ -1,33 +0,0 @@ -function min(x,y) - return xy?x:y; - -if(min(100,200)>max(50,20)) - print("I'm useless statement just to show up the if/else\n"); -else - print("squirrel!!\n"); - -print("\n") - -function typy(obj) -{ - switch(typeof obj) - { - case "integer": - case "float": - return "is a number"; - case "table": - case "array": - return "is a container"; - default: - return "is other stuff" - } -} - -local a=1,b={},c=function(a,b){return a+b;} - -print("a "+typy(a)+"\n"); -print("b "+typy(b)+"\n"); -print("c "+typy(c)+"\n"); diff --git a/m_packages/squirrel/samples/generators.nut b/m_packages/squirrel/samples/generators.nut deleted file mode 100644 index eb5eef6b..00000000 --- a/m_packages/squirrel/samples/generators.nut +++ /dev/null @@ -1,42 +0,0 @@ -/* -*Random number function from The Great Computer Language shootout -*converted to a generator func -*/ - -function gen_random(max) { - local last=42 - local IM = 139968; - local IA = 3877; - local IC = 29573; - for(;;){ //loops forever - yield (max * (last = (last * IA + IC) % IM) / IM); - } -} - -local randtor=gen_random(100); - -print("RAND NUMBERS \n") - -for(local i=0;i<10;i+=1) - print(">"+resume randtor+"\n"); - -print("FIBONACCI \n") -function fiboz(n) -{ - local prev=0; - local curr=1; - yield 1; - - for(local i=0;i"+val+"\n"); -} diff --git a/m_packages/squirrel/samples/hello.nut b/m_packages/squirrel/samples/hello.nut deleted file mode 100644 index f301245e..00000000 --- a/m_packages/squirrel/samples/hello.nut +++ /dev/null @@ -1 +0,0 @@ -print("Hello World!") diff --git a/m_packages/squirrel/samples/list.nut b/m_packages/squirrel/samples/list.nut deleted file mode 100644 index e7cc2218..00000000 --- a/m_packages/squirrel/samples/list.nut +++ /dev/null @@ -1,40 +0,0 @@ -/*translation of the list test from The Great Computer Language Shootout -*/ - -function compare_arr(a1,a2) -{ - foreach(i,val in a1) - if(val!=a2[i])return null; - return 1; -} - -function test() -{ - local size=10000 - local l1=[]; l1.resize(size); - for(local i=0;i0) - l3.append(l2.pop()); - while(l3.len()>0) - l2.append(l3.pop()); - l1.reverse(); - - if(compare_arr(l1,l2)) - return l1.len(); - return null; -} - -local n = vargv.len()!=0?vargv[0].tointeger():1 -for(local i=0;i\n"); -else - print("\n"); diff --git a/m_packages/squirrel/samples/methcall.nut b/m_packages/squirrel/samples/methcall.nut deleted file mode 100644 index 73bb2e84..00000000 --- a/m_packages/squirrel/samples/methcall.nut +++ /dev/null @@ -1,68 +0,0 @@ -/*translation of the methcall test from The Great Computer Language Shootout -*/ - -class Toggle { - bool=null -} - -function Toggle::constructor(startstate) { - bool = startstate -} - -function Toggle::value() { - return bool; -} - -function Toggle::activate() { - bool = !bool; - return this; -} - -class NthToggle extends Toggle { - count_max=null - count=0 -} - -function NthToggle::constructor(start_state,max_counter) -{ - base.constructor(start_state); - count_max = max_counter -} - -function NthToggle::activate () -{ - ++count; - if (count >= count_max ) { - base.activate(); - count = 0; - } - return this; -} - - -function main() { - local n = vargv.len()!=0?vargv[0].tointeger():1 - - - - local val = 1; - local toggle = Toggle(val); - local i = n; - while(i--) { - val = toggle.activate().value(); - - } - print(toggle.value() ? "true\n" : "false\n"); - - val = 1; - local ntoggle = NthToggle(val, 3); - i = n; - while(i--) { - val = ntoggle.activate().value(); - } - print(ntoggle.value() ? "true\n" : "false\n"); - -} -local start=clock(); -main(); -print("TIME="+(clock()-start)+"\n"); diff --git a/m_packages/squirrel/samples/regex.nut b/m_packages/squirrel/samples/regex.nut deleted file mode 100644 index fcd8e59e..00000000 --- a/m_packages/squirrel/samples/regex.nut +++ /dev/null @@ -1,10 +0,0 @@ -local ex = regexp("[a-zA-Z]+"); -local string = "123 Test; strlen(str);"; -local res = ex.search(string); -print(string.slice(res.begin,res.end)); //prints "Test" -print("\n"); -ex = regexp(@"\m()"); -string = "123 Test; doSomething(str, getTemp(), (a+(b/c)));"; -res = ex.search(string); -print(string.slice(res.begin,res.end)); //prints "(...)" -print("\n"); diff --git a/m_packages/squirrel/samples/tailstate.nut b/m_packages/squirrel/samples/tailstate.nut deleted file mode 100644 index 7ea06c69..00000000 --- a/m_packages/squirrel/samples/tailstate.nut +++ /dev/null @@ -1,24 +0,0 @@ -function state1() -{ - ::suspend("state1"); - return state2(); -} - -function state2() -{ - ::suspend("state2"); - return state3(); -} - -function state3() -{ - ::suspend("state3"); - return state1(); -} - -local statethread = ::newthread(state1) - -::print(statethread.call()+"\n"); - -for(local i = 0; i < 10000; i++) - ::print(statethread.wakeup()+"\n"); diff --git a/m_packages/squirrel/sq/CMakeLists.txt b/m_packages/squirrel/sq/CMakeLists.txt deleted file mode 100644 index f7629a3f..00000000 --- a/m_packages/squirrel/sq/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -set(CMAKE_C_STANDARD 99) -if(NOT DISABLE_DYNAMIC) - add_executable(sq sq.c) - add_executable(squirrel::interpreter ALIAS sq) - set_target_properties(sq PROPERTIES LINKER_LANGUAGE C EXPORT_NAME interpreter) - target_link_libraries(sq squirrel sqstdlib) - if(NOT SQ_DISABLE_INSTALLER) - install(TARGETS sq EXPORT squirrel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime) - endif() - target_include_directories(sq PUBLIC - "$" - "$" - ) -endif() - -if(NOT DISABLE_STATIC) - add_executable(sq_static sq.c) - add_executable(squirrel::interpreter_static ALIAS sq_static) - set_target_properties(sq_static PROPERTIES LINKER_LANGUAGE C EXPORT_NAME interpreter_static) - target_link_libraries(sq_static squirrel_static sqstdlib_static) - if(NOT SQ_DISABLE_INSTALLER) - install(TARGETS sq_static EXPORT squirrel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime) - endif() - target_include_directories(sq_static PUBLIC - "$" - "$" - ) -endif() - -if(LONG_OUTPUT_NAMES) - if(NOT DISABLE_DYNAMIC) - set_target_properties(sq PROPERTIES OUTPUT_NAME squirrel3) - endif() - - if(NOT DISABLE_STATIC) - set_target_properties(sq_static PROPERTIES OUTPUT_NAME squirrel3_static) - endif() -endif() diff --git a/m_packages/squirrel/sq/Makefile b/m_packages/squirrel/sq/Makefile deleted file mode 100644 index 948fd1ea..00000000 --- a/m_packages/squirrel/sq/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SQUIRREL= .. - - -OUT= $(SQUIRREL)/bin/sq -INCZ= -I$(SQUIRREL)/include -I. -I$(SQUIRREL)/sqlibs -LIBZ= -L$(SQUIRREL)/lib -LIB= -lsquirrel -lsqstdlib - -OBJS= sq.o - -SRCS= sq.c - - -sq32: - g++ -O2 -fno-exceptions -fno-rtti -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB) - -sqprof: - g++ -O2 -pg -fno-exceptions -fno-rtti -pie -gstabs -g3 -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB) - -sq64: - g++ -O2 -m64 -fno-exceptions -fno-rtti -D_SQ64 -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB) diff --git a/m_packages/squirrel/sq/sq.c b/m_packages/squirrel/sq/sq.c deleted file mode 100644 index ee5eabbb..00000000 --- a/m_packages/squirrel/sq/sq.c +++ /dev/null @@ -1,349 +0,0 @@ -/* see copyright notice in squirrel.h */ - -#include -#include -#include -#include - -#if defined(_MSC_VER) && defined(_DEBUG) -#include -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#ifdef SQUNICODE -#define scfprintf fwprintf -#define scvprintf vfwprintf -#else -#define scfprintf fprintf -#define scvprintf vfprintf -#endif - - -void PrintVersionInfos(); - -#if defined(_MSC_VER) && defined(_DEBUG) -int MemAllocHook( int allocType, void *userData, size_t size, int blockType, - long requestNumber, const unsigned char *filename, int lineNumber) -{ - //if(requestNumber==769)_asm int 3; - return 1; -} -#endif - - -SQInteger quit(HSQUIRRELVM v) -{ - int *done; - sq_getuserpointer(v,-1,(SQUserPointer*)&done); - *done=1; - return 0; -} - -void printfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...) -{ - va_list vl; - va_start(vl, s); - scvprintf(stdout, s, vl); - va_end(vl); -} - -void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...) -{ - va_list vl; - va_start(vl, s); - scvprintf(stderr, s, vl); - va_end(vl); -} - -void PrintVersionInfos() -{ - scfprintf(stdout,_SC("%s %s (%d bits)\n"),SQUIRREL_VERSION,SQUIRREL_COPYRIGHT,((int)(sizeof(SQInteger)*8))); -} - -void PrintUsage() -{ - scfprintf(stderr,_SC("usage: sq .\n") - _SC("Available options are:\n") - _SC(" -c compiles the file to bytecode(default output 'out.cnut')\n") - _SC(" -o specifies output file for the -c option\n") - _SC(" -c compiles only\n") - _SC(" -d generates debug infos\n") - _SC(" -v displays version infos\n") - _SC(" -h prints help\n")); -} - -#define _INTERACTIVE 0 -#define _DONE 2 -#define _ERROR 3 -//<> this func is a mess -int getargs(HSQUIRRELVM v,int argc, char* argv[],SQInteger *retval) -{ - int i; - int compiles_only = 0; -#ifdef SQUNICODE - static SQChar temp[500]; -#endif - char * output = NULL; - *retval = 0; - if(argc>1) - { - int arg=1,exitloop=0; - - while(arg < argc && !exitloop) - { - - if(argv[arg][0]=='-') - { - switch(argv[arg][1]) - { - case 'd': //DEBUG(debug infos) - sq_enabledebuginfo(v,1); - break; - case 'c': - compiles_only = 1; - break; - case 'o': - if(arg < argc) { - arg++; - output = argv[arg]; - } - break; - case 'v': - PrintVersionInfos(); - return _DONE; - - case 'h': - PrintVersionInfos(); - PrintUsage(); - return _DONE; - default: - PrintVersionInfos(); - scprintf(_SC("unknown prameter '-%c'\n"),argv[arg][1]); - PrintUsage(); - *retval = -1; - return _ERROR; - } - }else break; - arg++; - } - - // src file - - if(arg")); - for(;;) { - int c; - if(done)return; - c = getchar(); - if (c == _SC('\n')) { - if (i>0 && buffer[i-1] == _SC('\\')) - { - buffer[i-1] = _SC('\n'); - } - else if(blocks==0)break; - buffer[i++] = _SC('\n'); - } - else if (c==_SC('}')) {blocks--; buffer[i++] = (SQChar)c;} - else if(c==_SC('{') && !string){ - blocks++; - buffer[i++] = (SQChar)c; - } - else if(c==_SC('"') || c==_SC('\'')){ - string=!string; - buffer[i++] = (SQChar)c; - } - else if (i >= MAXINPUT-1) { - scfprintf(stderr, _SC("sq : input line too long\n")); - break; - } - else{ - buffer[i++] = (SQChar)c; - } - } - buffer[i] = _SC('\0'); - - if(buffer[0]==_SC('=')){ - scsprintf(sq_getscratchpad(v,MAXINPUT),(size_t)MAXINPUT,_SC("return (%s)"),&buffer[1]); - memcpy(buffer,sq_getscratchpad(v,-1),(scstrlen(sq_getscratchpad(v,-1))+1)*sizeof(SQChar)); - retval=1; - } - i=scstrlen(buffer); - if(i>0){ - SQInteger oldtop=sq_gettop(v); - if(SQ_SUCCEEDED(sq_compilebuffer(v,buffer,i,_SC("interactive console"),SQTrue))){ - sq_pushroottable(v); - if(SQ_SUCCEEDED(sq_call(v,1,retval,SQTrue)) && retval){ - scprintf(_SC("\n")); - sq_pushroottable(v); - sq_pushstring(v,_SC("print"),-1); - sq_get(v,-2); - sq_pushroottable(v); - sq_push(v,-4); - sq_call(v,2,SQFalse,SQTrue); - retval=0; - scprintf(_SC("\n")); - } - } - - sq_settop(v,oldtop); - } - } -} - -int main(int argc, char* argv[]) -{ - HSQUIRRELVM v; - SQInteger retval = 0; -#if defined(_MSC_VER) && defined(_DEBUG) - _CrtSetAllocHook(MemAllocHook); -#endif - - v=sq_open(1024); - sq_setprintfunc(v,printfunc,errorfunc); - - sq_pushroottable(v); - - sqstd_register_bloblib(v); - sqstd_register_iolib(v); - sqstd_register_systemlib(v); - sqstd_register_mathlib(v); - sqstd_register_stringlib(v); - - //aux library - //sets error handlers - sqstd_seterrorhandlers(v); - - //gets arguments - switch(getargs(v,argc,argv,&retval)) - { - case _INTERACTIVE: - Interactive(v); - break; - case _DONE: - case _ERROR: - default: - break; - } - - sq_close(v); - -#if defined(_MSC_VER) && defined(_DEBUG) - _getch(); - _CrtMemDumpAllObjectsSince( NULL ); -#endif - return retval; -} - diff --git a/m_packages/squirrel/sq/sq.dsp b/m_packages/squirrel/sq/sq.dsp deleted file mode 100644 index a632d12b..00000000 --- a/m_packages/squirrel/sq/sq.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sq" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sq - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sq.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sq.mak" CFG="sq - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sq - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sq - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_LocalPath ".." -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sq - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\include" /I "..\sqstdlib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 squirrel.lib sqstdlib.lib /nologo /subsystem:console /machine:I386 /out:"../bin/sq.exe" /libpath:"../lib" - -!ELSEIF "$(CFG)" == "sq - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\sqstdlib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 squirrel.lib sqstdlib.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/sq.exe" /pdbtype:sept /libpath:"../lib" - -!ENDIF - -# Begin Target - -# Name "sq - Win32 Release" -# Name "sq - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sq.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/m_packages/squirrel/sqstdlib/CMakeLists.txt b/m_packages/squirrel/sqstdlib/CMakeLists.txt deleted file mode 100644 index a606ba81..00000000 --- a/m_packages/squirrel/sqstdlib/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -set(SQSTDLIB_SRC sqstdaux.cpp - sqstdblob.cpp - sqstdio.cpp - sqstdmath.cpp - sqstdrex.cpp - sqstdstream.cpp - sqstdstring.cpp - sqstdsystem.cpp) - -if(NOT DISABLE_DYNAMIC) - add_library(sqstdlib SHARED ${SQSTDLIB_SRC}) - add_library(squirrel::sqstdlib ALIAS sqstdlib) - set_property(TARGET sqstdlib PROPERTY EXPORT_NAME sqstdlib) - set_property(TARGET sqstdlib PROPERTY OUTPUT_NAME ${SQSTDLIB_NAME}) - target_link_libraries(sqstdlib squirrel) - if(NOT SQ_DISABLE_INSTALLER) - install(TARGETS sqstdlib EXPORT squirrel - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Libraries - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries NAMELINK_SKIP - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries - ) - install(TARGETS sqstdlib EXPORT squirrel - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development NAMELINK_ONLY - ) - endif() - target_include_directories(sqstdlib PUBLIC - "$" - "$" - ) -endif() - -if(NOT DISABLE_STATIC) - add_library(sqstdlib_static STATIC ${SQSTDLIB_SRC}) - add_library(squirrel::sqstdlib_static ALIAS sqstdlib_static) - set_property(TARGET sqstdlib_static PROPERTY EXPORT_NAME sqstdlib_static) - if(NOT SQ_DISABLE_INSTALLER) - install(TARGETS sqstdlib_static EXPORT squirrel ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development) - endif() - target_include_directories(sqstdlib_static PUBLIC - "$" - "$" - ) -endif() - -if(LONG_OUTPUT_NAMES) - if(NOT DISABLE_STATIC) - set_target_properties(sqstdlib_static PROPERTIES OUTPUT_NAME sqstdlib3_static) - endif() -endif() diff --git a/m_packages/squirrel/sqstdlib/Makefile b/m_packages/squirrel/sqstdlib/Makefile deleted file mode 100644 index 6ed1c12b..00000000 --- a/m_packages/squirrel/sqstdlib/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SQUIRREL= .. - - -CC?= gcc -OUT?= $(SQUIRREL)/lib/libsqstdlib.a -INCZ?= -I$(SQUIRREL)/include -I. -Iinclude -DEFS= $(CC_EXTRA_FLAGS) -LIB= - -OBJS= \ - sqstdblob.o \ - sqstdio.o \ - sqstdstream.o \ - sqstdmath.o \ - sqstdsystem.o \ - sqstdstring.o \ - sqstdaux.o \ - sqstdrex.o - -SRCS= \ - sqstdblob.cpp \ - sqstdio.cpp \ - sqstdstream.cpp \ - sqstdmath.cpp \ - sqstdsystem.cpp \ - sqstdstring.cpp \ - sqstdaux.cpp \ - sqstdrex.cpp - - -sq32: - $(CC) -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS) - ar rc $(OUT) *.o - rm *.o - -sqprof: - $(CC) -O2 -pg -fno-exceptions -fno-rtti -pie -gstabs -g3 -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS) - ar rc $(OUT) *.o - rm *.o - -sq64: - $(CC) -O2 -m64 -fno-exceptions -D_SQ64 -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS) - ar rc $(OUT) *.o - rm *.o diff --git a/m_packages/squirrel/sqstdlib/sqstdaux.cpp b/m_packages/squirrel/sqstdlib/sqstdaux.cpp deleted file mode 100644 index 75c16533..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdaux.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include -#include - -void sqstd_printcallstack(HSQUIRRELVM v) -{ - SQPRINTFUNCTION pf = sq_geterrorfunc(v); - if(pf) { - SQStackInfos si; - SQInteger i; - SQFloat f; - const SQChar *s; - SQInteger level=1; //1 is to skip this function that is level 0 - const SQChar *name=0; - SQInteger seq=0; - pf(v,_SC("\nCALLSTACK\n")); - while(SQ_SUCCEEDED(sq_stackinfos(v,level,&si))) - { - const SQChar *fn=_SC("unknown"); - const SQChar *src=_SC("unknown"); - if(si.funcname)fn=si.funcname; - if(si.source)src=si.source; - pf(v,_SC("*FUNCTION [%s()] %s line [%d]\n"),fn,src,si.line); - level++; - } - level=0; - pf(v,_SC("\nLOCALS\n")); - - for(level=0;level<10;level++){ - seq=0; - while((name = sq_getlocal(v,level,seq))) - { - seq++; - switch(sq_gettype(v,-1)) - { - case OT_NULL: - pf(v,_SC("[%s] NULL\n"),name); - break; - case OT_INTEGER: - sq_getinteger(v,-1,&i); - pf(v,_SC("[%s] %d\n"),name,i); - break; - case OT_FLOAT: - sq_getfloat(v,-1,&f); - pf(v,_SC("[%s] %.14g\n"),name,f); - break; - case OT_USERPOINTER: - pf(v,_SC("[%s] USERPOINTER\n"),name); - break; - case OT_STRING: - sq_getstring(v,-1,&s); - pf(v,_SC("[%s] \"%s\"\n"),name,s); - break; - case OT_TABLE: - pf(v,_SC("[%s] TABLE\n"),name); - break; - case OT_ARRAY: - pf(v,_SC("[%s] ARRAY\n"),name); - break; - case OT_CLOSURE: - pf(v,_SC("[%s] CLOSURE\n"),name); - break; - case OT_NATIVECLOSURE: - pf(v,_SC("[%s] NATIVECLOSURE\n"),name); - break; - case OT_GENERATOR: - pf(v,_SC("[%s] GENERATOR\n"),name); - break; - case OT_USERDATA: - pf(v,_SC("[%s] USERDATA\n"),name); - break; - case OT_THREAD: - pf(v,_SC("[%s] THREAD\n"),name); - break; - case OT_CLASS: - pf(v,_SC("[%s] CLASS\n"),name); - break; - case OT_INSTANCE: - pf(v,_SC("[%s] INSTANCE\n"),name); - break; - case OT_WEAKREF: - pf(v,_SC("[%s] WEAKREF\n"),name); - break; - case OT_BOOL:{ - SQBool bval; - sq_getbool(v,-1,&bval); - pf(v,_SC("[%s] %s\n"),name,bval == SQTrue ? _SC("true"):_SC("false")); - } - break; - default: assert(0); break; - } - sq_pop(v,1); - } - } - } -} - -static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v) -{ - SQPRINTFUNCTION pf = sq_geterrorfunc(v); - if(pf) { - const SQChar *sErr = 0; - if(sq_gettop(v)>=1) { - if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) { - pf(v,_SC("\nAN ERROR HAS OCCURRED [%s]\n"),sErr); - } - else{ - pf(v,_SC("\nAN ERROR HAS OCCURRED [unknown]\n")); - } - sqstd_printcallstack(v); - } - } - return 0; -} - -void _sqstd_compiler_error(HSQUIRRELVM v,const SQChar *sErr,const SQChar *sSource,SQInteger line,SQInteger column) -{ - SQPRINTFUNCTION pf = sq_geterrorfunc(v); - if(pf) { - pf(v,_SC("%s line = (%d) column = (%d) : error %s\n"),sSource,line,column,sErr); - } -} - -void sqstd_seterrorhandlers(HSQUIRRELVM v) -{ - sq_setcompilererrorhandler(v,_sqstd_compiler_error); - sq_newclosure(v,_sqstd_aux_printerror,0); - sq_seterrorhandler(v); -} - -SQRESULT sqstd_throwerrorf(HSQUIRRELVM v,const SQChar *err,...) -{ - SQInteger n=256; - va_list args; -begin: - va_start(args,err); - SQChar *b=sq_getscratchpad(v,n); - SQInteger r=scvsprintf(b,n,err,args); - va_end(args); - if (r>=n) { - n=r+1;//required+null - goto begin; - } else if (r<0) { - return sq_throwerror(v,_SC("@failed to generate formatted error message")); - } else { - return sq_throwerror(v,b); - } -} diff --git a/m_packages/squirrel/sqstdlib/sqstdblob.cpp b/m_packages/squirrel/sqstdlib/sqstdblob.cpp deleted file mode 100644 index 22df0cf9..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdblob.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include -#include -#include "sqstdstream.h" -#include "sqstdblobimpl.h" - -#define SQSTD_BLOB_TYPE_TAG ((SQUnsignedInteger)(SQSTD_STREAM_TYPE_TAG | 0x00000002)) - -//Blob - - -#define SETUP_BLOB(v) \ - SQBlob *self = NULL; \ - { if(SQ_FAILED(sq_getinstanceup(v,1,(SQUserPointer*)&self,(SQUserPointer)SQSTD_BLOB_TYPE_TAG,SQFalse))) \ - return sq_throwerror(v,_SC("invalid type tag")); } \ - if(!self || !self->IsValid()) \ - return sq_throwerror(v,_SC("the blob is invalid")); - - -static SQInteger _blob_resize(HSQUIRRELVM v) -{ - SETUP_BLOB(v); - SQInteger size; - sq_getinteger(v,2,&size); - if(!self->Resize(size)) - return sq_throwerror(v,_SC("resize failed")); - return 0; -} - -static void __swap_dword(unsigned int *n) -{ - *n=(unsigned int)(((*n&0xFF000000)>>24) | - ((*n&0x00FF0000)>>8) | - ((*n&0x0000FF00)<<8) | - ((*n&0x000000FF)<<24)); -} - -static void __swap_word(unsigned short *n) -{ - *n=(unsigned short)((*n>>8)&0x00FF)| ((*n<<8)&0xFF00); -} - -static SQInteger _blob_swap4(HSQUIRRELVM v) -{ - SETUP_BLOB(v); - SQInteger num=(self->Len()-(self->Len()%4))>>2; - unsigned int *t=(unsigned int *)self->GetBuf(); - for(SQInteger i = 0; i < num; i++) { - __swap_dword(&t[i]); - } - return 0; -} - -static SQInteger _blob_swap2(HSQUIRRELVM v) -{ - SETUP_BLOB(v); - SQInteger num=(self->Len()-(self->Len()%2))>>1; - unsigned short *t = (unsigned short *)self->GetBuf(); - for(SQInteger i = 0; i < num; i++) { - __swap_word(&t[i]); - } - return 0; -} - -static SQInteger _blob__set(HSQUIRRELVM v) -{ - SETUP_BLOB(v); - SQInteger idx,val; - sq_getinteger(v,2,&idx); - sq_getinteger(v,3,&val); - if(idx < 0 || idx >= self->Len()) - return sq_throwerror(v,_SC("index out of range")); - ((unsigned char *)self->GetBuf())[idx] = (unsigned char) val; - sq_push(v,3); - return 1; -} - -static SQInteger _blob__get(HSQUIRRELVM v) -{ - SETUP_BLOB(v); - SQInteger idx; - - if ((sq_gettype(v, 2) & SQOBJECT_NUMERIC) == 0) - { - sq_pushnull(v); - return sq_throwobject(v); - } - sq_getinteger(v,2,&idx); - if(idx < 0 || idx >= self->Len()) - return sq_throwerror(v,_SC("index out of range")); - sq_pushinteger(v,((unsigned char *)self->GetBuf())[idx]); - return 1; -} - -static SQInteger _blob__nexti(HSQUIRRELVM v) -{ - SETUP_BLOB(v); - if(sq_gettype(v,2) == OT_NULL) { - sq_pushinteger(v, 0); - return 1; - } - SQInteger idx; - if(SQ_SUCCEEDED(sq_getinteger(v, 2, &idx))) { - if(idx+1 < self->Len()) { - sq_pushinteger(v, idx+1); - return 1; - } - sq_pushnull(v); - return 1; - } - return sq_throwerror(v,_SC("internal error (_nexti) wrong argument type")); -} - -static SQInteger _blob__typeof(HSQUIRRELVM v) -{ - sq_pushstring(v,_SC("blob"),-1); - return 1; -} - -static SQInteger _blob_releasehook(SQUserPointer p, SQInteger SQ_UNUSED_ARG(size)) -{ - SQBlob *self = (SQBlob*)p; - self->~SQBlob(); - sq_free(self,sizeof(SQBlob)); - return 1; -} - -static SQInteger _blob_constructor(HSQUIRRELVM v) -{ - SQInteger nparam = sq_gettop(v); - SQInteger size = 0; - if(nparam == 2) { - sq_getinteger(v, 2, &size); - } - if(size < 0) return sq_throwerror(v, _SC("cannot create blob with negative size")); - //SQBlob *b = new SQBlob(size); - - SQBlob *b = new (sq_malloc(sizeof(SQBlob)))SQBlob(size); - if(SQ_FAILED(sq_setinstanceup(v,1,b))) { - b->~SQBlob(); - sq_free(b,sizeof(SQBlob)); - return sq_throwerror(v, _SC("cannot create blob")); - } - sq_setreleasehook(v,1,_blob_releasehook); - return 0; -} - -static SQInteger _blob__cloned(HSQUIRRELVM v) -{ - SQBlob *other = NULL; - { - if(SQ_FAILED(sq_getinstanceup(v,2,(SQUserPointer*)&other,(SQUserPointer)SQSTD_BLOB_TYPE_TAG,SQFalse))) - return SQ_ERROR; - } - //SQBlob *thisone = new SQBlob(other->Len()); - SQBlob *thisone = new (sq_malloc(sizeof(SQBlob)))SQBlob(other->Len()); - memcpy(thisone->GetBuf(),other->GetBuf(),thisone->Len()); - if(SQ_FAILED(sq_setinstanceup(v,1,thisone))) { - thisone->~SQBlob(); - sq_free(thisone,sizeof(SQBlob)); - return sq_throwerror(v, _SC("cannot clone blob")); - } - sq_setreleasehook(v,1,_blob_releasehook); - return 0; -} - -#define _DECL_BLOB_FUNC(name,nparams,typecheck) {_SC(#name),_blob_##name,nparams,typecheck} -static const SQRegFunction _blob_methods[] = { - _DECL_BLOB_FUNC(constructor,-1,_SC("xn")), - _DECL_BLOB_FUNC(resize,2,_SC("xn")), - _DECL_BLOB_FUNC(swap2,1,_SC("x")), - _DECL_BLOB_FUNC(swap4,1,_SC("x")), - _DECL_BLOB_FUNC(_set,3,_SC("xnn")), - _DECL_BLOB_FUNC(_get,2,_SC("x.")), - _DECL_BLOB_FUNC(_typeof,1,_SC("x")), - _DECL_BLOB_FUNC(_nexti,2,_SC("x")), - _DECL_BLOB_FUNC(_cloned,2,_SC("xx")), - {NULL,(SQFUNCTION)0,0,NULL} -}; - - - -//GLOBAL FUNCTIONS - -static SQInteger _g_blob_casti2f(HSQUIRRELVM v) -{ - SQInteger i; - sq_getinteger(v,2,&i); - sq_pushfloat(v,*((const SQFloat *)&i)); - return 1; -} - -static SQInteger _g_blob_castf2i(HSQUIRRELVM v) -{ - SQFloat f; - sq_getfloat(v,2,&f); - sq_pushinteger(v,*((const SQInteger *)&f)); - return 1; -} - -static SQInteger _g_blob_swap2(HSQUIRRELVM v) -{ - SQInteger i; - sq_getinteger(v,2,&i); - unsigned short s = (unsigned short)i; - sq_pushinteger(v, ((s << 8) | ((s >> 8) & 0x00FFu)) & 0xFFFFu); - return 1; -} - -static SQInteger _g_blob_swap4(HSQUIRRELVM v) -{ - SQInteger i; - sq_getinteger(v,2,&i); - unsigned int t4 = (unsigned int)i; - __swap_dword(&t4); - sq_pushinteger(v,(SQInteger)t4); - return 1; -} - -static SQInteger _g_blob_swapfloat(HSQUIRRELVM v) -{ - SQFloat f; - sq_getfloat(v,2,&f); - __swap_dword((unsigned int *)&f); - sq_pushfloat(v,f); - return 1; -} - -#define _DECL_GLOBALBLOB_FUNC(name,nparams,typecheck) {_SC(#name),_g_blob_##name,nparams,typecheck} -static const SQRegFunction bloblib_funcs[]={ - _DECL_GLOBALBLOB_FUNC(casti2f,2,_SC(".n")), - _DECL_GLOBALBLOB_FUNC(castf2i,2,_SC(".n")), - _DECL_GLOBALBLOB_FUNC(swap2,2,_SC(".n")), - _DECL_GLOBALBLOB_FUNC(swap4,2,_SC(".n")), - _DECL_GLOBALBLOB_FUNC(swapfloat,2,_SC(".n")), - {NULL,(SQFUNCTION)0,0,NULL} -}; - -SQRESULT sqstd_getblob(HSQUIRRELVM v,SQInteger idx,SQUserPointer *ptr) -{ - SQBlob *blob; - if(SQ_FAILED(sq_getinstanceup(v,idx,(SQUserPointer *)&blob,(SQUserPointer)SQSTD_BLOB_TYPE_TAG,SQTrue))) - return -1; - *ptr = blob->GetBuf(); - return SQ_OK; -} - -SQInteger sqstd_getblobsize(HSQUIRRELVM v,SQInteger idx) -{ - SQBlob *blob; - if(SQ_FAILED(sq_getinstanceup(v,idx,(SQUserPointer *)&blob,(SQUserPointer)SQSTD_BLOB_TYPE_TAG,SQTrue))) - return -1; - return blob->Len(); -} - -SQUserPointer sqstd_createblob(HSQUIRRELVM v, SQInteger size) -{ - SQInteger top = sq_gettop(v); - sq_pushregistrytable(v); - sq_pushstring(v,_SC("std_blob"),-1); - if(SQ_SUCCEEDED(sq_get(v,-2))) { - sq_remove(v,-2); //removes the registry - sq_push(v,1); // push the this - sq_pushinteger(v,size); //size - SQBlob *blob = NULL; - if(SQ_SUCCEEDED(sq_call(v,2,SQTrue,SQFalse)) - && SQ_SUCCEEDED(sq_getinstanceup(v,-1,(SQUserPointer *)&blob,(SQUserPointer)SQSTD_BLOB_TYPE_TAG,SQTrue))) { - sq_remove(v,-2); - return blob->GetBuf(); - } - } - sq_settop(v,top); - return NULL; -} - -SQRESULT sqstd_register_bloblib(HSQUIRRELVM v) -{ - return declare_stream(v,_SC("blob"),(SQUserPointer)SQSTD_BLOB_TYPE_TAG,_SC("std_blob"),_blob_methods,bloblib_funcs); -} - diff --git a/m_packages/squirrel/sqstdlib/sqstdblobimpl.h b/m_packages/squirrel/sqstdlib/sqstdblobimpl.h deleted file mode 100644 index bfdaddc2..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdblobimpl.h +++ /dev/null @@ -1,108 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQSTD_BLOBIMPL_H_ -#define _SQSTD_BLOBIMPL_H_ - -struct SQBlob : public SQStream -{ - SQBlob(SQInteger size) { - _size = size; - _allocated = size; - _buf = (unsigned char *)sq_malloc(size); - memset(_buf, 0, _size); - _ptr = 0; - _owns = true; - } - virtual ~SQBlob() { - sq_free(_buf, _allocated); - } - SQInteger Write(void *buffer, SQInteger size) { - if(!CanAdvance(size)) { - GrowBufOf(_ptr + size - _size); - } - memcpy(&_buf[_ptr], buffer, size); - _ptr += size; - return size; - } - SQInteger Read(void *buffer,SQInteger size) { - SQInteger n = size; - if(!CanAdvance(size)) { - if((_size - _ptr) > 0) - n = _size - _ptr; - else return 0; - } - memcpy(buffer, &_buf[_ptr], n); - _ptr += n; - return n; - } - bool Resize(SQInteger n) { - if(!_owns) return false; - if(n != _allocated) { - unsigned char *newbuf = (unsigned char *)sq_malloc(n); - memset(newbuf,0,n); - if(_size > n) - memcpy(newbuf,_buf,n); - else - memcpy(newbuf,_buf,_size); - sq_free(_buf,_allocated); - _buf=newbuf; - _allocated = n; - if(_size > _allocated) - _size = _allocated; - if(_ptr > _allocated) - _ptr = _allocated; - } - return true; - } - bool GrowBufOf(SQInteger n) - { - bool ret = true; - if(_size + n > _allocated) { - if(_size + n > _size * 2) - ret = Resize(_size + n); - else - ret = Resize(_size * 2); - } - _size = _size + n; - return ret; - } - bool CanAdvance(SQInteger n) { - if(_ptr+n>_size)return false; - return true; - } - SQInteger Seek(SQInteger offset, SQInteger origin) { - switch(origin) { - case SQ_SEEK_SET: - if(offset > _size || offset < 0) return -1; - _ptr = offset; - break; - case SQ_SEEK_CUR: - if(_ptr + offset > _size || _ptr + offset < 0) return -1; - _ptr += offset; - break; - case SQ_SEEK_END: - if(_size + offset > _size || _size + offset < 0) return -1; - _ptr = _size + offset; - break; - default: return -1; - } - return 0; - } - bool IsValid() { - return _size == 0 || _buf?true:false; - } - bool EOS() { - return _ptr == _size; - } - SQInteger Flush() { return 0; } - SQInteger Tell() { return _ptr; } - SQInteger Len() { return _size; } - SQUserPointer GetBuf(){ return _buf; } -private: - SQInteger _size; - SQInteger _allocated; - SQInteger _ptr; - unsigned char *_buf; - bool _owns; -}; - -#endif //_SQSTD_BLOBIMPL_H_ diff --git a/m_packages/squirrel/sqstdlib/sqstdio.cpp b/m_packages/squirrel/sqstdlib/sqstdio.cpp deleted file mode 100644 index ec6ee07e..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdio.cpp +++ /dev/null @@ -1,489 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include -#include "sqstdstream.h" - -#define SQSTD_FILE_TYPE_TAG ((SQUnsignedInteger)(SQSTD_STREAM_TYPE_TAG | 0x00000001)) -//basic API -SQFILE sqstd_fopen(const SQChar *filename ,const SQChar *mode) -{ -#ifndef SQUNICODE - return (SQFILE)fopen(filename,mode); -#else - return (SQFILE)_wfopen(filename,mode); -#endif -} - -SQInteger sqstd_fread(void* buffer, SQInteger size, SQInteger count, SQFILE file) -{ - SQInteger ret = (SQInteger)fread(buffer,size,count,(FILE *)file); - return ret; -} - -SQInteger sqstd_fwrite(const SQUserPointer buffer, SQInteger size, SQInteger count, SQFILE file) -{ - return (SQInteger)fwrite(buffer,size,count,(FILE *)file); -} - -SQInteger sqstd_fseek(SQFILE file, SQInteger offset, SQInteger origin) -{ - SQInteger realorigin; - switch(origin) { - case SQ_SEEK_CUR: realorigin = SEEK_CUR; break; - case SQ_SEEK_END: realorigin = SEEK_END; break; - case SQ_SEEK_SET: realorigin = SEEK_SET; break; - default: return -1; //failed - } - return fseek((FILE *)file,(long)offset,(int)realorigin); -} - -SQInteger sqstd_ftell(SQFILE file) -{ - return ftell((FILE *)file); -} - -SQInteger sqstd_fflush(SQFILE file) -{ - return fflush((FILE *)file); -} - -SQInteger sqstd_fclose(SQFILE file) -{ - return fclose((FILE *)file); -} - -SQInteger sqstd_feof(SQFILE file) -{ - return feof((FILE *)file); -} - -//File -struct SQFile : public SQStream { - SQFile() { _handle = NULL; _owns = false;} - SQFile(SQFILE file, bool owns) { _handle = file; _owns = owns;} - virtual ~SQFile() { Close(); } - bool Open(const SQChar *filename ,const SQChar *mode) { - Close(); - if( (_handle = sqstd_fopen(filename,mode)) ) { - _owns = true; - return true; - } - return false; - } - void Close() { - if(_handle && _owns) { - sqstd_fclose(_handle); - _handle = NULL; - _owns = false; - } - } - SQInteger Read(void *buffer,SQInteger size) { - return sqstd_fread(buffer,1,size,_handle); - } - SQInteger Write(void *buffer,SQInteger size) { - return sqstd_fwrite(buffer,1,size,_handle); - } - SQInteger Flush() { - return sqstd_fflush(_handle); - } - SQInteger Tell() { - return sqstd_ftell(_handle); - } - SQInteger Len() { - SQInteger prevpos=Tell(); - Seek(0,SQ_SEEK_END); - SQInteger size=Tell(); - Seek(prevpos,SQ_SEEK_SET); - return size; - } - SQInteger Seek(SQInteger offset, SQInteger origin) { - return sqstd_fseek(_handle,offset,origin); - } - bool IsValid() { return _handle?true:false; } - bool EOS() { return Tell()==Len()?true:false;} - SQFILE GetHandle() {return _handle;} -private: - SQFILE _handle; - bool _owns; -}; - -static SQInteger _file__typeof(HSQUIRRELVM v) -{ - sq_pushstring(v,_SC("file"),-1); - return 1; -} - -static SQInteger _file_releasehook(SQUserPointer p, SQInteger SQ_UNUSED_ARG(size)) -{ - SQFile *self = (SQFile*)p; - self->~SQFile(); - sq_free(self,sizeof(SQFile)); - return 1; -} - -static SQInteger _file_constructor(HSQUIRRELVM v) -{ - const SQChar *filename,*mode; - bool owns = true; - SQFile *f; - SQFILE newf; - if(sq_gettype(v,2) == OT_STRING && sq_gettype(v,3) == OT_STRING) { - sq_getstring(v, 2, &filename); - sq_getstring(v, 3, &mode); - newf = sqstd_fopen(filename, mode); - if(!newf) return sq_throwerror(v, _SC("cannot open file")); - } else if(sq_gettype(v,2) == OT_USERPOINTER) { - owns = !(sq_gettype(v,3) == OT_NULL); - sq_getuserpointer(v,2,&newf); - } else { - return sq_throwerror(v,_SC("wrong parameter")); - } - - f = new (sq_malloc(sizeof(SQFile)))SQFile(newf,owns); - if(SQ_FAILED(sq_setinstanceup(v,1,f))) { - f->~SQFile(); - sq_free(f,sizeof(SQFile)); - return sq_throwerror(v, _SC("cannot create blob with negative size")); - } - sq_setreleasehook(v,1,_file_releasehook); - return 0; -} - -static SQInteger _file_close(HSQUIRRELVM v) -{ - SQFile *self = NULL; - if(SQ_SUCCEEDED(sq_getinstanceup(v,1,(SQUserPointer*)&self,(SQUserPointer)SQSTD_FILE_TYPE_TAG, SQTrue)) - && self != NULL) - { - self->Close(); - } - return 0; -} - -//bindings -#define _DECL_FILE_FUNC(name,nparams,typecheck) {_SC(#name),_file_##name,nparams,typecheck} -static const SQRegFunction _file_methods[] = { - _DECL_FILE_FUNC(constructor,3,_SC("x")), - _DECL_FILE_FUNC(_typeof,1,_SC("x")), - _DECL_FILE_FUNC(close,1,_SC("x")), - {NULL,(SQFUNCTION)0,0,NULL} -}; - - - -SQRESULT sqstd_createfile(HSQUIRRELVM v, SQFILE file,SQBool own) -{ - SQInteger top = sq_gettop(v); - sq_pushregistrytable(v); - sq_pushstring(v,_SC("std_file"),-1); - if(SQ_SUCCEEDED(sq_get(v,-2))) { - sq_remove(v,-2); //removes the registry - sq_pushroottable(v); // push the this - sq_pushuserpointer(v,file); //file - if(own){ - sq_pushinteger(v,1); //true - } - else{ - sq_pushnull(v); //false - } - if(SQ_SUCCEEDED( sq_call(v,3,SQTrue,SQFalse) )) { - sq_remove(v,-2); - return SQ_OK; - } - } - sq_settop(v,top); - return SQ_ERROR; -} - -SQRESULT sqstd_getfile(HSQUIRRELVM v, SQInteger idx, SQFILE *file) -{ - SQFile *fileobj = NULL; - if(SQ_SUCCEEDED(sq_getinstanceup(v,idx,(SQUserPointer*)&fileobj,(SQUserPointer)SQSTD_FILE_TYPE_TAG,SQFalse))) { - *file = fileobj->GetHandle(); - return SQ_OK; - } - return sq_throwerror(v,_SC("not a file")); -} - - - -#define IO_BUFFER_SIZE 2048 -struct IOBuffer { - unsigned char buffer[IO_BUFFER_SIZE]; - SQInteger size; - SQInteger ptr; - SQFILE file; -}; - -SQInteger _read_byte(IOBuffer *iobuffer) -{ - if(iobuffer->ptr < iobuffer->size) { - - SQInteger ret = iobuffer->buffer[iobuffer->ptr]; - iobuffer->ptr++; - return ret; - } - else { - if( (iobuffer->size = sqstd_fread(iobuffer->buffer,1,IO_BUFFER_SIZE,iobuffer->file )) > 0 ) - { - SQInteger ret = iobuffer->buffer[0]; - iobuffer->ptr = 1; - return ret; - } - } - - return 0; -} - -SQInteger _read_two_bytes(IOBuffer *iobuffer) -{ - if(iobuffer->ptr < iobuffer->size) { - if(iobuffer->size < 2) return 0; - SQInteger ret = *((const wchar_t*)&iobuffer->buffer[iobuffer->ptr]); - iobuffer->ptr += 2; - return ret; - } - else { - if( (iobuffer->size = sqstd_fread(iobuffer->buffer,1,IO_BUFFER_SIZE,iobuffer->file )) > 0 ) - { - if(iobuffer->size < 2) return 0; - SQInteger ret = *((const wchar_t*)&iobuffer->buffer[0]); - iobuffer->ptr = 2; - return ret; - } - } - - return 0; -} - -static SQInteger _io_file_lexfeed_PLAIN(SQUserPointer iobuf) -{ - IOBuffer *iobuffer = (IOBuffer *)iobuf; - return _read_byte(iobuffer); - -} - -#ifdef SQUNICODE -static SQInteger _io_file_lexfeed_UTF8(SQUserPointer iobuf) -{ - IOBuffer *iobuffer = (IOBuffer *)iobuf; -#define READ(iobuf) \ - if((inchar = (unsigned char)_read_byte(iobuf)) == 0) \ - return 0; - - static const SQInteger utf8_lengths[16] = - { - 1,1,1,1,1,1,1,1, /* 0000 to 0111 : 1 byte (plain ASCII) */ - 0,0,0,0, /* 1000 to 1011 : not valid */ - 2,2, /* 1100, 1101 : 2 bytes */ - 3, /* 1110 : 3 bytes */ - 4 /* 1111 :4 bytes */ - }; - static const unsigned char byte_masks[5] = {0,0,0x1f,0x0f,0x07}; - unsigned char inchar; - SQInteger c = 0; - READ(iobuffer); - c = inchar; - // - if(c >= 0x80) { - SQInteger tmp; - SQInteger codelen = utf8_lengths[c>>4]; - if(codelen == 0) - return 0; - //"invalid UTF-8 stream"; - tmp = c&byte_masks[codelen]; - for(SQInteger n = 0; n < codelen-1; n++) { - tmp<<=6; - READ(iobuffer); - tmp |= inchar & 0x3F; - } - c = tmp; - } - return c; -} -#endif - -static SQInteger _io_file_lexfeed_UCS2_LE(SQUserPointer iobuf) -{ - SQInteger ret; - IOBuffer *iobuffer = (IOBuffer *)iobuf; - if( (ret = _read_two_bytes(iobuffer)) > 0 ) - return ret; - return 0; -} - -static SQInteger _io_file_lexfeed_UCS2_BE(SQUserPointer iobuf) -{ - SQInteger c; - IOBuffer *iobuffer = (IOBuffer *)iobuf; - if( (c = _read_two_bytes(iobuffer)) > 0 ) { - c = ((c>>8)&0x00FF)| ((c<<8)&0xFF00); - return c; - } - return 0; -} - -SQInteger file_read(SQUserPointer file,SQUserPointer buf,SQInteger size) -{ - SQInteger ret; - if( ( ret = sqstd_fread(buf,1,size,(SQFILE)file ))!=0 )return ret; - return -1; -} - -SQInteger file_write(SQUserPointer file,SQUserPointer p,SQInteger size) -{ - return sqstd_fwrite(p,1,size,(SQFILE)file); -} - -SQRESULT sqstd_loadfile(HSQUIRRELVM v,const SQChar *filename,SQBool printerror) -{ - SQFILE file = sqstd_fopen(filename,_SC("rb")); - - SQInteger ret; - unsigned short us; - unsigned char uc; - SQLEXREADFUNC func = _io_file_lexfeed_PLAIN; - if(file){ - ret = sqstd_fread(&us,1,2,file); - if(ret != 2) { - //probably an empty file - us = 0; - } - if(us == SQ_BYTECODE_STREAM_TAG) { //BYTECODE - sqstd_fseek(file,0,SQ_SEEK_SET); - if(SQ_SUCCEEDED(sq_readclosure(v,file_read,file))) { - sqstd_fclose(file); - return SQ_OK; - } - } - else { //SCRIPT - - switch(us) - { - //gotta swap the next 2 lines on BIG endian machines - case 0xFFFE: func = _io_file_lexfeed_UCS2_BE; break;//UTF-16 little endian; - case 0xFEFF: func = _io_file_lexfeed_UCS2_LE; break;//UTF-16 big endian; - case 0xBBEF: - if(sqstd_fread(&uc,1,sizeof(uc),file) == 0) { - sqstd_fclose(file); - return sq_throwerror(v,_SC("io error")); - } - if(uc != 0xBF) { - sqstd_fclose(file); - return sq_throwerror(v,_SC("Unrecognized encoding")); - } -#ifdef SQUNICODE - func = _io_file_lexfeed_UTF8; -#else - func = _io_file_lexfeed_PLAIN; -#endif - break;//UTF-8 ; - default: sqstd_fseek(file,0,SQ_SEEK_SET); break; // ascii - } - IOBuffer buffer; - buffer.ptr = 0; - buffer.size = 0; - buffer.file = file; - if(SQ_SUCCEEDED(sq_compile(v,func,&buffer,filename,printerror))){ - sqstd_fclose(file); - return SQ_OK; - } - } - sqstd_fclose(file); - return SQ_ERROR; - } - return sq_throwerror(v,_SC("cannot open the file")); -} - -SQRESULT sqstd_dofile(HSQUIRRELVM v,const SQChar *filename,SQBool retval,SQBool printerror) -{ - //at least one entry must exist in order for us to push it as the environment - if(sq_gettop(v) == 0) - return sq_throwerror(v,_SC("environment table expected")); - - if(SQ_SUCCEEDED(sqstd_loadfile(v,filename,printerror))) { - sq_push(v,-2); - if(SQ_SUCCEEDED(sq_call(v,1,retval,SQTrue))) { - sq_remove(v,retval?-2:-1); //removes the closure - return 1; - } - sq_pop(v,1); //removes the closure - } - return SQ_ERROR; -} - -SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v,const SQChar *filename) -{ - SQFILE file = sqstd_fopen(filename,_SC("wb+")); - if(!file) return sq_throwerror(v,_SC("cannot open the file")); - if(SQ_SUCCEEDED(sq_writeclosure(v,file_write,file))) { - sqstd_fclose(file); - return SQ_OK; - } - sqstd_fclose(file); - return SQ_ERROR; //forward the error -} - -SQInteger _g_io_loadfile(HSQUIRRELVM v) -{ - const SQChar *filename; - SQBool printerror = SQFalse; - sq_getstring(v,2,&filename); - if(sq_gettop(v) >= 3) { - sq_getbool(v,3,&printerror); - } - if(SQ_SUCCEEDED(sqstd_loadfile(v,filename,printerror))) - return 1; - return SQ_ERROR; //propagates the error -} - -SQInteger _g_io_writeclosuretofile(HSQUIRRELVM v) -{ - const SQChar *filename; - sq_getstring(v,2,&filename); - if(SQ_SUCCEEDED(sqstd_writeclosuretofile(v,filename))) - return 1; - return SQ_ERROR; //propagates the error -} - -SQInteger _g_io_dofile(HSQUIRRELVM v) -{ - const SQChar *filename; - SQBool printerror = SQFalse; - sq_getstring(v,2,&filename); - if(sq_gettop(v) >= 3) { - sq_getbool(v,3,&printerror); - } - sq_push(v,1); //repush the this - if(SQ_SUCCEEDED(sqstd_dofile(v,filename,SQTrue,printerror))) - return 1; - return SQ_ERROR; //propagates the error -} - -#define _DECL_GLOBALIO_FUNC(name,nparams,typecheck) {_SC(#name),_g_io_##name,nparams,typecheck} -static const SQRegFunction iolib_funcs[]={ - _DECL_GLOBALIO_FUNC(loadfile,-2,_SC(".sb")), - _DECL_GLOBALIO_FUNC(dofile,-2,_SC(".sb")), - _DECL_GLOBALIO_FUNC(writeclosuretofile,3,_SC(".sc")), - {NULL,(SQFUNCTION)0,0,NULL} -}; - -SQRESULT sqstd_register_iolib(HSQUIRRELVM v) -{ - SQInteger top = sq_gettop(v); - //create delegate - declare_stream(v,_SC("file"),(SQUserPointer)SQSTD_FILE_TYPE_TAG,_SC("std_file"),_file_methods,iolib_funcs); - sq_pushstring(v,_SC("stdout"),-1); - sqstd_createfile(v,stdout,SQFalse); - sq_newslot(v,-3,SQFalse); - sq_pushstring(v,_SC("stdin"),-1); - sqstd_createfile(v,stdin,SQFalse); - sq_newslot(v,-3,SQFalse); - sq_pushstring(v,_SC("stderr"),-1); - sqstd_createfile(v,stderr,SQFalse); - sq_newslot(v,-3,SQFalse); - sq_settop(v,top); - return SQ_OK; -} diff --git a/m_packages/squirrel/sqstdlib/sqstdlib.dsp b/m_packages/squirrel/sqstdlib/sqstdlib.dsp deleted file mode 100644 index ef5b7f48..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdlib.dsp +++ /dev/null @@ -1,131 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sqstdlib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=sqstdlib - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sqstdlib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sqstdlib.mak" CFG="sqstdlib - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sqstdlib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "sqstdlib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_LocalPath ".." -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sqstdlib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\lib\sqstdlib.lib" - -!ELSEIF "$(CFG)" == "sqstdlib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\lib\sqstdlib.lib" - -!ENDIF - -# Begin Target - -# Name "sqstdlib - Win32 Release" -# Name "sqstdlib - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sqstdblob.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqstdio.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqstdmath.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqstdrex.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqstdstream.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqstdstring.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqstdaux.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqstdsystem.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\sqstdblobimpl.h -# End Source File -# Begin Source File - -SOURCE=.\sqstdstream.h -# End Source File -# End Group -# End Target -# End Project diff --git a/m_packages/squirrel/sqstdlib/sqstdmath.cpp b/m_packages/squirrel/sqstdlib/sqstdmath.cpp deleted file mode 100644 index c41ffd5e..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdmath.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include - -#define SINGLE_ARG_FUNC(_funcname) static SQInteger math_##_funcname(HSQUIRRELVM v){ \ - SQFloat f; \ - sq_getfloat(v,2,&f); \ - sq_pushfloat(v,(SQFloat)_funcname(f)); \ - return 1; \ -} - -#define TWO_ARGS_FUNC(_funcname) static SQInteger math_##_funcname(HSQUIRRELVM v){ \ - SQFloat p1,p2; \ - sq_getfloat(v,2,&p1); \ - sq_getfloat(v,3,&p2); \ - sq_pushfloat(v,(SQFloat)_funcname(p1,p2)); \ - return 1; \ -} - -static SQInteger math_srand(HSQUIRRELVM v) -{ - SQInteger i; - if(SQ_FAILED(sq_getinteger(v,2,&i))) - return sq_throwerror(v,_SC("invalid param")); - srand((unsigned int)i); - return 0; -} - -static SQInteger math_rand(HSQUIRRELVM v) -{ - sq_pushinteger(v,rand()); - return 1; -} - -static SQInteger math_abs(HSQUIRRELVM v) -{ - SQInteger n; - sq_getinteger(v,2,&n); - sq_pushinteger(v,(SQInteger)abs((int)n)); - return 1; -} - -SINGLE_ARG_FUNC(sqrt) -SINGLE_ARG_FUNC(fabs) -SINGLE_ARG_FUNC(sin) -SINGLE_ARG_FUNC(cos) -SINGLE_ARG_FUNC(asin) -SINGLE_ARG_FUNC(acos) -SINGLE_ARG_FUNC(log) -SINGLE_ARG_FUNC(log10) -SINGLE_ARG_FUNC(tan) -SINGLE_ARG_FUNC(atan) -TWO_ARGS_FUNC(atan2) -TWO_ARGS_FUNC(pow) -SINGLE_ARG_FUNC(floor) -SINGLE_ARG_FUNC(ceil) -SINGLE_ARG_FUNC(exp) - -#define _DECL_FUNC(name,nparams,tycheck) {_SC(#name),math_##name,nparams,tycheck} -static const SQRegFunction mathlib_funcs[] = { - _DECL_FUNC(sqrt,2,_SC(".n")), - _DECL_FUNC(sin,2,_SC(".n")), - _DECL_FUNC(cos,2,_SC(".n")), - _DECL_FUNC(asin,2,_SC(".n")), - _DECL_FUNC(acos,2,_SC(".n")), - _DECL_FUNC(log,2,_SC(".n")), - _DECL_FUNC(log10,2,_SC(".n")), - _DECL_FUNC(tan,2,_SC(".n")), - _DECL_FUNC(atan,2,_SC(".n")), - _DECL_FUNC(atan2,3,_SC(".nn")), - _DECL_FUNC(pow,3,_SC(".nn")), - _DECL_FUNC(floor,2,_SC(".n")), - _DECL_FUNC(ceil,2,_SC(".n")), - _DECL_FUNC(exp,2,_SC(".n")), - _DECL_FUNC(srand,2,_SC(".n")), - _DECL_FUNC(rand,1,NULL), - _DECL_FUNC(fabs,2,_SC(".n")), - _DECL_FUNC(abs,2,_SC(".n")), - {NULL,(SQFUNCTION)0,0,NULL} -}; -#undef _DECL_FUNC - -#ifndef M_PI -#define M_PI (3.14159265358979323846) -#endif - -SQRESULT sqstd_register_mathlib(HSQUIRRELVM v) -{ - SQInteger i=0; - while(mathlib_funcs[i].name!=0) { - sq_pushstring(v,mathlib_funcs[i].name,-1); - sq_newclosure(v,mathlib_funcs[i].f,0); - sq_setparamscheck(v,mathlib_funcs[i].nparamscheck,mathlib_funcs[i].typemask); - sq_setnativeclosurename(v,-1,mathlib_funcs[i].name); - sq_newslot(v,-3,SQFalse); - i++; - } - sq_pushstring(v,_SC("RAND_MAX"),-1); - sq_pushinteger(v,RAND_MAX); - sq_newslot(v,-3,SQFalse); - sq_pushstring(v,_SC("PI"),-1); - sq_pushfloat(v,(SQFloat)M_PI); - sq_newslot(v,-3,SQFalse); - return SQ_OK; -} diff --git a/m_packages/squirrel/sqstdlib/sqstdrex.cpp b/m_packages/squirrel/sqstdlib/sqstdrex.cpp deleted file mode 100644 index d0583a6b..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdrex.cpp +++ /dev/null @@ -1,666 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include -#include - -#ifdef _DEBUG -#include - -static const SQChar *g_nnames[] = -{ - _SC("NONE"),_SC("OP_GREEDY"), _SC("OP_OR"), - _SC("OP_EXPR"),_SC("OP_NOCAPEXPR"),_SC("OP_DOT"), _SC("OP_CLASS"), - _SC("OP_CCLASS"),_SC("OP_NCLASS"),_SC("OP_RANGE"),_SC("OP_CHAR"), - _SC("OP_EOL"),_SC("OP_BOL"),_SC("OP_WB"),_SC("OP_MB") -}; - -#endif - -#define OP_GREEDY (MAX_CHAR+1) // * + ? {n} -#define OP_OR (MAX_CHAR+2) -#define OP_EXPR (MAX_CHAR+3) //parentesis () -#define OP_NOCAPEXPR (MAX_CHAR+4) //parentesis (?:) -#define OP_DOT (MAX_CHAR+5) -#define OP_CLASS (MAX_CHAR+6) -#define OP_CCLASS (MAX_CHAR+7) -#define OP_NCLASS (MAX_CHAR+8) //negates class the [^ -#define OP_RANGE (MAX_CHAR+9) -#define OP_CHAR (MAX_CHAR+10) -#define OP_EOL (MAX_CHAR+11) -#define OP_BOL (MAX_CHAR+12) -#define OP_WB (MAX_CHAR+13) -#define OP_MB (MAX_CHAR+14) //match balanced - -#define SQREX_SYMBOL_ANY_CHAR ('.') -#define SQREX_SYMBOL_GREEDY_ONE_OR_MORE ('+') -#define SQREX_SYMBOL_GREEDY_ZERO_OR_MORE ('*') -#define SQREX_SYMBOL_GREEDY_ZERO_OR_ONE ('?') -#define SQREX_SYMBOL_BRANCH ('|') -#define SQREX_SYMBOL_END_OF_STRING ('$') -#define SQREX_SYMBOL_BEGINNING_OF_STRING ('^') -#define SQREX_SYMBOL_ESCAPE_CHAR ('\\') - - -typedef int SQRexNodeType; - -typedef struct tagSQRexNode{ - SQRexNodeType type; - SQInteger left; - SQInteger right; - SQInteger next; -}SQRexNode; - -struct SQRex{ - const SQChar *_eol; - const SQChar *_bol; - const SQChar *_p; - SQInteger _first; - SQInteger _op; - SQRexNode *_nodes; - SQInteger _nallocated; - SQInteger _nsize; - SQInteger _nsubexpr; - SQRexMatch *_matches; - SQInteger _currsubexp; - void *_jmpbuf; - const SQChar **_error; -}; - -static SQInteger sqstd_rex_list(SQRex *exp); - -static SQInteger sqstd_rex_newnode(SQRex *exp, SQRexNodeType type) -{ - SQRexNode n; - n.type = type; - n.next = n.right = n.left = -1; - if(type == OP_EXPR) - n.right = exp->_nsubexpr++; - if(exp->_nallocated < (exp->_nsize + 1)) { - SQInteger oldsize = exp->_nallocated; - exp->_nallocated *= 2; - exp->_nodes = (SQRexNode *)sq_realloc(exp->_nodes, oldsize * sizeof(SQRexNode) ,exp->_nallocated * sizeof(SQRexNode)); - } - exp->_nodes[exp->_nsize++] = n; - SQInteger newid = exp->_nsize - 1; - return (SQInteger)newid; -} - -static void sqstd_rex_error(SQRex *exp,const SQChar *error) -{ - if(exp->_error) *exp->_error = error; - longjmp(*((jmp_buf*)exp->_jmpbuf),-1); -} - -static void sqstd_rex_expect(SQRex *exp, SQInteger n){ - if((*exp->_p) != n) - sqstd_rex_error(exp, _SC("expected paren")); - exp->_p++; -} - -static SQChar sqstd_rex_escapechar(SQRex *exp) -{ - if(*exp->_p == SQREX_SYMBOL_ESCAPE_CHAR){ - exp->_p++; - switch(*exp->_p) { - case 'v': exp->_p++; return '\v'; - case 'n': exp->_p++; return '\n'; - case 't': exp->_p++; return '\t'; - case 'r': exp->_p++; return '\r'; - case 'f': exp->_p++; return '\f'; - default: return (*exp->_p++); - } - } else if(!scisprint(*exp->_p)) sqstd_rex_error(exp,_SC("letter expected")); - return (*exp->_p++); -} - -static SQInteger sqstd_rex_charclass(SQRex *exp,SQInteger classid) -{ - SQInteger n = sqstd_rex_newnode(exp,OP_CCLASS); - exp->_nodes[n].left = classid; - return n; -} - -static SQInteger sqstd_rex_charnode(SQRex *exp,SQBool isclass) -{ - SQChar t; - if(*exp->_p == SQREX_SYMBOL_ESCAPE_CHAR) { - exp->_p++; - switch(*exp->_p) { - case 'n': exp->_p++; return sqstd_rex_newnode(exp,'\n'); - case 't': exp->_p++; return sqstd_rex_newnode(exp,'\t'); - case 'r': exp->_p++; return sqstd_rex_newnode(exp,'\r'); - case 'f': exp->_p++; return sqstd_rex_newnode(exp,'\f'); - case 'v': exp->_p++; return sqstd_rex_newnode(exp,'\v'); - case 'a': case 'A': case 'w': case 'W': case 's': case 'S': - case 'd': case 'D': case 'x': case 'X': case 'c': case 'C': - case 'p': case 'P': case 'l': case 'u': - { - t = *exp->_p; exp->_p++; - return sqstd_rex_charclass(exp,t); - } - case 'm': - { - SQChar cb, ce; //cb = character begin match ce = character end match - cb = *++exp->_p; //skip 'm' - ce = *++exp->_p; - exp->_p++; //points to the next char to be parsed - if ((!cb) || (!ce)) sqstd_rex_error(exp,_SC("balanced chars expected")); - if ( cb == ce ) sqstd_rex_error(exp,_SC("open/close char can't be the same")); - SQInteger node = sqstd_rex_newnode(exp,OP_MB); - exp->_nodes[node].left = cb; - exp->_nodes[node].right = ce; - return node; - } - case 0: - sqstd_rex_error(exp,_SC("letter expected for argument of escape sequence")); - break; - case 'b': - case 'B': - if(!isclass) { - SQInteger node = sqstd_rex_newnode(exp,OP_WB); - exp->_nodes[node].left = *exp->_p; - exp->_p++; - return node; - } //else default - default: - t = *exp->_p; exp->_p++; - return sqstd_rex_newnode(exp,t); - } - } - else if(!scisprint(*exp->_p)) { - - sqstd_rex_error(exp,_SC("letter expected")); - } - t = *exp->_p; exp->_p++; - return sqstd_rex_newnode(exp,t); -} -static SQInteger sqstd_rex_class(SQRex *exp) -{ - SQInteger ret = -1; - SQInteger first = -1,chain; - if(*exp->_p == SQREX_SYMBOL_BEGINNING_OF_STRING){ - ret = sqstd_rex_newnode(exp,OP_NCLASS); - exp->_p++; - }else ret = sqstd_rex_newnode(exp,OP_CLASS); - - if(*exp->_p == ']') sqstd_rex_error(exp,_SC("empty class")); - chain = ret; - while(*exp->_p != ']' && exp->_p != exp->_eol) { - if(*exp->_p == '-' && first != -1){ - SQInteger r; - if(*exp->_p++ == ']') sqstd_rex_error(exp,_SC("unfinished range")); - r = sqstd_rex_newnode(exp,OP_RANGE); - if(exp->_nodes[first].type>*exp->_p) sqstd_rex_error(exp,_SC("invalid range")); - if(exp->_nodes[first].type == OP_CCLASS) sqstd_rex_error(exp,_SC("cannot use character classes in ranges")); - exp->_nodes[r].left = exp->_nodes[first].type; - SQInteger t = sqstd_rex_escapechar(exp); - exp->_nodes[r].right = t; - exp->_nodes[chain].next = r; - chain = r; - first = -1; - } - else{ - if(first!=-1){ - SQInteger c = first; - exp->_nodes[chain].next = c; - chain = c; - first = sqstd_rex_charnode(exp,SQTrue); - } - else{ - first = sqstd_rex_charnode(exp,SQTrue); - } - } - } - if(first!=-1){ - SQInteger c = first; - exp->_nodes[chain].next = c; - } - /* hack? */ - exp->_nodes[ret].left = exp->_nodes[ret].next; - exp->_nodes[ret].next = -1; - return ret; -} - -static SQInteger sqstd_rex_parsenumber(SQRex *exp) -{ - SQInteger ret = *exp->_p-'0'; - SQInteger positions = 10; - exp->_p++; - while(isdigit(*exp->_p)) { - ret = ret*10+(*exp->_p++-'0'); - if(positions==1000000000) sqstd_rex_error(exp,_SC("overflow in numeric constant")); - positions *= 10; - }; - return ret; -} - -static SQInteger sqstd_rex_element(SQRex *exp) -{ - SQInteger ret = -1; - switch(*exp->_p) - { - case '(': { - SQInteger expr; - exp->_p++; - - - if(*exp->_p =='?') { - exp->_p++; - sqstd_rex_expect(exp,':'); - expr = sqstd_rex_newnode(exp,OP_NOCAPEXPR); - } - else - expr = sqstd_rex_newnode(exp,OP_EXPR); - SQInteger newn = sqstd_rex_list(exp); - exp->_nodes[expr].left = newn; - ret = expr; - sqstd_rex_expect(exp,')'); - } - break; - case '[': - exp->_p++; - ret = sqstd_rex_class(exp); - sqstd_rex_expect(exp,']'); - break; - case SQREX_SYMBOL_END_OF_STRING: exp->_p++; ret = sqstd_rex_newnode(exp,OP_EOL);break; - case SQREX_SYMBOL_ANY_CHAR: exp->_p++; ret = sqstd_rex_newnode(exp,OP_DOT);break; - default: - ret = sqstd_rex_charnode(exp,SQFalse); - break; - } - - - SQBool isgreedy = SQFalse; - unsigned short p0 = 0, p1 = 0; - switch(*exp->_p){ - case SQREX_SYMBOL_GREEDY_ZERO_OR_MORE: p0 = 0; p1 = 0xFFFF; exp->_p++; isgreedy = SQTrue; break; - case SQREX_SYMBOL_GREEDY_ONE_OR_MORE: p0 = 1; p1 = 0xFFFF; exp->_p++; isgreedy = SQTrue; break; - case SQREX_SYMBOL_GREEDY_ZERO_OR_ONE: p0 = 0; p1 = 1; exp->_p++; isgreedy = SQTrue; break; - case '{': - exp->_p++; - if(!isdigit(*exp->_p)) sqstd_rex_error(exp,_SC("number expected")); - p0 = (unsigned short)sqstd_rex_parsenumber(exp); - /*******************************/ - switch(*exp->_p) { - case '}': - p1 = p0; exp->_p++; - break; - case ',': - exp->_p++; - p1 = 0xFFFF; - if(isdigit(*exp->_p)){ - p1 = (unsigned short)sqstd_rex_parsenumber(exp); - } - sqstd_rex_expect(exp,'}'); - break; - default: - sqstd_rex_error(exp,_SC(", or } expected")); - } - /*******************************/ - isgreedy = SQTrue; - break; - - } - if(isgreedy) { - SQInteger nnode = sqstd_rex_newnode(exp,OP_GREEDY); - exp->_nodes[nnode].left = ret; - exp->_nodes[nnode].right = ((p0)<<16)|p1; - ret = nnode; - } - - if((*exp->_p != SQREX_SYMBOL_BRANCH) && (*exp->_p != ')') && (*exp->_p != SQREX_SYMBOL_GREEDY_ZERO_OR_MORE) && (*exp->_p != SQREX_SYMBOL_GREEDY_ONE_OR_MORE) && (*exp->_p != '\0')) { - SQInteger nnode = sqstd_rex_element(exp); - exp->_nodes[ret].next = nnode; - } - - return ret; -} - -static SQInteger sqstd_rex_list(SQRex *exp) -{ - SQInteger ret=-1,e; - if(*exp->_p == SQREX_SYMBOL_BEGINNING_OF_STRING) { - exp->_p++; - ret = sqstd_rex_newnode(exp,OP_BOL); - } - e = sqstd_rex_element(exp); - if(ret != -1) { - exp->_nodes[ret].next = e; - } - else ret = e; - - if(*exp->_p == SQREX_SYMBOL_BRANCH) { - SQInteger temp,tright; - exp->_p++; - temp = sqstd_rex_newnode(exp,OP_OR); - exp->_nodes[temp].left = ret; - tright = sqstd_rex_list(exp); - exp->_nodes[temp].right = tright; - ret = temp; - } - return ret; -} - -static SQBool sqstd_rex_matchcclass(SQInteger cclass,SQChar c) -{ - switch(cclass) { - case 'a': return isalpha(c)?SQTrue:SQFalse; - case 'A': return !isalpha(c)?SQTrue:SQFalse; - case 'w': return (isalnum(c) || c == '_')?SQTrue:SQFalse; - case 'W': return (!isalnum(c) && c != '_')?SQTrue:SQFalse; - case 's': return isspace(c)?SQTrue:SQFalse; - case 'S': return !isspace(c)?SQTrue:SQFalse; - case 'd': return isdigit(c)?SQTrue:SQFalse; - case 'D': return !isdigit(c)?SQTrue:SQFalse; - case 'x': return isxdigit(c)?SQTrue:SQFalse; - case 'X': return !isxdigit(c)?SQTrue:SQFalse; - case 'c': return iscntrl(c)?SQTrue:SQFalse; - case 'C': return !iscntrl(c)?SQTrue:SQFalse; - case 'p': return ispunct(c)?SQTrue:SQFalse; - case 'P': return !ispunct(c)?SQTrue:SQFalse; - case 'l': return islower(c)?SQTrue:SQFalse; - case 'u': return isupper(c)?SQTrue:SQFalse; - } - return SQFalse; /*cannot happen*/ -} - -static SQBool sqstd_rex_matchclass(SQRex* exp,SQRexNode *node,SQChar c) -{ - do { - switch(node->type) { - case OP_RANGE: - if(c >= node->left && c <= node->right) return SQTrue; - break; - case OP_CCLASS: - if(sqstd_rex_matchcclass(node->left,c)) return SQTrue; - break; - default: - if(c == node->type)return SQTrue; - } - } while((node->next != -1) && (node = &exp->_nodes[node->next])); - return SQFalse; -} - -static const SQChar *sqstd_rex_matchnode(SQRex* exp,SQRexNode *node,const SQChar *str,SQRexNode *next) -{ - - SQRexNodeType type = node->type; - switch(type) { - case OP_GREEDY: { - //SQRexNode *greedystop = (node->next != -1) ? &exp->_nodes[node->next] : NULL; - SQRexNode *greedystop = NULL; - SQInteger p0 = (node->right >> 16)&0x0000FFFF, p1 = node->right&0x0000FFFF, nmaches = 0; - const SQChar *s=str, *good = str; - - if(node->next != -1) { - greedystop = &exp->_nodes[node->next]; - } - else { - greedystop = next; - } - - while((nmaches == 0xFFFF || nmaches < p1)) { - - const SQChar *stop; - if(!(s = sqstd_rex_matchnode(exp,&exp->_nodes[node->left],s,greedystop))) - break; - nmaches++; - good=s; - if(greedystop) { - //checks that 0 matches satisfy the expression(if so skips) - //if not would always stop(for instance if is a '?') - if(greedystop->type != OP_GREEDY || - (greedystop->type == OP_GREEDY && ((greedystop->right >> 16)&0x0000FFFF) != 0)) - { - SQRexNode *gnext = NULL; - if(greedystop->next != -1) { - gnext = &exp->_nodes[greedystop->next]; - }else if(next && next->next != -1){ - gnext = &exp->_nodes[next->next]; - } - stop = sqstd_rex_matchnode(exp,greedystop,s,gnext); - if(stop) { - //if satisfied stop it - if(p0 == p1 && p0 == nmaches) break; - else if(nmaches >= p0 && p1 == 0xFFFF) break; - else if(nmaches >= p0 && nmaches <= p1) break; - } - } - } - - if(s >= exp->_eol) - break; - } - if(p0 == p1 && p0 == nmaches) return good; - else if(nmaches >= p0 && p1 == 0xFFFF) return good; - else if(nmaches >= p0 && nmaches <= p1) return good; - return NULL; - } - case OP_OR: { - const SQChar *asd = str; - SQRexNode *temp=&exp->_nodes[node->left]; - while( (asd = sqstd_rex_matchnode(exp,temp,asd,NULL)) ) { - if(temp->next != -1) - temp = &exp->_nodes[temp->next]; - else - return asd; - } - asd = str; - temp = &exp->_nodes[node->right]; - while( (asd = sqstd_rex_matchnode(exp,temp,asd,NULL)) ) { - if(temp->next != -1) - temp = &exp->_nodes[temp->next]; - else - return asd; - } - return NULL; - break; - } - case OP_EXPR: - case OP_NOCAPEXPR:{ - SQRexNode *n = &exp->_nodes[node->left]; - const SQChar *cur = str; - SQInteger capture = -1; - if(node->type != OP_NOCAPEXPR && node->right == exp->_currsubexp) { - capture = exp->_currsubexp; - exp->_matches[capture].begin = cur; - exp->_currsubexp++; - } - SQInteger tempcap = exp->_currsubexp; - do { - SQRexNode *subnext = NULL; - if(n->next != -1) { - subnext = &exp->_nodes[n->next]; - }else { - subnext = next; - } - if(!(cur = sqstd_rex_matchnode(exp,n,cur,subnext))) { - if(capture != -1){ - exp->_matches[capture].begin = 0; - exp->_matches[capture].len = 0; - } - return NULL; - } - } while((n->next != -1) && (n = &exp->_nodes[n->next])); - - exp->_currsubexp = tempcap; - if(capture != -1) - exp->_matches[capture].len = cur - exp->_matches[capture].begin; - return cur; - } - case OP_WB: - if((str == exp->_bol && !isspace(*str)) - || (str == exp->_eol && !isspace(*(str-1))) - || (!isspace(*str) && isspace(*(str+1))) - || (isspace(*str) && !isspace(*(str+1))) ) { - return (node->left == 'b')?str:NULL; - } - return (node->left == 'b')?NULL:str; - case OP_BOL: - if(str == exp->_bol) return str; - return NULL; - case OP_EOL: - if(str == exp->_eol) return str; - return NULL; - case OP_DOT:{ - if (str == exp->_eol) return NULL; - str++; - } - return str; - case OP_NCLASS: - case OP_CLASS: - if (str == exp->_eol) return NULL; - if(sqstd_rex_matchclass(exp,&exp->_nodes[node->left],*str)?(type == OP_CLASS?SQTrue:SQFalse):(type == OP_NCLASS?SQTrue:SQFalse)) { - str++; - return str; - } - return NULL; - case OP_CCLASS: - if (str == exp->_eol) return NULL; - if(sqstd_rex_matchcclass(node->left,*str)) { - str++; - return str; - } - return NULL; - case OP_MB: - { - SQInteger cb = node->left; //char that opens a balanced expression - if(*str != cb) return NULL; // string doesnt start with open char - SQInteger ce = node->right; //char that closes a balanced expression - SQInteger cont = 1; - const SQChar *streol = exp->_eol; - while (++str < streol) { - if (*str == ce) { - if (--cont == 0) { - return ++str; - } - } - else if (*str == cb) cont++; - } - } - return NULL; // string ends out of balance - default: /* char */ - if (str == exp->_eol) return NULL; - if(*str != node->type) return NULL; - str++; - return str; - } - return NULL; -} - -/* public api */ -SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error) -{ - SQRex * volatile exp = (SQRex *)sq_malloc(sizeof(SQRex)); // "volatile" is needed for setjmp() - exp->_eol = exp->_bol = NULL; - exp->_p = pattern; - exp->_nallocated = (SQInteger)scstrlen(pattern) * sizeof(SQChar); - exp->_nodes = (SQRexNode *)sq_malloc(exp->_nallocated * sizeof(SQRexNode)); - exp->_nsize = 0; - exp->_matches = 0; - exp->_nsubexpr = 0; - exp->_first = sqstd_rex_newnode(exp,OP_EXPR); - exp->_error = error; - exp->_jmpbuf = sq_malloc(sizeof(jmp_buf)); - if(setjmp(*((jmp_buf*)exp->_jmpbuf)) == 0) { - SQInteger res = sqstd_rex_list(exp); - exp->_nodes[exp->_first].left = res; - if(*exp->_p!='\0') - sqstd_rex_error(exp,_SC("unexpected character")); -#ifdef _DEBUG - { - SQInteger nsize,i; - SQRexNode *t; - nsize = exp->_nsize; - t = &exp->_nodes[0]; - scprintf(_SC("\n")); - for(i = 0;i < nsize; i++) { - if(exp->_nodes[i].type>MAX_CHAR) - scprintf(_SC("[%02d] %10s "), (SQInt32)i,g_nnames[exp->_nodes[i].type-MAX_CHAR]); - else - scprintf(_SC("[%02d] %10c "), (SQInt32)i,exp->_nodes[i].type); - scprintf(_SC("left %02d right %02d next %02d\n"), (SQInt32)exp->_nodes[i].left, (SQInt32)exp->_nodes[i].right, (SQInt32)exp->_nodes[i].next); - } - scprintf(_SC("\n")); - } -#endif - exp->_matches = (SQRexMatch *) sq_malloc(exp->_nsubexpr * sizeof(SQRexMatch)); - memset(exp->_matches,0,exp->_nsubexpr * sizeof(SQRexMatch)); - } - else{ - sqstd_rex_free(exp); - return NULL; - } - return exp; -} - -void sqstd_rex_free(SQRex *exp) -{ - if(exp) { - if(exp->_nodes) sq_free(exp->_nodes,exp->_nallocated * sizeof(SQRexNode)); - if(exp->_jmpbuf) sq_free(exp->_jmpbuf,sizeof(jmp_buf)); - if(exp->_matches) sq_free(exp->_matches,exp->_nsubexpr * sizeof(SQRexMatch)); - sq_free(exp,sizeof(SQRex)); - } -} - -SQBool sqstd_rex_match(SQRex* exp,const SQChar* text) -{ - const SQChar* res = NULL; - exp->_bol = text; - exp->_eol = text + scstrlen(text); - exp->_currsubexp = 0; - res = sqstd_rex_matchnode(exp,exp->_nodes,text,NULL); - if(res == NULL || res != exp->_eol) - return SQFalse; - return SQTrue; -} - -SQBool sqstd_rex_searchrange(SQRex* exp,const SQChar* text_begin,const SQChar* text_end,const SQChar** out_begin, const SQChar** out_end) -{ - const SQChar *cur = NULL; - SQInteger node = exp->_first; - if(text_begin >= text_end) return SQFalse; - exp->_bol = text_begin; - exp->_eol = text_end; - do { - cur = text_begin; - while(node != -1) { - exp->_currsubexp = 0; - cur = sqstd_rex_matchnode(exp,&exp->_nodes[node],cur,NULL); - if(!cur) - break; - node = exp->_nodes[node].next; - } - text_begin++; - } while(cur == NULL && text_begin != text_end); - - if(cur == NULL) - return SQFalse; - - --text_begin; - - if(out_begin) *out_begin = text_begin; - if(out_end) *out_end = cur; - return SQTrue; -} - -SQBool sqstd_rex_search(SQRex* exp,const SQChar* text, const SQChar** out_begin, const SQChar** out_end) -{ - return sqstd_rex_searchrange(exp,text,text + scstrlen(text),out_begin,out_end); -} - -SQInteger sqstd_rex_getsubexpcount(SQRex* exp) -{ - return exp->_nsubexpr; -} - -SQBool sqstd_rex_getsubexp(SQRex* exp, SQInteger n, SQRexMatch *subexp) -{ - if( n<0 || n >= exp->_nsubexpr) return SQFalse; - *subexp = exp->_matches[n]; - return SQTrue; -} - diff --git a/m_packages/squirrel/sqstdlib/sqstdstream.cpp b/m_packages/squirrel/sqstdlib/sqstdstream.cpp deleted file mode 100644 index 605a56c5..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdstream.cpp +++ /dev/null @@ -1,336 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include -#include -#include -#include -#include "sqstdstream.h" -#include "sqstdblobimpl.h" - -#define SETUP_STREAM(v) \ - SQStream *self = NULL; \ - if(SQ_FAILED(sq_getinstanceup(v,1,(SQUserPointer*)&self,(SQUserPointer)((SQUnsignedInteger)SQSTD_STREAM_TYPE_TAG),SQFalse))) \ - return sq_throwerror(v,_SC("invalid type tag")); \ - if(!self || !self->IsValid()) \ - return sq_throwerror(v,_SC("the stream is invalid")); - -SQInteger _stream_readblob(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - SQUserPointer data,blobp; - SQInteger size,res; - sq_getinteger(v,2,&size); - if(size > self->Len()) { - size = self->Len(); - } - data = sq_getscratchpad(v,size); - res = self->Read(data,size); - if(res <= 0) - return sq_throwerror(v,_SC("no data left to read")); - blobp = sqstd_createblob(v,res); - memcpy(blobp,data,res); - return 1; -} - -#define SAFE_READN(ptr,len) { \ - if(self->Read(ptr,len) != len) return sq_throwerror(v,_SC("io error")); \ - } -SQInteger _stream_readn(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - SQInteger format; - sq_getinteger(v, 2, &format); - switch(format) { - case 'l': { - SQInteger i; - SAFE_READN(&i, sizeof(i)); - sq_pushinteger(v, i); - } - break; - case 'i': { - SQInt32 i; - SAFE_READN(&i, sizeof(i)); - sq_pushinteger(v, i); - } - break; - case 's': { - short s; - SAFE_READN(&s, sizeof(short)); - sq_pushinteger(v, s); - } - break; - case 'w': { - unsigned short w; - SAFE_READN(&w, sizeof(unsigned short)); - sq_pushinteger(v, w); - } - break; - case 'c': { - char c; - SAFE_READN(&c, sizeof(char)); - sq_pushinteger(v, c); - } - break; - case 'b': { - unsigned char c; - SAFE_READN(&c, sizeof(unsigned char)); - sq_pushinteger(v, c); - } - break; - case 'f': { - float f; - SAFE_READN(&f, sizeof(float)); - sq_pushfloat(v, f); - } - break; - case 'd': { - double d; - SAFE_READN(&d, sizeof(double)); - sq_pushfloat(v, (SQFloat)d); - } - break; - default: - return sq_throwerror(v, _SC("invalid format")); - } - return 1; -} - -SQInteger _stream_writeblob(HSQUIRRELVM v) -{ - SQUserPointer data; - SQInteger size; - SETUP_STREAM(v); - if(SQ_FAILED(sqstd_getblob(v,2,&data))) - return sq_throwerror(v,_SC("invalid parameter")); - size = sqstd_getblobsize(v,2); - if(self->Write(data,size) != size) - return sq_throwerror(v,_SC("io error")); - sq_pushinteger(v,size); - return 1; -} - -SQInteger _stream_writen(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - SQInteger format, ti; - SQFloat tf; - sq_getinteger(v, 3, &format); - switch(format) { - case 'l': { - SQInteger i; - sq_getinteger(v, 2, &ti); - i = ti; - self->Write(&i, sizeof(SQInteger)); - } - break; - case 'i': { - SQInt32 i; - sq_getinteger(v, 2, &ti); - i = (SQInt32)ti; - self->Write(&i, sizeof(SQInt32)); - } - break; - case 's': { - short s; - sq_getinteger(v, 2, &ti); - s = (short)ti; - self->Write(&s, sizeof(short)); - } - break; - case 'w': { - unsigned short w; - sq_getinteger(v, 2, &ti); - w = (unsigned short)ti; - self->Write(&w, sizeof(unsigned short)); - } - break; - case 'c': { - char c; - sq_getinteger(v, 2, &ti); - c = (char)ti; - self->Write(&c, sizeof(char)); - } - break; - case 'b': { - unsigned char b; - sq_getinteger(v, 2, &ti); - b = (unsigned char)ti; - self->Write(&b, sizeof(unsigned char)); - } - break; - case 'f': { - float f; - sq_getfloat(v, 2, &tf); - f = (float)tf; - self->Write(&f, sizeof(float)); - } - break; - case 'd': { - double d; - sq_getfloat(v, 2, &tf); - d = tf; - self->Write(&d, sizeof(double)); - } - break; - default: - return sq_throwerror(v, _SC("invalid format")); - } - return 0; -} - -SQInteger _stream_seek(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - SQInteger offset, origin = SQ_SEEK_SET; - sq_getinteger(v, 2, &offset); - if(sq_gettop(v) > 2) { - SQInteger t; - sq_getinteger(v, 3, &t); - switch(t) { - case 'b': origin = SQ_SEEK_SET; break; - case 'c': origin = SQ_SEEK_CUR; break; - case 'e': origin = SQ_SEEK_END; break; - default: return sq_throwerror(v,_SC("invalid origin")); - } - } - sq_pushinteger(v, self->Seek(offset, origin)); - return 1; -} - -SQInteger _stream_tell(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - sq_pushinteger(v, self->Tell()); - return 1; -} - -SQInteger _stream_len(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - sq_pushinteger(v, self->Len()); - return 1; -} - -SQInteger _stream_flush(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - if(!self->Flush()) - sq_pushinteger(v, 1); - else - sq_pushnull(v); - return 1; -} - -SQInteger _stream_eos(HSQUIRRELVM v) -{ - SETUP_STREAM(v); - if(self->EOS()) - sq_pushinteger(v, 1); - else - sq_pushnull(v); - return 1; -} - - SQInteger _stream__cloned(HSQUIRRELVM v) - { - return sq_throwerror(v,_SC("this object cannot be cloned")); - } - -static const SQRegFunction _stream_methods[] = { - _DECL_STREAM_FUNC(readblob,2,_SC("xn")), - _DECL_STREAM_FUNC(readn,2,_SC("xn")), - _DECL_STREAM_FUNC(writeblob,-2,_SC("xx")), - _DECL_STREAM_FUNC(writen,3,_SC("xnn")), - _DECL_STREAM_FUNC(seek,-2,_SC("xnn")), - _DECL_STREAM_FUNC(tell,1,_SC("x")), - _DECL_STREAM_FUNC(len,1,_SC("x")), - _DECL_STREAM_FUNC(eos,1,_SC("x")), - _DECL_STREAM_FUNC(flush,1,_SC("x")), - _DECL_STREAM_FUNC(_cloned,0,NULL), - {NULL,(SQFUNCTION)0,0,NULL} -}; - -void init_streamclass(HSQUIRRELVM v) -{ - sq_pushregistrytable(v); - sq_pushstring(v,_SC("std_stream"),-1); - if(SQ_FAILED(sq_get(v,-2))) { - sq_pushstring(v,_SC("std_stream"),-1); - sq_newclass(v,SQFalse); - sq_settypetag(v,-1,(SQUserPointer)((SQUnsignedInteger)SQSTD_STREAM_TYPE_TAG)); - SQInteger i = 0; - while(_stream_methods[i].name != 0) { - const SQRegFunction &f = _stream_methods[i]; - sq_pushstring(v,f.name,-1); - sq_newclosure(v,f.f,0); - sq_setparamscheck(v,f.nparamscheck,f.typemask); - sq_newslot(v,-3,SQFalse); - i++; - } - sq_newslot(v,-3,SQFalse); - sq_pushroottable(v); - sq_pushstring(v,_SC("stream"),-1); - sq_pushstring(v,_SC("std_stream"),-1); - sq_get(v,-4); - sq_newslot(v,-3,SQFalse); - sq_pop(v,1); - } - else { - sq_pop(v,1); //result - } - sq_pop(v,1); -} - -SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,const SQRegFunction *methods,const SQRegFunction *globals) -{ - if(sq_gettype(v,-1) != OT_TABLE) - return sq_throwerror(v,_SC("table expected")); - SQInteger top = sq_gettop(v); - //create delegate - init_streamclass(v); - sq_pushregistrytable(v); - sq_pushstring(v,reg_name,-1); - sq_pushstring(v,_SC("std_stream"),-1); - if(SQ_SUCCEEDED(sq_get(v,-3))) { - sq_newclass(v,SQTrue); - sq_settypetag(v,-1,typetag); - SQInteger i = 0; - while(methods[i].name != 0) { - const SQRegFunction &f = methods[i]; - sq_pushstring(v,f.name,-1); - sq_newclosure(v,f.f,0); - sq_setparamscheck(v,f.nparamscheck,f.typemask); - sq_setnativeclosurename(v,-1,f.name); - sq_newslot(v,-3,SQFalse); - i++; - } - sq_newslot(v,-3,SQFalse); - sq_pop(v,1); - - i = 0; - while(globals[i].name!=0) - { - const SQRegFunction &f = globals[i]; - sq_pushstring(v,f.name,-1); - sq_newclosure(v,f.f,0); - sq_setparamscheck(v,f.nparamscheck,f.typemask); - sq_setnativeclosurename(v,-1,f.name); - sq_newslot(v,-3,SQFalse); - i++; - } - //register the class in the target table - sq_pushstring(v,name,-1); - sq_pushregistrytable(v); - sq_pushstring(v,reg_name,-1); - sq_get(v,-2); - sq_remove(v,-2); - sq_newslot(v,-3,SQFalse); - - sq_settop(v,top); - return SQ_OK; - } - sq_settop(v,top); - return SQ_ERROR; -} diff --git a/m_packages/squirrel/sqstdlib/sqstdstream.h b/m_packages/squirrel/sqstdlib/sqstdstream.h deleted file mode 100644 index 867c135f..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdstream.h +++ /dev/null @@ -1,18 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQSTD_STREAM_H_ -#define _SQSTD_STREAM_H_ - -SQInteger _stream_readblob(HSQUIRRELVM v); -SQInteger _stream_readline(HSQUIRRELVM v); -SQInteger _stream_readn(HSQUIRRELVM v); -SQInteger _stream_writeblob(HSQUIRRELVM v); -SQInteger _stream_writen(HSQUIRRELVM v); -SQInteger _stream_seek(HSQUIRRELVM v); -SQInteger _stream_tell(HSQUIRRELVM v); -SQInteger _stream_len(HSQUIRRELVM v); -SQInteger _stream_eos(HSQUIRRELVM v); -SQInteger _stream_flush(HSQUIRRELVM v); - -#define _DECL_STREAM_FUNC(name,nparams,typecheck) {_SC(#name),_stream_##name,nparams,typecheck} -SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,const SQRegFunction *methods,const SQRegFunction *globals); -#endif /*_SQSTD_STREAM_H_*/ diff --git a/m_packages/squirrel/sqstdlib/sqstdstring.cpp b/m_packages/squirrel/sqstdlib/sqstdstring.cpp deleted file mode 100644 index ca3df3ed..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdstring.cpp +++ /dev/null @@ -1,552 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_FORMAT_LEN 20 -#define MAX_WFORMAT_LEN 3 -#define ADDITIONAL_FORMAT_SPACE (100*sizeof(SQChar)) - -static SQUserPointer rex_typetag = NULL; - -static SQBool isfmtchr(SQChar ch) -{ - switch(ch) { - case '-': case '+': case ' ': case '#': case '0': return SQTrue; - } - return SQFalse; -} - -static SQInteger validate_format(HSQUIRRELVM v, SQChar *fmt, const SQChar *src, SQInteger n,SQInteger &width) -{ - SQChar *dummy; - SQChar swidth[MAX_WFORMAT_LEN]; - SQInteger wc = 0; - SQInteger start = n; - fmt[0] = '%'; - while (isfmtchr(src[n])) n++; - while (scisdigit(src[n])) { - swidth[wc] = src[n]; - n++; - wc++; - if(wc>=MAX_WFORMAT_LEN) - return sq_throwerror(v,_SC("width format too long")); - } - swidth[wc] = '\0'; - if(wc > 0) { - width = scstrtol(swidth,&dummy,10); - } - else - width = 0; - if (src[n] == '.') { - n++; - - wc = 0; - while (scisdigit(src[n])) { - swidth[wc] = src[n]; - n++; - wc++; - if(wc>=MAX_WFORMAT_LEN) - return sq_throwerror(v,_SC("precision format too long")); - } - swidth[wc] = '\0'; - if(wc > 0) { - width += scstrtol(swidth,&dummy,10); - - } - } - if (n-start > MAX_FORMAT_LEN ) - return sq_throwerror(v,_SC("format too long")); - memcpy(&fmt[1],&src[start],((n-start)+1)*sizeof(SQChar)); - fmt[(n-start)+2] = '\0'; - return n; -} - -SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen,SQChar **output) -{ - const SQChar *format; - SQChar *dest; - SQChar fmt[MAX_FORMAT_LEN]; - const SQRESULT res = sq_getstring(v,nformatstringidx,&format); - if (SQ_FAILED(res)) { - return res; // propagate the error - } - SQInteger format_size = sq_getsize(v,nformatstringidx); - SQInteger allocated = (format_size+2)*sizeof(SQChar); - dest = sq_getscratchpad(v,allocated); - SQInteger n = 0,i = 0, nparam = nformatstringidx+1, w = 0; - //while(format[n] != '\0') - while(n < format_size) - { - if(format[n] != '%') { - assert(i < allocated); - dest[i++] = format[n]; - n++; - } - else if(format[n+1] == '%') { //handles %% - dest[i++] = '%'; - n += 2; - } - else { - n++; - if( nparam > sq_gettop(v) ) - return sq_throwerror(v,_SC("not enough parameters for the given format string")); - n = validate_format(v,fmt,format,n,w); - if(n < 0) return -1; - SQInteger addlen = 0; - SQInteger valtype = 0; - const SQChar *ts = NULL; - SQInteger ti = 0; - SQFloat tf = 0; - switch(format[n]) { - case 's': - if(SQ_FAILED(sq_getstring(v,nparam,&ts))) - return sq_throwerror(v,_SC("string expected for the specified format")); - addlen = (sq_getsize(v,nparam)*sizeof(SQChar))+((w+1)*sizeof(SQChar)); - valtype = 's'; - break; - case 'i': case 'd': case 'o': case 'u': case 'x': case 'X': -#ifdef _SQ64 - { - size_t flen = scstrlen(fmt); - SQInteger fpos = flen - 1; - SQChar f = fmt[fpos]; - const SQChar *prec = (const SQChar *)_PRINT_INT_PREC; - while(*prec != _SC('\0')) { - fmt[fpos++] = *prec++; - } - fmt[fpos++] = f; - fmt[fpos++] = _SC('\0'); - } -#endif - case 'c': - if(SQ_FAILED(sq_getinteger(v,nparam,&ti))) - return sq_throwerror(v,_SC("integer expected for the specified format")); - addlen = (ADDITIONAL_FORMAT_SPACE)+((w+1)*sizeof(SQChar)); - valtype = 'i'; - break; - case 'f': case 'g': case 'G': case 'e': case 'E': - if(SQ_FAILED(sq_getfloat(v,nparam,&tf))) - return sq_throwerror(v,_SC("float expected for the specified format")); - addlen = (ADDITIONAL_FORMAT_SPACE)+((w+1)*sizeof(SQChar)); - valtype = 'f'; - break; - default: - return sq_throwerror(v,_SC("invalid format")); - } - n++; - allocated += addlen + sizeof(SQChar); - dest = sq_getscratchpad(v,allocated); - switch(valtype) { - case 's': i += scsprintf(&dest[i],allocated,fmt,ts); break; - case 'i': i += scsprintf(&dest[i],allocated,fmt,ti); break; - case 'f': i += scsprintf(&dest[i],allocated,fmt,tf); break; - }; - nparam ++; - } - } - *outlen = i; - dest[i] = '\0'; - *output = dest; - return SQ_OK; -} - -void sqstd_pushstringf(HSQUIRRELVM v,const SQChar *s,...) -{ - SQInteger n=256; - va_list args; -begin: - va_start(args,s); - SQChar *b=sq_getscratchpad(v,n); - SQInteger r=scvsprintf(b,n,s,args); - va_end(args); - if (r>=n) { - n=r+1;//required+null - goto begin; - } else if (r<0) { - sq_pushnull(v); - } else { - sq_pushstring(v,b,r); - } -} - -static SQInteger _string_printf(HSQUIRRELVM v) -{ - SQChar *dest = NULL; - SQInteger length = 0; - if(SQ_FAILED(sqstd_format(v,2,&length,&dest))) - return -1; - - SQPRINTFUNCTION printfunc = sq_getprintfunc(v); - if(printfunc) printfunc(v,_SC("%s"),dest); - - return 0; -} - -static SQInteger _string_format(HSQUIRRELVM v) -{ - SQChar *dest = NULL; - SQInteger length = 0; - if(SQ_FAILED(sqstd_format(v,2,&length,&dest))) - return -1; - sq_pushstring(v,dest,length); - return 1; -} - -static void __strip_l(const SQChar *str,const SQChar **start) -{ - const SQChar *t = str; - while(((*t) != '\0') && scisspace(*t)){ t++; } - *start = t; -} - -static void __strip_r(const SQChar *str,SQInteger len,const SQChar **end) -{ - if(len == 0) { - *end = str; - return; - } - const SQChar *t = &str[len-1]; - while(t >= str && scisspace(*t)) { t--; } - *end = t + 1; -} - -static SQInteger _string_strip(HSQUIRRELVM v) -{ - const SQChar *str,*start,*end; - sq_getstring(v,2,&str); - SQInteger len = sq_getsize(v,2); - __strip_l(str,&start); - __strip_r(str,len,&end); - sq_pushstring(v,start,end - start); - return 1; -} - -static SQInteger _string_lstrip(HSQUIRRELVM v) -{ - const SQChar *str,*start; - sq_getstring(v,2,&str); - __strip_l(str,&start); - sq_pushstring(v,start,-1); - return 1; -} - -static SQInteger _string_rstrip(HSQUIRRELVM v) -{ - const SQChar *str,*end; - sq_getstring(v,2,&str); - SQInteger len = sq_getsize(v,2); - __strip_r(str,len,&end); - sq_pushstring(v,str,end - str); - return 1; -} - -static SQInteger _string_split(HSQUIRRELVM v) -{ - const SQChar *str,*seps; - SQInteger sepsize; - SQBool skipempty = SQFalse; - sq_getstring(v,2,&str); - sq_getstringandsize(v,3,&seps,&sepsize); - if(sepsize == 0) return sq_throwerror(v,_SC("empty separators string")); - if(sq_gettop(v)>3) { - sq_getbool(v,4,&skipempty); - } - const SQChar *start = str; - const SQChar *end = str; - sq_newarray(v,0); - while(*end != '\0') - { - SQChar cur = *end; - for(SQInteger i = 0; i < sepsize; i++) - { - if(cur == seps[i]) - { - if(!skipempty || (end != start)) { - sq_pushstring(v,start,end-start); - sq_arrayappend(v,-2); - } - start = end + 1; - break; - } - } - end++; - } - if(end != start) - { - sq_pushstring(v,start,end-start); - sq_arrayappend(v,-2); - } - return 1; -} - -static SQInteger _string_escape(HSQUIRRELVM v) -{ - const SQChar *str; - SQChar *dest,*resstr; - SQInteger size; - sq_getstring(v,2,&str); - size = sq_getsize(v,2); - if(size == 0) { - sq_push(v,2); - return 1; - } -#ifdef SQUNICODE -#if WCHAR_SIZE == 2 - const SQChar *escpat = _SC("\\x%04x"); - const SQInteger maxescsize = 6; -#else //WCHAR_SIZE == 4 - const SQChar *escpat = _SC("\\x%08x"); - const SQInteger maxescsize = 10; -#endif -#else - const SQChar *escpat = _SC("\\x%02x"); - const SQInteger maxescsize = 4; -#endif - SQInteger destcharsize = (size * maxescsize); //assumes every char could be escaped - resstr = dest = (SQChar *)sq_getscratchpad(v,destcharsize * sizeof(SQChar)); - SQChar c; - SQChar escch; - SQInteger escaped = 0; - for(int n = 0; n < size; n++){ - c = *str++; - escch = 0; - if(scisprint(c) || c == 0) { - switch(c) { - case '\a': escch = 'a'; break; - case '\b': escch = 'b'; break; - case '\t': escch = 't'; break; - case '\n': escch = 'n'; break; - case '\v': escch = 'v'; break; - case '\f': escch = 'f'; break; - case '\r': escch = 'r'; break; - case '\\': escch = '\\'; break; - case '\"': escch = '\"'; break; - case '\'': escch = '\''; break; - case 0: escch = '0'; break; - } - if(escch) { - *dest++ = '\\'; - *dest++ = escch; - escaped++; - } - else { - *dest++ = c; - } - } - else { - - dest += scsprintf(dest, destcharsize, escpat, c); - escaped++; - } - } - - if(escaped) { - sq_pushstring(v,resstr,dest - resstr); - } - else { - sq_push(v,2); //nothing escaped - } - return 1; -} - -static SQInteger _string_startswith(HSQUIRRELVM v) -{ - const SQChar *str,*cmp; - sq_getstring(v,2,&str); - sq_getstring(v,3,&cmp); - SQInteger len = sq_getsize(v,2); - SQInteger cmplen = sq_getsize(v,3); - SQBool ret = SQFalse; - if(cmplen <= len) { - ret = memcmp(str,cmp,sq_rsl(cmplen)) == 0 ? SQTrue : SQFalse; - } - sq_pushbool(v,ret); - return 1; -} - -static SQInteger _string_endswith(HSQUIRRELVM v) -{ - const SQChar *str,*cmp; - sq_getstring(v,2,&str); - sq_getstring(v,3,&cmp); - SQInteger len = sq_getsize(v,2); - SQInteger cmplen = sq_getsize(v,3); - SQBool ret = SQFalse; - if(cmplen <= len) { - ret = memcmp(&str[len - cmplen],cmp,sq_rsl(cmplen)) == 0 ? SQTrue : SQFalse; - } - sq_pushbool(v,ret); - return 1; -} - -#define SETUP_REX(v) \ - SQRex *self = NULL; \ - if(SQ_FAILED(sq_getinstanceup(v,1,(SQUserPointer *)&self,rex_typetag,SQFalse))) { \ - return sq_throwerror(v,_SC("invalid type tag")); \ - } - -static SQInteger _rexobj_releasehook(SQUserPointer p, SQInteger SQ_UNUSED_ARG(size)) -{ - SQRex *self = ((SQRex *)p); - sqstd_rex_free(self); - return 1; -} - -static SQInteger _regexp_match(HSQUIRRELVM v) -{ - SETUP_REX(v); - const SQChar *str; - sq_getstring(v,2,&str); - if(sqstd_rex_match(self,str) == SQTrue) - { - sq_pushbool(v,SQTrue); - return 1; - } - sq_pushbool(v,SQFalse); - return 1; -} - -static void _addrexmatch(HSQUIRRELVM v,const SQChar *str,const SQChar *begin,const SQChar *end) -{ - sq_newtable(v); - sq_pushstring(v,_SC("begin"),-1); - sq_pushinteger(v,begin - str); - sq_rawset(v,-3); - sq_pushstring(v,_SC("end"),-1); - sq_pushinteger(v,end - str); - sq_rawset(v,-3); -} - -static SQInteger _regexp_search(HSQUIRRELVM v) -{ - SETUP_REX(v); - const SQChar *str,*begin,*end; - SQInteger start = 0; - sq_getstring(v,2,&str); - if(sq_gettop(v) > 2) sq_getinteger(v,3,&start); - if(sqstd_rex_search(self,str+start,&begin,&end) == SQTrue) { - _addrexmatch(v,str,begin,end); - return 1; - } - return 0; -} - -static SQInteger _regexp_capture(HSQUIRRELVM v) -{ - SETUP_REX(v); - const SQChar *str,*begin,*end; - SQInteger start = 0; - sq_getstring(v,2,&str); - if(sq_gettop(v) > 2) sq_getinteger(v,3,&start); - if(sqstd_rex_search(self,str+start,&begin,&end) == SQTrue) { - SQInteger n = sqstd_rex_getsubexpcount(self); - SQRexMatch match; - sq_newarray(v,0); - for(SQInteger i = 0;i < n; i++) { - sqstd_rex_getsubexp(self,i,&match); - if(match.len > 0) - _addrexmatch(v,str,match.begin,match.begin+match.len); - else - _addrexmatch(v,str,str,str); //empty match - sq_arrayappend(v,-2); - } - return 1; - } - return 0; -} - -static SQInteger _regexp_subexpcount(HSQUIRRELVM v) -{ - SETUP_REX(v); - sq_pushinteger(v,sqstd_rex_getsubexpcount(self)); - return 1; -} - -static SQInteger _regexp_constructor(HSQUIRRELVM v) -{ - SQRex *self = NULL; - if (SQ_FAILED(sq_getinstanceup(v, 1, (SQUserPointer *)&self, rex_typetag, SQFalse))) { - return sq_throwerror(v, _SC("invalid type tag")); - } - if (self != NULL) { - return sq_throwerror(v, _SC("invalid regexp object")); - } - const SQChar *error,*pattern; - sq_getstring(v,2,&pattern); - SQRex *rex = sqstd_rex_compile(pattern,&error); - if(!rex) return sq_throwerror(v,error); - sq_setinstanceup(v,1,rex); - sq_setreleasehook(v,1,_rexobj_releasehook); - return 0; -} - -static SQInteger _regexp__typeof(HSQUIRRELVM v) -{ - sq_pushstring(v,_SC("regexp"),-1); - return 1; -} - -#define _DECL_REX_FUNC(name,nparams,pmask) {_SC(#name),_regexp_##name,nparams,pmask} -static const SQRegFunction rexobj_funcs[]={ - _DECL_REX_FUNC(constructor,2,_SC(".s")), - _DECL_REX_FUNC(search,-2,_SC("xsn")), - _DECL_REX_FUNC(match,2,_SC("xs")), - _DECL_REX_FUNC(capture,-2,_SC("xsn")), - _DECL_REX_FUNC(subexpcount,1,_SC("x")), - _DECL_REX_FUNC(_typeof,1,_SC("x")), - {NULL,(SQFUNCTION)0,0,NULL} -}; -#undef _DECL_REX_FUNC - -#define _DECL_FUNC(name,nparams,pmask) {_SC(#name),_string_##name,nparams,pmask} -static const SQRegFunction stringlib_funcs[]={ - _DECL_FUNC(format,-2,_SC(".s")), - _DECL_FUNC(printf,-2,_SC(".s")), - _DECL_FUNC(strip,2,_SC(".s")), - _DECL_FUNC(lstrip,2,_SC(".s")), - _DECL_FUNC(rstrip,2,_SC(".s")), - _DECL_FUNC(split,-3,_SC(".ssb")), - _DECL_FUNC(escape,2,_SC(".s")), - _DECL_FUNC(startswith,3,_SC(".ss")), - _DECL_FUNC(endswith,3,_SC(".ss")), - {NULL,(SQFUNCTION)0,0,NULL} -}; -#undef _DECL_FUNC - - -SQInteger sqstd_register_stringlib(HSQUIRRELVM v) -{ - sq_pushstring(v,_SC("regexp"),-1); - sq_newclass(v,SQFalse); - rex_typetag = (SQUserPointer)rexobj_funcs; - sq_settypetag(v, -1, rex_typetag); - SQInteger i = 0; - while(rexobj_funcs[i].name != 0) { - const SQRegFunction &f = rexobj_funcs[i]; - sq_pushstring(v,f.name,-1); - sq_newclosure(v,f.f,0); - sq_setparamscheck(v,f.nparamscheck,f.typemask); - sq_setnativeclosurename(v,-1,f.name); - sq_newslot(v,-3,SQFalse); - i++; - } - sq_newslot(v,-3,SQFalse); - - i = 0; - while(stringlib_funcs[i].name!=0) - { - sq_pushstring(v,stringlib_funcs[i].name,-1); - sq_newclosure(v,stringlib_funcs[i].f,0); - sq_setparamscheck(v,stringlib_funcs[i].nparamscheck,stringlib_funcs[i].typemask); - sq_setnativeclosurename(v,-1,stringlib_funcs[i].name); - sq_newslot(v,-3,SQFalse); - i++; - } - return 1; -} diff --git a/m_packages/squirrel/sqstdlib/sqstdsystem.cpp b/m_packages/squirrel/sqstdlib/sqstdsystem.cpp deleted file mode 100644 index d326be1a..00000000 --- a/m_packages/squirrel/sqstdlib/sqstdsystem.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* see copyright notice in squirrel.h */ -#include -#include -#include -#include -#include - -#ifdef SQUNICODE -#include -#define scgetenv _wgetenv -#define scsystem _wsystem -#define scasctime _wasctime -#define scremove _wremove -#define screname _wrename -#else -#define scgetenv getenv -#define scsystem system -#define scasctime asctime -#define scremove remove -#define screname rename -#endif -#ifdef IOS - #include - extern char **environ; -#endif - -static SQInteger _system_getenv(HSQUIRRELVM v) -{ - const SQChar *s; - if(SQ_SUCCEEDED(sq_getstring(v,2,&s))){ - sq_pushstring(v,scgetenv(s),-1); - return 1; - } - return 0; -} - -static SQInteger _system_system(HSQUIRRELVM v) -{ - const SQChar *s; - if(SQ_SUCCEEDED(sq_getstring(v,2,&s))){ - #ifdef IOS - pid_t pid; - posix_spawn(&pid, s, NULL, NULL, NULL, environ); - sq_pushinteger(v, 0); - #else - sq_pushinteger(v,scsystem(s)); - #endif - return 1; - } - return sq_throwerror(v,_SC("wrong param")); -} - -static SQInteger _system_clock(HSQUIRRELVM v) -{ - sq_pushfloat(v,((SQFloat)clock())/(SQFloat)CLOCKS_PER_SEC); - return 1; -} - -static SQInteger _system_time(HSQUIRRELVM v) -{ - SQInteger t = (SQInteger)time(NULL); - sq_pushinteger(v,t); - return 1; -} - -static SQInteger _system_remove(HSQUIRRELVM v) -{ - const SQChar *s; - sq_getstring(v,2,&s); - if(scremove(s)==-1) - return sq_throwerror(v,_SC("remove() failed")); - return 0; -} - -static SQInteger _system_rename(HSQUIRRELVM v) -{ - const SQChar *oldn,*newn; - sq_getstring(v,2,&oldn); - sq_getstring(v,3,&newn); - if(screname(oldn,newn)==-1) - return sq_throwerror(v,_SC("rename() failed")); - return 0; -} - -static void _set_integer_slot(HSQUIRRELVM v,const SQChar *name,SQInteger val) -{ - sq_pushstring(v,name,-1); - sq_pushinteger(v,val); - sq_rawset(v,-3); -} - -static SQInteger _system_date(HSQUIRRELVM v) -{ - time_t t; - SQInteger it; - SQInteger format = 'l'; - if(sq_gettop(v) > 1) { - sq_getinteger(v,2,&it); - t = it; - if(sq_gettop(v) > 2) { - sq_getinteger(v,3,(SQInteger*)&format); - } - } - else { - time(&t); - } - tm *date; - if(format == 'u') - date = gmtime(&t); - else - date = localtime(&t); - if(!date) - return sq_throwerror(v,_SC("crt api failure")); - sq_newtable(v); - _set_integer_slot(v, _SC("sec"), date->tm_sec); - _set_integer_slot(v, _SC("min"), date->tm_min); - _set_integer_slot(v, _SC("hour"), date->tm_hour); - _set_integer_slot(v, _SC("day"), date->tm_mday); - _set_integer_slot(v, _SC("month"), date->tm_mon); - _set_integer_slot(v, _SC("year"), date->tm_year+1900); - _set_integer_slot(v, _SC("wday"), date->tm_wday); - _set_integer_slot(v, _SC("yday"), date->tm_yday); - return 1; -} - - - -#define _DECL_FUNC(name,nparams,pmask) {_SC(#name),_system_##name,nparams,pmask} -static const SQRegFunction systemlib_funcs[]={ - _DECL_FUNC(getenv,2,_SC(".s")), - _DECL_FUNC(system,2,_SC(".s")), - _DECL_FUNC(clock,0,NULL), - _DECL_FUNC(time,1,NULL), - _DECL_FUNC(date,-1,_SC(".nn")), - _DECL_FUNC(remove,2,_SC(".s")), - _DECL_FUNC(rename,3,_SC(".ss")), - {NULL,(SQFUNCTION)0,0,NULL} -}; -#undef _DECL_FUNC - -SQInteger sqstd_register_systemlib(HSQUIRRELVM v) -{ - SQInteger i=0; - while(systemlib_funcs[i].name!=0) - { - sq_pushstring(v,systemlib_funcs[i].name,-1); - sq_newclosure(v,systemlib_funcs[i].f,0); - sq_setparamscheck(v,systemlib_funcs[i].nparamscheck,systemlib_funcs[i].typemask); - sq_setnativeclosurename(v,-1,systemlib_funcs[i].name); - sq_newslot(v,-3,SQFalse); - i++; - } - return 1; -} diff --git a/m_packages/squirrel/squirrel-config.cmake.in b/m_packages/squirrel/squirrel-config.cmake.in deleted file mode 100644 index 6ed4a8aa..00000000 --- a/m_packages/squirrel/squirrel-config.cmake.in +++ /dev/null @@ -1,4 +0,0 @@ -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/squirrel-config-version.cmake") -include("${CMAKE_CURRENT_LIST_DIR}/squirrel-targets.cmake") diff --git a/m_packages/squirrel/squirrel.dsw b/m_packages/squirrel/squirrel.dsw deleted file mode 100644 index 72150910..00000000 --- a/m_packages/squirrel/squirrel.dsw +++ /dev/null @@ -1,77 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "sq"=.\sq\sq.dsp - Package Owner=<4> - -Package=<5> -{{{ - begin source code control - . - end source code control -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name sqlibs - End Project Dependency - Begin Project Dependency - Project_Dep_Name squirrel - End Project Dependency - Begin Project Dependency - Project_Dep_Name sqstdlib - End Project Dependency -}}} - -############################################################################### - -Project: "sqstdlib"=.\sqstdlib\sqstdlib.dsp - Package Owner=<4> - -Package=<5> -{{{ - begin source code control - "$/squirrel", HAAAAAAA - . - end source code control -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "squirrel"=.\squirrel\squirrel.dsp - Package Owner=<4> - -Package=<5> -{{{ - begin source code control - "$/squirrel", HAAAAAAA - . - end source code control -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ - begin source code control - "$/squirrel", HAAAAAAA - . - end source code control -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/m_packages/squirrel/squirrel.pc.in b/m_packages/squirrel/squirrel.pc.in deleted file mode 100644 index ea66485f..00000000 --- a/m_packages/squirrel/squirrel.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: @PROJECT_NAME@ -Version: @PROJECT_VERSION@ -Description: @PROJECT_DESCRIPTION@ -URL: @PROJECT_HOMEPAGE_URL@ -Requires: -Provides: squirrel3 = @PROJECT_VERSION@ -Libs: -L${libdir} -l@LIBSQUIRREL_NAME@ -l@SQSTDLIB_NAME@ -Cflags: -I${includedir} diff --git a/m_packages/squirrel/squirrel/CMakeLists.txt b/m_packages/squirrel/squirrel/CMakeLists.txt deleted file mode 100644 index c8a31b9a..00000000 --- a/m_packages/squirrel/squirrel/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -set(SQUIRREL_SRC sqapi.cpp - sqbaselib.cpp - sqclass.cpp - sqcompiler.cpp - sqdebug.cpp - sqfuncstate.cpp - sqlexer.cpp - sqmem.cpp - sqobject.cpp - sqstate.cpp - sqtable.cpp - sqvm.cpp) - -if(NOT DISABLE_DYNAMIC) - add_library(squirrel SHARED ${SQUIRREL_SRC}) - add_library(squirrel::squirrel ALIAS squirrel) - set_property(TARGET squirrel PROPERTY EXPORT_NAME squirrel) - set_property(TARGET squirrel PROPERTY OUTPUT_NAME ${LIBSQUIRREL_NAME}) - if(NOT SQ_DISABLE_INSTALLER) - install(TARGETS squirrel EXPORT squirrel - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Libraries - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries NAMELINK_SKIP - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries - ) - install(TARGETS squirrel EXPORT squirrel - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development NAMELINK_ONLY - ) - endif() - target_include_directories(squirrel PUBLIC - "$" - "$" - ) -endif() - -if(NOT DISABLE_STATIC) - add_library(squirrel_static STATIC ${SQUIRREL_SRC}) - add_library(squirrel::squirrel_static ALIAS squirrel_static) - set_property(TARGET squirrel_static PROPERTY EXPORT_NAME squirrel_static) - if(NOT SQ_DISABLE_INSTALLER) - install(TARGETS squirrel_static EXPORT squirrel ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development) - endif() - target_include_directories(squirrel_static PUBLIC - "$" - "$" - ) -endif() - -if(LONG_OUTPUT_NAMES) - if(NOT DISABLE_STATIC) - set_target_properties(squirrel_static PROPERTIES OUTPUT_NAME squirrel3_static) - endif() -endif() diff --git a/m_packages/squirrel/squirrel/Makefile b/m_packages/squirrel/squirrel/Makefile deleted file mode 100644 index 2422a834..00000000 --- a/m_packages/squirrel/squirrel/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -SQUIRREL= .. - - -CC?= gcc -OUT?= $(SQUIRREL)/lib/libsquirrel.a -INCZ?= -I$(SQUIRREL)/include -I. -Iinclude -DEFS= $(CC_EXTRA_FLAGS) -LIB= - -OBJS= \ - sqapi.o \ - sqbaselib.o \ - sqfuncstate.o \ - sqdebug.o \ - sqlexer.o \ - sqobject.o \ - sqcompiler.o \ - sqstate.o \ - sqtable.o \ - sqmem.o \ - sqvm.o \ - sqclass.o - -SRCS= \ - sqapi.cpp \ - sqbaselib.cpp \ - sqfuncstate.cpp \ - sqdebug.cpp \ - sqlexer.cpp \ - sqobject.cpp \ - sqcompiler.cpp \ - sqstate.cpp \ - sqtable.cpp \ - sqmem.cpp \ - sqvm.cpp \ - sqclass.cpp - - - -sq32: - $(CC) -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS) - ar rc $(OUT) *.o - rm *.o - -sqprof: - $(CC) -O2 -pg -fno-exceptions -fno-rtti -pie -gstabs -g3 -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS) - ar rc $(OUT) *.o - rm *.o - -sq64: - $(CC) -O2 -m64 -D_SQ64 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS) - ar rc $(OUT) *.o - rm *.o diff --git a/m_packages/squirrel/squirrel/sqapi.cpp b/m_packages/squirrel/squirrel/sqapi.cpp deleted file mode 100644 index 54eecac4..00000000 --- a/m_packages/squirrel/squirrel/sqapi.cpp +++ /dev/null @@ -1,1631 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include "sqvm.h" -#include "sqstring.h" -#include "sqtable.h" -#include "sqarray.h" -#include "sqfuncproto.h" -#include "sqclosure.h" -#include "squserdata.h" -#include "sqcompiler.h" -#include "sqfuncstate.h" -#include "sqclass.h" - -static bool sq_aux_gettypedarg(HSQUIRRELVM v,SQInteger idx,SQObjectType type,SQObjectPtr **o) -{ - *o = &stack_get(v,idx); - if(sq_type(**o) != type){ - SQObjectPtr oval = v->PrintObjVal(**o); - v->Raise_Error(_SC("wrong argument type, expected '%s' got '%.50s'"),IdType2Name(type),_stringval(oval)); - return false; - } - return true; -} - -#define _GETSAFE_OBJ(v,idx,type,o) { if(!sq_aux_gettypedarg(v,idx,type,&o)) return SQ_ERROR; } - -#define sq_aux_paramscheck(v,count) \ -{ \ - if(sq_gettop(v) < count){ v->Raise_Error(_SC("not enough params in the stack")); return SQ_ERROR; }\ -} - - -SQInteger sq_aux_invalidtype(HSQUIRRELVM v,SQObjectType type) -{ - SQUnsignedInteger buf_size = 100 *sizeof(SQChar); - scsprintf(_ss(v)->GetScratchPad(buf_size), buf_size, _SC("unexpected type %s"), IdType2Name(type)); - return sq_throwerror(v, _ss(v)->GetScratchPad(-1)); -} - -HSQUIRRELVM sq_open(SQInteger initialstacksize) -{ - SQSharedState *ss; - SQVM *v; - sq_new(ss, SQSharedState); - ss->Init(); - v = (SQVM *)SQ_MALLOC(sizeof(SQVM)); - new (v) SQVM(ss); - ss->_root_vm = v; - if(v->Init(NULL, initialstacksize)) { - return v; - } else { - sq_delete(v, SQVM); - return NULL; - } - return v; -} - -HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize) -{ - SQSharedState *ss; - SQVM *v; - ss=_ss(friendvm); - - v= (SQVM *)SQ_MALLOC(sizeof(SQVM)); - new (v) SQVM(ss); - - if(v->Init(friendvm, initialstacksize)) { - friendvm->Push(v); - return v; - } else { - sq_delete(v, SQVM); - return NULL; - } -} - -SQInteger sq_getvmstate(HSQUIRRELVM v) -{ - if(v->_suspended) - return SQ_VMSTATE_SUSPENDED; - else { - if(v->_callsstacksize != 0) return SQ_VMSTATE_RUNNING; - else return SQ_VMSTATE_IDLE; - } -} - -void sq_seterrorhandler(HSQUIRRELVM v) -{ - SQObject o = stack_get(v, -1); - if(sq_isclosure(o) || sq_isnativeclosure(o) || sq_isnull(o)) { - v->_errorhandler = o; - v->Pop(); - } -} - -void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook) -{ - v->_debughook_native = hook; - v->_debughook_closure.Null(); - v->_debughook = hook?true:false; -} - -void sq_setdebughook(HSQUIRRELVM v) -{ - SQObject o = stack_get(v,-1); - if(sq_isclosure(o) || sq_isnativeclosure(o) || sq_isnull(o)) { - v->_debughook_closure = o; - v->_debughook_native = NULL; - v->_debughook = !sq_isnull(o); - v->Pop(); - } -} - -void sq_close(HSQUIRRELVM v) -{ - SQSharedState *ss = _ss(v); - _thread(ss->_root_vm)->Finalize(); - sq_delete(ss, SQSharedState); -} - -SQInteger sq_getversion() -{ - return SQUIRREL_VERSION_NUMBER; -} - -SQRESULT sq_compile(HSQUIRRELVM v,SQLEXREADFUNC read,SQUserPointer p,const SQChar *sourcename,SQBool raiseerror) -{ - SQObjectPtr o; -#ifndef NO_COMPILER - if(Compile(v, read, p, sourcename, o, raiseerror?true:false, _ss(v)->_debuginfo)) { - v->Push(SQClosure::Create(_ss(v), _funcproto(o), _table(v->_roottable)->GetWeakRef(OT_TABLE))); - return SQ_OK; - } - return SQ_ERROR; -#else - return sq_throwerror(v,_SC("this is a no compiler build")); -#endif -} - -void sq_enabledebuginfo(HSQUIRRELVM v, SQBool enable) -{ - _ss(v)->_debuginfo = enable?true:false; -} - -void sq_notifyallexceptions(HSQUIRRELVM v, SQBool enable) -{ - _ss(v)->_notifyallexceptions = enable?true:false; -} - -void sq_addref(HSQUIRRELVM v,HSQOBJECT *po) -{ - if(!ISREFCOUNTED(sq_type(*po))) return; -#ifdef NO_GARBAGE_COLLECTOR - __AddRef(po->_type,po->_unVal); -#else - _ss(v)->_refs_table.AddRef(*po); -#endif -} - -SQUnsignedInteger sq_getrefcount(HSQUIRRELVM v,HSQOBJECT *po) -{ - if(!ISREFCOUNTED(sq_type(*po))) return 0; -#ifdef NO_GARBAGE_COLLECTOR - return po->_unVal.pRefCounted->_uiRef; -#else - return _ss(v)->_refs_table.GetRefCount(*po); -#endif -} - -SQBool sq_release(HSQUIRRELVM v,HSQOBJECT *po) -{ - if(!ISREFCOUNTED(sq_type(*po))) return SQTrue; -#ifdef NO_GARBAGE_COLLECTOR - bool ret = (po->_unVal.pRefCounted->_uiRef <= 1) ? SQTrue : SQFalse; - __Release(po->_type,po->_unVal); - return ret; //the ret val doesn't work(and cannot be fixed) -#else - return _ss(v)->_refs_table.Release(*po); -#endif -} - -SQUnsignedInteger sq_getvmrefcount(HSQUIRRELVM SQ_UNUSED_ARG(v), const HSQOBJECT *po) -{ - if (!ISREFCOUNTED(sq_type(*po))) return 0; - return po->_unVal.pRefCounted->_uiRef; -} - -const SQChar *sq_objtostring(const HSQOBJECT *o) -{ - if(sq_type(*o) == OT_STRING) { - return _stringval(*o); - } - return NULL; -} - -SQInteger sq_objtointeger(const HSQOBJECT *o) -{ - if(sq_isnumeric(*o)) { - return tointeger(*o); - } - return 0; -} - -SQFloat sq_objtofloat(const HSQOBJECT *o) -{ - if(sq_isnumeric(*o)) { - return tofloat(*o); - } - return 0; -} - -SQBool sq_objtobool(const HSQOBJECT *o) -{ - if(sq_isbool(*o)) { - return _integer(*o); - } - return SQFalse; -} - -SQUserPointer sq_objtouserpointer(const HSQOBJECT *o) -{ - if(sq_isuserpointer(*o)) { - return _userpointer(*o); - } - return 0; -} - -void sq_pushnull(HSQUIRRELVM v) -{ - v->PushNull(); -} - -void sq_pushstring(HSQUIRRELVM v,const SQChar *s,SQInteger len) -{ - if(s) - v->Push(SQObjectPtr(SQString::Create(_ss(v), s, len))); - else v->PushNull(); -} - -void sq_pushinteger(HSQUIRRELVM v,SQInteger n) -{ - v->Push(n); -} - -void sq_pushbool(HSQUIRRELVM v,SQBool b) -{ - v->Push(b?true:false); -} - -void sq_pushfloat(HSQUIRRELVM v,SQFloat n) -{ - v->Push(n); -} - -void sq_pushuserpointer(HSQUIRRELVM v,SQUserPointer p) -{ - v->Push(p); -} - -void sq_pushthread(HSQUIRRELVM v, HSQUIRRELVM thread) -{ - v->Push(thread); -} - -SQUserPointer sq_newuserdata(HSQUIRRELVM v,SQUnsignedInteger size) -{ - SQUserData *ud = SQUserData::Create(_ss(v), size + SQ_ALIGNMENT); - v->Push(ud); - return (SQUserPointer)sq_aligning(ud + 1); -} - -void sq_newtable(HSQUIRRELVM v) -{ - v->Push(SQTable::Create(_ss(v), 0)); -} - -void sq_newtableex(HSQUIRRELVM v,SQInteger initialcapacity) -{ - v->Push(SQTable::Create(_ss(v), initialcapacity)); -} - -void sq_newarray(HSQUIRRELVM v,SQInteger size) -{ - v->Push(SQArray::Create(_ss(v), size)); -} - -SQRESULT sq_newclass(HSQUIRRELVM v,SQBool hasbase) -{ - SQClass *baseclass = NULL; - if(hasbase) { - SQObjectPtr &base = stack_get(v,-1); - if(sq_type(base) != OT_CLASS) - return sq_throwerror(v,_SC("invalid base type")); - baseclass = _class(base); - } - SQClass *newclass = SQClass::Create(_ss(v), baseclass); - if(baseclass) v->Pop(); - v->Push(newclass); - return SQ_OK; -} - -SQBool sq_instanceof(HSQUIRRELVM v) -{ - SQObjectPtr &inst = stack_get(v,-1); - SQObjectPtr &cl = stack_get(v,-2); - if(sq_type(inst) != OT_INSTANCE || sq_type(cl) != OT_CLASS) - return sq_throwerror(v,_SC("invalid param type")); - return _instance(inst)->InstanceOf(_class(cl))?SQTrue:SQFalse; -} - -SQRESULT sq_arrayappend(HSQUIRRELVM v,SQInteger idx) -{ - sq_aux_paramscheck(v,2); - SQObjectPtr *arr; - _GETSAFE_OBJ(v, idx, OT_ARRAY,arr); - _array(*arr)->Append(v->GetUp(-1)); - v->Pop(); - return SQ_OK; -} - -SQRESULT sq_arraypop(HSQUIRRELVM v,SQInteger idx,SQBool pushval) -{ - sq_aux_paramscheck(v, 1); - SQObjectPtr *arr; - _GETSAFE_OBJ(v, idx, OT_ARRAY,arr); - if(_array(*arr)->Size() > 0) { - if(pushval != 0){ v->Push(_array(*arr)->Top()); } - _array(*arr)->Pop(); - return SQ_OK; - } - return sq_throwerror(v, _SC("empty array")); -} - -SQRESULT sq_arrayresize(HSQUIRRELVM v,SQInteger idx,SQInteger newsize) -{ - sq_aux_paramscheck(v,1); - SQObjectPtr *arr; - _GETSAFE_OBJ(v, idx, OT_ARRAY,arr); - if(newsize >= 0) { - _array(*arr)->Resize(newsize); - return SQ_OK; - } - return sq_throwerror(v,_SC("negative size")); -} - - -SQRESULT sq_arrayreverse(HSQUIRRELVM v,SQInteger idx) -{ - sq_aux_paramscheck(v, 1); - SQObjectPtr *o; - _GETSAFE_OBJ(v, idx, OT_ARRAY,o); - SQArray *arr = _array(*o); - if(arr->Size() > 0) { - SQObjectPtr t; - SQInteger size = arr->Size(); - SQInteger n = size >> 1; size -= 1; - for(SQInteger i = 0; i < n; i++) { - t = arr->_values[i]; - arr->_values[i] = arr->_values[size-i]; - arr->_values[size-i] = t; - } - return SQ_OK; - } - return SQ_OK; -} - -SQRESULT sq_arrayremove(HSQUIRRELVM v,SQInteger idx,SQInteger itemidx) -{ - sq_aux_paramscheck(v, 1); - SQObjectPtr *arr; - _GETSAFE_OBJ(v, idx, OT_ARRAY,arr); - return _array(*arr)->Remove(itemidx) ? SQ_OK : sq_throwerror(v,_SC("index out of range")); -} - -SQRESULT sq_arrayinsert(HSQUIRRELVM v,SQInteger idx,SQInteger destpos) -{ - sq_aux_paramscheck(v, 1); - SQObjectPtr *arr; - _GETSAFE_OBJ(v, idx, OT_ARRAY,arr); - SQRESULT ret = _array(*arr)->Insert(destpos, v->GetUp(-1)) ? SQ_OK : sq_throwerror(v,_SC("index out of range")); - v->Pop(); - return ret; -} - -void sq_newclosure(HSQUIRRELVM v,SQFUNCTION func,SQUnsignedInteger nfreevars) -{ - SQNativeClosure *nc = SQNativeClosure::Create(_ss(v), func,nfreevars); - nc->_nparamscheck = 0; - for(SQUnsignedInteger i = 0; i < nfreevars; i++) { - nc->_outervalues[i] = v->Top(); - v->Pop(); - } - v->Push(SQObjectPtr(nc)); -} - -SQRESULT sq_getclosureinfo(HSQUIRRELVM v,SQInteger idx,SQInteger *nparams,SQInteger *nfreevars) -{ - SQObject o = stack_get(v, idx); - if(sq_type(o) == OT_CLOSURE) { - SQClosure *c = _closure(o); - SQFunctionProto *proto = c->_function; - *nparams = proto->_nparameters; - *nfreevars = proto->_noutervalues; - return SQ_OK; - } - else if(sq_type(o) == OT_NATIVECLOSURE) - { - SQNativeClosure *c = _nativeclosure(o); - *nparams = c->_nparamscheck; - *nfreevars = (SQInteger)c->_noutervalues; - return SQ_OK; - } - return sq_throwerror(v,_SC("the object is not a closure")); -} - -SQRESULT sq_setnativeclosurename(HSQUIRRELVM v,SQInteger idx,const SQChar *name) -{ - SQObject o = stack_get(v, idx); - if(sq_isnativeclosure(o)) { - SQNativeClosure *nc = _nativeclosure(o); - nc->_name = SQString::Create(_ss(v),name); - return SQ_OK; - } - return sq_throwerror(v,_SC("the object is not a nativeclosure")); -} - -SQRESULT sq_setparamscheck(HSQUIRRELVM v,SQInteger nparamscheck,const SQChar *typemask) -{ - SQObject o = stack_get(v, -1); - if(!sq_isnativeclosure(o)) - return sq_throwerror(v, _SC("native closure expected")); - SQNativeClosure *nc = _nativeclosure(o); - nc->_nparamscheck = nparamscheck; - if(typemask) { - SQIntVec res; - if(!CompileTypemask(res, typemask)) - return sq_throwerror(v, _SC("invalid typemask")); - nc->_typecheck.copy(res); - } - else { - nc->_typecheck.resize(0); - } - if(nparamscheck == SQ_MATCHTYPEMASKSTRING) { - nc->_nparamscheck = nc->_typecheck.size(); - } - return SQ_OK; -} - -SQRESULT sq_bindenv(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &o = stack_get(v,idx); - if(!sq_isnativeclosure(o) && - !sq_isclosure(o)) - return sq_throwerror(v,_SC("the target is not a closure")); - SQObjectPtr &env = stack_get(v,-1); - if(!sq_istable(env) && - !sq_isarray(env) && - !sq_isclass(env) && - !sq_isinstance(env)) - return sq_throwerror(v,_SC("invalid environment")); - SQWeakRef *w = _refcounted(env)->GetWeakRef(sq_type(env)); - SQObjectPtr ret; - if(sq_isclosure(o)) { - SQClosure *c = _closure(o)->Clone(); - __ObjRelease(c->_env); - c->_env = w; - __ObjAddRef(c->_env); - if(_closure(o)->_base) { - c->_base = _closure(o)->_base; - __ObjAddRef(c->_base); - } - ret = c; - } - else { //then must be a native closure - SQNativeClosure *c = _nativeclosure(o)->Clone(); - __ObjRelease(c->_env); - c->_env = w; - __ObjAddRef(c->_env); - ret = c; - } - v->Pop(); - v->Push(ret); - return SQ_OK; -} - -SQRESULT sq_getclosurename(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &o = stack_get(v,idx); - if(!sq_isnativeclosure(o) && - !sq_isclosure(o)) - return sq_throwerror(v,_SC("the target is not a closure")); - if(sq_isnativeclosure(o)) - { - v->Push(_nativeclosure(o)->_name); - } - else { //closure - v->Push(_closure(o)->_function->_name); - } - return SQ_OK; -} - -SQRESULT sq_setclosureroot(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &c = stack_get(v,idx); - SQObject o = stack_get(v, -1); - if(!sq_isclosure(c)) return sq_throwerror(v, _SC("closure expected")); - if(sq_istable(o)) { - _closure(c)->SetRoot(_table(o)->GetWeakRef(OT_TABLE)); - v->Pop(); - return SQ_OK; - } - return sq_throwerror(v, _SC("invalid type")); -} - -SQRESULT sq_getclosureroot(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &c = stack_get(v,idx); - if(!sq_isclosure(c)) return sq_throwerror(v, _SC("closure expected")); - v->Push(_closure(c)->_root->_obj); - return SQ_OK; -} - -SQRESULT sq_clear(HSQUIRRELVM v,SQInteger idx) -{ - SQObject &o=stack_get(v,idx); - switch(sq_type(o)) { - case OT_TABLE: _table(o)->Clear(); break; - case OT_ARRAY: _array(o)->Resize(0); break; - default: - return sq_throwerror(v, _SC("clear only works on table and array")); - break; - - } - return SQ_OK; -} - -void sq_pushroottable(HSQUIRRELVM v) -{ - v->Push(v->_roottable); -} - -void sq_pushregistrytable(HSQUIRRELVM v) -{ - v->Push(_ss(v)->_registry); -} - -void sq_pushconsttable(HSQUIRRELVM v) -{ - v->Push(_ss(v)->_consts); -} - -SQRESULT sq_setroottable(HSQUIRRELVM v) -{ - SQObject o = stack_get(v, -1); - if(sq_istable(o) || sq_isnull(o)) { - v->_roottable = o; - v->Pop(); - return SQ_OK; - } - return sq_throwerror(v, _SC("invalid type")); -} - -SQRESULT sq_setconsttable(HSQUIRRELVM v) -{ - SQObject o = stack_get(v, -1); - if(sq_istable(o)) { - _ss(v)->_consts = o; - v->Pop(); - return SQ_OK; - } - return sq_throwerror(v, _SC("invalid type, expected table")); -} - -void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p) -{ - v->_foreignptr = p; -} - -SQUserPointer sq_getforeignptr(HSQUIRRELVM v) -{ - return v->_foreignptr; -} - -void sq_setsharedforeignptr(HSQUIRRELVM v,SQUserPointer p) -{ - _ss(v)->_foreignptr = p; -} - -SQUserPointer sq_getsharedforeignptr(HSQUIRRELVM v) -{ - return _ss(v)->_foreignptr; -} - -void sq_setvmreleasehook(HSQUIRRELVM v,SQRELEASEHOOK hook) -{ - v->_releasehook = hook; -} - -SQRELEASEHOOK sq_getvmreleasehook(HSQUIRRELVM v) -{ - return v->_releasehook; -} - -void sq_setsharedreleasehook(HSQUIRRELVM v,SQRELEASEHOOK hook) -{ - _ss(v)->_releasehook = hook; -} - -SQRELEASEHOOK sq_getsharedreleasehook(HSQUIRRELVM v) -{ - return _ss(v)->_releasehook; -} - -void sq_push(HSQUIRRELVM v,SQInteger idx) -{ - v->Push(stack_get(v, idx)); -} - -SQObjectType sq_gettype(HSQUIRRELVM v,SQInteger idx) -{ - return sq_type(stack_get(v, idx)); -} - -SQRESULT sq_typeof(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &o = stack_get(v, idx); - SQObjectPtr res; - if(!v->TypeOf(o,res)) { - return SQ_ERROR; - } - v->Push(res); - return SQ_OK; -} - -SQRESULT sq_tostring(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &o = stack_get(v, idx); - SQObjectPtr res; - if(!v->ToString(o,res)) { - return SQ_ERROR; - } - v->Push(res); - return SQ_OK; -} - -void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool *b) -{ - SQObjectPtr &o = stack_get(v, idx); - *b = SQVM::IsFalse(o)?SQFalse:SQTrue; -} - -SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i) -{ - SQObjectPtr &o = stack_get(v, idx); - if(sq_isnumeric(o)) { - *i = tointeger(o); - return SQ_OK; - } - if(sq_isbool(o)) { - *i = SQVM::IsFalse(o)?SQFalse:SQTrue; - return SQ_OK; - } - return SQ_ERROR; -} - -SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f) -{ - SQObjectPtr &o = stack_get(v, idx); - if(sq_isnumeric(o)) { - *f = tofloat(o); - return SQ_OK; - } - return SQ_ERROR; -} - -SQRESULT sq_getbool(HSQUIRRELVM v,SQInteger idx,SQBool *b) -{ - SQObjectPtr &o = stack_get(v, idx); - if(sq_isbool(o)) { - *b = _integer(o); - return SQ_OK; - } - return SQ_ERROR; -} - -SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const SQChar **c,SQInteger *size) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_STRING,o); - *c = _stringval(*o); - *size = _string(*o)->_len; - return SQ_OK; -} - -SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_STRING,o); - *c = _stringval(*o); - return SQ_OK; -} - -SQRESULT sq_getthread(HSQUIRRELVM v,SQInteger idx,HSQUIRRELVM *thread) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_THREAD,o); - *thread = _thread(*o); - return SQ_OK; -} - -SQRESULT sq_clone(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &o = stack_get(v,idx); - v->PushNull(); - if(!v->Clone(o, stack_get(v, -1))){ - v->Pop(); - return SQ_ERROR; - } - return SQ_OK; -} - -SQInteger sq_getsize(HSQUIRRELVM v, SQInteger idx) -{ - SQObjectPtr &o = stack_get(v, idx); - SQObjectType type = sq_type(o); - switch(type) { - case OT_STRING: return _string(o)->_len; - case OT_TABLE: return _table(o)->CountUsed(); - case OT_ARRAY: return _array(o)->Size(); - case OT_USERDATA: return _userdata(o)->_size; - case OT_INSTANCE: return _instance(o)->_class->_udsize; - case OT_CLASS: return _class(o)->_udsize; - default: - return sq_aux_invalidtype(v, type); - } -} - -SQHash sq_gethash(HSQUIRRELVM v, SQInteger idx) -{ - SQObjectPtr &o = stack_get(v, idx); - return HashObj(o); -} - -SQRESULT sq_getuserdata(HSQUIRRELVM v,SQInteger idx,SQUserPointer *p,SQUserPointer *typetag) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_USERDATA,o); - (*p) = _userdataval(*o); - if(typetag) *typetag = _userdata(*o)->_typetag; - return SQ_OK; -} - -SQRESULT sq_settypetag(HSQUIRRELVM v,SQInteger idx,SQUserPointer typetag) -{ - SQObjectPtr &o = stack_get(v,idx); - switch(sq_type(o)) { - case OT_USERDATA: _userdata(o)->_typetag = typetag; break; - case OT_CLASS: _class(o)->_typetag = typetag; break; - default: return sq_throwerror(v,_SC("invalid object type")); - } - return SQ_OK; -} - -SQRESULT sq_getobjtypetag(const HSQOBJECT *o,SQUserPointer * typetag) -{ - switch(sq_type(*o)) { - case OT_INSTANCE: *typetag = _instance(*o)->_class->_typetag; break; - case OT_USERDATA: *typetag = _userdata(*o)->_typetag; break; - case OT_CLASS: *typetag = _class(*o)->_typetag; break; - default: return SQ_ERROR; - } - return SQ_OK; -} - -SQRESULT sq_gettypetag(HSQUIRRELVM v,SQInteger idx,SQUserPointer *typetag) -{ - SQObjectPtr &o = stack_get(v,idx); - if (SQ_FAILED(sq_getobjtypetag(&o, typetag))) - return SQ_ERROR;// this is not an error it should be a bool but would break backward compatibility - return SQ_OK; -} - -SQRESULT sq_getuserpointer(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_USERPOINTER,o); - (*p) = _userpointer(*o); - return SQ_OK; -} - -SQRESULT sq_setinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer p) -{ - SQObjectPtr &o = stack_get(v,idx); - if(sq_type(o) != OT_INSTANCE) return sq_throwerror(v,_SC("the object is not a class instance")); - _instance(o)->_userpointer = p; - return SQ_OK; -} - -SQRESULT sq_setclassudsize(HSQUIRRELVM v, SQInteger idx, SQInteger udsize) -{ - SQObjectPtr &o = stack_get(v,idx); - if(sq_type(o) != OT_CLASS) return sq_throwerror(v,_SC("the object is not a class")); - if(_class(o)->_locked) return sq_throwerror(v,_SC("the class is locked")); - _class(o)->_udsize = udsize; - return SQ_OK; -} - - -SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p, SQUserPointer typetag, SQBool throwerror) -{ - SQObjectPtr &o = stack_get(v, idx); - if (sq_type(o) != OT_INSTANCE) return throwerror ? sq_throwerror(v, _SC("the object is not a class instance")) : SQ_ERROR; - (*p) = _instance(o)->_userpointer; - if (typetag != 0) { - SQClass *cl = _instance(o)->_class; - do { - if (cl->_typetag == typetag) - return SQ_OK; - cl = cl->_base; - } while (cl != NULL); - return throwerror ? sq_throwerror(v, _SC("invalid type tag")) : SQ_ERROR; - } - return SQ_OK; -} - -SQInteger sq_gettop(HSQUIRRELVM v) -{ - return (v->_top) - v->_stackbase; -} - -void sq_settop(HSQUIRRELVM v, SQInteger newtop) -{ - SQInteger top = sq_gettop(v); - if(top > newtop) - sq_pop(v, top - newtop); - else - while(top++ < newtop) sq_pushnull(v); -} - -void sq_pop(HSQUIRRELVM v, SQInteger nelemstopop) -{ - assert(v->_top >= nelemstopop); - v->Pop(nelemstopop); -} - -void sq_poptop(HSQUIRRELVM v) -{ - assert(v->_top >= 1); - v->Pop(); -} - - -void sq_remove(HSQUIRRELVM v, SQInteger idx) -{ - v->Remove(idx); -} - -SQInteger sq_cmp(HSQUIRRELVM v) -{ - SQInteger res; - v->ObjCmp(stack_get(v, -1), stack_get(v, -2),res); - return res; -} - -SQRESULT sq_newslot(HSQUIRRELVM v, SQInteger idx, SQBool bstatic) -{ - sq_aux_paramscheck(v, 3); - SQObjectPtr &self = stack_get(v, idx); - if(sq_type(self) == OT_TABLE || sq_type(self) == OT_CLASS) { - SQObjectPtr &key = v->GetUp(-2); - if(sq_type(key) == OT_NULL) return sq_throwerror(v, _SC("null is not a valid key")); - v->NewSlot(self, key, v->GetUp(-1),bstatic?true:false); - v->Pop(2); - } - return SQ_OK; -} - -SQRESULT sq_deleteslot(HSQUIRRELVM v,SQInteger idx,SQBool pushval) -{ - sq_aux_paramscheck(v, 2); - SQObjectPtr *self; - _GETSAFE_OBJ(v, idx, OT_TABLE,self); - SQObjectPtr &key = v->GetUp(-1); - if(sq_type(key) == OT_NULL) return sq_throwerror(v, _SC("null is not a valid key")); - SQObjectPtr res; - if(!v->DeleteSlot(*self, key, res)){ - v->Pop(); - return SQ_ERROR; - } - if(pushval) v->GetUp(-1) = res; - else v->Pop(); - return SQ_OK; -} - -SQRESULT sq_set(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &self = stack_get(v, idx); - if(v->Set(self, v->GetUp(-2), v->GetUp(-1),DONT_FALL_BACK)) { - v->Pop(2); - return SQ_OK; - } - return SQ_ERROR; -} - -SQRESULT sq_rawset(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &self = stack_get(v, idx); - SQObjectPtr &key = v->GetUp(-2); - if(sq_type(key) == OT_NULL) { - v->Pop(2); - return sq_throwerror(v, _SC("null key")); - } - switch(sq_type(self)) { - case OT_TABLE: - _table(self)->NewSlot(key, v->GetUp(-1)); - v->Pop(2); - return SQ_OK; - break; - case OT_CLASS: - _class(self)->NewSlot(_ss(v), key, v->GetUp(-1),false); - v->Pop(2); - return SQ_OK; - break; - case OT_INSTANCE: - if(_instance(self)->Set(key, v->GetUp(-1))) { - v->Pop(2); - return SQ_OK; - } - break; - case OT_ARRAY: - if(v->Set(self, key, v->GetUp(-1),false)) { - v->Pop(2); - return SQ_OK; - } - break; - default: - v->Pop(2); - return sq_throwerror(v, _SC("rawset works only on array/table/class and instance")); - } - v->Raise_IdxError(v->GetUp(-2));return SQ_ERROR; -} - -SQRESULT sq_newmember(HSQUIRRELVM v,SQInteger idx,SQBool bstatic) -{ - SQObjectPtr &self = stack_get(v, idx); - if(sq_type(self) != OT_CLASS) return sq_throwerror(v, _SC("new member only works with classes")); - SQObjectPtr &key = v->GetUp(-3); - if(sq_type(key) == OT_NULL) return sq_throwerror(v, _SC("null key")); - if(!v->NewSlotA(self,key,v->GetUp(-2),v->GetUp(-1),bstatic?true:false,false)) { - v->Pop(3); - return SQ_ERROR; - } - v->Pop(3); - return SQ_OK; -} - -SQRESULT sq_rawnewmember(HSQUIRRELVM v,SQInteger idx,SQBool bstatic) -{ - SQObjectPtr &self = stack_get(v, idx); - if(sq_type(self) != OT_CLASS) return sq_throwerror(v, _SC("new member only works with classes")); - SQObjectPtr &key = v->GetUp(-3); - if(sq_type(key) == OT_NULL) return sq_throwerror(v, _SC("null key")); - if(!v->NewSlotA(self,key,v->GetUp(-2),v->GetUp(-1),bstatic?true:false,true)) { - v->Pop(3); - return SQ_ERROR; - } - v->Pop(3); - return SQ_OK; -} - -SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &self = stack_get(v, idx); - SQObjectPtr &mt = v->GetUp(-1); - SQObjectType type = sq_type(self); - switch(type) { - case OT_TABLE: - if(sq_type(mt) == OT_TABLE) { - if(!_table(self)->SetDelegate(_table(mt))) { - return sq_throwerror(v, _SC("delegate cycle")); - } - v->Pop(); - } - else if(sq_type(mt)==OT_NULL) { - _table(self)->SetDelegate(NULL); v->Pop(); } - else return sq_aux_invalidtype(v,type); - break; - case OT_USERDATA: - if(sq_type(mt)==OT_TABLE) { - _userdata(self)->SetDelegate(_table(mt)); v->Pop(); } - else if(sq_type(mt)==OT_NULL) { - _userdata(self)->SetDelegate(NULL); v->Pop(); } - else return sq_aux_invalidtype(v, type); - break; - default: - return sq_aux_invalidtype(v, type); - break; - } - return SQ_OK; -} - -SQRESULT sq_rawdeleteslot(HSQUIRRELVM v,SQInteger idx,SQBool pushval) -{ - sq_aux_paramscheck(v, 2); - SQObjectPtr *self; - _GETSAFE_OBJ(v, idx, OT_TABLE,self); - SQObjectPtr &key = v->GetUp(-1); - SQObjectPtr t; - if(_table(*self)->Get(key,t)) { - _table(*self)->Remove(key); - } - if(pushval != 0) - v->GetUp(-1) = t; - else - v->Pop(); - return SQ_OK; -} - -SQRESULT sq_getdelegate(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &self=stack_get(v,idx); - switch(sq_type(self)){ - case OT_TABLE: - case OT_USERDATA: - if(!_delegable(self)->_delegate){ - v->PushNull(); - break; - } - v->Push(SQObjectPtr(_delegable(self)->_delegate)); - break; - default: return sq_throwerror(v,_SC("wrong type")); break; - } - return SQ_OK; - -} - -SQRESULT sq_get(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &self=stack_get(v,idx); - SQObjectPtr &obj = v->GetUp(-1); - if(v->Get(self,obj,obj,false,DONT_FALL_BACK)) - return SQ_OK; - v->Pop(); - return SQ_ERROR; -} - -SQRESULT sq_rawget(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &self=stack_get(v,idx); - SQObjectPtr &obj = v->GetUp(-1); - switch(sq_type(self)) { - case OT_TABLE: - if(_table(self)->Get(obj,obj)) - return SQ_OK; - break; - case OT_CLASS: - if(_class(self)->Get(obj,obj)) - return SQ_OK; - break; - case OT_INSTANCE: - if(_instance(self)->Get(obj,obj)) - return SQ_OK; - break; - case OT_ARRAY:{ - if(sq_isnumeric(obj)){ - if(_array(self)->Get(tointeger(obj),obj)) { - return SQ_OK; - } - } - else { - v->Pop(); - return sq_throwerror(v,_SC("invalid index type for an array")); - } - } - break; - default: - v->Pop(); - return sq_throwerror(v,_SC("rawget works only on array/table/instance and class")); - } - v->Pop(); - return sq_throwerror(v,_SC("the index doesn't exist")); -} - -SQRESULT sq_getstackobj(HSQUIRRELVM v,SQInteger idx,HSQOBJECT *po) -{ - *po=stack_get(v,idx); - return SQ_OK; -} - -const SQChar *sq_getlocal(HSQUIRRELVM v,SQUnsignedInteger level,SQUnsignedInteger idx) -{ - SQUnsignedInteger cstksize=v->_callsstacksize; - SQUnsignedInteger lvl=(cstksize-level)-1; - SQInteger stackbase=v->_stackbase; - if(lvl_callsstack[(cstksize-i)-1]; - stackbase-=ci._prevstkbase; - } - SQVM::CallInfo &ci=v->_callsstack[lvl]; - if(sq_type(ci._closure)!=OT_CLOSURE) - return NULL; - SQClosure *c=_closure(ci._closure); - SQFunctionProto *func=c->_function; - if(func->_noutervalues > (SQInteger)idx) { - v->Push(*_outer(c->_outervalues[idx])->_valptr); - return _stringval(func->_outervalues[idx]._name); - } - idx -= func->_noutervalues; - return func->GetLocal(v,stackbase,idx,(SQInteger)(ci._ip-func->_instructions)-1); - } - return NULL; -} - -void sq_pushobject(HSQUIRRELVM v,HSQOBJECT obj) -{ - v->Push(SQObjectPtr(obj)); -} - -void sq_resetobject(HSQOBJECT *po) -{ - po->_unVal.pUserPointer=NULL;po->_type=OT_NULL; -} - -SQRESULT sq_throwerror(HSQUIRRELVM v,const SQChar *err) -{ - v->_lasterror=SQString::Create(_ss(v),err); - return SQ_ERROR; -} - -SQRESULT sq_throwobject(HSQUIRRELVM v) -{ - v->_lasterror = v->GetUp(-1); - v->Pop(); - return SQ_ERROR; -} - - -void sq_reseterror(HSQUIRRELVM v) -{ - v->_lasterror.Null(); -} - -void sq_getlasterror(HSQUIRRELVM v) -{ - v->Push(v->_lasterror); -} - -SQRESULT sq_reservestack(HSQUIRRELVM v,SQInteger nsize) -{ - if (((SQUnsignedInteger)v->_top + nsize) > v->_stack.size()) { - if(v->_nmetamethodscall) { - return sq_throwerror(v,_SC("cannot resize stack while in a metamethod")); - } - v->_stack.resize(v->_stack.size() + ((v->_top + nsize) - v->_stack.size())); - } - return SQ_OK; -} - -SQRESULT sq_resume(HSQUIRRELVM v,SQBool retval,SQBool raiseerror) -{ - if (sq_type(v->GetUp(-1)) == OT_GENERATOR) - { - v->PushNull(); //retval - if (!v->Execute(v->GetUp(-2), 0, v->_top, v->GetUp(-1), raiseerror, SQVM::ET_RESUME_GENERATOR)) - {v->Raise_Error(v->_lasterror); return SQ_ERROR;} - if(!retval) - v->Pop(); - return SQ_OK; - } - return sq_throwerror(v,_SC("only generators can be resumed")); -} - -SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror) -{ - SQObjectPtr res; - if(!v->Call(v->GetUp(-(params+1)),params,v->_top-params,res,raiseerror?true:false)){ - v->Pop(params); //pop args - return SQ_ERROR; - } - if(!v->_suspended) - v->Pop(params); //pop args - if(retval) - v->Push(res); // push result - return SQ_OK; -} - -SQRESULT sq_tailcall(HSQUIRRELVM v, SQInteger nparams) -{ - SQObjectPtr &res = v->GetUp(-(nparams + 1)); - if (sq_type(res) != OT_CLOSURE) { - return sq_throwerror(v, _SC("only closure can be tail called")); - } - SQClosure *clo = _closure(res); - if (clo->_function->_bgenerator) - { - return sq_throwerror(v, _SC("generators cannot be tail called")); - } - - SQInteger stackbase = (v->_top - nparams) - v->_stackbase; - if (!v->TailCall(clo, stackbase, nparams)) { - return SQ_ERROR; - } - return SQ_TAILCALL_FLAG; -} - -SQRESULT sq_suspendvm(HSQUIRRELVM v) -{ - return v->Suspend(); -} - -SQRESULT sq_wakeupvm(HSQUIRRELVM v,SQBool wakeupret,SQBool retval,SQBool raiseerror,SQBool throwerror) -{ - SQObjectPtr ret; - if(!v->_suspended) - return sq_throwerror(v,_SC("cannot resume a vm that is not running any code")); - SQInteger target = v->_suspended_target; - if(wakeupret) { - if(target != -1) { - v->GetAt(v->_stackbase+v->_suspended_target)=v->GetUp(-1); //retval - } - v->Pop(); - } else if(target != -1) { v->GetAt(v->_stackbase+v->_suspended_target).Null(); } - SQObjectPtr dummy; - if(!v->Execute(dummy,-1,-1,ret,raiseerror,throwerror?SQVM::ET_RESUME_THROW_VM : SQVM::ET_RESUME_VM)) { - return SQ_ERROR; - } - if(retval) - v->Push(ret); - return SQ_OK; -} - -void sq_setreleasehook(HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook) -{ - SQObjectPtr &ud=stack_get(v,idx); - switch(sq_type(ud) ) { - case OT_USERDATA: _userdata(ud)->_hook = hook; break; - case OT_INSTANCE: _instance(ud)->_hook = hook; break; - case OT_CLASS: _class(ud)->_hook = hook; break; - default: return; - } -} - -SQRELEASEHOOK sq_getreleasehook(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &ud=stack_get(v,idx); - switch(sq_type(ud) ) { - case OT_USERDATA: return _userdata(ud)->_hook; break; - case OT_INSTANCE: return _instance(ud)->_hook; break; - case OT_CLASS: return _class(ud)->_hook; break; - default: return NULL; - } -} - -void sq_setcompilererrorhandler(HSQUIRRELVM v,SQCOMPILERERROR f) -{ - _ss(v)->_compilererrorhandler = f; -} - -SQRESULT sq_writeclosure(HSQUIRRELVM v,SQWRITEFUNC w,SQUserPointer up) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, -1, OT_CLOSURE,o); - unsigned short tag = SQ_BYTECODE_STREAM_TAG; - if(_closure(*o)->_function->_noutervalues) - return sq_throwerror(v,_SC("a closure with free variables bound cannot be serialized")); - if(w(up,&tag,2) != 2) - return sq_throwerror(v,_SC("io error")); - if(!_closure(*o)->Save(v,up,w)) - return SQ_ERROR; - return SQ_OK; -} - -SQRESULT sq_readclosure(HSQUIRRELVM v,SQREADFUNC r,SQUserPointer up) -{ - SQObjectPtr closure; - - unsigned short tag; - if(r(up,&tag,2) != 2) - return sq_throwerror(v,_SC("io error")); - if(tag != SQ_BYTECODE_STREAM_TAG) - return sq_throwerror(v,_SC("invalid stream")); - if(!SQClosure::Load(v,up,r,closure)) - return SQ_ERROR; - v->Push(closure); - return SQ_OK; -} - -SQChar *sq_getscratchpad(HSQUIRRELVM v,SQInteger minsize) -{ - return _ss(v)->GetScratchPad(minsize); -} - -SQRESULT sq_resurrectunreachable(HSQUIRRELVM v) -{ -#ifndef NO_GARBAGE_COLLECTOR - _ss(v)->ResurrectUnreachable(v); - return SQ_OK; -#else - return sq_throwerror(v,_SC("sq_resurrectunreachable requires a garbage collector build")); -#endif -} - -SQInteger sq_collectgarbage(HSQUIRRELVM v) -{ -#ifndef NO_GARBAGE_COLLECTOR - return _ss(v)->CollectGarbage(v); -#else - return -1; -#endif -} - -SQRESULT sq_getcallee(HSQUIRRELVM v) -{ - if(v->_callsstacksize > 1) - { - v->Push(v->_callsstack[v->_callsstacksize - 2]._closure); - return SQ_OK; - } - return sq_throwerror(v,_SC("no closure in the calls stack")); -} - -const SQChar *sq_getfreevariable(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval) -{ - SQObjectPtr &self=stack_get(v,idx); - const SQChar *name = NULL; - switch(sq_type(self)) - { - case OT_CLOSURE:{ - SQClosure *clo = _closure(self); - SQFunctionProto *fp = clo->_function; - if(((SQUnsignedInteger)fp->_noutervalues) > nval) { - v->Push(*(_outer(clo->_outervalues[nval])->_valptr)); - SQOuterVar &ov = fp->_outervalues[nval]; - name = _stringval(ov._name); - } - } - break; - case OT_NATIVECLOSURE:{ - SQNativeClosure *clo = _nativeclosure(self); - if(clo->_noutervalues > nval) { - v->Push(clo->_outervalues[nval]); - name = _SC("@NATIVE"); - } - } - break; - default: break; //shutup compiler - } - return name; -} - -SQRESULT sq_setfreevariable(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval) -{ - SQObjectPtr &self=stack_get(v,idx); - switch(sq_type(self)) - { - case OT_CLOSURE:{ - SQFunctionProto *fp = _closure(self)->_function; - if(((SQUnsignedInteger)fp->_noutervalues) > nval){ - *(_outer(_closure(self)->_outervalues[nval])->_valptr) = stack_get(v,-1); - } - else return sq_throwerror(v,_SC("invalid free var index")); - } - break; - case OT_NATIVECLOSURE: - if(_nativeclosure(self)->_noutervalues > nval){ - _nativeclosure(self)->_outervalues[nval] = stack_get(v,-1); - } - else return sq_throwerror(v,_SC("invalid free var index")); - break; - default: - return sq_aux_invalidtype(v, sq_type(self)); - } - v->Pop(); - return SQ_OK; -} - -SQRESULT sq_setattributes(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_CLASS,o); - SQObjectPtr &key = stack_get(v,-2); - SQObjectPtr &val = stack_get(v,-1); - SQObjectPtr attrs; - if(sq_type(key) == OT_NULL) { - attrs = _class(*o)->_attributes; - _class(*o)->_attributes = val; - v->Pop(2); - v->Push(attrs); - return SQ_OK; - }else if(_class(*o)->GetAttributes(key,attrs)) { - _class(*o)->SetAttributes(key,val); - v->Pop(2); - v->Push(attrs); - return SQ_OK; - } - return sq_throwerror(v,_SC("wrong index")); -} - -SQRESULT sq_getattributes(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_CLASS,o); - SQObjectPtr &key = stack_get(v,-1); - SQObjectPtr attrs; - if(sq_type(key) == OT_NULL) { - attrs = _class(*o)->_attributes; - v->Pop(); - v->Push(attrs); - return SQ_OK; - } - else if(_class(*o)->GetAttributes(key,attrs)) { - v->Pop(); - v->Push(attrs); - return SQ_OK; - } - return sq_throwerror(v,_SC("wrong index")); -} - -SQRESULT sq_getmemberhandle(HSQUIRRELVM v,SQInteger idx,HSQMEMBERHANDLE *handle) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_CLASS,o); - SQObjectPtr &key = stack_get(v,-1); - SQTable *m = _class(*o)->_members; - SQObjectPtr val; - if(m->Get(key,val)) { - handle->_static = _isfield(val) ? SQFalse : SQTrue; - handle->_index = _member_idx(val); - v->Pop(); - return SQ_OK; - } - return sq_throwerror(v,_SC("wrong index")); -} - -SQRESULT _getmemberbyhandle(HSQUIRRELVM v,SQObjectPtr &self,const HSQMEMBERHANDLE *handle,SQObjectPtr *&val) -{ - switch(sq_type(self)) { - case OT_INSTANCE: { - SQInstance *i = _instance(self); - if(handle->_static) { - SQClass *c = i->_class; - val = &c->_methods[handle->_index].val; - } - else { - val = &i->_values[handle->_index]; - - } - } - break; - case OT_CLASS: { - SQClass *c = _class(self); - if(handle->_static) { - val = &c->_methods[handle->_index].val; - } - else { - val = &c->_defaultvalues[handle->_index].val; - } - } - break; - default: - return sq_throwerror(v,_SC("wrong type(expected class or instance)")); - } - return SQ_OK; -} - -SQRESULT sq_getbyhandle(HSQUIRRELVM v,SQInteger idx,const HSQMEMBERHANDLE *handle) -{ - SQObjectPtr &self = stack_get(v,idx); - SQObjectPtr *val = NULL; - if(SQ_FAILED(_getmemberbyhandle(v,self,handle,val))) { - return SQ_ERROR; - } - v->Push(_realval(*val)); - return SQ_OK; -} - -SQRESULT sq_setbyhandle(HSQUIRRELVM v,SQInteger idx,const HSQMEMBERHANDLE *handle) -{ - SQObjectPtr &self = stack_get(v,idx); - SQObjectPtr &newval = stack_get(v,-1); - SQObjectPtr *val = NULL; - if(SQ_FAILED(_getmemberbyhandle(v,self,handle,val))) { - return SQ_ERROR; - } - *val = newval; - v->Pop(); - return SQ_OK; -} - -SQRESULT sq_getbase(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_CLASS,o); - if(_class(*o)->_base) - v->Push(SQObjectPtr(_class(*o)->_base)); - else - v->PushNull(); - return SQ_OK; -} - -SQRESULT sq_getclass(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_INSTANCE,o); - v->Push(SQObjectPtr(_instance(*o)->_class)); - return SQ_OK; -} - -SQRESULT sq_createinstance(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr *o = NULL; - _GETSAFE_OBJ(v, idx, OT_CLASS,o); - v->Push(_class(*o)->CreateInstance()); - return SQ_OK; -} - -void sq_weakref(HSQUIRRELVM v,SQInteger idx) -{ - SQObject &o=stack_get(v,idx); - if(ISREFCOUNTED(sq_type(o))) { - v->Push(_refcounted(o)->GetWeakRef(sq_type(o))); - return; - } - v->Push(o); -} - -SQRESULT sq_getweakrefval(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr &o = stack_get(v,idx); - if(sq_type(o) != OT_WEAKREF) { - return sq_throwerror(v,_SC("the object must be a weakref")); - } - v->Push(_weakref(o)->_obj); - return SQ_OK; -} - -SQRESULT sq_getdefaultdelegate(HSQUIRRELVM v,SQObjectType t) -{ - SQSharedState *ss = _ss(v); - switch(t) { - case OT_TABLE: v->Push(ss->_table_default_delegate); break; - case OT_ARRAY: v->Push(ss->_array_default_delegate); break; - case OT_STRING: v->Push(ss->_string_default_delegate); break; - case OT_INTEGER: case OT_FLOAT: v->Push(ss->_number_default_delegate); break; - case OT_GENERATOR: v->Push(ss->_generator_default_delegate); break; - case OT_CLOSURE: case OT_NATIVECLOSURE: v->Push(ss->_closure_default_delegate); break; - case OT_THREAD: v->Push(ss->_thread_default_delegate); break; - case OT_CLASS: v->Push(ss->_class_default_delegate); break; - case OT_INSTANCE: v->Push(ss->_instance_default_delegate); break; - case OT_WEAKREF: v->Push(ss->_weakref_default_delegate); break; - default: return sq_throwerror(v,_SC("the type doesn't have a default delegate")); - } - return SQ_OK; -} - -SQRESULT sq_next(HSQUIRRELVM v,SQInteger idx) -{ - SQObjectPtr o=stack_get(v,idx),&refpos = stack_get(v,-1),realkey,val; - if(sq_type(o) == OT_GENERATOR) { - return sq_throwerror(v,_SC("cannot iterate a generator")); - } - int faketojump; - if(!v->FOREACH_OP(o,realkey,val,refpos,0,666,faketojump)) - return SQ_ERROR; - if(faketojump != 666) { - v->Push(realkey); - v->Push(val); - return SQ_OK; - } - return SQ_ERROR; -} - -struct BufState{ - const SQChar *buf; - SQInteger ptr; - SQInteger size; -}; - -SQInteger buf_lexfeed(SQUserPointer file) -{ - BufState *buf=(BufState*)file; - if(buf->size<(buf->ptr+1)) - return 0; - return buf->buf[buf->ptr++]; -} - -SQRESULT sq_compilebuffer(HSQUIRRELVM v,const SQChar *s,SQInteger size,const SQChar *sourcename,SQBool raiseerror) { - BufState buf; - buf.buf = s; - buf.size = size; - buf.ptr = 0; - return sq_compile(v, buf_lexfeed, &buf, sourcename, raiseerror); -} - -void sq_move(HSQUIRRELVM dest,HSQUIRRELVM src,SQInteger idx) -{ - dest->Push(stack_get(src,idx)); -} - -void sq_setprintfunc(HSQUIRRELVM v, SQPRINTFUNCTION printfunc,SQPRINTFUNCTION errfunc) -{ - _ss(v)->_printfunc = printfunc; - _ss(v)->_errorfunc = errfunc; -} - -SQPRINTFUNCTION sq_getprintfunc(HSQUIRRELVM v) -{ - return _ss(v)->_printfunc; -} - -SQPRINTFUNCTION sq_geterrorfunc(HSQUIRRELVM v) -{ - return _ss(v)->_errorfunc; -} - -void *sq_malloc(SQUnsignedInteger size) -{ - return SQ_MALLOC(size); -} - -void *sq_realloc(void* p,SQUnsignedInteger oldsize,SQUnsignedInteger newsize) -{ - return SQ_REALLOC(p,oldsize,newsize); -} - -void sq_free(void *p,SQUnsignedInteger size) -{ - SQ_FREE(p,size); -} diff --git a/m_packages/squirrel/squirrel/sqarray.h b/m_packages/squirrel/squirrel/sqarray.h deleted file mode 100644 index 7c6c2049..00000000 --- a/m_packages/squirrel/squirrel/sqarray.h +++ /dev/null @@ -1,94 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQARRAY_H_ -#define _SQARRAY_H_ - -struct SQArray : public CHAINABLE_OBJ -{ -private: - SQArray(SQSharedState *ss,SQInteger nsize){_values.resize(nsize); INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this);} - ~SQArray() - { - REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this); - } -public: - static SQArray* Create(SQSharedState *ss,SQInteger nInitialSize){ - SQArray *newarray=(SQArray*)SQ_MALLOC(sizeof(SQArray)); - new (newarray) SQArray(ss,nInitialSize); - return newarray; - } -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - SQObjectType GetType() {return OT_ARRAY;} -#endif - void Finalize(){ - _values.resize(0); - } - bool Get(const SQInteger nidx,SQObjectPtr &val) - { - if(nidx>=0 && nidx<(SQInteger)_values.size()){ - SQObjectPtr &o = _values[nidx]; - val = _realval(o); - return true; - } - else return false; - } - bool Set(const SQInteger nidx,const SQObjectPtr &val) - { - if(nidx>=0 && nidx<(SQInteger)_values.size()){ - _values[nidx]=val; - return true; - } - else return false; - } - SQInteger Next(const SQObjectPtr &refpos,SQObjectPtr &outkey,SQObjectPtr &outval) - { - SQUnsignedInteger idx=TranslateIndex(refpos); - while(idx<_values.size()){ - //first found - outkey=(SQInteger)idx; - SQObjectPtr &o = _values[idx]; - outval = _realval(o); - //return idx for the next iteration - return ++idx; - } - //nothing to iterate anymore - return -1; - } - SQArray *Clone(){SQArray *anew=Create(_opt_ss(this),0); anew->_values.copy(_values); return anew; } - SQInteger Size() const {return _values.size();} - void Resize(SQInteger size) - { - SQObjectPtr _null; - Resize(size,_null); - } - void Resize(SQInteger size,SQObjectPtr &fill) { _values.resize(size,fill); ShrinkIfNeeded(); } - void Reserve(SQInteger size) { _values.reserve(size); } - void Append(const SQObject &o){_values.push_back(o);} - void Extend(const SQArray *a); - SQObjectPtr &Top(){return _values.top();} - void Pop(){_values.pop_back(); ShrinkIfNeeded(); } - bool Insert(SQInteger idx,const SQObject &val){ - if(idx < 0 || idx > (SQInteger)_values.size()) - return false; - _values.insert(idx,val); - return true; - } - void ShrinkIfNeeded() { - if(_values.size() <= _values.capacity()>>2) //shrink the array - _values.shrinktofit(); - } - bool Remove(SQInteger idx){ - if(idx < 0 || idx >= (SQInteger)_values.size()) - return false; - _values.remove(idx); - ShrinkIfNeeded(); - return true; - } - void Release() - { - sq_delete(this,SQArray); - } - - SQObjectPtrVec _values; -}; -#endif //_SQARRAY_H_ diff --git a/m_packages/squirrel/squirrel/sqbaselib.cpp b/m_packages/squirrel/squirrel/sqbaselib.cpp deleted file mode 100644 index 5055f18a..00000000 --- a/m_packages/squirrel/squirrel/sqbaselib.cpp +++ /dev/null @@ -1,1404 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include "sqvm.h" -#include "sqstring.h" -#include "sqtable.h" -#include "sqarray.h" -#include "sqfuncproto.h" -#include "sqclosure.h" -#include "sqclass.h" -#include -#include -#include - -static bool str2num(const SQChar *s,SQObjectPtr &res,SQInteger base) -{ - SQChar *end; - const SQChar *e = s; - bool iseintbase = base > 13; //to fix error converting hexadecimals with e like 56f0791e - bool isfloat = false; - SQChar c; - while((c = *e) != _SC('\0')) - { - if (c == _SC('.') || (!iseintbase && (c == _SC('E') || c == _SC('e')))) { //e and E is for scientific notation - isfloat = true; - break; - } - e++; - } - if(isfloat){ - SQFloat r = SQFloat(scstrtod(s,&end)); - if(s == end) return false; - res = r; - } - else{ - SQInteger r = SQInteger(scstrtol(s,&end,(int)base)); - if(s == end) return false; - res = r; - } - return true; -} - -static SQInteger base_dummy(HSQUIRRELVM SQ_UNUSED_ARG(v)) -{ - return 0; -} - -#ifndef NO_GARBAGE_COLLECTOR -static SQInteger base_collectgarbage(HSQUIRRELVM v) -{ - sq_pushinteger(v, sq_collectgarbage(v)); - return 1; -} -static SQInteger base_resurectureachable(HSQUIRRELVM v) -{ - sq_resurrectunreachable(v); - return 1; -} -#endif - -static SQInteger base_getroottable(HSQUIRRELVM v) -{ - v->Push(v->_roottable); - return 1; -} - -static SQInteger base_getconsttable(HSQUIRRELVM v) -{ - v->Push(_ss(v)->_consts); - return 1; -} - - -static SQInteger base_setroottable(HSQUIRRELVM v) -{ - SQObjectPtr o = v->_roottable; - if(SQ_FAILED(sq_setroottable(v))) return SQ_ERROR; - v->Push(o); - return 1; -} - -static SQInteger base_setconsttable(HSQUIRRELVM v) -{ - SQObjectPtr o = _ss(v)->_consts; - if(SQ_FAILED(sq_setconsttable(v))) return SQ_ERROR; - v->Push(o); - return 1; -} - -static SQInteger base_seterrorhandler(HSQUIRRELVM v) -{ - sq_seterrorhandler(v); - return 0; -} - -static SQInteger base_setdebughook(HSQUIRRELVM v) -{ - sq_setdebughook(v); - return 0; -} - -static SQInteger base_enabledebuginfo(HSQUIRRELVM v) -{ - SQObjectPtr &o=stack_get(v,2); - - sq_enabledebuginfo(v,SQVM::IsFalse(o)?SQFalse:SQTrue); - return 0; -} - -static SQInteger __getcallstackinfos(HSQUIRRELVM v,SQInteger level) -{ - SQStackInfos si; - SQInteger seq = 0; - const SQChar *name = NULL; - - if (SQ_SUCCEEDED(sq_stackinfos(v, level, &si))) - { - const SQChar *fn = _SC("unknown"); - const SQChar *src = _SC("unknown"); - if(si.funcname)fn = si.funcname; - if(si.source)src = si.source; - sq_newtable(v); - sq_pushstring(v, _SC("func"), -1); - sq_pushstring(v, fn, -1); - sq_newslot(v, -3, SQFalse); - sq_pushstring(v, _SC("src"), -1); - sq_pushstring(v, src, -1); - sq_newslot(v, -3, SQFalse); - sq_pushstring(v, _SC("line"), -1); - sq_pushinteger(v, si.line); - sq_newslot(v, -3, SQFalse); - sq_pushstring(v, _SC("locals"), -1); - sq_newtable(v); - seq=0; - while ((name = sq_getlocal(v, level, seq))) { - sq_pushstring(v, name, -1); - sq_push(v, -2); - sq_newslot(v, -4, SQFalse); - sq_pop(v, 1); - seq++; - } - sq_newslot(v, -3, SQFalse); - return 1; - } - - return 0; -} -static SQInteger base_getstackinfos(HSQUIRRELVM v) -{ - SQInteger level; - sq_getinteger(v, -1, &level); - return __getcallstackinfos(v,level); -} - -static SQInteger base_assert(HSQUIRRELVM v) -{ - if(SQVM::IsFalse(stack_get(v,2))){ - SQInteger top = sq_gettop(v); - if (top>2 && SQ_SUCCEEDED(sq_tostring(v,3))) { - const SQChar *str = 0; - if (SQ_SUCCEEDED(sq_getstring(v,-1,&str))) { - return sq_throwerror(v, str); - } - } - return sq_throwerror(v, _SC("assertion failed")); - } - return 0; -} - -static SQInteger get_slice_params(HSQUIRRELVM v,SQInteger &sidx,SQInteger &eidx,SQObjectPtr &o) -{ - SQInteger top = sq_gettop(v); - sidx=0; - eidx=0; - o=stack_get(v,1); - if(top>1){ - SQObjectPtr &start=stack_get(v,2); - if(sq_type(start)!=OT_NULL && sq_isnumeric(start)){ - sidx=tointeger(start); - } - } - if(top>2){ - SQObjectPtr &end=stack_get(v,3); - if(sq_isnumeric(end)){ - eidx=tointeger(end); - } - } - else { - eidx = sq_getsize(v,1); - } - return 1; -} - -static SQInteger base_print(HSQUIRRELVM v) -{ - const SQChar *str; - if(SQ_SUCCEEDED(sq_tostring(v,2))) - { - if(SQ_SUCCEEDED(sq_getstring(v,-1,&str))) { - if(_ss(v)->_printfunc) _ss(v)->_printfunc(v,_SC("%s"),str); - return 0; - } - } - return SQ_ERROR; -} - -static SQInteger base_error(HSQUIRRELVM v) -{ - const SQChar *str; - if(SQ_SUCCEEDED(sq_tostring(v,2))) - { - if(SQ_SUCCEEDED(sq_getstring(v,-1,&str))) { - if(_ss(v)->_errorfunc) _ss(v)->_errorfunc(v,_SC("%s"),str); - return 0; - } - } - return SQ_ERROR; -} - -static SQInteger base_compilestring(HSQUIRRELVM v) -{ - SQInteger nargs=sq_gettop(v); - const SQChar *src=NULL,*name=_SC("unnamedbuffer"); - SQInteger size; - sq_getstring(v,2,&src); - size=sq_getsize(v,2); - if(nargs>2){ - sq_getstring(v,3,&name); - } - if(SQ_SUCCEEDED(sq_compilebuffer(v,src,size,name,SQFalse))) - return 1; - else - return SQ_ERROR; -} - -static SQInteger base_newthread(HSQUIRRELVM v) -{ - SQObjectPtr &func = stack_get(v,2); - SQInteger stksize = (_closure(func)->_function->_stacksize << 1) +2; - HSQUIRRELVM newv = sq_newthread(v, (stksize < MIN_STACK_OVERHEAD + 2)? MIN_STACK_OVERHEAD + 2 : stksize); - sq_move(newv,v,-2); - return 1; -} - -static SQInteger base_suspend(HSQUIRRELVM v) -{ - return sq_suspendvm(v); -} - -static SQInteger base_array(HSQUIRRELVM v) -{ - SQArray *a; - SQObject &size = stack_get(v,2); - if(sq_gettop(v) > 2) { - a = SQArray::Create(_ss(v),0); - a->Resize(tointeger(size),stack_get(v,3)); - } - else { - a = SQArray::Create(_ss(v),tointeger(size)); - } - v->Push(a); - return 1; -} - -static SQInteger base_type(HSQUIRRELVM v) -{ - SQObjectPtr &o = stack_get(v,2); - v->Push(SQString::Create(_ss(v),GetTypeName(o),-1)); - return 1; -} - -static SQInteger base_callee(HSQUIRRELVM v) -{ - if(v->_callsstacksize > 1) - { - v->Push(v->_callsstack[v->_callsstacksize - 2]._closure); - return 1; - } - return sq_throwerror(v,_SC("no closure in the calls stack")); -} - -static const SQRegFunction base_funcs[]={ - //generic - {_SC("seterrorhandler"),base_seterrorhandler,2, NULL}, - {_SC("setdebughook"),base_setdebughook,2, NULL}, - {_SC("enabledebuginfo"),base_enabledebuginfo,2, NULL}, - {_SC("getstackinfos"),base_getstackinfos,2, _SC(".n")}, - {_SC("getroottable"),base_getroottable,1, NULL}, - {_SC("setroottable"),base_setroottable,2, NULL}, - {_SC("getconsttable"),base_getconsttable,1, NULL}, - {_SC("setconsttable"),base_setconsttable,2, NULL}, - {_SC("assert"),base_assert,-2, NULL}, - {_SC("print"),base_print,2, NULL}, - {_SC("error"),base_error,2, NULL}, - {_SC("compilestring"),base_compilestring,-2, _SC(".ss")}, - {_SC("newthread"),base_newthread,2, _SC(".c")}, - {_SC("suspend"),base_suspend,-1, NULL}, - {_SC("array"),base_array,-2, _SC(".n")}, - {_SC("type"),base_type,2, NULL}, - {_SC("callee"),base_callee,0,NULL}, - {_SC("dummy"),base_dummy,0,NULL}, -#ifndef NO_GARBAGE_COLLECTOR - {_SC("collectgarbage"),base_collectgarbage,0, NULL}, - {_SC("resurrectunreachable"),base_resurectureachable,0, NULL}, -#endif - {NULL,(SQFUNCTION)0,0,NULL} -}; - -void sq_base_register(HSQUIRRELVM v) -{ - SQInteger i=0; - sq_pushroottable(v); - while(base_funcs[i].name!=0) { - sq_pushstring(v,base_funcs[i].name,-1); - sq_newclosure(v,base_funcs[i].f,0); - sq_setnativeclosurename(v,-1,base_funcs[i].name); - sq_setparamscheck(v,base_funcs[i].nparamscheck,base_funcs[i].typemask); - sq_newslot(v,-3, SQFalse); - i++; - } - - sq_pushstring(v,_SC("_versionnumber_"),-1); - sq_pushinteger(v,SQUIRREL_VERSION_NUMBER); - sq_newslot(v,-3, SQFalse); - sq_pushstring(v,_SC("_version_"),-1); - sq_pushstring(v,SQUIRREL_VERSION,-1); - sq_newslot(v,-3, SQFalse); - sq_pushstring(v,_SC("_charsize_"),-1); - sq_pushinteger(v,sizeof(SQChar)); - sq_newslot(v,-3, SQFalse); - sq_pushstring(v,_SC("_intsize_"),-1); - sq_pushinteger(v,sizeof(SQInteger)); - sq_newslot(v,-3, SQFalse); - sq_pushstring(v,_SC("_floatsize_"),-1); - sq_pushinteger(v,sizeof(SQFloat)); - sq_newslot(v,-3, SQFalse); - sq_pop(v,1); -} - -static SQInteger default_delegate_len(HSQUIRRELVM v) -{ - v->Push(SQInteger(sq_getsize(v,1))); - return 1; -} - -static SQInteger default_delegate_tofloat(HSQUIRRELVM v) -{ - SQObjectPtr &o=stack_get(v,1); - switch(sq_type(o)){ - case OT_STRING:{ - SQObjectPtr res; - if(str2num(_stringval(o),res,10)){ - v->Push(SQObjectPtr(tofloat(res))); - break; - }} - return sq_throwerror(v, _SC("cannot convert the string")); - break; - case OT_INTEGER:case OT_FLOAT: - v->Push(SQObjectPtr(tofloat(o))); - break; - case OT_BOOL: - v->Push(SQObjectPtr((SQFloat)(_integer(o)?1:0))); - break; - default: - v->PushNull(); - break; - } - return 1; -} - -static SQInteger default_delegate_tointeger(HSQUIRRELVM v) -{ - SQObjectPtr &o=stack_get(v,1); - SQInteger base = 10; - if(sq_gettop(v) > 1) { - sq_getinteger(v,2,&base); - } - switch(sq_type(o)){ - case OT_STRING:{ - SQObjectPtr res; - if(str2num(_stringval(o),res,base)){ - v->Push(SQObjectPtr(tointeger(res))); - break; - }} - return sq_throwerror(v, _SC("cannot convert the string")); - break; - case OT_INTEGER:case OT_FLOAT: - v->Push(SQObjectPtr(tointeger(o))); - break; - case OT_BOOL: - v->Push(SQObjectPtr(_integer(o)?(SQInteger)1:(SQInteger)0)); - break; - default: - v->PushNull(); - break; - } - return 1; -} - -static SQInteger default_delegate_tostring(HSQUIRRELVM v) -{ - if(SQ_FAILED(sq_tostring(v,1))) - return SQ_ERROR; - return 1; -} - -static SQInteger obj_delegate_weakref(HSQUIRRELVM v) -{ - sq_weakref(v,1); - return 1; -} - -static SQInteger obj_clear(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_clear(v,-1)) ? 1 : SQ_ERROR; -} - - -static SQInteger number_delegate_tochar(HSQUIRRELVM v) -{ - SQObject &o=stack_get(v,1); - SQChar c = (SQChar)tointeger(o); - v->Push(SQString::Create(_ss(v),(const SQChar *)&c,1)); - return 1; -} - - - -///////////////////////////////////////////////////////////////// -//TABLE DEFAULT DELEGATE - -static SQInteger table_rawdelete(HSQUIRRELVM v) -{ - if(SQ_FAILED(sq_rawdeleteslot(v,1,SQTrue))) - return SQ_ERROR; - return 1; -} - - -static SQInteger container_rawexists(HSQUIRRELVM v) -{ - if(SQ_SUCCEEDED(sq_rawget(v,-2))) { - sq_pushbool(v,SQTrue); - return 1; - } - sq_pushbool(v,SQFalse); - return 1; -} - -static SQInteger container_rawset(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_rawset(v,-3)) ? 1 : SQ_ERROR; -} - - -static SQInteger container_rawget(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_rawget(v,-2))?1:SQ_ERROR; -} - -static SQInteger table_setdelegate(HSQUIRRELVM v) -{ - if(SQ_FAILED(sq_setdelegate(v,-2))) - return SQ_ERROR; - sq_push(v,-1); // -1 because sq_setdelegate pops 1 - return 1; -} - -static SQInteger table_getdelegate(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_getdelegate(v,-1))?1:SQ_ERROR; -} - -static SQInteger table_filter(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v,1); - SQTable *tbl = _table(o); - SQObjectPtr ret = SQTable::Create(_ss(v),0); - - SQObjectPtr itr, key, val; - SQInteger nitr; - while((nitr = tbl->Next(false, itr, key, val)) != -1) { - itr = (SQInteger)nitr; - - v->Push(o); - v->Push(key); - v->Push(val); - if(SQ_FAILED(sq_call(v,3,SQTrue,SQFalse))) { - return SQ_ERROR; - } - if(!SQVM::IsFalse(v->GetUp(-1))) { - _table(ret)->NewSlot(key, val); - } - v->Pop(); - } - - v->Push(ret); - return 1; -} - -static SQInteger table_map(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v, 1); - SQTable *tbl = _table(o); - SQInteger nitr, n = 0; - SQInteger nitems = tbl->CountUsed(); - SQObjectPtr ret = SQArray::Create(_ss(v), nitems); - SQObjectPtr itr, key, val; - while ((nitr = tbl->Next(false, itr, key, val)) != -1) { - itr = (SQInteger)nitr; - - v->Push(o); - v->Push(key); - v->Push(val); - if (SQ_FAILED(sq_call(v, 3, SQTrue, SQFalse))) { - return SQ_ERROR; - } - _array(ret)->Set(n, v->GetUp(-1)); - v->Pop(); - n++; - } - - v->Push(ret); - return 1; -} - -#define TABLE_TO_ARRAY_FUNC(_funcname_,_valname_) static SQInteger _funcname_(HSQUIRRELVM v) \ -{ \ - SQObject &o = stack_get(v, 1); \ - SQTable *t = _table(o); \ - SQObjectPtr itr, key, val; \ - SQObjectPtr _null; \ - SQInteger nitr, n = 0; \ - SQInteger nitems = t->CountUsed(); \ - SQArray *a = SQArray::Create(_ss(v), nitems); \ - a->Resize(nitems, _null); \ - if (nitems) { \ - while ((nitr = t->Next(false, itr, key, val)) != -1) { \ - itr = (SQInteger)nitr; \ - a->Set(n, _valname_); \ - n++; \ - } \ - } \ - v->Push(a); \ - return 1; \ -} - -TABLE_TO_ARRAY_FUNC(table_keys, key) -TABLE_TO_ARRAY_FUNC(table_values, val) - - -const SQRegFunction SQSharedState::_table_default_delegate_funcz[]={ - {_SC("len"),default_delegate_len,1, _SC("t")}, - {_SC("rawget"),container_rawget,2, _SC("t")}, - {_SC("rawset"),container_rawset,3, _SC("t")}, - {_SC("rawdelete"),table_rawdelete,2, _SC("t")}, - {_SC("rawin"),container_rawexists,2, _SC("t")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {_SC("clear"),obj_clear,1, _SC(".")}, - {_SC("setdelegate"),table_setdelegate,2, _SC(".t|o")}, - {_SC("getdelegate"),table_getdelegate,1, _SC(".")}, - {_SC("filter"),table_filter,2, _SC("tc")}, - {_SC("map"),table_map,2, _SC("tc") }, - {_SC("keys"),table_keys,1, _SC("t") }, - {_SC("values"),table_values,1, _SC("t") }, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -//ARRAY DEFAULT DELEGATE/////////////////////////////////////// - -static SQInteger array_append(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_arrayappend(v,-2)) ? 1 : SQ_ERROR; -} - -static SQInteger array_extend(HSQUIRRELVM v) -{ - _array(stack_get(v,1))->Extend(_array(stack_get(v,2))); - sq_pop(v,1); - return 1; -} - -static SQInteger array_reverse(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_arrayreverse(v,-1)) ? 1 : SQ_ERROR; -} - -static SQInteger array_pop(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_arraypop(v,1,SQTrue))?1:SQ_ERROR; -} - -static SQInteger array_top(HSQUIRRELVM v) -{ - SQObject &o=stack_get(v,1); - if(_array(o)->Size()>0){ - v->Push(_array(o)->Top()); - return 1; - } - else return sq_throwerror(v,_SC("top() on a empty array")); -} - -static SQInteger array_insert(HSQUIRRELVM v) -{ - SQObject &o=stack_get(v,1); - SQObject &idx=stack_get(v,2); - SQObject &val=stack_get(v,3); - if(!_array(o)->Insert(tointeger(idx),val)) - return sq_throwerror(v,_SC("index out of range")); - sq_pop(v,2); - return 1; -} - -static SQInteger array_remove(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v, 1); - SQObject &idx = stack_get(v, 2); - if(!sq_isnumeric(idx)) return sq_throwerror(v, _SC("wrong type")); - SQObjectPtr val; - if(_array(o)->Get(tointeger(idx), val)) { - _array(o)->Remove(tointeger(idx)); - v->Push(val); - return 1; - } - return sq_throwerror(v, _SC("idx out of range")); -} - -static SQInteger array_resize(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v, 1); - SQObject &nsize = stack_get(v, 2); - SQObjectPtr fill; - if(sq_isnumeric(nsize)) { - SQInteger sz = tointeger(nsize); - if (sz<0) - return sq_throwerror(v, _SC("resizing to negative length")); - - if(sq_gettop(v) > 2) - fill = stack_get(v, 3); - _array(o)->Resize(sz,fill); - sq_settop(v, 1); - return 1; - } - return sq_throwerror(v, _SC("size must be a number")); -} - -static SQInteger __map_array(SQArray *dest,SQArray *src,HSQUIRRELVM v) { - SQObjectPtr temp; - SQInteger size = src->Size(); - SQObject &closure = stack_get(v, 2); - v->Push(closure); - - SQInteger nArgs = 0; - if(sq_type(closure) == OT_CLOSURE) { - nArgs = _closure(closure)->_function->_nparameters; - } - else if (sq_type(closure) == OT_NATIVECLOSURE) { - SQInteger nParamsCheck = _nativeclosure(closure)->_nparamscheck; - if (nParamsCheck > 0) - nArgs = nParamsCheck; - else // push all params when there is no check or only minimal count set - nArgs = 4; - } - - for(SQInteger n = 0; n < size; n++) { - src->Get(n,temp); - v->Push(src); - v->Push(temp); - if (nArgs >= 3) - v->Push(SQObjectPtr(n)); - if (nArgs >= 4) - v->Push(src); - if(SQ_FAILED(sq_call(v,nArgs,SQTrue,SQFalse))) { - return SQ_ERROR; - } - dest->Set(n,v->GetUp(-1)); - v->Pop(); - } - v->Pop(); - return 0; -} - -static SQInteger array_map(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v,1); - SQInteger size = _array(o)->Size(); - SQObjectPtr ret = SQArray::Create(_ss(v),size); - if(SQ_FAILED(__map_array(_array(ret),_array(o),v))) - return SQ_ERROR; - v->Push(ret); - return 1; -} - -static SQInteger array_apply(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v,1); - if(SQ_FAILED(__map_array(_array(o),_array(o),v))) - return SQ_ERROR; - sq_pop(v,1); - return 1; -} - -static SQInteger array_reduce(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v,1); - SQArray *a = _array(o); - SQInteger size = a->Size(); - SQObjectPtr res; - SQInteger iterStart; - if (sq_gettop(v)>2) { - res = stack_get(v,3); - iterStart = 0; - } else if (size==0) { - return 0; - } else { - a->Get(0,res); - iterStart = 1; - } - if (size > iterStart) { - SQObjectPtr other; - v->Push(stack_get(v,2)); - for (SQInteger n = iterStart; n < size; n++) { - a->Get(n,other); - v->Push(o); - v->Push(res); - v->Push(other); - if(SQ_FAILED(sq_call(v,3,SQTrue,SQFalse))) { - return SQ_ERROR; - } - res = v->GetUp(-1); - v->Pop(); - } - v->Pop(); - } - v->Push(res); - return 1; -} - -static SQInteger array_filter(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v,1); - SQArray *a = _array(o); - SQObjectPtr ret = SQArray::Create(_ss(v),0); - SQInteger size = a->Size(); - SQObjectPtr val; - for(SQInteger n = 0; n < size; n++) { - a->Get(n,val); - v->Push(o); - v->Push(n); - v->Push(val); - if(SQ_FAILED(sq_call(v,3,SQTrue,SQFalse))) { - return SQ_ERROR; - } - if(!SQVM::IsFalse(v->GetUp(-1))) { - _array(ret)->Append(val); - } - v->Pop(); - } - v->Push(ret); - return 1; -} - -static SQInteger array_find(HSQUIRRELVM v) -{ - SQObject &o = stack_get(v,1); - SQObjectPtr &val = stack_get(v,2); - SQArray *a = _array(o); - SQInteger size = a->Size(); - SQObjectPtr temp; - for(SQInteger n = 0; n < size; n++) { - bool res = false; - a->Get(n,temp); - if(SQVM::IsEqual(temp,val,res) && res) { - v->Push(n); - return 1; - } - } - return 0; -} - - -static bool _sort_compare(HSQUIRRELVM v, SQArray *arr, SQObjectPtr &a,SQObjectPtr &b,SQInteger func,SQInteger &ret) -{ - if(func < 0) { - if(!v->ObjCmp(a,b,ret)) return false; - } - else { - SQInteger top = sq_gettop(v); - sq_push(v, func); - sq_pushroottable(v); - v->Push(a); - v->Push(b); - SQObjectPtr *valptr = arr->_values._vals; - SQUnsignedInteger precallsize = arr->_values.size(); - if(SQ_FAILED(sq_call(v, 3, SQTrue, SQFalse))) { - if(!sq_isstring( v->_lasterror)) - v->Raise_Error(_SC("compare func failed")); - return false; - } - if(SQ_FAILED(sq_getinteger(v, -1, &ret))) { - v->Raise_Error(_SC("numeric value expected as return value of the compare function")); - return false; - } - if (precallsize != arr->_values.size() || valptr != arr->_values._vals) { - v->Raise_Error(_SC("array resized during sort operation")); - return false; - } - sq_settop(v, top); - return true; - } - return true; -} - -static bool _hsort_sift_down(HSQUIRRELVM v,SQArray *arr, SQInteger root, SQInteger bottom, SQInteger func) -{ - SQInteger maxChild; - SQInteger done = 0; - SQInteger ret; - SQInteger root2; - while (((root2 = root * 2) <= bottom) && (!done)) - { - if (root2 == bottom) { - maxChild = root2; - } - else { - if(!_sort_compare(v,arr,arr->_values[root2],arr->_values[root2 + 1],func,ret)) - return false; - if (ret > 0) { - maxChild = root2; - } - else { - maxChild = root2 + 1; - } - } - - if(!_sort_compare(v,arr,arr->_values[root],arr->_values[maxChild],func,ret)) - return false; - if (ret < 0) { - if (root == maxChild) { - v->Raise_Error(_SC("inconsistent compare function")); - return false; // We'd be swapping ourselve. The compare function is incorrect - } - - _Swap(arr->_values[root],arr->_values[maxChild]); - root = maxChild; - } - else { - done = 1; - } - } - return true; -} - -static bool _hsort(HSQUIRRELVM v,SQObjectPtr &arr, SQInteger SQ_UNUSED_ARG(l), SQInteger SQ_UNUSED_ARG(r),SQInteger func) -{ - SQArray *a = _array(arr); - SQInteger i; - SQInteger array_size = a->Size(); - for (i = (array_size / 2); i >= 0; i--) { - if(!_hsort_sift_down(v,a, i, array_size - 1,func)) return false; - } - - for (i = array_size-1; i >= 1; i--) - { - _Swap(a->_values[0],a->_values[i]); - if(!_hsort_sift_down(v,a, 0, i-1,func)) return false; - } - return true; -} - -static SQInteger array_sort(HSQUIRRELVM v) -{ - SQInteger func = -1; - SQObjectPtr &o = stack_get(v,1); - if(_array(o)->Size() > 1) { - if(sq_gettop(v) == 2) func = 2; - if(!_hsort(v, o, 0, _array(o)->Size()-1, func)) - return SQ_ERROR; - - } - sq_settop(v,1); - return 1; -} - -static SQInteger array_slice(HSQUIRRELVM v) -{ - SQInteger sidx,eidx; - SQObjectPtr o; - if(get_slice_params(v,sidx,eidx,o)==-1)return -1; - SQInteger alen = _array(o)->Size(); - if(sidx < 0)sidx = alen + sidx; - if(eidx < 0)eidx = alen + eidx; - if(eidx < sidx)return sq_throwerror(v,_SC("wrong indexes")); - if(eidx > alen || sidx < 0)return sq_throwerror(v, _SC("slice out of range")); - SQArray *arr=SQArray::Create(_ss(v),eidx-sidx); - SQObjectPtr t; - SQInteger count=0; - for(SQInteger i=sidx;iGet(i,t); - arr->Set(count++,t); - } - v->Push(arr); - return 1; - -} - -const SQRegFunction SQSharedState::_array_default_delegate_funcz[]={ - {_SC("len"),default_delegate_len,1, _SC("a")}, - {_SC("append"),array_append,2, _SC("a")}, - {_SC("extend"),array_extend,2, _SC("aa")}, - {_SC("push"),array_append,2, _SC("a")}, - {_SC("pop"),array_pop,1, _SC("a")}, - {_SC("top"),array_top,1, _SC("a")}, - {_SC("insert"),array_insert,3, _SC("an")}, - {_SC("remove"),array_remove,2, _SC("an")}, - {_SC("resize"),array_resize,-2, _SC("an")}, - {_SC("reverse"),array_reverse,1, _SC("a")}, - {_SC("sort"),array_sort,-1, _SC("ac")}, - {_SC("slice"),array_slice,-1, _SC("ann")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {_SC("clear"),obj_clear,1, _SC(".")}, - {_SC("map"),array_map,2, _SC("ac")}, - {_SC("apply"),array_apply,2, _SC("ac")}, - {_SC("reduce"),array_reduce,-2, _SC("ac.")}, - {_SC("filter"),array_filter,2, _SC("ac")}, - {_SC("find"),array_find,2, _SC("a.")}, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -//STRING DEFAULT DELEGATE////////////////////////// -static SQInteger string_slice(HSQUIRRELVM v) -{ - SQInteger sidx,eidx; - SQObjectPtr o; - if(SQ_FAILED(get_slice_params(v,sidx,eidx,o)))return -1; - SQInteger slen = _string(o)->_len; - if(sidx < 0)sidx = slen + sidx; - if(eidx < 0)eidx = slen + eidx; - if(eidx < sidx) return sq_throwerror(v,_SC("wrong indexes")); - if(eidx > slen || sidx < 0) return sq_throwerror(v, _SC("slice out of range")); - v->Push(SQString::Create(_ss(v),&_stringval(o)[sidx],eidx-sidx)); - return 1; -} - -static SQInteger string_find(HSQUIRRELVM v) -{ - SQInteger top,start_idx=0; - const SQChar *str,*substr,*ret; - if(((top=sq_gettop(v))>1) && SQ_SUCCEEDED(sq_getstring(v,1,&str)) && SQ_SUCCEEDED(sq_getstring(v,2,&substr))){ - if(top>2)sq_getinteger(v,3,&start_idx); - if((sq_getsize(v,1)>start_idx) && (start_idx>=0)){ - ret=scstrstr(&str[start_idx],substr); - if(ret){ - sq_pushinteger(v,(SQInteger)(ret-str)); - return 1; - } - } - return 0; - } - return sq_throwerror(v,_SC("invalid param")); -} - -#define STRING_TOFUNCZ(func) static SQInteger string_##func(HSQUIRRELVM v) \ -{\ - SQInteger sidx,eidx; \ - SQObjectPtr str; \ - if(SQ_FAILED(get_slice_params(v,sidx,eidx,str)))return -1; \ - SQInteger slen = _string(str)->_len; \ - if(sidx < 0)sidx = slen + sidx; \ - if(eidx < 0)eidx = slen + eidx; \ - if(eidx < sidx) return sq_throwerror(v,_SC("wrong indexes")); \ - if(eidx > slen || sidx < 0) return sq_throwerror(v,_SC("slice out of range")); \ - SQInteger len=_string(str)->_len; \ - const SQChar *sthis=_stringval(str); \ - SQChar *snew=(_ss(v)->GetScratchPad(sq_rsl(len))); \ - memcpy(snew,sthis,sq_rsl(len));\ - for(SQInteger i=sidx;iPush(SQString::Create(_ss(v),snew,len)); \ - return 1; \ -} - - -STRING_TOFUNCZ(tolower) -STRING_TOFUNCZ(toupper) - -const SQRegFunction SQSharedState::_string_default_delegate_funcz[]={ - {_SC("len"),default_delegate_len,1, _SC("s")}, - {_SC("tointeger"),default_delegate_tointeger,-1, _SC("sn")}, - {_SC("tofloat"),default_delegate_tofloat,1, _SC("s")}, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {_SC("slice"),string_slice,-1, _SC("s n n")}, - {_SC("find"),string_find,-2, _SC("s s n")}, - {_SC("tolower"),string_tolower,-1, _SC("s n n")}, - {_SC("toupper"),string_toupper,-1, _SC("s n n")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -//INTEGER DEFAULT DELEGATE////////////////////////// -const SQRegFunction SQSharedState::_number_default_delegate_funcz[]={ - {_SC("tointeger"),default_delegate_tointeger,1, _SC("n|b")}, - {_SC("tofloat"),default_delegate_tofloat,1, _SC("n|b")}, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {_SC("tochar"),number_delegate_tochar,1, _SC("n|b")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -//CLOSURE DEFAULT DELEGATE////////////////////////// -static SQInteger closure_pcall(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_call(v,sq_gettop(v)-1,SQTrue,SQFalse))?1:SQ_ERROR; -} - -static SQInteger closure_call(HSQUIRRELVM v) -{ - SQObjectPtr &c = stack_get(v, -1); - if (sq_type(c) == OT_CLOSURE && (_closure(c)->_function->_bgenerator == false)) - { - return sq_tailcall(v, sq_gettop(v) - 1); - } - return SQ_SUCCEEDED(sq_call(v, sq_gettop(v) - 1, SQTrue, SQTrue)) ? 1 : SQ_ERROR; -} - -static SQInteger _closure_acall(HSQUIRRELVM v,SQBool raiseerror) -{ - SQArray *aparams=_array(stack_get(v,2)); - SQInteger nparams=aparams->Size(); - v->Push(stack_get(v,1)); - for(SQInteger i=0;iPush(aparams->_values[i]); - return SQ_SUCCEEDED(sq_call(v,nparams,SQTrue,raiseerror))?1:SQ_ERROR; -} - -static SQInteger closure_acall(HSQUIRRELVM v) -{ - return _closure_acall(v,SQTrue); -} - -static SQInteger closure_pacall(HSQUIRRELVM v) -{ - return _closure_acall(v,SQFalse); -} - -static SQInteger closure_bindenv(HSQUIRRELVM v) -{ - if(SQ_FAILED(sq_bindenv(v,1))) - return SQ_ERROR; - return 1; -} - -static SQInteger closure_getroot(HSQUIRRELVM v) -{ - if(SQ_FAILED(sq_getclosureroot(v,-1))) - return SQ_ERROR; - return 1; -} - -static SQInteger closure_setroot(HSQUIRRELVM v) -{ - if(SQ_FAILED(sq_setclosureroot(v,-2))) - return SQ_ERROR; - return 1; -} - -static SQInteger closure_getinfos(HSQUIRRELVM v) { - SQObject o = stack_get(v,1); - SQTable *res = SQTable::Create(_ss(v),4); - if(sq_type(o) == OT_CLOSURE) { - SQFunctionProto *f = _closure(o)->_function; - SQInteger nparams = f->_nparameters + (f->_varparams?1:0); - SQObjectPtr params = SQArray::Create(_ss(v),nparams); - SQObjectPtr defparams = SQArray::Create(_ss(v),f->_ndefaultparams); - for(SQInteger n = 0; n_nparameters; n++) { - _array(params)->Set((SQInteger)n,f->_parameters[n]); - } - for(SQInteger j = 0; j_ndefaultparams; j++) { - _array(defparams)->Set((SQInteger)j,_closure(o)->_defaultparams[j]); - } - if(f->_varparams) { - _array(params)->Set(nparams-1,SQString::Create(_ss(v),_SC("..."),-1)); - } - res->NewSlot(SQString::Create(_ss(v),_SC("native"),-1),false); - res->NewSlot(SQString::Create(_ss(v),_SC("name"),-1),f->_name); - res->NewSlot(SQString::Create(_ss(v),_SC("src"),-1),f->_sourcename); - res->NewSlot(SQString::Create(_ss(v),_SC("parameters"),-1),params); - res->NewSlot(SQString::Create(_ss(v),_SC("varargs"),-1),f->_varparams); - res->NewSlot(SQString::Create(_ss(v),_SC("defparams"),-1),defparams); - } - else { //OT_NATIVECLOSURE - SQNativeClosure *nc = _nativeclosure(o); - res->NewSlot(SQString::Create(_ss(v),_SC("native"),-1),true); - res->NewSlot(SQString::Create(_ss(v),_SC("name"),-1),nc->_name); - res->NewSlot(SQString::Create(_ss(v),_SC("paramscheck"),-1),nc->_nparamscheck); - SQObjectPtr typecheck; - if(nc->_typecheck.size() > 0) { - typecheck = - SQArray::Create(_ss(v), nc->_typecheck.size()); - for(SQUnsignedInteger n = 0; n_typecheck.size(); n++) { - _array(typecheck)->Set((SQInteger)n,nc->_typecheck[n]); - } - } - res->NewSlot(SQString::Create(_ss(v),_SC("typecheck"),-1),typecheck); - } - v->Push(res); - return 1; -} - - - -const SQRegFunction SQSharedState::_closure_default_delegate_funcz[]={ - {_SC("call"),closure_call,-1, _SC("c")}, - {_SC("pcall"),closure_pcall,-1, _SC("c")}, - {_SC("acall"),closure_acall,2, _SC("ca")}, - {_SC("pacall"),closure_pacall,2, _SC("ca")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {_SC("bindenv"),closure_bindenv,2, _SC("c x|y|t")}, - {_SC("getinfos"),closure_getinfos,1, _SC("c")}, - {_SC("getroot"),closure_getroot,1, _SC("c")}, - {_SC("setroot"),closure_setroot,2, _SC("ct")}, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -//GENERATOR DEFAULT DELEGATE -static SQInteger generator_getstatus(HSQUIRRELVM v) -{ - SQObject &o=stack_get(v,1); - switch(_generator(o)->_state){ - case SQGenerator::eSuspended:v->Push(SQString::Create(_ss(v),_SC("suspended")));break; - case SQGenerator::eRunning:v->Push(SQString::Create(_ss(v),_SC("running")));break; - case SQGenerator::eDead:v->Push(SQString::Create(_ss(v),_SC("dead")));break; - } - return 1; -} - -const SQRegFunction SQSharedState::_generator_default_delegate_funcz[]={ - {_SC("getstatus"),generator_getstatus,1, _SC("g")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -//THREAD DEFAULT DELEGATE -static SQInteger thread_call(HSQUIRRELVM v) -{ - SQObjectPtr o = stack_get(v,1); - if(sq_type(o) == OT_THREAD) { - SQInteger nparams = sq_gettop(v); - sq_reservestack(_thread(o), nparams + 3); - _thread(o)->Push(_thread(o)->_roottable); - for(SQInteger i = 2; i<(nparams+1); i++) - sq_move(_thread(o),v,i); - if(SQ_SUCCEEDED(sq_call(_thread(o),nparams,SQTrue,SQTrue))) { - sq_move(v,_thread(o),-1); - sq_pop(_thread(o),1); - return 1; - } - v->_lasterror = _thread(o)->_lasterror; - return SQ_ERROR; - } - return sq_throwerror(v,_SC("wrong parameter")); -} - -static SQInteger thread_wakeup(HSQUIRRELVM v) -{ - SQObjectPtr o = stack_get(v,1); - if(sq_type(o) == OT_THREAD) { - SQVM *thread = _thread(o); - SQInteger state = sq_getvmstate(thread); - if(state != SQ_VMSTATE_SUSPENDED) { - switch(state) { - case SQ_VMSTATE_IDLE: - return sq_throwerror(v,_SC("cannot wakeup a idle thread")); - break; - case SQ_VMSTATE_RUNNING: - return sq_throwerror(v,_SC("cannot wakeup a running thread")); - break; - } - } - - SQInteger wakeupret = sq_gettop(v)>1?SQTrue:SQFalse; - if(wakeupret) { - sq_move(thread,v,2); - } - if(SQ_SUCCEEDED(sq_wakeupvm(thread,wakeupret,SQTrue,SQTrue,SQFalse))) { - sq_move(v,thread,-1); - sq_pop(thread,1); //pop retval - if(sq_getvmstate(thread) == SQ_VMSTATE_IDLE) { - sq_settop(thread,1); //pop roottable - } - return 1; - } - sq_settop(thread,1); - v->_lasterror = thread->_lasterror; - return SQ_ERROR; - } - return sq_throwerror(v,_SC("wrong parameter")); -} - -static SQInteger thread_wakeupthrow(HSQUIRRELVM v) -{ - SQObjectPtr o = stack_get(v,1); - if(sq_type(o) == OT_THREAD) { - SQVM *thread = _thread(o); - SQInteger state = sq_getvmstate(thread); - if(state != SQ_VMSTATE_SUSPENDED) { - switch(state) { - case SQ_VMSTATE_IDLE: - return sq_throwerror(v,_SC("cannot wakeup a idle thread")); - break; - case SQ_VMSTATE_RUNNING: - return sq_throwerror(v,_SC("cannot wakeup a running thread")); - break; - } - } - - sq_move(thread,v,2); - sq_throwobject(thread); - SQBool rethrow_error = SQTrue; - if(sq_gettop(v) > 2) { - sq_getbool(v,3,&rethrow_error); - } - if(SQ_SUCCEEDED(sq_wakeupvm(thread,SQFalse,SQTrue,SQTrue,SQTrue))) { - sq_move(v,thread,-1); - sq_pop(thread,1); //pop retval - if(sq_getvmstate(thread) == SQ_VMSTATE_IDLE) { - sq_settop(thread,1); //pop roottable - } - return 1; - } - sq_settop(thread,1); - if(rethrow_error) { - v->_lasterror = thread->_lasterror; - return SQ_ERROR; - } - return SQ_OK; - } - return sq_throwerror(v,_SC("wrong parameter")); -} - -static SQInteger thread_getstatus(HSQUIRRELVM v) -{ - SQObjectPtr &o = stack_get(v,1); - switch(sq_getvmstate(_thread(o))) { - case SQ_VMSTATE_IDLE: - sq_pushstring(v,_SC("idle"),-1); - break; - case SQ_VMSTATE_RUNNING: - sq_pushstring(v,_SC("running"),-1); - break; - case SQ_VMSTATE_SUSPENDED: - sq_pushstring(v,_SC("suspended"),-1); - break; - default: - return sq_throwerror(v,_SC("internal VM error")); - } - return 1; -} - -static SQInteger thread_getstackinfos(HSQUIRRELVM v) -{ - SQObjectPtr o = stack_get(v,1); - if(sq_type(o) == OT_THREAD) { - SQVM *thread = _thread(o); - SQInteger threadtop = sq_gettop(thread); - SQInteger level; - sq_getinteger(v,-1,&level); - SQRESULT res = __getcallstackinfos(thread,level); - if(SQ_FAILED(res)) - { - sq_settop(thread,threadtop); - if(sq_type(thread->_lasterror) == OT_STRING) { - sq_throwerror(v,_stringval(thread->_lasterror)); - } - else { - sq_throwerror(v,_SC("unknown error")); - } - } - if(res > 0) { - //some result - sq_move(v,thread,-1); - sq_settop(thread,threadtop); - return 1; - } - //no result - sq_settop(thread,threadtop); - return 0; - - } - return sq_throwerror(v,_SC("wrong parameter")); -} - -const SQRegFunction SQSharedState::_thread_default_delegate_funcz[] = { - {_SC("call"), thread_call, -1, _SC("v")}, - {_SC("wakeup"), thread_wakeup, -1, _SC("v")}, - {_SC("wakeupthrow"), thread_wakeupthrow, -2, _SC("v.b")}, - {_SC("getstatus"), thread_getstatus, 1, _SC("v")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("getstackinfos"),thread_getstackinfos,2, _SC("vn")}, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -static SQInteger class_getattributes(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_getattributes(v,-2))?1:SQ_ERROR; -} - -static SQInteger class_setattributes(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_setattributes(v,-3))?1:SQ_ERROR; -} - -static SQInteger class_instance(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_createinstance(v,-1))?1:SQ_ERROR; -} - -static SQInteger class_getbase(HSQUIRRELVM v) -{ - return SQ_SUCCEEDED(sq_getbase(v,-1))?1:SQ_ERROR; -} - -static SQInteger class_newmember(HSQUIRRELVM v) -{ - SQInteger top = sq_gettop(v); - SQBool bstatic = SQFalse; - if(top == 5) - { - sq_tobool(v,-1,&bstatic); - sq_pop(v,1); - } - - if(top < 4) { - sq_pushnull(v); - } - return SQ_SUCCEEDED(sq_newmember(v,-4,bstatic))?1:SQ_ERROR; -} - -static SQInteger class_rawnewmember(HSQUIRRELVM v) -{ - SQInteger top = sq_gettop(v); - SQBool bstatic = SQFalse; - if(top == 5) - { - sq_tobool(v,-1,&bstatic); - sq_pop(v,1); - } - - if(top < 4) { - sq_pushnull(v); - } - return SQ_SUCCEEDED(sq_rawnewmember(v,-4,bstatic))?1:SQ_ERROR; -} - -const SQRegFunction SQSharedState::_class_default_delegate_funcz[] = { - {_SC("getattributes"), class_getattributes, 2, _SC("y.")}, - {_SC("setattributes"), class_setattributes, 3, _SC("y..")}, - {_SC("rawget"),container_rawget,2, _SC("y")}, - {_SC("rawset"),container_rawset,3, _SC("y")}, - {_SC("rawin"),container_rawexists,2, _SC("y")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {_SC("instance"),class_instance,1, _SC("y")}, - {_SC("getbase"),class_getbase,1, _SC("y")}, - {_SC("newmember"),class_newmember,-3, _SC("y")}, - {_SC("rawnewmember"),class_rawnewmember,-3, _SC("y")}, - {NULL,(SQFUNCTION)0,0,NULL} -}; - - -static SQInteger instance_getclass(HSQUIRRELVM v) -{ - if(SQ_SUCCEEDED(sq_getclass(v,1))) - return 1; - return SQ_ERROR; -} - -const SQRegFunction SQSharedState::_instance_default_delegate_funcz[] = { - {_SC("getclass"), instance_getclass, 1, _SC("x")}, - {_SC("rawget"),container_rawget,2, _SC("x")}, - {_SC("rawset"),container_rawset,3, _SC("x")}, - {_SC("rawin"),container_rawexists,2, _SC("x")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {NULL,(SQFUNCTION)0,0,NULL} -}; - -static SQInteger weakref_ref(HSQUIRRELVM v) -{ - if(SQ_FAILED(sq_getweakrefval(v,1))) - return SQ_ERROR; - return 1; -} - -const SQRegFunction SQSharedState::_weakref_default_delegate_funcz[] = { - {_SC("ref"),weakref_ref,1, _SC("r")}, - {_SC("weakref"),obj_delegate_weakref,1, NULL }, - {_SC("tostring"),default_delegate_tostring,1, _SC(".")}, - {NULL,(SQFUNCTION)0,0,NULL} -}; diff --git a/m_packages/squirrel/squirrel/sqclass.cpp b/m_packages/squirrel/squirrel/sqclass.cpp deleted file mode 100644 index 53a29763..00000000 --- a/m_packages/squirrel/squirrel/sqclass.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include "sqvm.h" -#include "sqtable.h" -#include "sqclass.h" -#include "sqfuncproto.h" -#include "sqclosure.h" - - - -SQClass::SQClass(SQSharedState *ss,SQClass *base) -{ - _base = base; - _typetag = 0; - _hook = NULL; - _udsize = 0; - _locked = false; - _constructoridx = -1; - if(_base) { - _constructoridx = _base->_constructoridx; - _udsize = _base->_udsize; - _defaultvalues.copy(base->_defaultvalues); - _methods.copy(base->_methods); - _COPY_VECTOR(_metamethods,base->_metamethods,MT_LAST); - __ObjAddRef(_base); - } - _members = base?base->_members->Clone() : SQTable::Create(ss,0); - __ObjAddRef(_members); - - INIT_CHAIN(); - ADD_TO_CHAIN(&_sharedstate->_gc_chain, this); -} - -void SQClass::Finalize() { - _attributes.Null(); - _NULL_SQOBJECT_VECTOR(_defaultvalues,_defaultvalues.size()); - _methods.resize(0); - _NULL_SQOBJECT_VECTOR(_metamethods,MT_LAST); - __ObjRelease(_members); - if(_base) { - __ObjRelease(_base); - } -} - -SQClass::~SQClass() -{ - REMOVE_FROM_CHAIN(&_sharedstate->_gc_chain, this); - Finalize(); -} - -bool SQClass::NewSlot(SQSharedState *ss,const SQObjectPtr &key,const SQObjectPtr &val,bool bstatic) -{ - SQObjectPtr temp; - bool belongs_to_static_table = sq_type(val) == OT_CLOSURE || sq_type(val) == OT_NATIVECLOSURE || bstatic; - if(_locked && !belongs_to_static_table) - return false; //the class already has an instance so cannot be modified - if(_members->Get(key,temp) && _isfield(temp)) //overrides the default value - { - _defaultvalues[_member_idx(temp)].val = val; - return true; - } - if (_members->CountUsed() >= MEMBER_MAX_COUNT) { - return false; - } - if(belongs_to_static_table) { - SQInteger mmidx; - if((sq_type(val) == OT_CLOSURE || sq_type(val) == OT_NATIVECLOSURE) && - (mmidx = ss->GetMetaMethodIdxByName(key)) != -1) { - _metamethods[mmidx] = val; - } - else { - SQObjectPtr theval = val; - if(_base && sq_type(val) == OT_CLOSURE) { - theval = _closure(val)->Clone(); - _closure(theval)->_base = _base; - __ObjAddRef(_base); //ref for the closure - } - if(sq_type(temp) == OT_NULL) { - bool isconstructor; - SQVM::IsEqual(ss->_constructoridx, key, isconstructor); - if(isconstructor) { - _constructoridx = (SQInteger)_methods.size(); - } - SQClassMember m; - m.val = theval; - _members->NewSlot(key,SQObjectPtr(_make_method_idx(_methods.size()))); - _methods.push_back(m); - } - else { - _methods[_member_idx(temp)].val = theval; - } - } - return true; - } - SQClassMember m; - m.val = val; - _members->NewSlot(key,SQObjectPtr(_make_field_idx(_defaultvalues.size()))); - _defaultvalues.push_back(m); - return true; -} - -SQInstance *SQClass::CreateInstance() -{ - if(!_locked) Lock(); - return SQInstance::Create(_opt_ss(this),this); -} - -SQInteger SQClass::Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval) -{ - SQObjectPtr oval; - SQInteger idx = _members->Next(false,refpos,outkey,oval); - if(idx != -1) { - if(_ismethod(oval)) { - outval = _methods[_member_idx(oval)].val; - } - else { - SQObjectPtr &o = _defaultvalues[_member_idx(oval)].val; - outval = _realval(o); - } - } - return idx; -} - -bool SQClass::SetAttributes(const SQObjectPtr &key,const SQObjectPtr &val) -{ - SQObjectPtr idx; - if(_members->Get(key,idx)) { - if(_isfield(idx)) - _defaultvalues[_member_idx(idx)].attrs = val; - else - _methods[_member_idx(idx)].attrs = val; - return true; - } - return false; -} - -bool SQClass::GetAttributes(const SQObjectPtr &key,SQObjectPtr &outval) -{ - SQObjectPtr idx; - if(_members->Get(key,idx)) { - outval = (_isfield(idx)?_defaultvalues[_member_idx(idx)].attrs:_methods[_member_idx(idx)].attrs); - return true; - } - return false; -} - -/////////////////////////////////////////////////////////////////////// -void SQInstance::Init(SQSharedState *ss) -{ - _userpointer = NULL; - _hook = NULL; - __ObjAddRef(_class); - _delegate = _class->_members; - INIT_CHAIN(); - ADD_TO_CHAIN(&_sharedstate->_gc_chain, this); -} - -SQInstance::SQInstance(SQSharedState *ss, SQClass *c, SQInteger memsize) -{ - _memsize = memsize; - _class = c; - SQUnsignedInteger nvalues = _class->_defaultvalues.size(); - for(SQUnsignedInteger n = 0; n < nvalues; n++) { - new (&_values[n]) SQObjectPtr(_class->_defaultvalues[n].val); - } - Init(ss); -} - -SQInstance::SQInstance(SQSharedState *ss, SQInstance *i, SQInteger memsize) -{ - _memsize = memsize; - _class = i->_class; - SQUnsignedInteger nvalues = _class->_defaultvalues.size(); - for(SQUnsignedInteger n = 0; n < nvalues; n++) { - new (&_values[n]) SQObjectPtr(i->_values[n]); - } - Init(ss); -} - -void SQInstance::Finalize() -{ - SQUnsignedInteger nvalues = _class->_defaultvalues.size(); - __ObjRelease(_class); - _NULL_SQOBJECT_VECTOR(_values,nvalues); -} - -SQInstance::~SQInstance() -{ - REMOVE_FROM_CHAIN(&_sharedstate->_gc_chain, this); - if(_class){ Finalize(); } //if _class is null it was already finalized by the GC -} - -bool SQInstance::GetMetaMethod(SQVM* SQ_UNUSED_ARG(v),SQMetaMethod mm,SQObjectPtr &res) -{ - if(sq_type(_class->_metamethods[mm]) != OT_NULL) { - res = _class->_metamethods[mm]; - return true; - } - return false; -} - -bool SQInstance::InstanceOf(SQClass *trg) -{ - SQClass *parent = _class; - while(parent != NULL) { - if(parent == trg) - return true; - parent = parent->_base; - } - return false; -} diff --git a/m_packages/squirrel/squirrel/sqclass.h b/m_packages/squirrel/squirrel/sqclass.h deleted file mode 100644 index 60d3d21b..00000000 --- a/m_packages/squirrel/squirrel/sqclass.h +++ /dev/null @@ -1,163 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQCLASS_H_ -#define _SQCLASS_H_ - -struct SQInstance; - -struct SQClassMember { - SQObjectPtr val; - SQObjectPtr attrs; - void Null() { - val.Null(); - attrs.Null(); - } -}; - -typedef sqvector SQClassMemberVec; - -#define MEMBER_TYPE_METHOD 0x01000000 -#define MEMBER_TYPE_FIELD 0x02000000 -#define MEMBER_MAX_COUNT 0x00FFFFFF - -#define _ismethod(o) (_integer(o)&MEMBER_TYPE_METHOD) -#define _isfield(o) (_integer(o)&MEMBER_TYPE_FIELD) -#define _make_method_idx(i) ((SQInteger)(MEMBER_TYPE_METHOD|i)) -#define _make_field_idx(i) ((SQInteger)(MEMBER_TYPE_FIELD|i)) -#define _member_type(o) (_integer(o)&0xFF000000) -#define _member_idx(o) (_integer(o)&0x00FFFFFF) - -struct SQClass : public CHAINABLE_OBJ -{ - SQClass(SQSharedState *ss,SQClass *base); -public: - static SQClass* Create(SQSharedState *ss,SQClass *base) { - SQClass *newclass = (SQClass *)SQ_MALLOC(sizeof(SQClass)); - new (newclass) SQClass(ss, base); - return newclass; - } - ~SQClass(); - bool NewSlot(SQSharedState *ss, const SQObjectPtr &key,const SQObjectPtr &val,bool bstatic); - bool Get(const SQObjectPtr &key,SQObjectPtr &val) { - if(_members->Get(key,val)) { - if(_isfield(val)) { - SQObjectPtr &o = _defaultvalues[_member_idx(val)].val; - val = _realval(o); - } - else { - val = _methods[_member_idx(val)].val; - } - return true; - } - return false; - } - bool GetConstructor(SQObjectPtr &ctor) - { - if(_constructoridx != -1) { - ctor = _methods[_constructoridx].val; - return true; - } - return false; - } - bool SetAttributes(const SQObjectPtr &key,const SQObjectPtr &val); - bool GetAttributes(const SQObjectPtr &key,SQObjectPtr &outval); - void Lock() { _locked = true; if(_base) _base->Lock(); } - void Release() { - if (_hook) { _hook(_typetag,0);} - sq_delete(this, SQClass); - } - void Finalize(); -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable ** ); - SQObjectType GetType() {return OT_CLASS;} -#endif - SQInteger Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval); - SQInstance *CreateInstance(); - SQTable *_members; - SQClass *_base; - SQClassMemberVec _defaultvalues; - SQClassMemberVec _methods; - SQObjectPtr _metamethods[MT_LAST]; - SQObjectPtr _attributes; - SQUserPointer _typetag; - SQRELEASEHOOK _hook; - bool _locked; - SQInteger _constructoridx; - SQInteger _udsize; -}; - -#define calcinstancesize(_theclass_) \ - (_theclass_->_udsize + sq_aligning(sizeof(SQInstance) + (sizeof(SQObjectPtr)*(_theclass_->_defaultvalues.size()>0?_theclass_->_defaultvalues.size()-1:0)))) - -struct SQInstance : public SQDelegable -{ - void Init(SQSharedState *ss); - SQInstance(SQSharedState *ss, SQClass *c, SQInteger memsize); - SQInstance(SQSharedState *ss, SQInstance *c, SQInteger memsize); -public: - static SQInstance* Create(SQSharedState *ss,SQClass *theclass) { - - SQInteger size = calcinstancesize(theclass); - SQInstance *newinst = (SQInstance *)SQ_MALLOC(size); - new (newinst) SQInstance(ss, theclass,size); - if(theclass->_udsize) { - newinst->_userpointer = ((unsigned char *)newinst) + (size - theclass->_udsize); - } - return newinst; - } - SQInstance *Clone(SQSharedState *ss) - { - SQInteger size = calcinstancesize(_class); - SQInstance *newinst = (SQInstance *)SQ_MALLOC(size); - new (newinst) SQInstance(ss, this,size); - if(_class->_udsize) { - newinst->_userpointer = ((unsigned char *)newinst) + (size - _class->_udsize); - } - return newinst; - } - ~SQInstance(); - bool Get(const SQObjectPtr &key,SQObjectPtr &val) { - if(_class->_members->Get(key,val)) { - if(_isfield(val)) { - SQObjectPtr &o = _values[_member_idx(val)]; - val = _realval(o); - } - else { - val = _class->_methods[_member_idx(val)].val; - } - return true; - } - return false; - } - bool Set(const SQObjectPtr &key,const SQObjectPtr &val) { - SQObjectPtr idx; - if(_class->_members->Get(key,idx) && _isfield(idx)) { - _values[_member_idx(idx)] = val; - return true; - } - return false; - } - void Release() { - _uiRef++; - if (_hook) { _hook(_userpointer,0);} - _uiRef--; - if(_uiRef > 0) return; - SQInteger size = _memsize; - this->~SQInstance(); - SQ_FREE(this, size); - } - void Finalize(); -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable ** ); - SQObjectType GetType() {return OT_INSTANCE;} -#endif - bool InstanceOf(SQClass *trg); - bool GetMetaMethod(SQVM *v,SQMetaMethod mm,SQObjectPtr &res); - - SQClass *_class; - SQUserPointer _userpointer; - SQRELEASEHOOK _hook; - SQInteger _memsize; - SQObjectPtr _values[1]; -}; - -#endif //_SQCLASS_H_ diff --git a/m_packages/squirrel/squirrel/sqclosure.h b/m_packages/squirrel/squirrel/sqclosure.h deleted file mode 100644 index 66495b94..00000000 --- a/m_packages/squirrel/squirrel/sqclosure.h +++ /dev/null @@ -1,201 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQCLOSURE_H_ -#define _SQCLOSURE_H_ - - -#define _CALC_CLOSURE_SIZE(func) (sizeof(SQClosure) + (func->_noutervalues*sizeof(SQObjectPtr)) + (func->_ndefaultparams*sizeof(SQObjectPtr))) - -struct SQFunctionProto; -struct SQClass; -struct SQClosure : public CHAINABLE_OBJ -{ -private: - SQClosure(SQSharedState *ss,SQFunctionProto *func){_function = func; __ObjAddRef(_function); _base = NULL; INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL; _root=NULL;} -public: - static SQClosure *Create(SQSharedState *ss,SQFunctionProto *func,SQWeakRef *root){ - SQInteger size = _CALC_CLOSURE_SIZE(func); - SQClosure *nc=(SQClosure*)SQ_MALLOC(size); - new (nc) SQClosure(ss,func); - nc->_outervalues = (SQObjectPtr *)(nc + 1); - nc->_defaultparams = &nc->_outervalues[func->_noutervalues]; - nc->_root = root; - __ObjAddRef(nc->_root); - _CONSTRUCT_VECTOR(SQObjectPtr,func->_noutervalues,nc->_outervalues); - _CONSTRUCT_VECTOR(SQObjectPtr,func->_ndefaultparams,nc->_defaultparams); - return nc; - } - void Release(){ - SQFunctionProto *f = _function; - SQInteger size = _CALC_CLOSURE_SIZE(f); - _DESTRUCT_VECTOR(SQObjectPtr,f->_noutervalues,_outervalues); - _DESTRUCT_VECTOR(SQObjectPtr,f->_ndefaultparams,_defaultparams); - __ObjRelease(_function); - this->~SQClosure(); - sq_vm_free(this,size); - } - void SetRoot(SQWeakRef *r) - { - __ObjRelease(_root); - _root = r; - __ObjAddRef(_root); - } - SQClosure *Clone() - { - SQFunctionProto *f = _function; - SQClosure * ret = SQClosure::Create(_opt_ss(this),f,_root); - ret->_env = _env; - if(ret->_env) __ObjAddRef(ret->_env); - _COPY_VECTOR(ret->_outervalues,_outervalues,f->_noutervalues); - _COPY_VECTOR(ret->_defaultparams,_defaultparams,f->_ndefaultparams); - return ret; - } - ~SQClosure(); - - bool Save(SQVM *v,SQUserPointer up,SQWRITEFUNC write); - static bool Load(SQVM *v,SQUserPointer up,SQREADFUNC read,SQObjectPtr &ret); -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - void Finalize(){ - SQFunctionProto *f = _function; - _NULL_SQOBJECT_VECTOR(_outervalues,f->_noutervalues); - _NULL_SQOBJECT_VECTOR(_defaultparams,f->_ndefaultparams); - } - SQObjectType GetType() {return OT_CLOSURE;} -#endif - SQWeakRef *_env; - SQWeakRef *_root; - SQClass *_base; - SQFunctionProto *_function; - SQObjectPtr *_outervalues; - SQObjectPtr *_defaultparams; -}; - -////////////////////////////////////////////// -struct SQOuter : public CHAINABLE_OBJ -{ - -private: - SQOuter(SQSharedState *ss, SQObjectPtr *outer){_valptr = outer; _next = NULL; INIT_CHAIN(); ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); } - -public: - static SQOuter *Create(SQSharedState *ss, SQObjectPtr *outer) - { - SQOuter *nc = (SQOuter*)SQ_MALLOC(sizeof(SQOuter)); - new (nc) SQOuter(ss, outer); - return nc; - } - ~SQOuter() { REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this); } - - void Release() - { - this->~SQOuter(); - sq_vm_free(this,sizeof(SQOuter)); - } - -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - void Finalize() { _value.Null(); } - SQObjectType GetType() {return OT_OUTER;} -#endif - - SQObjectPtr *_valptr; /* pointer to value on stack, or _value below */ - SQInteger _idx; /* idx in stack array, for relocation */ - SQObjectPtr _value; /* value of outer after stack frame is closed */ - SQOuter *_next; /* pointer to next outer when frame is open */ -}; - -////////////////////////////////////////////// -struct SQGenerator : public CHAINABLE_OBJ -{ - enum SQGeneratorState{eRunning,eSuspended,eDead}; -private: - SQGenerator(SQSharedState *ss,SQClosure *closure){_closure=closure;_state=eRunning;_ci._generator=NULL;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this);} -public: - static SQGenerator *Create(SQSharedState *ss,SQClosure *closure){ - SQGenerator *nc=(SQGenerator*)SQ_MALLOC(sizeof(SQGenerator)); - new (nc) SQGenerator(ss,closure); - return nc; - } - ~SQGenerator() - { - REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this); - } - void Kill(){ - _state=eDead; - _stack.resize(0); - _closure.Null();} - void Release(){ - sq_delete(this,SQGenerator); - } - - bool Yield(SQVM *v,SQInteger target); - bool Resume(SQVM *v,SQObjectPtr &dest); -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - void Finalize(){_stack.resize(0);_closure.Null();} - SQObjectType GetType() {return OT_GENERATOR;} -#endif - SQObjectPtr _closure; - SQObjectPtrVec _stack; - SQVM::CallInfo _ci; - ExceptionsTraps _etraps; - SQGeneratorState _state; -}; - -#define _CALC_NATVIVECLOSURE_SIZE(noutervalues) (sizeof(SQNativeClosure) + (noutervalues*sizeof(SQObjectPtr))) - -struct SQNativeClosure : public CHAINABLE_OBJ -{ -private: - SQNativeClosure(SQSharedState *ss,SQFUNCTION func){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); _env = NULL;} -public: - static SQNativeClosure *Create(SQSharedState *ss,SQFUNCTION func,SQInteger nouters) - { - SQInteger size = _CALC_NATVIVECLOSURE_SIZE(nouters); - SQNativeClosure *nc=(SQNativeClosure*)SQ_MALLOC(size); - new (nc) SQNativeClosure(ss,func); - nc->_outervalues = (SQObjectPtr *)(nc + 1); - nc->_noutervalues = nouters; - _CONSTRUCT_VECTOR(SQObjectPtr,nc->_noutervalues,nc->_outervalues); - return nc; - } - SQNativeClosure *Clone() - { - SQNativeClosure * ret = SQNativeClosure::Create(_opt_ss(this),_function,_noutervalues); - ret->_env = _env; - if(ret->_env) __ObjAddRef(ret->_env); - ret->_name = _name; - _COPY_VECTOR(ret->_outervalues,_outervalues,_noutervalues); - ret->_typecheck.copy(_typecheck); - ret->_nparamscheck = _nparamscheck; - return ret; - } - ~SQNativeClosure() - { - __ObjRelease(_env); - REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this); - } - void Release(){ - SQInteger size = _CALC_NATVIVECLOSURE_SIZE(_noutervalues); - _DESTRUCT_VECTOR(SQObjectPtr,_noutervalues,_outervalues); - this->~SQNativeClosure(); - sq_free(this,size); - } - -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - void Finalize() { _NULL_SQOBJECT_VECTOR(_outervalues,_noutervalues); } - SQObjectType GetType() {return OT_NATIVECLOSURE;} -#endif - SQInteger _nparamscheck; - SQIntVec _typecheck; - SQObjectPtr *_outervalues; - SQUnsignedInteger _noutervalues; - SQWeakRef *_env; - SQFUNCTION _function; - SQObjectPtr _name; -}; - - - -#endif //_SQCLOSURE_H_ diff --git a/m_packages/squirrel/squirrel/sqcompiler.cpp b/m_packages/squirrel/squirrel/sqcompiler.cpp deleted file mode 100644 index 51ba75f8..00000000 --- a/m_packages/squirrel/squirrel/sqcompiler.cpp +++ /dev/null @@ -1,1636 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#ifndef NO_COMPILER -#include -#include -#include "sqopcodes.h" -#include "sqstring.h" -#include "sqfuncproto.h" -#include "sqcompiler.h" -#include "sqfuncstate.h" -#include "sqlexer.h" -#include "sqvm.h" -#include "sqtable.h" - -#define EXPR 1 -#define OBJECT 2 -#define BASE 3 -#define LOCAL 4 -#define OUTER 5 - -struct SQExpState { - SQInteger etype; /* expr. type; one of EXPR, OBJECT, BASE, OUTER or LOCAL */ - SQInteger epos; /* expr. location on stack; -1 for OBJECT and BASE */ - bool donot_get; /* signal not to deref the next value */ -}; - -#define MAX_COMPILER_ERROR_LEN 256 - -struct SQScope { - SQInteger outers; - SQInteger stacksize; -}; - -#define BEGIN_SCOPE() SQScope __oldscope__ = _scope; \ - _scope.outers = _fs->_outers; \ - _scope.stacksize = _fs->GetStackSize(); - -#define RESOLVE_OUTERS() if(_fs->GetStackSize() != _scope.stacksize) { \ - if(_fs->CountOuters(_scope.stacksize)) { \ - _fs->AddInstruction(_OP_CLOSE,0,_scope.stacksize); \ - } \ - } - -#define END_SCOPE_NO_CLOSE() { if(_fs->GetStackSize() != _scope.stacksize) { \ - _fs->SetStackSize(_scope.stacksize); \ - } \ - _scope = __oldscope__; \ - } - -#define END_SCOPE() { SQInteger oldouters = _fs->_outers;\ - if(_fs->GetStackSize() != _scope.stacksize) { \ - _fs->SetStackSize(_scope.stacksize); \ - if(oldouters != _fs->_outers) { \ - _fs->AddInstruction(_OP_CLOSE,0,_scope.stacksize); \ - } \ - } \ - _scope = __oldscope__; \ - } - -#define BEGIN_BREAKBLE_BLOCK() SQInteger __nbreaks__=_fs->_unresolvedbreaks.size(); \ - SQInteger __ncontinues__=_fs->_unresolvedcontinues.size(); \ - _fs->_breaktargets.push_back(0);_fs->_continuetargets.push_back(0); - -#define END_BREAKBLE_BLOCK(continue_target) {__nbreaks__=_fs->_unresolvedbreaks.size()-__nbreaks__; \ - __ncontinues__=_fs->_unresolvedcontinues.size()-__ncontinues__; \ - if(__ncontinues__>0)ResolveContinues(_fs,__ncontinues__,continue_target); \ - if(__nbreaks__>0)ResolveBreaks(_fs,__nbreaks__); \ - _fs->_breaktargets.pop_back();_fs->_continuetargets.pop_back();} - -class SQCompiler -{ -public: - SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) - { - _vm=v; - _lex.Init(_ss(v), rg, up,ThrowError,this); - _sourcename = SQString::Create(_ss(v), sourcename); - _lineinfo = lineinfo;_raiseerror = raiseerror; - _scope.outers = 0; - _scope.stacksize = 0; - _compilererror[0] = _SC('\0'); - } - static void ThrowError(void *ud, const SQChar *s) { - SQCompiler *c = (SQCompiler *)ud; - c->Error(s); - } - void Error(const SQChar *s, ...) - { - va_list vl; - va_start(vl, s); - scvsprintf(_compilererror, MAX_COMPILER_ERROR_LEN, s, vl); - va_end(vl); - longjmp(_errorjmp,1); - } - void Lex(){ _token = _lex.Lex();} - SQObject Expect(SQInteger tok) - { - - if(_token != tok) { - if(_token == TK_CONSTRUCTOR && tok == TK_IDENTIFIER) { - //do nothing - } - else { - const SQChar *etypename; - if(tok > 255) { - switch(tok) - { - case TK_IDENTIFIER: - etypename = _SC("IDENTIFIER"); - break; - case TK_STRING_LITERAL: - etypename = _SC("STRING_LITERAL"); - break; - case TK_INTEGER: - etypename = _SC("INTEGER"); - break; - case TK_FLOAT: - etypename = _SC("FLOAT"); - break; - default: - etypename = _lex.Tok2Str(tok); - } - Error(_SC("expected '%s'"), etypename); - } - Error(_SC("expected '%c'"), tok); - } - } - SQObjectPtr ret; - switch(tok) - { - case TK_IDENTIFIER: - ret = _fs->CreateString(_lex._svalue); - break; - case TK_STRING_LITERAL: - ret = _fs->CreateString(_lex._svalue,_lex._longstr.size()-1); - break; - case TK_INTEGER: - ret = SQObjectPtr(_lex._nvalue); - break; - case TK_FLOAT: - ret = SQObjectPtr(_lex._fvalue); - break; - } - Lex(); - return ret; - } - bool IsEndOfStatement() { return ((_lex._prevtoken == _SC('\n')) || (_token == SQUIRREL_EOB) || (_token == _SC('}')) || (_token == _SC(';'))); } - void OptionalSemicolon() - { - if(_token == _SC(';')) { Lex(); return; } - if(!IsEndOfStatement()) { - Error(_SC("end of statement expected (; or lf)")); - } - } - void MoveIfCurrentTargetIsLocal() { - SQInteger trg = _fs->TopTarget(); - if(_fs->IsLocal(trg)) { - trg = _fs->PopTarget(); //pops the target and moves it - _fs->AddInstruction(_OP_MOVE, _fs->PushTarget(), trg); - } - } - bool Compile(SQObjectPtr &o) - { - _debugline = 1; - _debugop = 0; - - SQFuncState funcstate(_ss(_vm), NULL,ThrowError,this); - funcstate._name = SQString::Create(_ss(_vm), _SC("main")); - _fs = &funcstate; - _fs->AddParameter(_fs->CreateString(_SC("this"))); - _fs->AddParameter(_fs->CreateString(_SC("vargv"))); - _fs->_varparams = true; - _fs->_sourcename = _sourcename; - SQInteger stacksize = _fs->GetStackSize(); - if(setjmp(_errorjmp) == 0) { - Lex(); - while(_token > 0){ - Statement(); - if(_lex._prevtoken != _SC('}') && _lex._prevtoken != _SC(';')) OptionalSemicolon(); - } - _fs->SetStackSize(stacksize); - _fs->AddLineInfos(_lex._currentline, _lineinfo, true); - _fs->AddInstruction(_OP_RETURN, 0xFF); - _fs->SetStackSize(0); - o =_fs->BuildProto(); -#ifdef _DEBUG_DUMP - _fs->Dump(_funcproto(o)); -#endif - } - else { - if(_raiseerror && _ss(_vm)->_compilererrorhandler) { - _ss(_vm)->_compilererrorhandler(_vm, _compilererror, sq_type(_sourcename) == OT_STRING?_stringval(_sourcename):_SC("unknown"), - _lex._currentline, _lex._currentcolumn); - } - _vm->_lasterror = SQString::Create(_ss(_vm), _compilererror, -1); - return false; - } - return true; - } - void Statements() - { - while(_token != _SC('}') && _token != TK_DEFAULT && _token != TK_CASE) { - Statement(); - if(_lex._prevtoken != _SC('}') && _lex._prevtoken != _SC(';')) OptionalSemicolon(); - } - } - void Statement(bool closeframe = true) - { - _fs->AddLineInfos(_lex._currentline, _lineinfo); - switch(_token){ - case _SC(';'): Lex(); break; - case TK_IF: IfStatement(); break; - case TK_WHILE: WhileStatement(); break; - case TK_DO: DoWhileStatement(); break; - case TK_FOR: ForStatement(); break; - case TK_FOREACH: ForEachStatement(); break; - case TK_SWITCH: SwitchStatement(); break; - case TK_LOCAL: LocalDeclStatement(); break; - case TK_RETURN: - case TK_YIELD: { - SQOpcode op; - if(_token == TK_RETURN) { - op = _OP_RETURN; - } - else { - op = _OP_YIELD; - _fs->_bgenerator = true; - } - Lex(); - if(!IsEndOfStatement()) { - SQInteger retexp = _fs->GetCurrentPos()+1; - CommaExpr(); - if(op == _OP_RETURN && _fs->_traps > 0) - _fs->AddInstruction(_OP_POPTRAP, _fs->_traps, 0); - _fs->_returnexp = retexp; - _fs->AddInstruction(op, 1, _fs->PopTarget(),_fs->GetStackSize()); - } - else{ - if(op == _OP_RETURN && _fs->_traps > 0) - _fs->AddInstruction(_OP_POPTRAP, _fs->_traps ,0); - _fs->_returnexp = -1; - _fs->AddInstruction(op, 0xFF,0,_fs->GetStackSize()); - } - break;} - case TK_BREAK: - if(_fs->_breaktargets.size() <= 0)Error(_SC("'break' has to be in a loop block")); - if(_fs->_breaktargets.top() > 0){ - _fs->AddInstruction(_OP_POPTRAP, _fs->_breaktargets.top(), 0); - } - RESOLVE_OUTERS(); - _fs->AddInstruction(_OP_JMP, 0, -1234); - _fs->_unresolvedbreaks.push_back(_fs->GetCurrentPos()); - Lex(); - break; - case TK_CONTINUE: - if(_fs->_continuetargets.size() <= 0)Error(_SC("'continue' has to be in a loop block")); - if(_fs->_continuetargets.top() > 0) { - _fs->AddInstruction(_OP_POPTRAP, _fs->_continuetargets.top(), 0); - } - RESOLVE_OUTERS(); - _fs->AddInstruction(_OP_JMP, 0, -1234); - _fs->_unresolvedcontinues.push_back(_fs->GetCurrentPos()); - Lex(); - break; - case TK_FUNCTION: - FunctionStatement(); - break; - case TK_CLASS: - ClassStatement(); - break; - case TK_ENUM: - EnumStatement(); - break; - case _SC('{'):{ - BEGIN_SCOPE(); - Lex(); - Statements(); - Expect(_SC('}')); - if(closeframe) { - END_SCOPE(); - } - else { - END_SCOPE_NO_CLOSE(); - } - } - break; - case TK_TRY: - TryCatchStatement(); - break; - case TK_THROW: - Lex(); - CommaExpr(); - _fs->AddInstruction(_OP_THROW, _fs->PopTarget()); - break; - case TK_CONST: - { - Lex(); - SQObject id = Expect(TK_IDENTIFIER); - Expect('='); - SQObject val = ExpectScalar(); - OptionalSemicolon(); - SQTable *enums = _table(_ss(_vm)->_consts); - SQObjectPtr strongid = id; - enums->NewSlot(strongid,SQObjectPtr(val)); - strongid.Null(); - } - break; - default: - CommaExpr(); - _fs->DiscardTarget(); - //_fs->PopTarget(); - break; - } - _fs->SnoozeOpt(); - } - void EmitDerefOp(SQOpcode op) - { - SQInteger val = _fs->PopTarget(); - SQInteger key = _fs->PopTarget(); - SQInteger src = _fs->PopTarget(); - _fs->AddInstruction(op,_fs->PushTarget(),src,key,val); - } - void Emit2ArgsOP(SQOpcode op, SQInteger p3 = 0) - { - SQInteger p2 = _fs->PopTarget(); //src in OP_GET - SQInteger p1 = _fs->PopTarget(); //key in OP_GET - _fs->AddInstruction(op,_fs->PushTarget(), p1, p2, p3); - } - void EmitCompoundArith(SQInteger tok, SQInteger etype, SQInteger pos) - { - /* Generate code depending on the expression type */ - switch(etype) { - case LOCAL:{ - SQInteger p2 = _fs->PopTarget(); //src in OP_GET - SQInteger p1 = _fs->PopTarget(); //key in OP_GET - _fs->PushTarget(p1); - //EmitCompArithLocal(tok, p1, p1, p2); - _fs->AddInstruction(ChooseArithOpByToken(tok),p1, p2, p1, 0); - _fs->SnoozeOpt(); - } - break; - case OBJECT: - case BASE: - { - SQInteger val = _fs->PopTarget(); - SQInteger key = _fs->PopTarget(); - SQInteger src = _fs->PopTarget(); - /* _OP_COMPARITH mixes dest obj and source val in the arg1 */ - _fs->AddInstruction(_OP_COMPARITH, _fs->PushTarget(), (src<<16)|val, key, ChooseCompArithCharByToken(tok)); - } - break; - case OUTER: - { - SQInteger val = _fs->TopTarget(); - SQInteger tmp = _fs->PushTarget(); - _fs->AddInstruction(_OP_GETOUTER, tmp, pos); - _fs->AddInstruction(ChooseArithOpByToken(tok), tmp, val, tmp, 0); - _fs->PopTarget(); - _fs->PopTarget(); - _fs->AddInstruction(_OP_SETOUTER, _fs->PushTarget(), pos, tmp); - } - break; - } - } - void CommaExpr() - { - for(Expression();_token == ',';_fs->PopTarget(), Lex(), CommaExpr()); - } - void Expression() - { - SQExpState es = _es; - _es.etype = EXPR; - _es.epos = -1; - _es.donot_get = false; - LogicalOrExp(); - switch(_token) { - case _SC('='): - case TK_NEWSLOT: - case TK_MINUSEQ: - case TK_PLUSEQ: - case TK_MULEQ: - case TK_DIVEQ: - case TK_MODEQ:{ - SQInteger op = _token; - SQInteger ds = _es.etype; - SQInteger pos = _es.epos; - if(ds == EXPR) Error(_SC("can't assign expression")); - else if(ds == BASE) Error(_SC("'base' cannot be modified")); - Lex(); Expression(); - - switch(op){ - case TK_NEWSLOT: - if(ds == OBJECT || ds == BASE) - EmitDerefOp(_OP_NEWSLOT); - else //if _derefstate != DEREF_NO_DEREF && DEREF_FIELD so is the index of a local - Error(_SC("can't 'create' a local slot")); - break; - case _SC('='): //ASSIGN - switch(ds) { - case LOCAL: - { - SQInteger src = _fs->PopTarget(); - SQInteger dst = _fs->TopTarget(); - _fs->AddInstruction(_OP_MOVE, dst, src); - } - break; - case OBJECT: - case BASE: - EmitDerefOp(_OP_SET); - break; - case OUTER: - { - SQInteger src = _fs->PopTarget(); - SQInteger dst = _fs->PushTarget(); - _fs->AddInstruction(_OP_SETOUTER, dst, pos, src); - } - } - break; - case TK_MINUSEQ: - case TK_PLUSEQ: - case TK_MULEQ: - case TK_DIVEQ: - case TK_MODEQ: - EmitCompoundArith(op, ds, pos); - break; - } - } - break; - case _SC('?'): { - Lex(); - _fs->AddInstruction(_OP_JZ, _fs->PopTarget()); - SQInteger jzpos = _fs->GetCurrentPos(); - SQInteger trg = _fs->PushTarget(); - Expression(); - SQInteger first_exp = _fs->PopTarget(); - if(trg != first_exp) _fs->AddInstruction(_OP_MOVE, trg, first_exp); - SQInteger endfirstexp = _fs->GetCurrentPos(); - _fs->AddInstruction(_OP_JMP, 0, 0); - Expect(_SC(':')); - SQInteger jmppos = _fs->GetCurrentPos(); - Expression(); - SQInteger second_exp = _fs->PopTarget(); - if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp); - _fs->SetInstructionParam(jmppos, 1, _fs->GetCurrentPos() - jmppos); - _fs->SetInstructionParam(jzpos, 1, endfirstexp - jzpos + 1); - _fs->SnoozeOpt(); - } - break; - default: - break; - } - _es = es; - } - template void INVOKE_EXP(T f) - { - SQExpState es = _es; - _es.etype = EXPR; - _es.epos = -1; - _es.donot_get = false; - (this->*f)(); - _es = es; - } - template void BIN_EXP(SQOpcode op, T f,SQInteger op3 = 0) - { - Lex(); - INVOKE_EXP(f); - SQInteger op1 = _fs->PopTarget();SQInteger op2 = _fs->PopTarget(); - _fs->AddInstruction(op, _fs->PushTarget(), op1, op2, op3); - _es.etype = EXPR; - } - void LogicalOrExp() - { - LogicalAndExp(); - for(;;) if(_token == TK_OR) { - SQInteger first_exp = _fs->PopTarget(); - SQInteger trg = _fs->PushTarget(); - _fs->AddInstruction(_OP_OR, trg, 0, first_exp, 0); - SQInteger jpos = _fs->GetCurrentPos(); - if(trg != first_exp) _fs->AddInstruction(_OP_MOVE, trg, first_exp); - Lex(); INVOKE_EXP(&SQCompiler::LogicalOrExp); - _fs->SnoozeOpt(); - SQInteger second_exp = _fs->PopTarget(); - if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp); - _fs->SnoozeOpt(); - _fs->SetInstructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos)); - _es.etype = EXPR; - break; - }else return; - } - void LogicalAndExp() - { - BitwiseOrExp(); - for(;;) switch(_token) { - case TK_AND: { - SQInteger first_exp = _fs->PopTarget(); - SQInteger trg = _fs->PushTarget(); - _fs->AddInstruction(_OP_AND, trg, 0, first_exp, 0); - SQInteger jpos = _fs->GetCurrentPos(); - if(trg != first_exp) _fs->AddInstruction(_OP_MOVE, trg, first_exp); - Lex(); INVOKE_EXP(&SQCompiler::LogicalAndExp); - _fs->SnoozeOpt(); - SQInteger second_exp = _fs->PopTarget(); - if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp); - _fs->SnoozeOpt(); - _fs->SetInstructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos)); - _es.etype = EXPR; - break; - } - - default: - return; - } - } - void BitwiseOrExp() - { - BitwiseXorExp(); - for(;;) if(_token == _SC('|')) - {BIN_EXP(_OP_BITW, &SQCompiler::BitwiseXorExp,BW_OR); - }else return; - } - void BitwiseXorExp() - { - BitwiseAndExp(); - for(;;) if(_token == _SC('^')) - {BIN_EXP(_OP_BITW, &SQCompiler::BitwiseAndExp,BW_XOR); - }else return; - } - void BitwiseAndExp() - { - EqExp(); - for(;;) if(_token == _SC('&')) - {BIN_EXP(_OP_BITW, &SQCompiler::EqExp,BW_AND); - }else return; - } - void EqExp() - { - CompExp(); - for(;;) switch(_token) { - case TK_EQ: BIN_EXP(_OP_EQ, &SQCompiler::CompExp); break; - case TK_NE: BIN_EXP(_OP_NE, &SQCompiler::CompExp); break; - case TK_3WAYSCMP: BIN_EXP(_OP_CMP, &SQCompiler::CompExp,CMP_3W); break; - default: return; - } - } - void CompExp() - { - ShiftExp(); - for(;;) switch(_token) { - case _SC('>'): BIN_EXP(_OP_CMP, &SQCompiler::ShiftExp,CMP_G); break; - case _SC('<'): BIN_EXP(_OP_CMP, &SQCompiler::ShiftExp,CMP_L); break; - case TK_GE: BIN_EXP(_OP_CMP, &SQCompiler::ShiftExp,CMP_GE); break; - case TK_LE: BIN_EXP(_OP_CMP, &SQCompiler::ShiftExp,CMP_LE); break; - case TK_IN: BIN_EXP(_OP_EXISTS, &SQCompiler::ShiftExp); break; - case TK_INSTANCEOF: BIN_EXP(_OP_INSTANCEOF, &SQCompiler::ShiftExp); break; - default: return; - } - } - void ShiftExp() - { - PlusExp(); - for(;;) switch(_token) { - case TK_USHIFTR: BIN_EXP(_OP_BITW, &SQCompiler::PlusExp,BW_USHIFTR); break; - case TK_SHIFTL: BIN_EXP(_OP_BITW, &SQCompiler::PlusExp,BW_SHIFTL); break; - case TK_SHIFTR: BIN_EXP(_OP_BITW, &SQCompiler::PlusExp,BW_SHIFTR); break; - default: return; - } - } - SQOpcode ChooseArithOpByToken(SQInteger tok) - { - switch(tok) { - case TK_PLUSEQ: case '+': return _OP_ADD; - case TK_MINUSEQ: case '-': return _OP_SUB; - case TK_MULEQ: case '*': return _OP_MUL; - case TK_DIVEQ: case '/': return _OP_DIV; - case TK_MODEQ: case '%': return _OP_MOD; - default: assert(0); - } - return _OP_ADD; - } - SQInteger ChooseCompArithCharByToken(SQInteger tok) - { - SQInteger oper; - switch(tok){ - case TK_MINUSEQ: oper = '-'; break; - case TK_PLUSEQ: oper = '+'; break; - case TK_MULEQ: oper = '*'; break; - case TK_DIVEQ: oper = '/'; break; - case TK_MODEQ: oper = '%'; break; - default: oper = 0; //shut up compiler - assert(0); break; - }; - return oper; - } - void PlusExp() - { - MultExp(); - for(;;) switch(_token) { - case _SC('+'): case _SC('-'): - BIN_EXP(ChooseArithOpByToken(_token), &SQCompiler::MultExp); break; - default: return; - } - } - - void MultExp() - { - PrefixedExpr(); - for(;;) switch(_token) { - case _SC('*'): case _SC('/'): case _SC('%'): - BIN_EXP(ChooseArithOpByToken(_token), &SQCompiler::PrefixedExpr); break; - default: return; - } - } - //if 'pos' != -1 the previous variable is a local variable - void PrefixedExpr() - { - SQInteger pos = Factor(); - for(;;) { - switch(_token) { - case _SC('.'): - pos = -1; - Lex(); - - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(Expect(TK_IDENTIFIER))); - if(_es.etype==BASE) { - Emit2ArgsOP(_OP_GET); - pos = _fs->TopTarget(); - _es.etype = EXPR; - _es.epos = pos; - } - else { - if(NeedGet()) { - Emit2ArgsOP(_OP_GET); - } - _es.etype = OBJECT; - } - break; - case _SC('['): - if(_lex._prevtoken == _SC('\n')) Error(_SC("cannot break deref/or comma needed after [exp]=exp slot declaration")); - Lex(); Expression(); Expect(_SC(']')); - pos = -1; - if(_es.etype==BASE) { - Emit2ArgsOP(_OP_GET); - pos = _fs->TopTarget(); - _es.etype = EXPR; - _es.epos = pos; - } - else { - if(NeedGet()) { - Emit2ArgsOP(_OP_GET); - } - _es.etype = OBJECT; - } - break; - case TK_MINUSMINUS: - case TK_PLUSPLUS: - { - if(IsEndOfStatement()) return; - SQInteger diff = (_token==TK_MINUSMINUS) ? -1 : 1; - Lex(); - switch(_es.etype) - { - case EXPR: Error(_SC("can't '++' or '--' an expression")); break; - case BASE: Error(_SC("'base' cannot be modified")); break; - case OBJECT: - if(_es.donot_get == true) { Error(_SC("can't '++' or '--' an expression")); break; } //mmh dor this make sense? - Emit2ArgsOP(_OP_PINC, diff); - break; - case LOCAL: { - SQInteger src = _fs->PopTarget(); - _fs->AddInstruction(_OP_PINCL, _fs->PushTarget(), src, 0, diff); - } - break; - case OUTER: { - SQInteger tmp1 = _fs->PushTarget(); - SQInteger tmp2 = _fs->PushTarget(); - _fs->AddInstruction(_OP_GETOUTER, tmp2, _es.epos); - _fs->AddInstruction(_OP_PINCL, tmp1, tmp2, 0, diff); - _fs->AddInstruction(_OP_SETOUTER, tmp2, _es.epos, tmp2); - _fs->PopTarget(); - } - } - _es.etype = EXPR; - } - return; - break; - case _SC('('): - switch(_es.etype) { - case OBJECT: { - SQInteger key = _fs->PopTarget(); /* location of the key */ - SQInteger table = _fs->PopTarget(); /* location of the object */ - SQInteger closure = _fs->PushTarget(); /* location for the closure */ - SQInteger ttarget = _fs->PushTarget(); /* location for 'this' pointer */ - _fs->AddInstruction(_OP_PREPCALL, closure, key, table, ttarget); - } - break; - case BASE: - //Emit2ArgsOP(_OP_GET); - _fs->AddInstruction(_OP_MOVE, _fs->PushTarget(), 0); - break; - case OUTER: - _fs->AddInstruction(_OP_GETOUTER, _fs->PushTarget(), _es.epos); - _fs->AddInstruction(_OP_MOVE, _fs->PushTarget(), 0); - break; - default: - _fs->AddInstruction(_OP_MOVE, _fs->PushTarget(), 0); - } - _es.etype = EXPR; - Lex(); - FunctionCallArgs(); - break; - default: return; - } - } - } - SQInteger Factor() - { - //_es.etype = EXPR; - switch(_token) - { - case TK_STRING_LITERAL: - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(_fs->CreateString(_lex._svalue,_lex._longstr.size()-1))); - Lex(); - break; - case TK_BASE: - Lex(); - _fs->AddInstruction(_OP_GETBASE, _fs->PushTarget()); - _es.etype = BASE; - _es.epos = _fs->TopTarget(); - return (_es.epos); - break; - case TK_IDENTIFIER: - case TK_CONSTRUCTOR: - case TK_THIS:{ - SQObject id; - SQObject constant; - - switch(_token) { - case TK_IDENTIFIER: id = _fs->CreateString(_lex._svalue); break; - case TK_THIS: id = _fs->CreateString(_SC("this"),4); break; - case TK_CONSTRUCTOR: id = _fs->CreateString(_SC("constructor"),11); break; - } - - SQInteger pos = -1; - Lex(); - if((pos = _fs->GetLocalVariable(id)) != -1) { - /* Handle a local variable (includes 'this') */ - _fs->PushTarget(pos); - _es.etype = LOCAL; - _es.epos = pos; - } - - else if((pos = _fs->GetOuterVariable(id)) != -1) { - /* Handle a free var */ - if(NeedGet()) { - _es.epos = _fs->PushTarget(); - _fs->AddInstruction(_OP_GETOUTER, _es.epos, pos); - /* _es.etype = EXPR; already default value */ - } - else { - _es.etype = OUTER; - _es.epos = pos; - } - } - - else if(_fs->IsConstant(id, constant)) { - /* Handle named constant */ - SQObjectPtr constval; - SQObject constid; - if(sq_type(constant) == OT_TABLE) { - Expect('.'); - constid = Expect(TK_IDENTIFIER); - if(!_table(constant)->Get(constid, constval)) { - constval.Null(); - Error(_SC("invalid constant [%s.%s]"), _stringval(id), _stringval(constid)); - } - } - else { - constval = constant; - } - _es.epos = _fs->PushTarget(); - - /* generate direct or literal function depending on size */ - SQObjectType ctype = sq_type(constval); - switch(ctype) { - case OT_INTEGER: EmitLoadConstInt(_integer(constval),_es.epos); break; - case OT_FLOAT: EmitLoadConstFloat(_float(constval),_es.epos); break; - case OT_BOOL: _fs->AddInstruction(_OP_LOADBOOL, _es.epos, _integer(constval)); break; - default: _fs->AddInstruction(_OP_LOAD,_es.epos,_fs->GetConstant(constval)); break; - } - _es.etype = EXPR; - } - else { - /* Handle a non-local variable, aka a field. Push the 'this' pointer on - * the virtual stack (always found in offset 0, so no instruction needs to - * be generated), and push the key next. Generate an _OP_LOAD instruction - * for the latter. If we are not using the variable as a dref expr, generate - * the _OP_GET instruction. - */ - _fs->PushTarget(0); - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(id)); - if(NeedGet()) { - Emit2ArgsOP(_OP_GET); - } - _es.etype = OBJECT; - } - return _es.epos; - } - break; - case TK_DOUBLE_COLON: // "::" - _fs->AddInstruction(_OP_LOADROOT, _fs->PushTarget()); - _es.etype = OBJECT; - _token = _SC('.'); /* hack: drop into PrefixExpr, case '.'*/ - _es.epos = -1; - return _es.epos; - break; - case TK_NULL: - _fs->AddInstruction(_OP_LOADNULLS, _fs->PushTarget(),1); - Lex(); - break; - case TK_INTEGER: EmitLoadConstInt(_lex._nvalue,-1); Lex(); break; - case TK_FLOAT: EmitLoadConstFloat(_lex._fvalue,-1); Lex(); break; - case TK_TRUE: case TK_FALSE: - _fs->AddInstruction(_OP_LOADBOOL, _fs->PushTarget(),_token == TK_TRUE?1:0); - Lex(); - break; - case _SC('['): { - _fs->AddInstruction(_OP_NEWOBJ, _fs->PushTarget(),0,0,NOT_ARRAY); - SQInteger apos = _fs->GetCurrentPos(),key = 0; - Lex(); - while(_token != _SC(']')) { - Expression(); - if(_token == _SC(',')) Lex(); - SQInteger val = _fs->PopTarget(); - SQInteger array = _fs->TopTarget(); - _fs->AddInstruction(_OP_APPENDARRAY, array, val, AAT_STACK); - key++; - } - _fs->SetInstructionParam(apos, 1, key); - Lex(); - } - break; - case _SC('{'): - _fs->AddInstruction(_OP_NEWOBJ, _fs->PushTarget(),0,0,NOT_TABLE); - Lex();ParseTableOrClass(_SC(','),_SC('}')); - break; - case TK_FUNCTION: FunctionExp();break; - case _SC('@'): FunctionExp(true);break; - case TK_CLASS: Lex(); ClassExp();break; - case _SC('-'): - Lex(); - switch(_token) { - case TK_INTEGER: EmitLoadConstInt(-_lex._nvalue,-1); Lex(); break; - case TK_FLOAT: EmitLoadConstFloat(-_lex._fvalue,-1); Lex(); break; - default: UnaryOP(_OP_NEG); - } - break; - case _SC('!'): Lex(); UnaryOP(_OP_NOT); break; - case _SC('~'): - Lex(); - if(_token == TK_INTEGER) { EmitLoadConstInt(~_lex._nvalue,-1); Lex(); break; } - UnaryOP(_OP_BWNOT); - break; - case TK_TYPEOF : Lex() ;UnaryOP(_OP_TYPEOF); break; - case TK_RESUME : Lex(); UnaryOP(_OP_RESUME); break; - case TK_CLONE : Lex(); UnaryOP(_OP_CLONE); break; - case TK_RAWCALL: Lex(); Expect('('); FunctionCallArgs(true); break; - case TK_MINUSMINUS : - case TK_PLUSPLUS :PrefixIncDec(_token); break; - case TK_DELETE : DeleteExpr(); break; - case _SC('('): Lex(); CommaExpr(); Expect(_SC(')')); - break; - case TK___LINE__: EmitLoadConstInt(_lex._currentline,-1); Lex(); break; - case TK___FILE__: _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(_sourcename)); Lex(); break; - default: Error(_SC("expression expected")); - } - _es.etype = EXPR; - return -1; - } - void EmitLoadConstInt(SQInteger value,SQInteger target) - { - if(target < 0) { - target = _fs->PushTarget(); - } - if(value <= INT_MAX && value > INT_MIN) { //does it fit in 32 bits? - _fs->AddInstruction(_OP_LOADINT, target,value); - } - else { - _fs->AddInstruction(_OP_LOAD, target, _fs->GetNumericConstant(value)); - } - } - void EmitLoadConstFloat(SQFloat value,SQInteger target) - { - if(target < 0) { - target = _fs->PushTarget(); - } - if(sizeof(SQFloat) == sizeof(SQInt32)) { - _fs->AddInstruction(_OP_LOADFLOAT, target,*((SQInt32 *)&value)); - } - else { - _fs->AddInstruction(_OP_LOAD, target, _fs->GetNumericConstant(value)); - } - } - void UnaryOP(SQOpcode op) - { - PrefixedExpr(); - if (_fs->_targetstack.size() == 0) - Error(_SC("cannot evaluate unary operator")); - SQInteger src = _fs->PopTarget(); - _fs->AddInstruction(op, _fs->PushTarget(), src); - } - bool NeedGet() - { - switch(_token) { - case _SC('='): case _SC('('): case TK_NEWSLOT: case TK_MODEQ: case TK_MULEQ: - case TK_DIVEQ: case TK_MINUSEQ: case TK_PLUSEQ: - return false; - case TK_PLUSPLUS: case TK_MINUSMINUS: - if (!IsEndOfStatement()) { - return false; - } - break; - } - return (!_es.donot_get || ( _es.donot_get && (_token == _SC('.') || _token == _SC('[')))); - } - void FunctionCallArgs(bool rawcall = false) - { - SQInteger nargs = 1;//this - while(_token != _SC(')')) { - Expression(); - MoveIfCurrentTargetIsLocal(); - nargs++; - if(_token == _SC(',')){ - Lex(); - if(_token == ')') Error(_SC("expression expected, found ')'")); - } - } - Lex(); - if (rawcall) { - if (nargs < 3) Error(_SC("rawcall requires at least 2 parameters (callee and this)")); - nargs -= 2; //removes callee and this from count - } - for(SQInteger i = 0; i < (nargs - 1); i++) _fs->PopTarget(); - SQInteger stackbase = _fs->PopTarget(); - SQInteger closure = _fs->PopTarget(); - _fs->AddInstruction(_OP_CALL, _fs->PushTarget(), closure, stackbase, nargs); - if (_token == '{') - { - SQInteger retval = _fs->TopTarget(); - SQInteger nkeys = 0; - Lex(); - while (_token != '}') { - switch (_token) { - case _SC('['): - Lex(); CommaExpr(); Expect(_SC(']')); - Expect(_SC('=')); Expression(); - break; - default: - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(Expect(TK_IDENTIFIER))); - Expect(_SC('=')); Expression(); - break; - } - if (_token == ',') Lex(); - nkeys++; - SQInteger val = _fs->PopTarget(); - SQInteger key = _fs->PopTarget(); - _fs->AddInstruction(_OP_SET, 0xFF, retval, key, val); - } - Lex(); - } - } - void ParseTableOrClass(SQInteger separator,SQInteger terminator) - { - SQInteger tpos = _fs->GetCurrentPos(),nkeys = 0; - while(_token != terminator) { - bool hasattrs = false; - bool isstatic = false; - //check if is an attribute - if(separator == ';') { - if(_token == TK_ATTR_OPEN) { - _fs->AddInstruction(_OP_NEWOBJ, _fs->PushTarget(),0,0,NOT_TABLE); Lex(); - ParseTableOrClass(',',TK_ATTR_CLOSE); - hasattrs = true; - } - if(_token == TK_STATIC) { - isstatic = true; - Lex(); - } - } - switch(_token) { - case TK_FUNCTION: - case TK_CONSTRUCTOR:{ - SQInteger tk = _token; - Lex(); - SQObject id = tk == TK_FUNCTION ? Expect(TK_IDENTIFIER) : _fs->CreateString(_SC("constructor")); - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(id)); - SQInteger boundtarget = 0xFF; - if (_token == _SC('[')) { - boundtarget = ParseBindEnv(); - } - Expect(_SC('(')); - - CreateFunction(id, boundtarget); - _fs->AddInstruction(_OP_CLOSURE, _fs->PushTarget(), _fs->_functions.size() - 1, boundtarget); - } - break; - case _SC('['): - Lex(); CommaExpr(); Expect(_SC(']')); - Expect(_SC('=')); Expression(); - break; - case TK_STRING_LITERAL: //JSON - if(separator == ',') { //only works for tables - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(Expect(TK_STRING_LITERAL))); - Expect(_SC(':')); Expression(); - break; - } - default : - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(Expect(TK_IDENTIFIER))); - Expect(_SC('=')); Expression(); - } - if(_token == separator) Lex();//optional comma/semicolon - nkeys++; - SQInteger val = _fs->PopTarget(); - SQInteger key = _fs->PopTarget(); - SQInteger attrs = hasattrs ? _fs->PopTarget():-1; - ((void)attrs); - assert((hasattrs && (attrs == key-1)) || !hasattrs); - unsigned char flags = (hasattrs?NEW_SLOT_ATTRIBUTES_FLAG:0)|(isstatic?NEW_SLOT_STATIC_FLAG:0); - SQInteger table = _fs->TopTarget(); //<AddInstruction(_OP_NEWSLOT, 0xFF, table, key, val); - } - else { - _fs->AddInstruction(_OP_NEWSLOTA, flags, table, key, val); //this for classes only as it invokes _newmember - } - } - if(separator == _SC(',')) //hack recognizes a table from the separator - _fs->SetInstructionParam(tpos, 1, nkeys); - Lex(); - } - void LocalDeclStatement() - { - SQObject varname; - Lex(); - if( _token == TK_FUNCTION) { - SQInteger boundtarget = 0xFF; - Lex(); - varname = Expect(TK_IDENTIFIER); - if (_token == _SC('[')) { - boundtarget = ParseBindEnv(); - } - Expect(_SC('(')); - CreateFunction(varname,0xFF,false); - _fs->AddInstruction(_OP_CLOSURE, _fs->PushTarget(), _fs->_functions.size() - 1, boundtarget); - _fs->PopTarget(); - _fs->PushLocalVariable(varname); - return; - } - - do { - varname = Expect(TK_IDENTIFIER); - if(_token == _SC('=')) { - Lex(); Expression(); - SQInteger src = _fs->PopTarget(); - SQInteger dest = _fs->PushTarget(); - if (dest != src) { - if (_fs->IsLocal(src)) { - _fs->SnoozeOpt(); - } - _fs->AddInstruction(_OP_MOVE, dest, src); - } - } - else{ - _fs->AddInstruction(_OP_LOADNULLS, _fs->PushTarget(),1); - } - _fs->PopTarget(); - _fs->PushLocalVariable(varname); - if(_token == _SC(',')) Lex(); else break; - } while(1); - } - void IfBlock() - { - if (_token == _SC('{')) - { - BEGIN_SCOPE(); - Lex(); - Statements(); - Expect(_SC('}')); - if (true) { - END_SCOPE(); - } - else { - END_SCOPE_NO_CLOSE(); - } - } - else { - Statement(); - if (_lex._prevtoken != _SC('}') && _lex._prevtoken != _SC(';')) OptionalSemicolon(); - } - } - void IfStatement() - { - SQInteger jmppos; - bool haselse = false; - Lex(); Expect(_SC('(')); CommaExpr(); Expect(_SC(')')); - _fs->AddInstruction(_OP_JZ, _fs->PopTarget()); - SQInteger jnepos = _fs->GetCurrentPos(); - - IfBlock(); - - SQInteger endifblock = _fs->GetCurrentPos(); - if(_token == TK_ELSE){ - haselse = true; - _fs->AddInstruction(_OP_JMP); - jmppos = _fs->GetCurrentPos(); - Lex(); - IfBlock(); - _fs->SetInstructionParam(jmppos, 1, _fs->GetCurrentPos() - jmppos); - } - _fs->SetInstructionParam(jnepos, 1, endifblock - jnepos + (haselse?1:0)); - } - void WhileStatement() - { - SQInteger jzpos, jmppos; - jmppos = _fs->GetCurrentPos(); - Lex(); Expect(_SC('(')); CommaExpr(); Expect(_SC(')')); - - BEGIN_BREAKBLE_BLOCK(); - _fs->AddInstruction(_OP_JZ, _fs->PopTarget()); - jzpos = _fs->GetCurrentPos(); - BEGIN_SCOPE(); - - Statement(); - - END_SCOPE(); - _fs->AddInstruction(_OP_JMP, 0, jmppos - _fs->GetCurrentPos() - 1); - _fs->SetInstructionParam(jzpos, 1, _fs->GetCurrentPos() - jzpos); - - END_BREAKBLE_BLOCK(jmppos); - } - void DoWhileStatement() - { - Lex(); - SQInteger jmptrg = _fs->GetCurrentPos(); - BEGIN_BREAKBLE_BLOCK() - BEGIN_SCOPE(); - Statement(); - END_SCOPE(); - Expect(TK_WHILE); - SQInteger continuetrg = _fs->GetCurrentPos(); - Expect(_SC('(')); CommaExpr(); Expect(_SC(')')); - _fs->AddInstruction(_OP_JZ, _fs->PopTarget(), 1); - _fs->AddInstruction(_OP_JMP, 0, jmptrg - _fs->GetCurrentPos() - 1); - END_BREAKBLE_BLOCK(continuetrg); - } - void ForStatement() - { - Lex(); - BEGIN_SCOPE(); - Expect(_SC('(')); - if(_token == TK_LOCAL) LocalDeclStatement(); - else if(_token != _SC(';')){ - CommaExpr(); - _fs->PopTarget(); - } - Expect(_SC(';')); - _fs->SnoozeOpt(); - SQInteger jmppos = _fs->GetCurrentPos(); - SQInteger jzpos = -1; - if(_token != _SC(';')) { CommaExpr(); _fs->AddInstruction(_OP_JZ, _fs->PopTarget()); jzpos = _fs->GetCurrentPos(); } - Expect(_SC(';')); - _fs->SnoozeOpt(); - SQInteger expstart = _fs->GetCurrentPos() + 1; - if(_token != _SC(')')) { - CommaExpr(); - _fs->PopTarget(); - } - Expect(_SC(')')); - _fs->SnoozeOpt(); - SQInteger expend = _fs->GetCurrentPos(); - SQInteger expsize = (expend - expstart) + 1; - SQInstructionVec exp; - if(expsize > 0) { - for(SQInteger i = 0; i < expsize; i++) - exp.push_back(_fs->GetInstruction(expstart + i)); - _fs->PopInstructions(expsize); - } - BEGIN_BREAKBLE_BLOCK() - Statement(); - SQInteger continuetrg = _fs->GetCurrentPos(); - if(expsize > 0) { - for(SQInteger i = 0; i < expsize; i++) - _fs->AddInstruction(exp[i]); - } - _fs->AddInstruction(_OP_JMP, 0, jmppos - _fs->GetCurrentPos() - 1, 0); - if(jzpos> 0) _fs->SetInstructionParam(jzpos, 1, _fs->GetCurrentPos() - jzpos); - - END_BREAKBLE_BLOCK(continuetrg); - - END_SCOPE(); - } - void ForEachStatement() - { - SQObject idxname, valname; - Lex(); Expect(_SC('(')); valname = Expect(TK_IDENTIFIER); - if(_token == _SC(',')) { - idxname = valname; - Lex(); valname = Expect(TK_IDENTIFIER); - } - else{ - idxname = _fs->CreateString(_SC("@INDEX@")); - } - Expect(TK_IN); - - //save the stack size - BEGIN_SCOPE(); - //put the table in the stack(evaluate the table expression) - Expression(); Expect(_SC(')')); - SQInteger container = _fs->TopTarget(); - //push the index local var - SQInteger indexpos = _fs->PushLocalVariable(idxname); - _fs->AddInstruction(_OP_LOADNULLS, indexpos,1); - //push the value local var - SQInteger valuepos = _fs->PushLocalVariable(valname); - _fs->AddInstruction(_OP_LOADNULLS, valuepos,1); - //push reference index - SQInteger itrpos = _fs->PushLocalVariable(_fs->CreateString(_SC("@ITERATOR@"))); //use invalid id to make it inaccessible - _fs->AddInstruction(_OP_LOADNULLS, itrpos,1); - SQInteger jmppos = _fs->GetCurrentPos(); - _fs->AddInstruction(_OP_FOREACH, container, 0, indexpos); - SQInteger foreachpos = _fs->GetCurrentPos(); - _fs->AddInstruction(_OP_POSTFOREACH, container, 0, indexpos); - //generate the statement code - BEGIN_BREAKBLE_BLOCK() - Statement(); - _fs->AddInstruction(_OP_JMP, 0, jmppos - _fs->GetCurrentPos() - 1); - _fs->SetInstructionParam(foreachpos, 1, _fs->GetCurrentPos() - foreachpos); - _fs->SetInstructionParam(foreachpos + 1, 1, _fs->GetCurrentPos() - foreachpos); - END_BREAKBLE_BLOCK(foreachpos - 1); - //restore the local variable stack(remove index,val and ref idx) - _fs->PopTarget(); - END_SCOPE(); - } - void SwitchStatement() - { - Lex(); Expect(_SC('(')); CommaExpr(); Expect(_SC(')')); - Expect(_SC('{')); - SQInteger expr = _fs->TopTarget(); - bool bfirst = true; - SQInteger tonextcondjmp = -1; - SQInteger skipcondjmp = -1; - SQInteger __nbreaks__ = _fs->_unresolvedbreaks.size(); - _fs->_breaktargets.push_back(0); - while(_token == TK_CASE) { - if(!bfirst) { - _fs->AddInstruction(_OP_JMP, 0, 0); - skipcondjmp = _fs->GetCurrentPos(); - _fs->SetInstructionParam(tonextcondjmp, 1, _fs->GetCurrentPos() - tonextcondjmp); - } - //condition - Lex(); Expression(); Expect(_SC(':')); - SQInteger trg = _fs->PopTarget(); - SQInteger eqtarget = trg; - bool local = _fs->IsLocal(trg); - if(local) { - eqtarget = _fs->PushTarget(); //we need to allocate a extra reg - } - _fs->AddInstruction(_OP_EQ, eqtarget, trg, expr); - _fs->AddInstruction(_OP_JZ, eqtarget, 0); - if(local) { - _fs->PopTarget(); - } - - //end condition - if(skipcondjmp != -1) { - _fs->SetInstructionParam(skipcondjmp, 1, (_fs->GetCurrentPos() - skipcondjmp)); - } - tonextcondjmp = _fs->GetCurrentPos(); - BEGIN_SCOPE(); - Statements(); - END_SCOPE(); - bfirst = false; - } - if(tonextcondjmp != -1) - _fs->SetInstructionParam(tonextcondjmp, 1, _fs->GetCurrentPos() - tonextcondjmp); - if(_token == TK_DEFAULT) { - Lex(); Expect(_SC(':')); - BEGIN_SCOPE(); - Statements(); - END_SCOPE(); - } - Expect(_SC('}')); - _fs->PopTarget(); - __nbreaks__ = _fs->_unresolvedbreaks.size() - __nbreaks__; - if(__nbreaks__ > 0)ResolveBreaks(_fs, __nbreaks__); - _fs->_breaktargets.pop_back(); - } - void FunctionStatement() - { - SQObject id; - Lex(); id = Expect(TK_IDENTIFIER); - _fs->PushTarget(0); - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(id)); - if(_token == TK_DOUBLE_COLON) Emit2ArgsOP(_OP_GET); - - while(_token == TK_DOUBLE_COLON) { - Lex(); - id = Expect(TK_IDENTIFIER); - _fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(id)); - if(_token == TK_DOUBLE_COLON) Emit2ArgsOP(_OP_GET); - } - SQInteger boundtarget = 0xFF; - if (_token == _SC('[')) { - boundtarget = ParseBindEnv(); - } - Expect(_SC('(')); - CreateFunction(id, boundtarget); - _fs->AddInstruction(_OP_CLOSURE, _fs->PushTarget(), _fs->_functions.size() - 1, boundtarget); - EmitDerefOp(_OP_NEWSLOT); - _fs->PopTarget(); - } - void ClassStatement() - { - SQExpState es; - Lex(); - es = _es; - _es.donot_get = true; - PrefixedExpr(); - if(_es.etype == EXPR) { - Error(_SC("invalid class name")); - } - else if(_es.etype == OBJECT || _es.etype == BASE) { - ClassExp(); - EmitDerefOp(_OP_NEWSLOT); - _fs->PopTarget(); - } - else { - Error(_SC("cannot create a class in a local with the syntax(class )")); - } - _es = es; - } - SQObject ExpectScalar() - { - SQObject val; - val._type = OT_NULL; val._unVal.nInteger = 0; //shut up GCC 4.x - switch(_token) { - case TK_INTEGER: - val._type = OT_INTEGER; - val._unVal.nInteger = _lex._nvalue; - break; - case TK_FLOAT: - val._type = OT_FLOAT; - val._unVal.fFloat = _lex._fvalue; - break; - case TK_STRING_LITERAL: - val = _fs->CreateString(_lex._svalue,_lex._longstr.size()-1); - break; - case TK_TRUE: - case TK_FALSE: - val._type = OT_BOOL; - val._unVal.nInteger = _token == TK_TRUE ? 1 : 0; - break; - case '-': - Lex(); - switch(_token) - { - case TK_INTEGER: - val._type = OT_INTEGER; - val._unVal.nInteger = -_lex._nvalue; - break; - case TK_FLOAT: - val._type = OT_FLOAT; - val._unVal.fFloat = -_lex._fvalue; - break; - default: - Error(_SC("scalar expected : integer, float")); - } - break; - default: - Error(_SC("scalar expected : integer, float, or string")); - } - Lex(); - return val; - } - void EnumStatement() - { - Lex(); - SQObject id = Expect(TK_IDENTIFIER); - Expect(_SC('{')); - - SQObject table = _fs->CreateTable(); - SQInteger nval = 0; - while(_token != _SC('}')) { - SQObject key = Expect(TK_IDENTIFIER); - SQObject val; - if(_token == _SC('=')) { - Lex(); - val = ExpectScalar(); - } - else { - val._type = OT_INTEGER; - val._unVal.nInteger = nval++; - } - _table(table)->NewSlot(SQObjectPtr(key),SQObjectPtr(val)); - if(_token == ',') Lex(); - } - SQTable *enums = _table(_ss(_vm)->_consts); - SQObjectPtr strongid = id; - enums->NewSlot(SQObjectPtr(strongid),SQObjectPtr(table)); - strongid.Null(); - Lex(); - } - void TryCatchStatement() - { - SQObject exid; - Lex(); - _fs->AddInstruction(_OP_PUSHTRAP,0,0); - _fs->_traps++; - if(_fs->_breaktargets.size()) _fs->_breaktargets.top()++; - if(_fs->_continuetargets.size()) _fs->_continuetargets.top()++; - SQInteger trappos = _fs->GetCurrentPos(); - { - BEGIN_SCOPE(); - Statement(); - END_SCOPE(); - } - _fs->_traps--; - _fs->AddInstruction(_OP_POPTRAP, 1, 0); - if(_fs->_breaktargets.size()) _fs->_breaktargets.top()--; - if(_fs->_continuetargets.size()) _fs->_continuetargets.top()--; - _fs->AddInstruction(_OP_JMP, 0, 0); - SQInteger jmppos = _fs->GetCurrentPos(); - _fs->SetInstructionParam(trappos, 1, (_fs->GetCurrentPos() - trappos)); - Expect(TK_CATCH); Expect(_SC('(')); exid = Expect(TK_IDENTIFIER); Expect(_SC(')')); - { - BEGIN_SCOPE(); - SQInteger ex_target = _fs->PushLocalVariable(exid); - _fs->SetInstructionParam(trappos, 0, ex_target); - Statement(); - _fs->SetInstructionParams(jmppos, 0, (_fs->GetCurrentPos() - jmppos), 0); - END_SCOPE(); - } - } - SQInteger ParseBindEnv() - { - SQInteger boundtarget; - Lex(); - Expression(); - boundtarget = _fs->TopTarget(); - Expect(_SC(']')); - return boundtarget; - } - void FunctionExp(bool lambda = false) - { - Lex(); - SQInteger boundtarget = 0xFF; - if (_token == _SC('[')) { - boundtarget = ParseBindEnv(); - } - Expect(_SC('(')); - SQObjectPtr dummy; - CreateFunction(dummy, boundtarget, lambda); - _fs->AddInstruction(_OP_CLOSURE, _fs->PushTarget(), _fs->_functions.size() - 1, boundtarget); - } - void ClassExp() - { - SQInteger base = -1; - SQInteger attrs = -1; - if(_token == TK_EXTENDS) { - Lex(); Expression(); - base = _fs->TopTarget(); - } - if(_token == TK_ATTR_OPEN) { - Lex(); - _fs->AddInstruction(_OP_NEWOBJ, _fs->PushTarget(),0,0,NOT_TABLE); - ParseTableOrClass(_SC(','),TK_ATTR_CLOSE); - attrs = _fs->TopTarget(); - } - Expect(_SC('{')); - if(attrs != -1) _fs->PopTarget(); - if(base != -1) _fs->PopTarget(); - _fs->AddInstruction(_OP_NEWOBJ, _fs->PushTarget(), base, attrs,NOT_CLASS); - ParseTableOrClass(_SC(';'),_SC('}')); - } - void DeleteExpr() - { - SQExpState es; - Lex(); - es = _es; - _es.donot_get = true; - PrefixedExpr(); - if(_es.etype==EXPR) Error(_SC("can't delete an expression")); - if(_es.etype==BASE) Error(_SC("can't delete 'base'")); - if(_es.etype==OBJECT) { - Emit2ArgsOP(_OP_DELETE); - } - else { - Error(_SC("cannot delete an (outer) local")); - } - _es = es; - } - void PrefixIncDec(SQInteger token) - { - SQExpState es; - SQInteger diff = (token==TK_MINUSMINUS) ? -1 : 1; - Lex(); - es = _es; - _es.donot_get = true; - PrefixedExpr(); - if(_es.etype==EXPR) { - Error(_SC("can't '++' or '--' an expression")); - } - else if (_es.etype == BASE) { - Error(_SC("can't '++' or '--' a base")); - } - else if(_es.etype==OBJECT) { - Emit2ArgsOP(_OP_INC, diff); - } - else if(_es.etype==LOCAL) { - SQInteger src = _fs->TopTarget(); - _fs->AddInstruction(_OP_INCL, src, src, 0, diff); - - } - else if(_es.etype==OUTER) { - SQInteger tmp = _fs->PushTarget(); - _fs->AddInstruction(_OP_GETOUTER, tmp, _es.epos); - _fs->AddInstruction(_OP_INCL, tmp, tmp, 0, diff); - _fs->AddInstruction(_OP_SETOUTER, tmp, _es.epos, tmp); - } - _es = es; - } - void CreateFunction(SQObject &name,SQInteger boundtarget,bool lambda = false) - { - SQFuncState *funcstate = _fs->PushChildState(_ss(_vm)); - funcstate->_name = name; - SQObject paramname; - funcstate->AddParameter(_fs->CreateString(_SC("this"))); - funcstate->_sourcename = _sourcename; - SQInteger defparams = 0; - while(_token!=_SC(')')) { - if(_token == TK_VARPARAMS) { - if(defparams > 0) Error(_SC("function with default parameters cannot have variable number of parameters")); - funcstate->AddParameter(_fs->CreateString(_SC("vargv"))); - funcstate->_varparams = true; - Lex(); - if(_token != _SC(')')) Error(_SC("expected ')'")); - break; - } - else { - paramname = Expect(TK_IDENTIFIER); - funcstate->AddParameter(paramname); - if(_token == _SC('=')) { - Lex(); - Expression(); - funcstate->AddDefaultParam(_fs->TopTarget()); - defparams++; - } - else { - if(defparams > 0) Error(_SC("expected '='")); - } - if(_token == _SC(',')) Lex(); - else if(_token != _SC(')')) Error(_SC("expected ')' or ','")); - } - } - Expect(_SC(')')); - if (boundtarget != 0xFF) { - _fs->PopTarget(); - } - for(SQInteger n = 0; n < defparams; n++) { - _fs->PopTarget(); - } - - SQFuncState *currchunk = _fs; - _fs = funcstate; - if(lambda) { - Expression(); - _fs->AddInstruction(_OP_RETURN, 1, _fs->PopTarget());} - else { - Statement(false); - } - funcstate->AddLineInfos(_lex._prevtoken == _SC('\n')?_lex._lasttokenline:_lex._currentline, _lineinfo, true); - funcstate->AddInstruction(_OP_RETURN, -1); - funcstate->SetStackSize(0); - - SQFunctionProto *func = funcstate->BuildProto(); -#ifdef _DEBUG_DUMP - funcstate->Dump(func); -#endif - _fs = currchunk; - _fs->_functions.push_back(func); - _fs->PopChildState(); - } - void ResolveBreaks(SQFuncState *funcstate, SQInteger ntoresolve) - { - while(ntoresolve > 0) { - SQInteger pos = funcstate->_unresolvedbreaks.back(); - funcstate->_unresolvedbreaks.pop_back(); - //set the jmp instruction - funcstate->SetInstructionParams(pos, 0, funcstate->GetCurrentPos() - pos, 0); - ntoresolve--; - } - } - void ResolveContinues(SQFuncState *funcstate, SQInteger ntoresolve, SQInteger targetpos) - { - while(ntoresolve > 0) { - SQInteger pos = funcstate->_unresolvedcontinues.back(); - funcstate->_unresolvedcontinues.pop_back(); - //set the jmp instruction - funcstate->SetInstructionParams(pos, 0, targetpos - pos, 0); - ntoresolve--; - } - } -private: - SQInteger _token; - SQFuncState *_fs; - SQObjectPtr _sourcename; - SQLexer _lex; - bool _lineinfo; - bool _raiseerror; - SQInteger _debugline; - SQInteger _debugop; - SQExpState _es; - SQScope _scope; - SQChar _compilererror[MAX_COMPILER_ERROR_LEN]; - jmp_buf _errorjmp; - SQVM *_vm; -}; - -bool Compile(SQVM *vm,SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out, bool raiseerror, bool lineinfo) -{ - SQCompiler p(vm, rg, up, sourcename, raiseerror, lineinfo); - return p.Compile(out); -} - -#endif diff --git a/m_packages/squirrel/squirrel/sqcompiler.h b/m_packages/squirrel/squirrel/sqcompiler.h deleted file mode 100644 index e7da6423..00000000 --- a/m_packages/squirrel/squirrel/sqcompiler.h +++ /dev/null @@ -1,79 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQCOMPILER_H_ -#define _SQCOMPILER_H_ - -struct SQVM; - -#define TK_IDENTIFIER 258 -#define TK_STRING_LITERAL 259 -#define TK_INTEGER 260 -#define TK_FLOAT 261 -#define TK_BASE 262 -#define TK_DELETE 263 -#define TK_EQ 264 -#define TK_NE 265 -#define TK_LE 266 -#define TK_GE 267 -#define TK_SWITCH 268 -#define TK_ARROW 269 -#define TK_AND 270 -#define TK_OR 271 -#define TK_IF 272 -#define TK_ELSE 273 -#define TK_WHILE 274 -#define TK_BREAK 275 -#define TK_FOR 276 -#define TK_DO 277 -#define TK_NULL 278 -#define TK_FOREACH 279 -#define TK_IN 280 -#define TK_NEWSLOT 281 -#define TK_MODULO 282 -#define TK_LOCAL 283 -#define TK_CLONE 284 -#define TK_FUNCTION 285 -#define TK_RETURN 286 -#define TK_TYPEOF 287 -#define TK_UMINUS 288 -#define TK_PLUSEQ 289 -#define TK_MINUSEQ 290 -#define TK_CONTINUE 291 -#define TK_YIELD 292 -#define TK_TRY 293 -#define TK_CATCH 294 -#define TK_THROW 295 -#define TK_SHIFTL 296 -#define TK_SHIFTR 297 -#define TK_RESUME 298 -#define TK_DOUBLE_COLON 299 -#define TK_CASE 300 -#define TK_DEFAULT 301 -#define TK_THIS 302 -#define TK_PLUSPLUS 303 -#define TK_MINUSMINUS 304 -#define TK_3WAYSCMP 305 -#define TK_USHIFTR 306 -#define TK_CLASS 307 -#define TK_EXTENDS 308 -#define TK_CONSTRUCTOR 310 -#define TK_INSTANCEOF 311 -#define TK_VARPARAMS 312 -#define TK___LINE__ 313 -#define TK___FILE__ 314 -#define TK_TRUE 315 -#define TK_FALSE 316 -#define TK_MULEQ 317 -#define TK_DIVEQ 318 -#define TK_MODEQ 319 -#define TK_ATTR_OPEN 320 -#define TK_ATTR_CLOSE 321 -#define TK_STATIC 322 -#define TK_ENUM 323 -#define TK_CONST 324 -#define TK_RAWCALL 325 - - - -typedef void(*CompilerErrorFunc)(void *ud, const SQChar *s); -bool Compile(SQVM *vm, SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out, bool raiseerror, bool lineinfo); -#endif //_SQCOMPILER_H_ diff --git a/m_packages/squirrel/squirrel/sqdebug.cpp b/m_packages/squirrel/squirrel/sqdebug.cpp deleted file mode 100644 index d55b1b2e..00000000 --- a/m_packages/squirrel/squirrel/sqdebug.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include -#include "sqvm.h" -#include "sqfuncproto.h" -#include "sqclosure.h" -#include "sqstring.h" - -SQRESULT sq_getfunctioninfo(HSQUIRRELVM v,SQInteger level,SQFunctionInfo *fi) -{ - SQInteger cssize = v->_callsstacksize; - if (cssize > level) { - SQVM::CallInfo &ci = v->_callsstack[cssize-level-1]; - if(sq_isclosure(ci._closure)) { - SQClosure *c = _closure(ci._closure); - SQFunctionProto *proto = c->_function; - fi->funcid = proto; - fi->name = sq_type(proto->_name) == OT_STRING?_stringval(proto->_name):_SC("unknown"); - fi->source = sq_type(proto->_sourcename) == OT_STRING?_stringval(proto->_sourcename):_SC("unknown"); - fi->line = proto->_lineinfos[0]._line; - return SQ_OK; - } - } - return sq_throwerror(v,_SC("the object is not a closure")); -} - -SQRESULT sq_stackinfos(HSQUIRRELVM v, SQInteger level, SQStackInfos *si) -{ - SQInteger cssize = v->_callsstacksize; - if (cssize > level) { - memset(si, 0, sizeof(SQStackInfos)); - SQVM::CallInfo &ci = v->_callsstack[cssize-level-1]; - switch (sq_type(ci._closure)) { - case OT_CLOSURE:{ - SQFunctionProto *func = _closure(ci._closure)->_function; - if (sq_type(func->_name) == OT_STRING) - si->funcname = _stringval(func->_name); - if (sq_type(func->_sourcename) == OT_STRING) - si->source = _stringval(func->_sourcename); - si->line = func->GetLine(ci._ip); - } - break; - case OT_NATIVECLOSURE: - si->source = _SC("NATIVE"); - si->funcname = _SC("unknown"); - if(sq_type(_nativeclosure(ci._closure)->_name) == OT_STRING) - si->funcname = _stringval(_nativeclosure(ci._closure)->_name); - si->line = -1; - break; - default: break; //shutup compiler - } - return SQ_OK; - } - return SQ_ERROR; -} - -void SQVM::Raise_Error(const SQChar *s, ...) -{ - va_list vl; - va_start(vl, s); - SQInteger buffersize = (SQInteger)scstrlen(s)+(NUMBER_MAX_CHAR*2); - scvsprintf(_sp(sq_rsl(buffersize)),buffersize, s, vl); - va_end(vl); - _lasterror = SQString::Create(_ss(this),_spval,-1); -} - -void SQVM::Raise_Error(const SQObjectPtr &desc) -{ - _lasterror = desc; -} - -SQString *SQVM::PrintObjVal(const SQObjectPtr &o) -{ - switch(sq_type(o)) { - case OT_STRING: return _string(o); - case OT_INTEGER: - scsprintf(_sp(sq_rsl(NUMBER_MAX_CHAR+1)),sq_rsl(NUMBER_MAX_CHAR), _PRINT_INT_FMT, _integer(o)); - return SQString::Create(_ss(this), _spval); - break; - case OT_FLOAT: - scsprintf(_sp(sq_rsl(NUMBER_MAX_CHAR+1)), sq_rsl(NUMBER_MAX_CHAR), _SC("%.14g"), _float(o)); - return SQString::Create(_ss(this), _spval); - break; - default: - return SQString::Create(_ss(this), GetTypeName(o)); - } -} - -void SQVM::Raise_IdxError(const SQObjectPtr &o) -{ - SQObjectPtr oval = PrintObjVal(o); - Raise_Error(_SC("the index '%.50s' does not exist"), _stringval(oval)); -} - -void SQVM::Raise_CompareError(const SQObject &o1, const SQObject &o2) -{ - SQObjectPtr oval1 = PrintObjVal(o1), oval2 = PrintObjVal(o2); - Raise_Error(_SC("comparison between '%.50s' and '%.50s'"), _stringval(oval1), _stringval(oval2)); -} - - -void SQVM::Raise_ParamTypeError(SQInteger nparam,SQInteger typemask,SQInteger type) -{ - SQObjectPtr exptypes = SQString::Create(_ss(this), _SC(""), -1); - SQInteger found = 0; - for(SQInteger i=0; i<16; i++) - { - SQInteger mask = ((SQInteger)1) << i; - if(typemask & (mask)) { - if(found>0) StringCat(exptypes,SQString::Create(_ss(this), _SC("|"), -1), exptypes); - found ++; - StringCat(exptypes,SQString::Create(_ss(this), IdType2Name((SQObjectType)mask), -1), exptypes); - } - } - Raise_Error(_SC("parameter %d has an invalid type '%s' ; expected: '%s'"), nparam, IdType2Name((SQObjectType)type), _stringval(exptypes)); -} diff --git a/m_packages/squirrel/squirrel/sqfuncproto.h b/m_packages/squirrel/squirrel/sqfuncproto.h deleted file mode 100644 index 546dbabb..00000000 --- a/m_packages/squirrel/squirrel/sqfuncproto.h +++ /dev/null @@ -1,154 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQFUNCTION_H_ -#define _SQFUNCTION_H_ - -#include "sqopcodes.h" - -enum SQOuterType { - otLOCAL = 0, - otOUTER = 1 -}; - -struct SQOuterVar -{ - - SQOuterVar(){} - SQOuterVar(const SQObjectPtr &name,const SQObjectPtr &src,SQOuterType t) - { - _name = name; - _src=src; - _type=t; - } - SQOuterVar(const SQOuterVar &ov) - { - _type=ov._type; - _src=ov._src; - _name=ov._name; - } - SQOuterType _type; - SQObjectPtr _name; - SQObjectPtr _src; -}; - -struct SQLocalVarInfo -{ - SQLocalVarInfo():_start_op(0),_end_op(0),_pos(0){} - SQLocalVarInfo(const SQLocalVarInfo &lvi) - { - _name=lvi._name; - _start_op=lvi._start_op; - _end_op=lvi._end_op; - _pos=lvi._pos; - } - SQObjectPtr _name; - SQUnsignedInteger _start_op; - SQUnsignedInteger _end_op; - SQUnsignedInteger _pos; -}; - -struct SQLineInfo { SQInteger _line;SQInteger _op; }; - -typedef sqvector SQOuterVarVec; -typedef sqvector SQLocalVarInfoVec; -typedef sqvector SQLineInfoVec; - -#define _FUNC_SIZE(ni,nl,nparams,nfuncs,nouters,nlineinf,localinf,defparams) (sizeof(SQFunctionProto) \ - +((ni-1)*sizeof(SQInstruction))+(nl*sizeof(SQObjectPtr)) \ - +(nparams*sizeof(SQObjectPtr))+(nfuncs*sizeof(SQObjectPtr)) \ - +(nouters*sizeof(SQOuterVar))+(nlineinf*sizeof(SQLineInfo)) \ - +(localinf*sizeof(SQLocalVarInfo))+(defparams*sizeof(SQInteger))) - - -struct SQFunctionProto : public CHAINABLE_OBJ -{ -private: - SQFunctionProto(SQSharedState *ss); - ~SQFunctionProto(); - -public: - static SQFunctionProto *Create(SQSharedState *ss,SQInteger ninstructions, - SQInteger nliterals,SQInteger nparameters, - SQInteger nfunctions,SQInteger noutervalues, - SQInteger nlineinfos,SQInteger nlocalvarinfos,SQInteger ndefaultparams) - { - SQFunctionProto *f; - //I compact the whole class and members in a single memory allocation - f = (SQFunctionProto *)sq_vm_malloc(_FUNC_SIZE(ninstructions,nliterals,nparameters,nfunctions,noutervalues,nlineinfos,nlocalvarinfos,ndefaultparams)); - new (f) SQFunctionProto(ss); - f->_ninstructions = ninstructions; - f->_literals = (SQObjectPtr*)&f->_instructions[ninstructions]; - f->_nliterals = nliterals; - f->_parameters = (SQObjectPtr*)&f->_literals[nliterals]; - f->_nparameters = nparameters; - f->_functions = (SQObjectPtr*)&f->_parameters[nparameters]; - f->_nfunctions = nfunctions; - f->_outervalues = (SQOuterVar*)&f->_functions[nfunctions]; - f->_noutervalues = noutervalues; - f->_lineinfos = (SQLineInfo *)&f->_outervalues[noutervalues]; - f->_nlineinfos = nlineinfos; - f->_localvarinfos = (SQLocalVarInfo *)&f->_lineinfos[nlineinfos]; - f->_nlocalvarinfos = nlocalvarinfos; - f->_defaultparams = (SQInteger *)&f->_localvarinfos[nlocalvarinfos]; - f->_ndefaultparams = ndefaultparams; - - _CONSTRUCT_VECTOR(SQObjectPtr,f->_nliterals,f->_literals); - _CONSTRUCT_VECTOR(SQObjectPtr,f->_nparameters,f->_parameters); - _CONSTRUCT_VECTOR(SQObjectPtr,f->_nfunctions,f->_functions); - _CONSTRUCT_VECTOR(SQOuterVar,f->_noutervalues,f->_outervalues); - //_CONSTRUCT_VECTOR(SQLineInfo,f->_nlineinfos,f->_lineinfos); //not required are 2 integers - _CONSTRUCT_VECTOR(SQLocalVarInfo,f->_nlocalvarinfos,f->_localvarinfos); - return f; - } - void Release(){ - _DESTRUCT_VECTOR(SQObjectPtr,_nliterals,_literals); - _DESTRUCT_VECTOR(SQObjectPtr,_nparameters,_parameters); - _DESTRUCT_VECTOR(SQObjectPtr,_nfunctions,_functions); - _DESTRUCT_VECTOR(SQOuterVar,_noutervalues,_outervalues); - //_DESTRUCT_VECTOR(SQLineInfo,_nlineinfos,_lineinfos); //not required are 2 integers - _DESTRUCT_VECTOR(SQLocalVarInfo,_nlocalvarinfos,_localvarinfos); - SQInteger size = _FUNC_SIZE(_ninstructions,_nliterals,_nparameters,_nfunctions,_noutervalues,_nlineinfos,_nlocalvarinfos,_ndefaultparams); - this->~SQFunctionProto(); - sq_vm_free(this,size); - } - - const SQChar* GetLocal(SQVM *v,SQUnsignedInteger stackbase,SQUnsignedInteger nseq,SQUnsignedInteger nop); - SQInteger GetLine(SQInstruction *curr); - bool Save(SQVM *v,SQUserPointer up,SQWRITEFUNC write); - static bool Load(SQVM *v,SQUserPointer up,SQREADFUNC read,SQObjectPtr &ret); -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - void Finalize(){ _NULL_SQOBJECT_VECTOR(_literals,_nliterals); } - SQObjectType GetType() {return OT_FUNCPROTO;} -#endif - SQObjectPtr _sourcename; - SQObjectPtr _name; - SQInteger _stacksize; - bool _bgenerator; - SQInteger _varparams; - - SQInteger _nlocalvarinfos; - SQLocalVarInfo *_localvarinfos; - - SQInteger _nlineinfos; - SQLineInfo *_lineinfos; - - SQInteger _nliterals; - SQObjectPtr *_literals; - - SQInteger _nparameters; - SQObjectPtr *_parameters; - - SQInteger _nfunctions; - SQObjectPtr *_functions; - - SQInteger _noutervalues; - SQOuterVar *_outervalues; - - SQInteger _ndefaultparams; - SQInteger *_defaultparams; - - SQInteger _ninstructions; - SQInstruction _instructions[1]; -}; - -#endif //_SQFUNCTION_H_ diff --git a/m_packages/squirrel/squirrel/sqfuncstate.cpp b/m_packages/squirrel/squirrel/sqfuncstate.cpp deleted file mode 100644 index 779b40df..00000000 --- a/m_packages/squirrel/squirrel/sqfuncstate.cpp +++ /dev/null @@ -1,649 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#ifndef NO_COMPILER -#include "sqcompiler.h" -#include "sqstring.h" -#include "sqfuncproto.h" -#include "sqtable.h" -#include "sqopcodes.h" -#include "sqfuncstate.h" - -#ifdef _DEBUG_DUMP -SQInstructionDesc g_InstrDesc[]={ - {_SC("_OP_LINE")}, - {_SC("_OP_LOAD")}, - {_SC("_OP_LOADINT")}, - {_SC("_OP_LOADFLOAT")}, - {_SC("_OP_DLOAD")}, - {_SC("_OP_TAILCALL")}, - {_SC("_OP_CALL")}, - {_SC("_OP_PREPCALL")}, - {_SC("_OP_PREPCALLK")}, - {_SC("_OP_GETK")}, - {_SC("_OP_MOVE")}, - {_SC("_OP_NEWSLOT")}, - {_SC("_OP_DELETE")}, - {_SC("_OP_SET")}, - {_SC("_OP_GET")}, - {_SC("_OP_EQ")}, - {_SC("_OP_NE")}, - {_SC("_OP_ADD")}, - {_SC("_OP_SUB")}, - {_SC("_OP_MUL")}, - {_SC("_OP_DIV")}, - {_SC("_OP_MOD")}, - {_SC("_OP_BITW")}, - {_SC("_OP_RETURN")}, - {_SC("_OP_LOADNULLS")}, - {_SC("_OP_LOADROOT")}, - {_SC("_OP_LOADBOOL")}, - {_SC("_OP_DMOVE")}, - {_SC("_OP_JMP")}, - {_SC("_OP_JCMP")}, - {_SC("_OP_JZ")}, - {_SC("_OP_SETOUTER")}, - {_SC("_OP_GETOUTER")}, - {_SC("_OP_NEWOBJ")}, - {_SC("_OP_APPENDARRAY")}, - {_SC("_OP_COMPARITH")}, - {_SC("_OP_INC")}, - {_SC("_OP_INCL")}, - {_SC("_OP_PINC")}, - {_SC("_OP_PINCL")}, - {_SC("_OP_CMP")}, - {_SC("_OP_EXISTS")}, - {_SC("_OP_INSTANCEOF")}, - {_SC("_OP_AND")}, - {_SC("_OP_OR")}, - {_SC("_OP_NEG")}, - {_SC("_OP_NOT")}, - {_SC("_OP_BWNOT")}, - {_SC("_OP_CLOSURE")}, - {_SC("_OP_YIELD")}, - {_SC("_OP_RESUME")}, - {_SC("_OP_FOREACH")}, - {_SC("_OP_POSTFOREACH")}, - {_SC("_OP_CLONE")}, - {_SC("_OP_TYPEOF")}, - {_SC("_OP_PUSHTRAP")}, - {_SC("_OP_POPTRAP")}, - {_SC("_OP_THROW")}, - {_SC("_OP_NEWSLOTA")}, - {_SC("_OP_GETBASE")}, - {_SC("_OP_CLOSE")}, -}; -#endif -void DumpLiteral(SQObjectPtr &o) -{ - switch(sq_type(o)){ - case OT_STRING: scprintf(_SC("\"%s\""),_stringval(o));break; - case OT_FLOAT: scprintf(_SC("{%f}"),_float(o));break; - case OT_INTEGER: scprintf(_SC("{") _PRINT_INT_FMT _SC("}"),_integer(o));break; - case OT_BOOL: scprintf(_SC("%s"),_integer(o)?_SC("true"):_SC("false"));break; - default: scprintf(_SC("(%s %p)"),GetTypeName(o),(void*)_rawval(o));break; break; //shut up compiler - } -} - -SQFuncState::SQFuncState(SQSharedState *ss,SQFuncState *parent,CompilerErrorFunc efunc,void *ed) -{ - _nliterals = 0; - _literals = SQTable::Create(ss,0); - _strings = SQTable::Create(ss,0); - _sharedstate = ss; - _lastline = 0; - _optimization = true; - _parent = parent; - _stacksize = 0; - _traps = 0; - _returnexp = 0; - _varparams = false; - _errfunc = efunc; - _errtarget = ed; - _bgenerator = false; - _outers = 0; - _ss = ss; - -} - -void SQFuncState::Error(const SQChar *err) -{ - _errfunc(_errtarget,err); -} - -#ifdef _DEBUG_DUMP -void SQFuncState::Dump(SQFunctionProto *func) -{ - SQUnsignedInteger n=0,i; - SQInteger si; - scprintf(_SC("SQInstruction sizeof %d\n"),(SQInt32)sizeof(SQInstruction)); - scprintf(_SC("SQObject sizeof %d\n"), (SQInt32)sizeof(SQObject)); - scprintf(_SC("--------------------------------------------------------------------\n")); - scprintf(_SC("*****FUNCTION [%s]\n"),sq_type(func->_name)==OT_STRING?_stringval(func->_name):_SC("unknown")); - scprintf(_SC("-----LITERALS\n")); - SQObjectPtr refidx,key,val; - SQInteger idx; - SQObjectPtrVec templiterals; - templiterals.resize(_nliterals); - while((idx=_table(_literals)->Next(false,refidx,key,val))!=-1) { - refidx=idx; - templiterals[_integer(val)]=key; - } - for(i=0;i>\n")); - n=0; - for(i=0;i<_parameters.size();i++){ - scprintf(_SC("[%d] "), (SQInt32)n); - DumpLiteral(_parameters[i]); - scprintf(_SC("\n")); - n++; - } - scprintf(_SC("-----LOCALS\n")); - for(si=0;si_nlocalvarinfos;si++){ - SQLocalVarInfo lvi=func->_localvarinfos[si]; - scprintf(_SC("[%d] %s \t%d %d\n"), (SQInt32)lvi._pos,_stringval(lvi._name), (SQInt32)lvi._start_op, (SQInt32)lvi._end_op); - n++; - } - scprintf(_SC("-----LINE INFO\n")); - for(i=0;i<_lineinfos.size();i++){ - SQLineInfo li=_lineinfos[i]; - scprintf(_SC("op [%d] line [%d] \n"), (SQInt32)li._op, (SQInt32)li._line); - n++; - } - scprintf(_SC("-----dump\n")); - n=0; - for(i=0;i<_instructions.size();i++){ - SQInstruction &inst=_instructions[i]; - if(inst.op==_OP_LOAD || inst.op==_OP_DLOAD || inst.op==_OP_PREPCALLK || inst.op==_OP_GETK ){ - - SQInteger lidx = inst._arg1; - scprintf(_SC("[%03d] %15s %d "), (SQInt32)n,g_InstrDesc[inst.op].name,inst._arg0); - if(lidx >= 0xFFFFFFFF) - scprintf(_SC("null")); - else { - SQInteger refidx; - SQObjectPtr val,key,refo; - while(((refidx=_table(_literals)->Next(false,refo,key,val))!= -1) && (_integer(val) != lidx)) { - refo = refidx; - } - DumpLiteral(key); - } - if(inst.op != _OP_DLOAD) { - scprintf(_SC(" %d %d \n"),inst._arg2,inst._arg3); - } - else { - scprintf(_SC(" %d "),inst._arg2); - lidx = inst._arg3; - if(lidx >= 0xFFFFFFFF) - scprintf(_SC("null")); - else { - SQInteger refidx; - SQObjectPtr val,key,refo; - while(((refidx=_table(_literals)->Next(false,refo,key,val))!= -1) && (_integer(val) != lidx)) { - refo = refidx; - } - DumpLiteral(key); - scprintf(_SC("\n")); - } - } - } - else if(inst.op==_OP_LOADFLOAT) { - scprintf(_SC("[%03d] %15s %d %f %d %d\n"), (SQInt32)n,g_InstrDesc[inst.op].name,inst._arg0,*((SQFloat*)&inst._arg1),inst._arg2,inst._arg3); - } - /* else if(inst.op==_OP_ARITH){ - scprintf(_SC("[%03d] %15s %d %d %d %c\n"),n,g_InstrDesc[inst.op].name,inst._arg0,inst._arg1,inst._arg2,inst._arg3); - }*/ - else { - scprintf(_SC("[%03d] %15s %d %d %d %d\n"), (SQInt32)n,g_InstrDesc[inst.op].name,inst._arg0,inst._arg1,inst._arg2,inst._arg3); - } - n++; - } - scprintf(_SC("-----\n")); - scprintf(_SC("stack size[%d]\n"), (SQInt32)func->_stacksize); - scprintf(_SC("--------------------------------------------------------------------\n\n")); -} -#endif - -SQInteger SQFuncState::GetNumericConstant(const SQInteger cons) -{ - return GetConstant(SQObjectPtr(cons)); -} - -SQInteger SQFuncState::GetNumericConstant(const SQFloat cons) -{ - return GetConstant(SQObjectPtr(cons)); -} - -SQInteger SQFuncState::GetConstant(const SQObject &cons) -{ - SQObjectPtr val; - if(!_table(_literals)->Get(cons,val)) - { - val = _nliterals; - _table(_literals)->NewSlot(cons,val); - _nliterals++; - if(_nliterals > MAX_LITERALS) { - val.Null(); - Error(_SC("internal compiler error: too many literals")); - } - } - return _integer(val); -} - -void SQFuncState::SetInstructionParams(SQInteger pos,SQInteger arg0,SQInteger arg1,SQInteger arg2,SQInteger arg3) -{ - _instructions[pos]._arg0=(unsigned char)*((SQUnsignedInteger *)&arg0); - _instructions[pos]._arg1=(SQInt32)*((SQUnsignedInteger *)&arg1); - _instructions[pos]._arg2=(unsigned char)*((SQUnsignedInteger *)&arg2); - _instructions[pos]._arg3=(unsigned char)*((SQUnsignedInteger *)&arg3); -} - -void SQFuncState::SetInstructionParam(SQInteger pos,SQInteger arg,SQInteger val) -{ - switch(arg){ - case 0:_instructions[pos]._arg0=(unsigned char)*((SQUnsignedInteger *)&val);break; - case 1:case 4:_instructions[pos]._arg1=(SQInt32)*((SQUnsignedInteger *)&val);break; - case 2:_instructions[pos]._arg2=(unsigned char)*((SQUnsignedInteger *)&val);break; - case 3:_instructions[pos]._arg3=(unsigned char)*((SQUnsignedInteger *)&val);break; - }; -} - -SQInteger SQFuncState::AllocStackPos() -{ - SQInteger npos=_vlocals.size(); - _vlocals.push_back(SQLocalVarInfo()); - if(_vlocals.size()>((SQUnsignedInteger)_stacksize)) { - if(_stacksize>MAX_FUNC_STACKSIZE) Error(_SC("internal compiler error: too many locals")); - _stacksize=_vlocals.size(); - } - return npos; -} - -SQInteger SQFuncState::PushTarget(SQInteger n) -{ - if(n!=-1){ - _targetstack.push_back(n); - return n; - } - n=AllocStackPos(); - _targetstack.push_back(n); - return n; -} - -SQInteger SQFuncState::GetUpTarget(SQInteger n){ - return _targetstack[((_targetstack.size()-1)-n)]; -} - -SQInteger SQFuncState::TopTarget(){ - return _targetstack.back(); -} -SQInteger SQFuncState::PopTarget() -{ - SQUnsignedInteger npos=_targetstack.back(); - assert(npos < _vlocals.size()); - SQLocalVarInfo &t = _vlocals[npos]; - if(sq_type(t._name)==OT_NULL){ - _vlocals.pop_back(); - } - _targetstack.pop_back(); - return npos; -} - -SQInteger SQFuncState::GetStackSize() -{ - return _vlocals.size(); -} - -SQInteger SQFuncState::CountOuters(SQInteger stacksize) -{ - SQInteger outers = 0; - SQInteger k = _vlocals.size() - 1; - while(k >= stacksize) { - SQLocalVarInfo &lvi = _vlocals[k]; - k--; - if(lvi._end_op == UINT_MINUS_ONE) { //this means is an outer - outers++; - } - } - return outers; -} - -void SQFuncState::SetStackSize(SQInteger n) -{ - SQInteger size=_vlocals.size(); - while(size>n){ - size--; - SQLocalVarInfo lvi = _vlocals.back(); - if(sq_type(lvi._name)!=OT_NULL){ - if(lvi._end_op == UINT_MINUS_ONE) { //this means is an outer - _outers--; - } - lvi._end_op = GetCurrentPos(); - _localvarinfos.push_back(lvi); - } - _vlocals.pop_back(); - } -} - -bool SQFuncState::IsConstant(const SQObject &name,SQObject &e) -{ - SQObjectPtr val; - if(_table(_sharedstate->_consts)->Get(name,val)) { - e = val; - return true; - } - return false; -} - -bool SQFuncState::IsLocal(SQUnsignedInteger stkpos) -{ - if(stkpos>=_vlocals.size())return false; - else if(sq_type(_vlocals[stkpos]._name)!=OT_NULL)return true; - return false; -} - -SQInteger SQFuncState::PushLocalVariable(const SQObject &name) -{ - SQInteger pos=_vlocals.size(); - SQLocalVarInfo lvi; - lvi._name=name; - lvi._start_op=GetCurrentPos()+1; - lvi._pos=_vlocals.size(); - _vlocals.push_back(lvi); - if(_vlocals.size()>((SQUnsignedInteger)_stacksize))_stacksize=_vlocals.size(); - return pos; -} - - - -SQInteger SQFuncState::GetLocalVariable(const SQObject &name) -{ - SQInteger locals=_vlocals.size(); - while(locals>=1){ - SQLocalVarInfo &lvi = _vlocals[locals-1]; - if(sq_type(lvi._name)==OT_STRING && _string(lvi._name)==_string(name)){ - return locals-1; - } - locals--; - } - return -1; -} - -void SQFuncState::MarkLocalAsOuter(SQInteger pos) -{ - SQLocalVarInfo &lvi = _vlocals[pos]; - lvi._end_op = UINT_MINUS_ONE; - _outers++; -} - -SQInteger SQFuncState::GetOuterVariable(const SQObject &name) -{ - SQInteger outers = _outervalues.size(); - for(SQInteger i = 0; iGetLocalVariable(name); - if(pos == -1) { - pos = _parent->GetOuterVariable(name); - if(pos != -1) { - _outervalues.push_back(SQOuterVar(name,SQObjectPtr(SQInteger(pos)),otOUTER)); //local - return _outervalues.size() - 1; - } - } - else { - _parent->MarkLocalAsOuter(pos); - _outervalues.push_back(SQOuterVar(name,SQObjectPtr(SQInteger(pos)),otLOCAL)); //local - return _outervalues.size() - 1; - - - } - } - return -1; -} - -void SQFuncState::AddParameter(const SQObject &name) -{ - PushLocalVariable(name); - _parameters.push_back(name); -} - -void SQFuncState::AddLineInfos(SQInteger line,bool lineop,bool force) -{ - if(_lastline!=line || force){ - SQLineInfo li; - li._line=line;li._op=(GetCurrentPos()+1); - if(lineop)AddInstruction(_OP_LINE,0,line); - if(_lastline!=line) { - _lineinfos.push_back(li); - } - _lastline=line; - } -} - -void SQFuncState::DiscardTarget() -{ - SQInteger discardedtarget = PopTarget(); - SQInteger size = _instructions.size(); - if(size > 0 && _optimization){ - SQInstruction &pi = _instructions[size-1];//previous instruction - switch(pi.op) { - case _OP_SET:case _OP_NEWSLOT:case _OP_SETOUTER:case _OP_CALL: - if(pi._arg0 == discardedtarget) { - pi._arg0 = 0xFF; - } - } - } -} - -void SQFuncState::AddInstruction(SQInstruction &i) -{ - SQInteger size = _instructions.size(); - if(size > 0 && _optimization){ //simple optimizer - SQInstruction &pi = _instructions[size-1];//previous instruction - switch(i.op) { - case _OP_JZ: - if( pi.op == _OP_CMP && pi._arg1 < 0xFF) { - pi.op = _OP_JCMP; - pi._arg0 = (unsigned char)pi._arg1; - pi._arg1 = i._arg1; - return; - } - break; - case _OP_SET: - case _OP_NEWSLOT: - if(i._arg0 == i._arg3) { - i._arg0 = 0xFF; - } - break; - case _OP_SETOUTER: - if(i._arg0 == i._arg2) { - i._arg0 = 0xFF; - } - break; - case _OP_RETURN: - if( _parent && i._arg0 != MAX_FUNC_STACKSIZE && pi.op == _OP_CALL && _returnexp < size-1) { - pi.op = _OP_TAILCALL; - } else if(pi.op == _OP_CLOSE){ - pi = i; - return; - } - break; - case _OP_GET: - if( pi.op == _OP_LOAD && pi._arg0 == i._arg2 && (!IsLocal(pi._arg0))){ - pi._arg2 = (unsigned char)i._arg1; - pi.op = _OP_GETK; - pi._arg0 = i._arg0; - - return; - } - break; - case _OP_PREPCALL: - if( pi.op == _OP_LOAD && pi._arg0 == i._arg1 && (!IsLocal(pi._arg0))){ - pi.op = _OP_PREPCALLK; - pi._arg0 = i._arg0; - pi._arg2 = i._arg2; - pi._arg3 = i._arg3; - return; - } - break; - case _OP_APPENDARRAY: { - SQInteger aat = -1; - switch(pi.op) { - case _OP_LOAD: aat = AAT_LITERAL; break; - case _OP_LOADINT: aat = AAT_INT; break; - case _OP_LOADBOOL: aat = AAT_BOOL; break; - case _OP_LOADFLOAT: aat = AAT_FLOAT; break; - default: break; - } - if(aat != -1 && pi._arg0 == i._arg1 && (!IsLocal(pi._arg0))){ - pi.op = _OP_APPENDARRAY; - pi._arg0 = i._arg0; - pi._arg2 = (unsigned char)aat; - pi._arg3 = MAX_FUNC_STACKSIZE; - return; - } - } - break; - case _OP_MOVE: - switch(pi.op) { - case _OP_GET: case _OP_ADD: case _OP_SUB: case _OP_MUL: case _OP_DIV: case _OP_MOD: case _OP_BITW: - case _OP_LOADINT: case _OP_LOADFLOAT: case _OP_LOADBOOL: case _OP_LOAD: - - if(pi._arg0 == i._arg1) - { - pi._arg0 = i._arg0; - _optimization = false; - //_result_elimination = false; - return; - } - } - - if(pi.op == _OP_MOVE) - { - pi.op = _OP_DMOVE; - pi._arg2 = i._arg0; - pi._arg3 = (unsigned char)i._arg1; - return; - } - break; - case _OP_LOAD: - if(pi.op == _OP_LOAD && i._arg1 < 256) { - pi.op = _OP_DLOAD; - pi._arg2 = i._arg0; - pi._arg3 = (unsigned char)i._arg1; - return; - } - break; - case _OP_EQ:case _OP_NE: - if(pi.op == _OP_LOAD && pi._arg0 == i._arg1 && (!IsLocal(pi._arg0) )) - { - pi.op = i.op; - pi._arg0 = i._arg0; - pi._arg2 = i._arg2; - pi._arg3 = MAX_FUNC_STACKSIZE; - return; - } - break; - case _OP_LOADNULLS: - if((pi.op == _OP_LOADNULLS && pi._arg0+pi._arg1 == i._arg0)) { - - pi._arg1 = pi._arg1 + 1; - pi.op = _OP_LOADNULLS; - return; - } - break; - case _OP_LINE: - if(pi.op == _OP_LINE) { - _instructions.pop_back(); - _lineinfos.pop_back(); - } - break; - } - } - _optimization = true; - _instructions.push_back(i); -} - -SQObject SQFuncState::CreateString(const SQChar *s,SQInteger len) -{ - SQObjectPtr ns(SQString::Create(_sharedstate,s,len)); - _table(_strings)->NewSlot(ns,(SQInteger)1); - return ns; -} - -SQObject SQFuncState::CreateTable() -{ - SQObjectPtr nt(SQTable::Create(_sharedstate,0)); - _table(_strings)->NewSlot(nt,(SQInteger)1); - return nt; -} - -SQFunctionProto *SQFuncState::BuildProto() -{ - - SQFunctionProto *f=SQFunctionProto::Create(_ss,_instructions.size(), - _nliterals,_parameters.size(),_functions.size(),_outervalues.size(), - _lineinfos.size(),_localvarinfos.size(),_defaultparams.size()); - - SQObjectPtr refidx,key,val; - SQInteger idx; - - f->_stacksize = _stacksize; - f->_sourcename = _sourcename; - f->_bgenerator = _bgenerator; - f->_name = _name; - - while((idx=_table(_literals)->Next(false,refidx,key,val))!=-1) { - f->_literals[_integer(val)]=key; - refidx=idx; - } - - for(SQUnsignedInteger nf = 0; nf < _functions.size(); nf++) f->_functions[nf] = _functions[nf]; - for(SQUnsignedInteger np = 0; np < _parameters.size(); np++) f->_parameters[np] = _parameters[np]; - for(SQUnsignedInteger no = 0; no < _outervalues.size(); no++) f->_outervalues[no] = _outervalues[no]; - for(SQUnsignedInteger nl = 0; nl < _localvarinfos.size(); nl++) f->_localvarinfos[nl] = _localvarinfos[nl]; - for(SQUnsignedInteger ni = 0; ni < _lineinfos.size(); ni++) f->_lineinfos[ni] = _lineinfos[ni]; - for(SQUnsignedInteger nd = 0; nd < _defaultparams.size(); nd++) f->_defaultparams[nd] = _defaultparams[nd]; - - memcpy(f->_instructions,&_instructions[0],_instructions.size()*sizeof(SQInstruction)); - - f->_varparams = _varparams; - - return f; -} - -SQFuncState *SQFuncState::PushChildState(SQSharedState *ss) -{ - SQFuncState *child = (SQFuncState *)sq_malloc(sizeof(SQFuncState)); - new (child) SQFuncState(ss,this,_errfunc,_errtarget); - _childstates.push_back(child); - return child; -} - -void SQFuncState::PopChildState() -{ - SQFuncState *child = _childstates.back(); - sq_delete(child,SQFuncState); - _childstates.pop_back(); -} - -SQFuncState::~SQFuncState() -{ - while(_childstates.size() > 0) - { - PopChildState(); - } -} - -#endif diff --git a/m_packages/squirrel/squirrel/sqfuncstate.h b/m_packages/squirrel/squirrel/sqfuncstate.h deleted file mode 100644 index 130aa54f..00000000 --- a/m_packages/squirrel/squirrel/sqfuncstate.h +++ /dev/null @@ -1,91 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQFUNCSTATE_H_ -#define _SQFUNCSTATE_H_ -/////////////////////////////////// -#include "squtils.h" - -struct SQFuncState -{ - SQFuncState(SQSharedState *ss,SQFuncState *parent,CompilerErrorFunc efunc,void *ed); - ~SQFuncState(); -#ifdef _DEBUG_DUMP - void Dump(SQFunctionProto *func); -#endif - void Error(const SQChar *err); - SQFuncState *PushChildState(SQSharedState *ss); - void PopChildState(); - void AddInstruction(SQOpcode _op,SQInteger arg0=0,SQInteger arg1=0,SQInteger arg2=0,SQInteger arg3=0){SQInstruction i(_op,arg0,arg1,arg2,arg3);AddInstruction(i);} - void AddInstruction(SQInstruction &i); - void SetInstructionParams(SQInteger pos,SQInteger arg0,SQInteger arg1,SQInteger arg2=0,SQInteger arg3=0); - void SetInstructionParam(SQInteger pos,SQInteger arg,SQInteger val); - SQInstruction &GetInstruction(SQInteger pos){return _instructions[pos];} - void PopInstructions(SQInteger size){for(SQInteger i=0;i _childstates; - SQInteger GetConstant(const SQObject &cons); -private: - CompilerErrorFunc _errfunc; - void *_errtarget; - SQSharedState *_ss; -}; - - -#endif //_SQFUNCSTATE_H_ - diff --git a/m_packages/squirrel/squirrel/sqlexer.cpp b/m_packages/squirrel/squirrel/sqlexer.cpp deleted file mode 100644 index 6a8e7c4f..00000000 --- a/m_packages/squirrel/squirrel/sqlexer.cpp +++ /dev/null @@ -1,563 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include -#include -#include "sqtable.h" -#include "sqstring.h" -#include "sqcompiler.h" -#include "sqlexer.h" - -#define CUR_CHAR (_currdata) -#define RETURN_TOKEN(t) { _prevtoken = _curtoken; _curtoken = t; return t;} -#define IS_EOB() (CUR_CHAR <= SQUIRREL_EOB) -#define NEXT() {Next();_currentcolumn++;} -#define INIT_TEMP_STRING() { _longstr.resize(0);} -#define APPEND_CHAR(c) { _longstr.push_back(c);} -#define TERMINATE_BUFFER() {_longstr.push_back(_SC('\0'));} -#define ADD_KEYWORD(key,id) _keywords->NewSlot( SQString::Create(ss, _SC(#key)) ,SQInteger(id)) - -SQLexer::SQLexer(){} -SQLexer::~SQLexer() -{ - _keywords->Release(); -} - -void SQLexer::Init(SQSharedState *ss, SQLEXREADFUNC rg, SQUserPointer up,CompilerErrorFunc efunc,void *ed) -{ - _errfunc = efunc; - _errtarget = ed; - _sharedstate = ss; - _keywords = SQTable::Create(ss, 37); - ADD_KEYWORD(while, TK_WHILE); - ADD_KEYWORD(do, TK_DO); - ADD_KEYWORD(if, TK_IF); - ADD_KEYWORD(else, TK_ELSE); - ADD_KEYWORD(break, TK_BREAK); - ADD_KEYWORD(continue, TK_CONTINUE); - ADD_KEYWORD(return, TK_RETURN); - ADD_KEYWORD(null, TK_NULL); - ADD_KEYWORD(function, TK_FUNCTION); - ADD_KEYWORD(local, TK_LOCAL); - ADD_KEYWORD(for, TK_FOR); - ADD_KEYWORD(foreach, TK_FOREACH); - ADD_KEYWORD(in, TK_IN); - ADD_KEYWORD(typeof, TK_TYPEOF); - ADD_KEYWORD(base, TK_BASE); - ADD_KEYWORD(delete, TK_DELETE); - ADD_KEYWORD(try, TK_TRY); - ADD_KEYWORD(catch, TK_CATCH); - ADD_KEYWORD(throw, TK_THROW); - ADD_KEYWORD(clone, TK_CLONE); - ADD_KEYWORD(yield, TK_YIELD); - ADD_KEYWORD(resume, TK_RESUME); - ADD_KEYWORD(switch, TK_SWITCH); - ADD_KEYWORD(case, TK_CASE); - ADD_KEYWORD(default, TK_DEFAULT); - ADD_KEYWORD(this, TK_THIS); - ADD_KEYWORD(class,TK_CLASS); - ADD_KEYWORD(extends,TK_EXTENDS); - ADD_KEYWORD(constructor,TK_CONSTRUCTOR); - ADD_KEYWORD(instanceof,TK_INSTANCEOF); - ADD_KEYWORD(true,TK_TRUE); - ADD_KEYWORD(false,TK_FALSE); - ADD_KEYWORD(static,TK_STATIC); - ADD_KEYWORD(enum,TK_ENUM); - ADD_KEYWORD(const,TK_CONST); - ADD_KEYWORD(__LINE__,TK___LINE__); - ADD_KEYWORD(__FILE__,TK___FILE__); - ADD_KEYWORD(rawcall, TK_RAWCALL); - - - _readf = rg; - _up = up; - _lasttokenline = _currentline = 1; - _currentcolumn = 0; - _prevtoken = -1; - _reached_eof = SQFalse; - Next(); -} - -void SQLexer::Error(const SQChar *err) -{ - _errfunc(_errtarget,err); -} - -void SQLexer::Next() -{ - SQInteger t = _readf(_up); - if(t > MAX_CHAR) Error(_SC("Invalid character")); - if(t != 0) { - _currdata = (LexChar)t; - return; - } - _currdata = SQUIRREL_EOB; - _reached_eof = SQTrue; -} - -const SQChar *SQLexer::Tok2Str(SQInteger tok) -{ - SQObjectPtr itr, key, val; - SQInteger nitr; - while((nitr = _keywords->Next(false,itr, key, val)) != -1) { - itr = (SQInteger)nitr; - if(((SQInteger)_integer(val)) == tok) - return _stringval(key); - } - return NULL; -} - -void SQLexer::LexBlockComment() -{ - bool done = false; - while(!done) { - switch(CUR_CHAR) { - case _SC('*'): { NEXT(); if(CUR_CHAR == _SC('/')) { done = true; NEXT(); }}; continue; - case _SC('\n'): _currentline++; NEXT(); continue; - case SQUIRREL_EOB: Error(_SC("missing \"*/\" in comment")); - default: NEXT(); - } - } -} -void SQLexer::LexLineComment() -{ - do { NEXT(); } while (CUR_CHAR != _SC('\n') && (!IS_EOB())); -} - -SQInteger SQLexer::Lex() -{ - _lasttokenline = _currentline; - while(CUR_CHAR != SQUIRREL_EOB) { - switch(CUR_CHAR){ - case _SC('\t'): case _SC('\r'): case _SC(' '): NEXT(); continue; - case _SC('\n'): - _currentline++; - _prevtoken=_curtoken; - _curtoken=_SC('\n'); - NEXT(); - _currentcolumn=1; - continue; - case _SC('#'): LexLineComment(); continue; - case _SC('/'): - NEXT(); - switch(CUR_CHAR){ - case _SC('*'): - NEXT(); - LexBlockComment(); - continue; - case _SC('/'): - LexLineComment(); - continue; - case _SC('='): - NEXT(); - RETURN_TOKEN(TK_DIVEQ); - continue; - case _SC('>'): - NEXT(); - RETURN_TOKEN(TK_ATTR_CLOSE); - continue; - default: - RETURN_TOKEN('/'); - } - case _SC('='): - NEXT(); - if (CUR_CHAR != _SC('=')){ RETURN_TOKEN('=') } - else { NEXT(); RETURN_TOKEN(TK_EQ); } - case _SC('<'): - NEXT(); - switch(CUR_CHAR) { - case _SC('='): - NEXT(); - if(CUR_CHAR == _SC('>')) { - NEXT(); - RETURN_TOKEN(TK_3WAYSCMP); - } - RETURN_TOKEN(TK_LE) - break; - case _SC('-'): NEXT(); RETURN_TOKEN(TK_NEWSLOT); break; - case _SC('<'): NEXT(); RETURN_TOKEN(TK_SHIFTL); break; - case _SC('/'): NEXT(); RETURN_TOKEN(TK_ATTR_OPEN); break; - } - RETURN_TOKEN('<'); - case _SC('>'): - NEXT(); - if (CUR_CHAR == _SC('=')){ NEXT(); RETURN_TOKEN(TK_GE);} - else if(CUR_CHAR == _SC('>')){ - NEXT(); - if(CUR_CHAR == _SC('>')){ - NEXT(); - RETURN_TOKEN(TK_USHIFTR); - } - RETURN_TOKEN(TK_SHIFTR); - } - else { RETURN_TOKEN('>') } - case _SC('!'): - NEXT(); - if (CUR_CHAR != _SC('=')){ RETURN_TOKEN('!')} - else { NEXT(); RETURN_TOKEN(TK_NE); } - case _SC('@'): { - SQInteger stype; - NEXT(); - if(CUR_CHAR != _SC('"')) { - RETURN_TOKEN('@'); - } - if((stype=ReadString('"',true))!=-1) { - RETURN_TOKEN(stype); - } - Error(_SC("error parsing the string")); - } - case _SC('"'): - case _SC('\''): { - SQInteger stype; - if((stype=ReadString(CUR_CHAR,false))!=-1){ - RETURN_TOKEN(stype); - } - Error(_SC("error parsing the string")); - } - case _SC('{'): case _SC('}'): case _SC('('): case _SC(')'): case _SC('['): case _SC(']'): - case _SC(';'): case _SC(','): case _SC('?'): case _SC('^'): case _SC('~'): - {SQInteger ret = CUR_CHAR; - NEXT(); RETURN_TOKEN(ret); } - case _SC('.'): - NEXT(); - if (CUR_CHAR != _SC('.')){ RETURN_TOKEN('.') } - NEXT(); - if (CUR_CHAR != _SC('.')){ Error(_SC("invalid token '..'")); } - NEXT(); - RETURN_TOKEN(TK_VARPARAMS); - case _SC('&'): - NEXT(); - if (CUR_CHAR != _SC('&')){ RETURN_TOKEN('&') } - else { NEXT(); RETURN_TOKEN(TK_AND); } - case _SC('|'): - NEXT(); - if (CUR_CHAR != _SC('|')){ RETURN_TOKEN('|') } - else { NEXT(); RETURN_TOKEN(TK_OR); } - case _SC(':'): - NEXT(); - if (CUR_CHAR != _SC(':')){ RETURN_TOKEN(':') } - else { NEXT(); RETURN_TOKEN(TK_DOUBLE_COLON); } - case _SC('*'): - NEXT(); - if (CUR_CHAR == _SC('=')){ NEXT(); RETURN_TOKEN(TK_MULEQ);} - else RETURN_TOKEN('*'); - case _SC('%'): - NEXT(); - if (CUR_CHAR == _SC('=')){ NEXT(); RETURN_TOKEN(TK_MODEQ);} - else RETURN_TOKEN('%'); - case _SC('-'): - NEXT(); - if (CUR_CHAR == _SC('=')){ NEXT(); RETURN_TOKEN(TK_MINUSEQ);} - else if (CUR_CHAR == _SC('-')){ NEXT(); RETURN_TOKEN(TK_MINUSMINUS);} - else RETURN_TOKEN('-'); - case _SC('+'): - NEXT(); - if (CUR_CHAR == _SC('=')){ NEXT(); RETURN_TOKEN(TK_PLUSEQ);} - else if (CUR_CHAR == _SC('+')){ NEXT(); RETURN_TOKEN(TK_PLUSPLUS);} - else RETURN_TOKEN('+'); - case SQUIRREL_EOB: - return 0; - default:{ - if (scisdigit(CUR_CHAR)) { - SQInteger ret = ReadNumber(); - RETURN_TOKEN(ret); - } - else if (scisalpha(CUR_CHAR) || CUR_CHAR == _SC('_')) { - SQInteger t = ReadID(); - RETURN_TOKEN(t); - } - else { - SQInteger c = CUR_CHAR; - if (sciscntrl((int)c)) Error(_SC("unexpected character(control)")); - NEXT(); - RETURN_TOKEN(c); - } - RETURN_TOKEN(0); - } - } - } - return 0; -} - -SQInteger SQLexer::GetIDType(const SQChar *s,SQInteger len) -{ - SQObjectPtr t; - if(_keywords->GetStr(s,len, t)) { - return SQInteger(_integer(t)); - } - return TK_IDENTIFIER; -} - -#ifdef SQUNICODE -#if WCHAR_SIZE == 2 -SQInteger SQLexer::AddUTF16(SQUnsignedInteger ch) -{ - if (ch >= 0x10000) - { - SQUnsignedInteger code = (ch - 0x10000); - APPEND_CHAR((SQChar)(0xD800 | (code >> 10))); - APPEND_CHAR((SQChar)(0xDC00 | (code & 0x3FF))); - return 2; - } - else { - APPEND_CHAR((SQChar)ch); - return 1; - } -} -#endif -#else -SQInteger SQLexer::AddUTF8(SQUnsignedInteger ch) -{ - if (ch < 0x80) { - APPEND_CHAR((char)ch); - return 1; - } - if (ch < 0x800) { - APPEND_CHAR((SQChar)((ch >> 6) | 0xC0)); - APPEND_CHAR((SQChar)((ch & 0x3F) | 0x80)); - return 2; - } - if (ch < 0x10000) { - APPEND_CHAR((SQChar)((ch >> 12) | 0xE0)); - APPEND_CHAR((SQChar)(((ch >> 6) & 0x3F) | 0x80)); - APPEND_CHAR((SQChar)((ch & 0x3F) | 0x80)); - return 3; - } - if (ch < 0x110000) { - APPEND_CHAR((SQChar)((ch >> 18) | 0xF0)); - APPEND_CHAR((SQChar)(((ch >> 12) & 0x3F) | 0x80)); - APPEND_CHAR((SQChar)(((ch >> 6) & 0x3F) | 0x80)); - APPEND_CHAR((SQChar)((ch & 0x3F) | 0x80)); - return 4; - } - return 0; -} -#endif - -SQInteger SQLexer::ProcessStringHexEscape(SQChar *dest, SQInteger maxdigits) -{ - NEXT(); - if (!isxdigit(CUR_CHAR)) Error(_SC("hexadecimal number expected")); - SQInteger n = 0; - while (isxdigit(CUR_CHAR) && n < maxdigits) { - dest[n] = CUR_CHAR; - n++; - NEXT(); - } - dest[n] = 0; - return n; -} - -SQInteger SQLexer::ReadString(SQInteger ndelim,bool verbatim) -{ - INIT_TEMP_STRING(); - NEXT(); - if(IS_EOB()) return -1; - for(;;) { - while(CUR_CHAR != ndelim) { - SQInteger x = CUR_CHAR; - switch (x) { - case SQUIRREL_EOB: - Error(_SC("unfinished string")); - return -1; - case _SC('\n'): - if(!verbatim) Error(_SC("newline in a constant")); - APPEND_CHAR(CUR_CHAR); NEXT(); - _currentline++; - break; - case _SC('\\'): - if(verbatim) { - APPEND_CHAR('\\'); NEXT(); - } - else { - NEXT(); - switch(CUR_CHAR) { - case _SC('x'): { - const SQInteger maxdigits = sizeof(SQChar) * 2; - SQChar temp[maxdigits + 1]; - ProcessStringHexEscape(temp, maxdigits); - SQChar *stemp; - APPEND_CHAR((SQChar)scstrtoul(temp, &stemp, 16)); - } - break; - case _SC('U'): - case _SC('u'): { - const SQInteger maxdigits = CUR_CHAR == 'u' ? 4 : 8; - SQChar temp[8 + 1]; - ProcessStringHexEscape(temp, maxdigits); - SQChar *stemp; -#ifdef SQUNICODE -#if WCHAR_SIZE == 2 - AddUTF16(scstrtoul(temp, &stemp, 16)); -#else - APPEND_CHAR((SQChar)scstrtoul(temp, &stemp, 16)); -#endif -#else - AddUTF8(scstrtoul(temp, &stemp, 16)); -#endif - } - break; - case _SC('t'): APPEND_CHAR(_SC('\t')); NEXT(); break; - case _SC('a'): APPEND_CHAR(_SC('\a')); NEXT(); break; - case _SC('b'): APPEND_CHAR(_SC('\b')); NEXT(); break; - case _SC('n'): APPEND_CHAR(_SC('\n')); NEXT(); break; - case _SC('r'): APPEND_CHAR(_SC('\r')); NEXT(); break; - case _SC('v'): APPEND_CHAR(_SC('\v')); NEXT(); break; - case _SC('f'): APPEND_CHAR(_SC('\f')); NEXT(); break; - case _SC('0'): APPEND_CHAR(_SC('\0')); NEXT(); break; - case _SC('\\'): APPEND_CHAR(_SC('\\')); NEXT(); break; - case _SC('"'): APPEND_CHAR(_SC('"')); NEXT(); break; - case _SC('\''): APPEND_CHAR(_SC('\'')); NEXT(); break; - default: - Error(_SC("unrecognised escaper char")); - break; - } - } - break; - default: - APPEND_CHAR(CUR_CHAR); - NEXT(); - } - } - NEXT(); - if(verbatim && CUR_CHAR == '"') { //double quotation - APPEND_CHAR(CUR_CHAR); - NEXT(); - } - else { - break; - } - } - TERMINATE_BUFFER(); - SQInteger len = _longstr.size()-1; - if(ndelim == _SC('\'')) { - if(len == 0) Error(_SC("empty constant")); - if(len > 1) Error(_SC("constant too long")); - _nvalue = _longstr[0]; - return TK_INTEGER; - } - _svalue = &_longstr[0]; - return TK_STRING_LITERAL; -} - -void LexHexadecimal(const SQChar *s,SQUnsignedInteger *res) -{ - *res = 0; - while(*s != 0) - { - if(scisdigit(*s)) *res = (*res)*16+((*s++)-'0'); - else if(scisxdigit(*s)) *res = (*res)*16+(toupper(*s++)-'A'+10); - else { assert(0); } - } -} - -void LexInteger(const SQChar *s,SQUnsignedInteger *res) -{ - *res = 0; - while(*s != 0) - { - *res = (*res)*10+((*s++)-'0'); - } -} - -SQInteger scisodigit(SQInteger c) { return c >= _SC('0') && c <= _SC('7'); } - -void LexOctal(const SQChar *s,SQUnsignedInteger *res) -{ - *res = 0; - while(*s != 0) - { - if(scisodigit(*s)) *res = (*res)*8+((*s++)-'0'); - else { assert(0); } - } -} - -SQInteger isexponent(SQInteger c) { return c == 'e' || c=='E'; } - - -#define MAX_HEX_DIGITS (sizeof(SQInteger)*2) -SQInteger SQLexer::ReadNumber() -{ -#define TINT 1 -#define TFLOAT 2 -#define THEX 3 -#define TSCIENTIFIC 4 -#define TOCTAL 5 - SQInteger type = TINT, firstchar = CUR_CHAR; - SQChar *sTemp; - INIT_TEMP_STRING(); - NEXT(); - if(firstchar == _SC('0') && (toupper(CUR_CHAR) == _SC('X') || scisodigit(CUR_CHAR)) ) { - if(scisodigit(CUR_CHAR)) { - type = TOCTAL; - while(scisodigit(CUR_CHAR)) { - APPEND_CHAR(CUR_CHAR); - NEXT(); - } - if(scisdigit(CUR_CHAR)) Error(_SC("invalid octal number")); - } - else { - NEXT(); - type = THEX; - while(isxdigit(CUR_CHAR)) { - APPEND_CHAR(CUR_CHAR); - NEXT(); - } - if(_longstr.size() > MAX_HEX_DIGITS) Error(_SC("too many digits for an Hex number")); - } - } - else { - APPEND_CHAR((int)firstchar); - while (CUR_CHAR == _SC('.') || scisdigit(CUR_CHAR) || isexponent(CUR_CHAR)) { - if(CUR_CHAR == _SC('.') || isexponent(CUR_CHAR)) type = TFLOAT; - if(isexponent(CUR_CHAR)) { - if(type != TFLOAT) Error(_SC("invalid numeric format")); - type = TSCIENTIFIC; - APPEND_CHAR(CUR_CHAR); - NEXT(); - if(CUR_CHAR == '+' || CUR_CHAR == '-'){ - APPEND_CHAR(CUR_CHAR); - NEXT(); - } - if(!scisdigit(CUR_CHAR)) Error(_SC("exponent expected")); - } - - APPEND_CHAR(CUR_CHAR); - NEXT(); - } - } - TERMINATE_BUFFER(); - switch(type) { - case TSCIENTIFIC: - case TFLOAT: - _fvalue = (SQFloat)scstrtod(&_longstr[0],&sTemp); - return TK_FLOAT; - case TINT: - LexInteger(&_longstr[0],(SQUnsignedInteger *)&_nvalue); - return TK_INTEGER; - case THEX: - LexHexadecimal(&_longstr[0],(SQUnsignedInteger *)&_nvalue); - return TK_INTEGER; - case TOCTAL: - LexOctal(&_longstr[0],(SQUnsignedInteger *)&_nvalue); - return TK_INTEGER; - } - return 0; -} - -SQInteger SQLexer::ReadID() -{ - SQInteger res; - INIT_TEMP_STRING(); - do { - APPEND_CHAR(CUR_CHAR); - NEXT(); - } while(scisalnum(CUR_CHAR) || CUR_CHAR == _SC('_')); - TERMINATE_BUFFER(); - res = GetIDType(&_longstr[0],_longstr.size() - 1); - if(res == TK_IDENTIFIER || res == TK_CONSTRUCTOR) { - _svalue = &_longstr[0]; - } - return res; -} diff --git a/m_packages/squirrel/squirrel/sqlexer.h b/m_packages/squirrel/squirrel/sqlexer.h deleted file mode 100644 index d731c20e..00000000 --- a/m_packages/squirrel/squirrel/sqlexer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQLEXER_H_ -#define _SQLEXER_H_ - -#ifdef SQUNICODE -typedef SQChar LexChar; -#else -typedef unsigned char LexChar; -#endif - -struct SQLexer -{ - SQLexer(); - ~SQLexer(); - void Init(SQSharedState *ss,SQLEXREADFUNC rg,SQUserPointer up,CompilerErrorFunc efunc,void *ed); - void Error(const SQChar *err); - SQInteger Lex(); - const SQChar *Tok2Str(SQInteger tok); -private: - SQInteger GetIDType(const SQChar *s,SQInteger len); - SQInteger ReadString(SQInteger ndelim,bool verbatim); - SQInteger ReadNumber(); - void LexBlockComment(); - void LexLineComment(); - SQInteger ReadID(); - void Next(); -#ifdef SQUNICODE -#if WCHAR_SIZE == 2 - SQInteger AddUTF16(SQUnsignedInteger ch); -#endif -#else - SQInteger AddUTF8(SQUnsignedInteger ch); -#endif - SQInteger ProcessStringHexEscape(SQChar *dest, SQInteger maxdigits); - SQInteger _curtoken; - SQTable *_keywords; - SQBool _reached_eof; -public: - SQInteger _prevtoken; - SQInteger _currentline; - SQInteger _lasttokenline; - SQInteger _currentcolumn; - const SQChar *_svalue; - SQInteger _nvalue; - SQFloat _fvalue; - SQLEXREADFUNC _readf; - SQUserPointer _up; - LexChar _currdata; - SQSharedState *_sharedstate; - sqvector _longstr; - CompilerErrorFunc _errfunc; - void *_errtarget; -}; - -#endif diff --git a/m_packages/squirrel/squirrel/sqmem.cpp b/m_packages/squirrel/squirrel/sqmem.cpp deleted file mode 100644 index 378e254b..00000000 --- a/m_packages/squirrel/squirrel/sqmem.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#ifndef SQ_EXCLUDE_DEFAULT_MEMFUNCTIONS -void *sq_vm_malloc(SQUnsignedInteger size){ return malloc(size); } - -void *sq_vm_realloc(void *p, SQUnsignedInteger SQ_UNUSED_ARG(oldsize), SQUnsignedInteger size){ return realloc(p, size); } - -void sq_vm_free(void *p, SQUnsignedInteger SQ_UNUSED_ARG(size)){ free(p); } -#endif diff --git a/m_packages/squirrel/squirrel/sqobject.cpp b/m_packages/squirrel/squirrel/sqobject.cpp deleted file mode 100644 index 7d7f297f..00000000 --- a/m_packages/squirrel/squirrel/sqobject.cpp +++ /dev/null @@ -1,677 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include "sqvm.h" -#include "sqstring.h" -#include "sqarray.h" -#include "sqtable.h" -#include "squserdata.h" -#include "sqfuncproto.h" -#include "sqclass.h" -#include "sqclosure.h" - - -const SQChar *IdType2Name(SQObjectType type) -{ - switch(_RAW_TYPE(type)) - { - case _RT_NULL:return _SC("null"); - case _RT_INTEGER:return _SC("integer"); - case _RT_FLOAT:return _SC("float"); - case _RT_BOOL:return _SC("bool"); - case _RT_STRING:return _SC("string"); - case _RT_TABLE:return _SC("table"); - case _RT_ARRAY:return _SC("array"); - case _RT_GENERATOR:return _SC("generator"); - case _RT_CLOSURE: - case _RT_NATIVECLOSURE: - return _SC("function"); - case _RT_USERDATA: - case _RT_USERPOINTER: - return _SC("userdata"); - case _RT_THREAD: return _SC("thread"); - case _RT_FUNCPROTO: return _SC("function"); - case _RT_CLASS: return _SC("class"); - case _RT_INSTANCE: return _SC("instance"); - case _RT_WEAKREF: return _SC("weakref"); - case _RT_OUTER: return _SC("outer"); - default: - return NULL; - } -} - -const SQChar *GetTypeName(const SQObjectPtr &obj1) -{ - return IdType2Name(sq_type(obj1)); -} - -SQString *SQString::Create(SQSharedState *ss,const SQChar *s,SQInteger len) -{ - SQString *str=ADD_STRING(ss,s,len); - return str; -} - -void SQString::Release() -{ - REMOVE_STRING(_sharedstate,this); -} - -SQInteger SQString::Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval) -{ - SQInteger idx = (SQInteger)TranslateIndex(refpos); - while(idx < _len){ - outkey = (SQInteger)idx; - outval = (SQInteger)((SQUnsignedInteger)_val[idx]); - //return idx for the next iteration - return ++idx; - } - //nothing to iterate anymore - return -1; -} - -SQUnsignedInteger TranslateIndex(const SQObjectPtr &idx) -{ - switch(sq_type(idx)){ - case OT_NULL: - return 0; - case OT_INTEGER: - return (SQUnsignedInteger)_integer(idx); - default: assert(0); break; - } - return 0; -} - -SQWeakRef *SQRefCounted::GetWeakRef(SQObjectType type) -{ - if(!_weakref) { - sq_new(_weakref,SQWeakRef); -#if defined(SQUSEDOUBLE) && !defined(_SQ64) - _weakref->_obj._unVal.raw = 0; //clean the whole union on 32 bits with double -#endif - _weakref->_obj._type = type; - _weakref->_obj._unVal.pRefCounted = this; - } - return _weakref; -} - -SQRefCounted::~SQRefCounted() -{ - if(_weakref) { - _weakref->_obj._type = OT_NULL; - _weakref->_obj._unVal.pRefCounted = NULL; - } -} - -void SQWeakRef::Release() { - if(ISREFCOUNTED(_obj._type)) { - _obj._unVal.pRefCounted->_weakref = NULL; - } - sq_delete(this,SQWeakRef); -} - -bool SQDelegable::GetMetaMethod(SQVM *v,SQMetaMethod mm,SQObjectPtr &res) { - if(_delegate) { - return _delegate->Get((*_ss(v)->_metamethods)[mm],res); - } - return false; -} - -bool SQDelegable::SetDelegate(SQTable *mt) -{ - SQTable *temp = mt; - if(temp == this) return false; - while (temp) { - if (temp->_delegate == this) return false; //cycle detected - temp = temp->_delegate; - } - if (mt) __ObjAddRef(mt); - __ObjRelease(_delegate); - _delegate = mt; - return true; -} - -bool SQGenerator::Yield(SQVM *v,SQInteger target) -{ - if(_state==eSuspended) { v->Raise_Error(_SC("internal vm error, yielding dead generator")); return false;} - if(_state==eDead) { v->Raise_Error(_SC("internal vm error, yielding a dead generator")); return false; } - SQInteger size = v->_top-v->_stackbase; - - _stack.resize(size); - SQObject _this = v->_stack[v->_stackbase]; - _stack._vals[0] = ISREFCOUNTED(sq_type(_this)) ? SQObjectPtr(_refcounted(_this)->GetWeakRef(sq_type(_this))) : _this; - for(SQInteger n =1; n_stack[v->_stackbase+n]; - } - for(SQInteger j =0; j < size; j++) - { - v->_stack[v->_stackbase+j].Null(); - } - - _ci = *v->ci; - _ci._generator=NULL; - for(SQInteger i=0;i<_ci._etraps;i++) { - _etraps.push_back(v->_etraps.top()); - v->_etraps.pop_back(); - // store relative stack base and size in case of resume to other _top - SQExceptionTrap &et = _etraps.back(); - et._stackbase -= v->_stackbase; - et._stacksize -= v->_stackbase; - } - _state=eSuspended; - return true; -} - -bool SQGenerator::Resume(SQVM *v,SQObjectPtr &dest) -{ - if(_state==eDead){ v->Raise_Error(_SC("resuming dead generator")); return false; } - if(_state==eRunning){ v->Raise_Error(_SC("resuming active generator")); return false; } - SQInteger size = _stack.size(); - SQInteger target = &dest - &(v->_stack._vals[v->_stackbase]); - assert(target>=0 && target<=255); - SQInteger newbase = v->_top; - if(!v->EnterFrame(v->_top, v->_top + size, false)) - return false; - v->ci->_generator = this; - v->ci->_target = (SQInt32)target; - v->ci->_closure = _ci._closure; - v->ci->_ip = _ci._ip; - v->ci->_literals = _ci._literals; - v->ci->_ncalls = _ci._ncalls; - v->ci->_etraps = _ci._etraps; - v->ci->_root = _ci._root; - - - for(SQInteger i=0;i<_ci._etraps;i++) { - v->_etraps.push_back(_etraps.top()); - _etraps.pop_back(); - SQExceptionTrap &et = v->_etraps.back(); - // restore absolute stack base and size - et._stackbase += newbase; - et._stacksize += newbase; - } - SQObject _this = _stack._vals[0]; - v->_stack[v->_stackbase] = sq_type(_this) == OT_WEAKREF ? _weakref(_this)->_obj : _this; - - for(SQInteger n = 1; n_stack[v->_stackbase+n] = _stack._vals[n]; - _stack._vals[n].Null(); - } - - _state=eRunning; - if (v->_debughook) - v->CallDebugHook(_SC('c')); - - return true; -} - -void SQArray::Extend(const SQArray *a){ - SQInteger xlen; - if((xlen=a->Size())) - for(SQInteger i=0;i_values[i]); -} - -const SQChar* SQFunctionProto::GetLocal(SQVM *vm,SQUnsignedInteger stackbase,SQUnsignedInteger nseq,SQUnsignedInteger nop) -{ - SQUnsignedInteger nvars=_nlocalvarinfos; - const SQChar *res=NULL; - if(nvars>=nseq){ - for(SQUnsignedInteger i=0;i=nop) - { - if(nseq==0){ - vm->Push(vm->_stack[stackbase+_localvarinfos[i]._pos]); - res=_stringval(_localvarinfos[i]._name); - break; - } - nseq--; - } - } - } - return res; -} - - -SQInteger SQFunctionProto::GetLine(SQInstruction *curr) -{ - SQInteger op = (SQInteger)(curr-_instructions); - SQInteger line=_lineinfos[0]._line; - SQInteger low = 0; - SQInteger high = _nlineinfos - 1; - SQInteger mid = 0; - while(low <= high) - { - mid = low + ((high - low) >> 1); - SQInteger curop = _lineinfos[mid]._op; - if(curop > op) - { - high = mid - 1; - } - else if(curop < op) { - if(mid < (_nlineinfos - 1) - && _lineinfos[mid + 1]._op >= op) { - break; - } - low = mid + 1; - } - else { //equal - break; - } - } - - while(mid > 0 && _lineinfos[mid]._op >= op) mid--; - - line = _lineinfos[mid]._line; - - return line; -} - -SQClosure::~SQClosure() -{ - __ObjRelease(_root); - __ObjRelease(_env); - __ObjRelease(_base); - REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this); -} - -#define _CHECK_IO(exp) { if(!exp)return false; } -bool SafeWrite(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up,SQUserPointer dest,SQInteger size) -{ - if(write(up,dest,size) != size) { - v->Raise_Error(_SC("io error (write function failure)")); - return false; - } - return true; -} - -bool SafeRead(HSQUIRRELVM v,SQREADFUNC read,SQUserPointer up,SQUserPointer dest,SQInteger size) -{ - if(size && read(up,dest,size) != size) { - v->Raise_Error(_SC("io error, read function failure, the origin stream could be corrupted/trucated")); - return false; - } - return true; -} - -bool WriteTag(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up,SQUnsignedInteger32 tag) -{ - return SafeWrite(v,write,up,&tag,sizeof(tag)); -} - -bool CheckTag(HSQUIRRELVM v,SQREADFUNC read,SQUserPointer up,SQUnsignedInteger32 tag) -{ - SQUnsignedInteger32 t; - _CHECK_IO(SafeRead(v,read,up,&t,sizeof(t))); - if(t != tag){ - v->Raise_Error(_SC("invalid or corrupted closure stream")); - return false; - } - return true; -} - -bool WriteObject(HSQUIRRELVM v,SQUserPointer up,SQWRITEFUNC write,SQObjectPtr &o) -{ - SQUnsignedInteger32 _type = (SQUnsignedInteger32)sq_type(o); - _CHECK_IO(SafeWrite(v,write,up,&_type,sizeof(_type))); - switch(sq_type(o)){ - case OT_STRING: - _CHECK_IO(SafeWrite(v,write,up,&_string(o)->_len,sizeof(SQInteger))); - _CHECK_IO(SafeWrite(v,write,up,_stringval(o),sq_rsl(_string(o)->_len))); - break; - case OT_BOOL: - case OT_INTEGER: - _CHECK_IO(SafeWrite(v,write,up,&_integer(o),sizeof(SQInteger)));break; - case OT_FLOAT: - _CHECK_IO(SafeWrite(v,write,up,&_float(o),sizeof(SQFloat)));break; - case OT_NULL: - break; - default: - v->Raise_Error(_SC("cannot serialize a %s"),GetTypeName(o)); - return false; - } - return true; -} - -bool ReadObject(HSQUIRRELVM v,SQUserPointer up,SQREADFUNC read,SQObjectPtr &o) -{ - SQUnsignedInteger32 _type; - _CHECK_IO(SafeRead(v,read,up,&_type,sizeof(_type))); - SQObjectType t = (SQObjectType)_type; - switch(t){ - case OT_STRING:{ - SQInteger len; - _CHECK_IO(SafeRead(v,read,up,&len,sizeof(SQInteger))); - _CHECK_IO(SafeRead(v,read,up,_ss(v)->GetScratchPad(sq_rsl(len)),sq_rsl(len))); - o=SQString::Create(_ss(v),_ss(v)->GetScratchPad(-1),len); - } - break; - case OT_INTEGER:{ - SQInteger i; - _CHECK_IO(SafeRead(v,read,up,&i,sizeof(SQInteger))); o = i; break; - } - case OT_BOOL:{ - SQInteger i; - _CHECK_IO(SafeRead(v,read,up,&i,sizeof(SQInteger))); o._type = OT_BOOL; o._unVal.nInteger = i; break; - } - case OT_FLOAT:{ - SQFloat f; - _CHECK_IO(SafeRead(v,read,up,&f,sizeof(SQFloat))); o = f; break; - } - case OT_NULL: - o.Null(); - break; - default: - v->Raise_Error(_SC("cannot serialize a %s"),IdType2Name(t)); - return false; - } - return true; -} - -bool SQClosure::Save(SQVM *v,SQUserPointer up,SQWRITEFUNC write) -{ - _CHECK_IO(WriteTag(v,write,up,SQ_CLOSURESTREAM_HEAD)); - _CHECK_IO(WriteTag(v,write,up,sizeof(SQChar))); - _CHECK_IO(WriteTag(v,write,up,sizeof(SQInteger))); - _CHECK_IO(WriteTag(v,write,up,sizeof(SQFloat))); - _CHECK_IO(_function->Save(v,up,write)); - _CHECK_IO(WriteTag(v,write,up,SQ_CLOSURESTREAM_TAIL)); - return true; -} - -bool SQClosure::Load(SQVM *v,SQUserPointer up,SQREADFUNC read,SQObjectPtr &ret) -{ - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_HEAD)); - _CHECK_IO(CheckTag(v,read,up,sizeof(SQChar))); - _CHECK_IO(CheckTag(v,read,up,sizeof(SQInteger))); - _CHECK_IO(CheckTag(v,read,up,sizeof(SQFloat))); - SQObjectPtr func; - _CHECK_IO(SQFunctionProto::Load(v,up,read,func)); - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_TAIL)); - ret = SQClosure::Create(_ss(v),_funcproto(func),_table(v->_roottable)->GetWeakRef(OT_TABLE)); - //FIXME: load an root for this closure - return true; -} - -SQFunctionProto::SQFunctionProto(SQSharedState *ss) -{ - _stacksize=0; - _bgenerator=false; - INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); -} - -SQFunctionProto::~SQFunctionProto() -{ - REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this); -} - -bool SQFunctionProto::Save(SQVM *v,SQUserPointer up,SQWRITEFUNC write) -{ - SQInteger i,nliterals = _nliterals,nparameters = _nparameters; - SQInteger noutervalues = _noutervalues,nlocalvarinfos = _nlocalvarinfos; - SQInteger nlineinfos=_nlineinfos,ninstructions = _ninstructions,nfunctions=_nfunctions; - SQInteger ndefaultparams = _ndefaultparams; - _CHECK_IO(WriteTag(v,write,up,SQ_CLOSURESTREAM_PART)); - _CHECK_IO(WriteObject(v,up,write,_sourcename)); - _CHECK_IO(WriteObject(v,up,write,_name)); - _CHECK_IO(WriteTag(v,write,up,SQ_CLOSURESTREAM_PART)); - _CHECK_IO(SafeWrite(v,write,up,&nliterals,sizeof(nliterals))); - _CHECK_IO(SafeWrite(v,write,up,&nparameters,sizeof(nparameters))); - _CHECK_IO(SafeWrite(v,write,up,&noutervalues,sizeof(noutervalues))); - _CHECK_IO(SafeWrite(v,write,up,&nlocalvarinfos,sizeof(nlocalvarinfos))); - _CHECK_IO(SafeWrite(v,write,up,&nlineinfos,sizeof(nlineinfos))); - _CHECK_IO(SafeWrite(v,write,up,&ndefaultparams,sizeof(ndefaultparams))); - _CHECK_IO(SafeWrite(v,write,up,&ninstructions,sizeof(ninstructions))); - _CHECK_IO(SafeWrite(v,write,up,&nfunctions,sizeof(nfunctions))); - _CHECK_IO(WriteTag(v,write,up,SQ_CLOSURESTREAM_PART)); - for(i=0;iSave(v,up,write)); - } - _CHECK_IO(SafeWrite(v,write,up,&_stacksize,sizeof(_stacksize))); - _CHECK_IO(SafeWrite(v,write,up,&_bgenerator,sizeof(_bgenerator))); - _CHECK_IO(SafeWrite(v,write,up,&_varparams,sizeof(_varparams))); - return true; -} - -bool SQFunctionProto::Load(SQVM *v,SQUserPointer up,SQREADFUNC read,SQObjectPtr &ret) -{ - SQInteger i, nliterals,nparameters; - SQInteger noutervalues ,nlocalvarinfos ; - SQInteger nlineinfos,ninstructions ,nfunctions,ndefaultparams ; - SQObjectPtr sourcename, name; - SQObjectPtr o; - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - _CHECK_IO(ReadObject(v, up, read, sourcename)); - _CHECK_IO(ReadObject(v, up, read, name)); - - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - _CHECK_IO(SafeRead(v,read,up, &nliterals, sizeof(nliterals))); - _CHECK_IO(SafeRead(v,read,up, &nparameters, sizeof(nparameters))); - _CHECK_IO(SafeRead(v,read,up, &noutervalues, sizeof(noutervalues))); - _CHECK_IO(SafeRead(v,read,up, &nlocalvarinfos, sizeof(nlocalvarinfos))); - _CHECK_IO(SafeRead(v,read,up, &nlineinfos, sizeof(nlineinfos))); - _CHECK_IO(SafeRead(v,read,up, &ndefaultparams, sizeof(ndefaultparams))); - _CHECK_IO(SafeRead(v,read,up, &ninstructions, sizeof(ninstructions))); - _CHECK_IO(SafeRead(v,read,up, &nfunctions, sizeof(nfunctions))); - - - SQFunctionProto *f = SQFunctionProto::Create(_opt_ss(v),ninstructions,nliterals,nparameters, - nfunctions,noutervalues,nlineinfos,nlocalvarinfos,ndefaultparams); - SQObjectPtr proto = f; //gets a ref in case of failure - f->_sourcename = sourcename; - f->_name = name; - - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - - for(i = 0;i < nliterals; i++){ - _CHECK_IO(ReadObject(v, up, read, o)); - f->_literals[i] = o; - } - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - - for(i = 0; i < nparameters; i++){ - _CHECK_IO(ReadObject(v, up, read, o)); - f->_parameters[i] = o; - } - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - - for(i = 0; i < noutervalues; i++){ - SQUnsignedInteger type; - SQObjectPtr name; - _CHECK_IO(SafeRead(v,read,up, &type, sizeof(SQUnsignedInteger))); - _CHECK_IO(ReadObject(v, up, read, o)); - _CHECK_IO(ReadObject(v, up, read, name)); - f->_outervalues[i] = SQOuterVar(name,o, (SQOuterType)type); - } - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - - for(i = 0; i < nlocalvarinfos; i++){ - SQLocalVarInfo lvi; - _CHECK_IO(ReadObject(v, up, read, lvi._name)); - _CHECK_IO(SafeRead(v,read,up, &lvi._pos, sizeof(SQUnsignedInteger))); - _CHECK_IO(SafeRead(v,read,up, &lvi._start_op, sizeof(SQUnsignedInteger))); - _CHECK_IO(SafeRead(v,read,up, &lvi._end_op, sizeof(SQUnsignedInteger))); - f->_localvarinfos[i] = lvi; - } - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - _CHECK_IO(SafeRead(v,read,up, f->_lineinfos, sizeof(SQLineInfo)*nlineinfos)); - - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - _CHECK_IO(SafeRead(v,read,up, f->_defaultparams, sizeof(SQInteger)*ndefaultparams)); - - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - _CHECK_IO(SafeRead(v,read,up, f->_instructions, sizeof(SQInstruction)*ninstructions)); - - _CHECK_IO(CheckTag(v,read,up,SQ_CLOSURESTREAM_PART)); - for(i = 0; i < nfunctions; i++){ - _CHECK_IO(_funcproto(o)->Load(v, up, read, o)); - f->_functions[i] = o; - } - _CHECK_IO(SafeRead(v,read,up, &f->_stacksize, sizeof(f->_stacksize))); - _CHECK_IO(SafeRead(v,read,up, &f->_bgenerator, sizeof(f->_bgenerator))); - _CHECK_IO(SafeRead(v,read,up, &f->_varparams, sizeof(f->_varparams))); - - ret = f; - return true; -} - -#ifndef NO_GARBAGE_COLLECTOR - -#define START_MARK() if(!(_uiRef&MARK_FLAG)){ \ - _uiRef|=MARK_FLAG; - -#define END_MARK() RemoveFromChain(&_sharedstate->_gc_chain, this); \ - AddToChain(chain, this); } - -void SQVM::Mark(SQCollectable **chain) -{ - START_MARK() - SQSharedState::MarkObject(_lasterror,chain); - SQSharedState::MarkObject(_errorhandler,chain); - SQSharedState::MarkObject(_debughook_closure,chain); - SQSharedState::MarkObject(_roottable, chain); - SQSharedState::MarkObject(temp_reg, chain); - for(SQUnsignedInteger i = 0; i < _stack.size(); i++) SQSharedState::MarkObject(_stack[i], chain); - for(SQInteger k = 0; k < _callsstacksize; k++) SQSharedState::MarkObject(_callsstack[k]._closure, chain); - END_MARK() -} - -void SQArray::Mark(SQCollectable **chain) -{ - START_MARK() - SQInteger len = _values.size(); - for(SQInteger i = 0;i < len; i++) SQSharedState::MarkObject(_values[i], chain); - END_MARK() -} -void SQTable::Mark(SQCollectable **chain) -{ - START_MARK() - if(_delegate) _delegate->Mark(chain); - SQInteger len = _numofnodes; - for(SQInteger i = 0; i < len; i++){ - SQSharedState::MarkObject(_nodes[i].key, chain); - SQSharedState::MarkObject(_nodes[i].val, chain); - } - END_MARK() -} - -void SQClass::Mark(SQCollectable **chain) -{ - START_MARK() - _members->Mark(chain); - if(_base) _base->Mark(chain); - SQSharedState::MarkObject(_attributes, chain); - for(SQUnsignedInteger i =0; i< _defaultvalues.size(); i++) { - SQSharedState::MarkObject(_defaultvalues[i].val, chain); - SQSharedState::MarkObject(_defaultvalues[i].attrs, chain); - } - for(SQUnsignedInteger j =0; j< _methods.size(); j++) { - SQSharedState::MarkObject(_methods[j].val, chain); - SQSharedState::MarkObject(_methods[j].attrs, chain); - } - for(SQUnsignedInteger k =0; k< MT_LAST; k++) { - SQSharedState::MarkObject(_metamethods[k], chain); - } - END_MARK() -} - -void SQInstance::Mark(SQCollectable **chain) -{ - START_MARK() - _class->Mark(chain); - SQUnsignedInteger nvalues = _class->_defaultvalues.size(); - for(SQUnsignedInteger i =0; i< nvalues; i++) { - SQSharedState::MarkObject(_values[i], chain); - } - END_MARK() -} - -void SQGenerator::Mark(SQCollectable **chain) -{ - START_MARK() - for(SQUnsignedInteger i = 0; i < _stack.size(); i++) SQSharedState::MarkObject(_stack[i], chain); - SQSharedState::MarkObject(_closure, chain); - END_MARK() -} - -void SQFunctionProto::Mark(SQCollectable **chain) -{ - START_MARK() - for(SQInteger i = 0; i < _nliterals; i++) SQSharedState::MarkObject(_literals[i], chain); - for(SQInteger k = 0; k < _nfunctions; k++) SQSharedState::MarkObject(_functions[k], chain); - END_MARK() -} - -void SQClosure::Mark(SQCollectable **chain) -{ - START_MARK() - if(_base) _base->Mark(chain); - SQFunctionProto *fp = _function; - fp->Mark(chain); - for(SQInteger i = 0; i < fp->_noutervalues; i++) SQSharedState::MarkObject(_outervalues[i], chain); - for(SQInteger k = 0; k < fp->_ndefaultparams; k++) SQSharedState::MarkObject(_defaultparams[k], chain); - END_MARK() -} - -void SQNativeClosure::Mark(SQCollectable **chain) -{ - START_MARK() - for(SQUnsignedInteger i = 0; i < _noutervalues; i++) SQSharedState::MarkObject(_outervalues[i], chain); - END_MARK() -} - -void SQOuter::Mark(SQCollectable **chain) -{ - START_MARK() - /* If the valptr points to a closed value, that value is alive */ - if(_valptr == &_value) { - SQSharedState::MarkObject(_value, chain); - } - END_MARK() -} - -void SQUserData::Mark(SQCollectable **chain){ - START_MARK() - if(_delegate) _delegate->Mark(chain); - END_MARK() -} - -void SQCollectable::UnMark() { _uiRef&=~MARK_FLAG; } - -#endif - diff --git a/m_packages/squirrel/squirrel/sqobject.h b/m_packages/squirrel/squirrel/sqobject.h deleted file mode 100644 index a2022227..00000000 --- a/m_packages/squirrel/squirrel/sqobject.h +++ /dev/null @@ -1,353 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQOBJECT_H_ -#define _SQOBJECT_H_ - -#include "squtils.h" - -#ifdef _SQ64 -#define UINT_MINUS_ONE (0xFFFFFFFFFFFFFFFF) -#else -#define UINT_MINUS_ONE (0xFFFFFFFF) -#endif - -#define SQ_CLOSURESTREAM_HEAD (('S'<<24)|('Q'<<16)|('I'<<8)|('R')) -#define SQ_CLOSURESTREAM_PART (('P'<<24)|('A'<<16)|('R'<<8)|('T')) -#define SQ_CLOSURESTREAM_TAIL (('T'<<24)|('A'<<16)|('I'<<8)|('L')) - -struct SQSharedState; - -enum SQMetaMethod{ - MT_ADD=0, - MT_SUB=1, - MT_MUL=2, - MT_DIV=3, - MT_UNM=4, - MT_MODULO=5, - MT_SET=6, - MT_GET=7, - MT_TYPEOF=8, - MT_NEXTI=9, - MT_CMP=10, - MT_CALL=11, - MT_CLONED=12, - MT_NEWSLOT=13, - MT_DELSLOT=14, - MT_TOSTRING=15, - MT_NEWMEMBER=16, - MT_INHERITED=17, - MT_LAST = 18 -}; - -#define MM_ADD _SC("_add") -#define MM_SUB _SC("_sub") -#define MM_MUL _SC("_mul") -#define MM_DIV _SC("_div") -#define MM_UNM _SC("_unm") -#define MM_MODULO _SC("_modulo") -#define MM_SET _SC("_set") -#define MM_GET _SC("_get") -#define MM_TYPEOF _SC("_typeof") -#define MM_NEXTI _SC("_nexti") -#define MM_CMP _SC("_cmp") -#define MM_CALL _SC("_call") -#define MM_CLONED _SC("_cloned") -#define MM_NEWSLOT _SC("_newslot") -#define MM_DELSLOT _SC("_delslot") -#define MM_TOSTRING _SC("_tostring") -#define MM_NEWMEMBER _SC("_newmember") -#define MM_INHERITED _SC("_inherited") - - -#define _CONSTRUCT_VECTOR(type,size,ptr) { \ - for(SQInteger n = 0; n < ((SQInteger)size); n++) { \ - new (&ptr[n]) type(); \ - } \ -} - -#define _DESTRUCT_VECTOR(type,size,ptr) { \ - for(SQInteger nl = 0; nl < ((SQInteger)size); nl++) { \ - ptr[nl].~type(); \ - } \ -} - -#define _COPY_VECTOR(dest,src,size) { \ - for(SQInteger _n_ = 0; _n_ < ((SQInteger)size); _n_++) { \ - dest[_n_] = src[_n_]; \ - } \ -} - -#define _NULL_SQOBJECT_VECTOR(vec,size) { \ - for(SQInteger _n_ = 0; _n_ < ((SQInteger)size); _n_++) { \ - vec[_n_].Null(); \ - } \ -} - -#define MINPOWER2 4 - -struct SQRefCounted -{ - SQUnsignedInteger _uiRef; - struct SQWeakRef *_weakref; - SQRefCounted() { _uiRef = 0; _weakref = NULL; } - virtual ~SQRefCounted(); - SQWeakRef *GetWeakRef(SQObjectType type); - virtual void Release()=0; - -}; - -struct SQWeakRef : SQRefCounted -{ - void Release(); - SQObject _obj; -}; - -#define _realval(o) (sq_type((o)) != OT_WEAKREF?(SQObject)o:_weakref(o)->_obj) - -struct SQObjectPtr; - -#define __AddRef(type,unval) if(ISREFCOUNTED(type)) \ - { \ - unval.pRefCounted->_uiRef++; \ - } - -#define __Release(type,unval) if(ISREFCOUNTED(type) && ((--unval.pRefCounted->_uiRef)==0)) \ - { \ - unval.pRefCounted->Release(); \ - } - -#define __ObjRelease(obj) { \ - if((obj)) { \ - (obj)->_uiRef--; \ - if((obj)->_uiRef == 0) \ - (obj)->Release(); \ - (obj) = NULL; \ - } \ -} - -#define __ObjAddRef(obj) { \ - (obj)->_uiRef++; \ -} - -#define is_delegable(t) (sq_type(t)&SQOBJECT_DELEGABLE) -#define raw_type(obj) _RAW_TYPE((obj)._type) - -#define _integer(obj) ((obj)._unVal.nInteger) -#define _float(obj) ((obj)._unVal.fFloat) -#define _string(obj) ((obj)._unVal.pString) -#define _table(obj) ((obj)._unVal.pTable) -#define _array(obj) ((obj)._unVal.pArray) -#define _closure(obj) ((obj)._unVal.pClosure) -#define _generator(obj) ((obj)._unVal.pGenerator) -#define _nativeclosure(obj) ((obj)._unVal.pNativeClosure) -#define _userdata(obj) ((obj)._unVal.pUserData) -#define _userpointer(obj) ((obj)._unVal.pUserPointer) -#define _thread(obj) ((obj)._unVal.pThread) -#define _funcproto(obj) ((obj)._unVal.pFunctionProto) -#define _class(obj) ((obj)._unVal.pClass) -#define _instance(obj) ((obj)._unVal.pInstance) -#define _delegable(obj) ((SQDelegable *)(obj)._unVal.pDelegable) -#define _weakref(obj) ((obj)._unVal.pWeakRef) -#define _outer(obj) ((obj)._unVal.pOuter) -#define _refcounted(obj) ((obj)._unVal.pRefCounted) -#define _rawval(obj) ((obj)._unVal.raw) - -#define _stringval(obj) (obj)._unVal.pString->_val -#define _userdataval(obj) ((SQUserPointer)sq_aligning((obj)._unVal.pUserData + 1)) - -#define tofloat(num) ((sq_type(num)==OT_INTEGER)?(SQFloat)_integer(num):_float(num)) -#define tointeger(num) ((sq_type(num)==OT_FLOAT)?(SQInteger)_float(num):_integer(num)) -///////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////// -#if defined(SQUSEDOUBLE) && !defined(_SQ64) || !defined(SQUSEDOUBLE) && defined(_SQ64) -#define SQ_REFOBJECT_INIT() SQ_OBJECT_RAWINIT() -#else -#define SQ_REFOBJECT_INIT() -#endif - -#define _REF_TYPE_DECL(type,_class,sym) \ - SQObjectPtr(_class * x) \ - { \ - SQ_OBJECT_RAWINIT() \ - _type=type; \ - _unVal.sym = x; \ - assert(_unVal.pTable); \ - _unVal.pRefCounted->_uiRef++; \ - } \ - inline SQObjectPtr& operator=(_class *x) \ - { \ - SQObjectType tOldType; \ - SQObjectValue unOldVal; \ - tOldType=_type; \ - unOldVal=_unVal; \ - _type = type; \ - SQ_REFOBJECT_INIT() \ - _unVal.sym = x; \ - _unVal.pRefCounted->_uiRef++; \ - __Release(tOldType,unOldVal); \ - return *this; \ - } - -#define _SCALAR_TYPE_DECL(type,_class,sym) \ - SQObjectPtr(_class x) \ - { \ - SQ_OBJECT_RAWINIT() \ - _type=type; \ - _unVal.sym = x; \ - } \ - inline SQObjectPtr& operator=(_class x) \ - { \ - __Release(_type,_unVal); \ - _type = type; \ - SQ_OBJECT_RAWINIT() \ - _unVal.sym = x; \ - return *this; \ - } -struct SQObjectPtr : public SQObject -{ - SQObjectPtr() - { - SQ_OBJECT_RAWINIT() - _type=OT_NULL; - _unVal.pUserPointer=NULL; - } - SQObjectPtr(const SQObjectPtr &o) - { - _type = o._type; - _unVal = o._unVal; - __AddRef(_type,_unVal); - } - SQObjectPtr(const SQObject &o) - { - _type = o._type; - _unVal = o._unVal; - __AddRef(_type,_unVal); - } - _REF_TYPE_DECL(OT_TABLE,SQTable,pTable) - _REF_TYPE_DECL(OT_CLASS,SQClass,pClass) - _REF_TYPE_DECL(OT_INSTANCE,SQInstance,pInstance) - _REF_TYPE_DECL(OT_ARRAY,SQArray,pArray) - _REF_TYPE_DECL(OT_CLOSURE,SQClosure,pClosure) - _REF_TYPE_DECL(OT_NATIVECLOSURE,SQNativeClosure,pNativeClosure) - _REF_TYPE_DECL(OT_OUTER,SQOuter,pOuter) - _REF_TYPE_DECL(OT_GENERATOR,SQGenerator,pGenerator) - _REF_TYPE_DECL(OT_STRING,SQString,pString) - _REF_TYPE_DECL(OT_USERDATA,SQUserData,pUserData) - _REF_TYPE_DECL(OT_WEAKREF,SQWeakRef,pWeakRef) - _REF_TYPE_DECL(OT_THREAD,SQVM,pThread) - _REF_TYPE_DECL(OT_FUNCPROTO,SQFunctionProto,pFunctionProto) - - _SCALAR_TYPE_DECL(OT_INTEGER,SQInteger,nInteger) - _SCALAR_TYPE_DECL(OT_FLOAT,SQFloat,fFloat) - _SCALAR_TYPE_DECL(OT_USERPOINTER,SQUserPointer,pUserPointer) - - SQObjectPtr(bool bBool) - { - SQ_OBJECT_RAWINIT() - _type = OT_BOOL; - _unVal.nInteger = bBool?1:0; - } - inline SQObjectPtr& operator=(bool b) - { - __Release(_type,_unVal); - SQ_OBJECT_RAWINIT() - _type = OT_BOOL; - _unVal.nInteger = b?1:0; - return *this; - } - - ~SQObjectPtr() - { - __Release(_type,_unVal); - } - - inline SQObjectPtr& operator=(const SQObjectPtr& obj) - { - SQObjectType tOldType; - SQObjectValue unOldVal; - tOldType=_type; - unOldVal=_unVal; - _unVal = obj._unVal; - _type = obj._type; - __AddRef(_type,_unVal); - __Release(tOldType,unOldVal); - return *this; - } - inline SQObjectPtr& operator=(const SQObject& obj) - { - SQObjectType tOldType; - SQObjectValue unOldVal; - tOldType=_type; - unOldVal=_unVal; - _unVal = obj._unVal; - _type = obj._type; - __AddRef(_type,_unVal); - __Release(tOldType,unOldVal); - return *this; - } - inline void Null() - { - SQObjectType tOldType = _type; - SQObjectValue unOldVal = _unVal; - _type = OT_NULL; - _unVal.raw = (SQRawObjectVal)NULL; - __Release(tOldType ,unOldVal); - } - private: - SQObjectPtr(const SQChar *){} //safety -}; - - -inline void _Swap(SQObject &a,SQObject &b) -{ - SQObjectType tOldType = a._type; - SQObjectValue unOldVal = a._unVal; - a._type = b._type; - a._unVal = b._unVal; - b._type = tOldType; - b._unVal = unOldVal; -} - -///////////////////////////////////////////////////////////////////////////////////// -#ifndef NO_GARBAGE_COLLECTOR -#define MARK_FLAG 0x80000000 -struct SQCollectable : public SQRefCounted { - SQCollectable *_next; - SQCollectable *_prev; - SQSharedState *_sharedstate; - virtual SQObjectType GetType()=0; - virtual void Release()=0; - virtual void Mark(SQCollectable **chain)=0; - void UnMark(); - virtual void Finalize()=0; - static void AddToChain(SQCollectable **chain,SQCollectable *c); - static void RemoveFromChain(SQCollectable **chain,SQCollectable *c); -}; - - -#define ADD_TO_CHAIN(chain,obj) AddToChain(chain,obj) -#define REMOVE_FROM_CHAIN(chain,obj) {if(!(_uiRef&MARK_FLAG))RemoveFromChain(chain,obj);} -#define CHAINABLE_OBJ SQCollectable -#define INIT_CHAIN() {_next=NULL;_prev=NULL;_sharedstate=ss;} -#else - -#define ADD_TO_CHAIN(chain,obj) ((void)0) -#define REMOVE_FROM_CHAIN(chain,obj) ((void)0) -#define CHAINABLE_OBJ SQRefCounted -#define INIT_CHAIN() ((void)0) -#endif - -struct SQDelegable : public CHAINABLE_OBJ { - bool SetDelegate(SQTable *m); - virtual bool GetMetaMethod(SQVM *v,SQMetaMethod mm,SQObjectPtr &res); - SQTable *_delegate; -}; - -SQUnsignedInteger TranslateIndex(const SQObjectPtr &idx); -typedef sqvector SQObjectPtrVec; -typedef sqvector SQIntVec; -const SQChar *GetTypeName(const SQObjectPtr &obj1); -const SQChar *IdType2Name(SQObjectType type); - - - -#endif //_SQOBJECT_H_ diff --git a/m_packages/squirrel/squirrel/sqopcodes.h b/m_packages/squirrel/squirrel/sqopcodes.h deleted file mode 100644 index 15d80e4b..00000000 --- a/m_packages/squirrel/squirrel/sqopcodes.h +++ /dev/null @@ -1,132 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQOPCODES_H_ -#define _SQOPCODES_H_ - -#define MAX_FUNC_STACKSIZE 0xFF -#define MAX_LITERALS ((SQInteger)0x7FFFFFFF) - -enum BitWiseOP { - BW_AND = 0, - BW_OR = 2, - BW_XOR = 3, - BW_SHIFTL = 4, - BW_SHIFTR = 5, - BW_USHIFTR = 6 -}; - -enum CmpOP { - CMP_G = 0, - CMP_GE = 2, - CMP_L = 3, - CMP_LE = 4, - CMP_3W = 5 -}; - -enum NewObjectType { - NOT_TABLE = 0, - NOT_ARRAY = 1, - NOT_CLASS = 2 -}; - -enum AppendArrayType { - AAT_STACK = 0, - AAT_LITERAL = 1, - AAT_INT = 2, - AAT_FLOAT = 3, - AAT_BOOL = 4 -}; - -enum SQOpcode -{ - _OP_LINE= 0x00, - _OP_LOAD= 0x01, - _OP_LOADINT= 0x02, - _OP_LOADFLOAT= 0x03, - _OP_DLOAD= 0x04, - _OP_TAILCALL= 0x05, - _OP_CALL= 0x06, - _OP_PREPCALL= 0x07, - _OP_PREPCALLK= 0x08, - _OP_GETK= 0x09, - _OP_MOVE= 0x0A, - _OP_NEWSLOT= 0x0B, - _OP_DELETE= 0x0C, - _OP_SET= 0x0D, - _OP_GET= 0x0E, - _OP_EQ= 0x0F, - _OP_NE= 0x10, - _OP_ADD= 0x11, - _OP_SUB= 0x12, - _OP_MUL= 0x13, - _OP_DIV= 0x14, - _OP_MOD= 0x15, - _OP_BITW= 0x16, - _OP_RETURN= 0x17, - _OP_LOADNULLS= 0x18, - _OP_LOADROOT= 0x19, - _OP_LOADBOOL= 0x1A, - _OP_DMOVE= 0x1B, - _OP_JMP= 0x1C, - //_OP_JNZ= 0x1D, - _OP_JCMP= 0x1D, - _OP_JZ= 0x1E, - _OP_SETOUTER= 0x1F, - _OP_GETOUTER= 0x20, - _OP_NEWOBJ= 0x21, - _OP_APPENDARRAY= 0x22, - _OP_COMPARITH= 0x23, - _OP_INC= 0x24, - _OP_INCL= 0x25, - _OP_PINC= 0x26, - _OP_PINCL= 0x27, - _OP_CMP= 0x28, - _OP_EXISTS= 0x29, - _OP_INSTANCEOF= 0x2A, - _OP_AND= 0x2B, - _OP_OR= 0x2C, - _OP_NEG= 0x2D, - _OP_NOT= 0x2E, - _OP_BWNOT= 0x2F, - _OP_CLOSURE= 0x30, - _OP_YIELD= 0x31, - _OP_RESUME= 0x32, - _OP_FOREACH= 0x33, - _OP_POSTFOREACH= 0x34, - _OP_CLONE= 0x35, - _OP_TYPEOF= 0x36, - _OP_PUSHTRAP= 0x37, - _OP_POPTRAP= 0x38, - _OP_THROW= 0x39, - _OP_NEWSLOTA= 0x3A, - _OP_GETBASE= 0x3B, - _OP_CLOSE= 0x3C -}; - -struct SQInstructionDesc { - const SQChar *name; -}; - -struct SQInstruction -{ - SQInstruction(){}; - SQInstruction(SQOpcode _op,SQInteger a0=0,SQInteger a1=0,SQInteger a2=0,SQInteger a3=0) - { op = (unsigned char)_op; - _arg0 = (unsigned char)a0;_arg1 = (SQInt32)a1; - _arg2 = (unsigned char)a2;_arg3 = (unsigned char)a3; - } - - - SQInt32 _arg1; - unsigned char op; - unsigned char _arg0; - unsigned char _arg2; - unsigned char _arg3; -}; - -#include "squtils.h" -typedef sqvector SQInstructionVec; - -#define NEW_SLOT_ATTRIBUTES_FLAG 0x01 -#define NEW_SLOT_STATIC_FLAG 0x02 - -#endif // _SQOPCODES_H_ diff --git a/m_packages/squirrel/squirrel/sqpcheader.h b/m_packages/squirrel/squirrel/sqpcheader.h deleted file mode 100644 index 8df5ef4c..00000000 --- a/m_packages/squirrel/squirrel/sqpcheader.h +++ /dev/null @@ -1,20 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQPCHEADER_H_ -#define _SQPCHEADER_H_ - -#if defined(_MSC_VER) && defined(_DEBUG) -#include -#endif - -#include -#include -#include -#include -#include -#include -//squirrel stuff -#include -#include "sqobject.h" -#include "sqstate.h" - -#endif //_SQPCHEADER_H_ diff --git a/m_packages/squirrel/squirrel/sqstate.cpp b/m_packages/squirrel/squirrel/sqstate.cpp deleted file mode 100644 index c89bdc4a..00000000 --- a/m_packages/squirrel/squirrel/sqstate.cpp +++ /dev/null @@ -1,647 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include "sqopcodes.h" -#include "sqvm.h" -#include "sqfuncproto.h" -#include "sqclosure.h" -#include "sqstring.h" -#include "sqtable.h" -#include "sqarray.h" -#include "squserdata.h" -#include "sqclass.h" - -SQSharedState::SQSharedState() -{ - _compilererrorhandler = NULL; - _printfunc = NULL; - _errorfunc = NULL; - _debuginfo = false; - _notifyallexceptions = false; - _foreignptr = NULL; - _releasehook = NULL; -} - -#define newsysstring(s) { \ - _systemstrings->push_back(SQString::Create(this,s)); \ - } - -#define newmetamethod(s) { \ - _metamethods->push_back(SQString::Create(this,s)); \ - _table(_metamethodsmap)->NewSlot(_metamethods->back(),(SQInteger)(_metamethods->size()-1)); \ - } - -bool CompileTypemask(SQIntVec &res,const SQChar *typemask) -{ - SQInteger i = 0; - SQInteger mask = 0; - while(typemask[i] != 0) { - switch(typemask[i]) { - case 'o': mask |= _RT_NULL; break; - case 'i': mask |= _RT_INTEGER; break; - case 'f': mask |= _RT_FLOAT; break; - case 'n': mask |= (_RT_FLOAT | _RT_INTEGER); break; - case 's': mask |= _RT_STRING; break; - case 't': mask |= _RT_TABLE; break; - case 'a': mask |= _RT_ARRAY; break; - case 'u': mask |= _RT_USERDATA; break; - case 'c': mask |= (_RT_CLOSURE | _RT_NATIVECLOSURE); break; - case 'b': mask |= _RT_BOOL; break; - case 'g': mask |= _RT_GENERATOR; break; - case 'p': mask |= _RT_USERPOINTER; break; - case 'v': mask |= _RT_THREAD; break; - case 'x': mask |= _RT_INSTANCE; break; - case 'y': mask |= _RT_CLASS; break; - case 'r': mask |= _RT_WEAKREF; break; - case '.': mask = -1; res.push_back(mask); i++; mask = 0; continue; - case ' ': i++; continue; //ignores spaces - default: - return false; - } - i++; - if(typemask[i] == '|') { - i++; - if(typemask[i] == 0) - return false; - continue; - } - res.push_back(mask); - mask = 0; - - } - return true; -} - -SQTable *CreateDefaultDelegate(SQSharedState *ss,const SQRegFunction *funcz) -{ - SQInteger i=0; - SQTable *t=SQTable::Create(ss,0); - while(funcz[i].name!=0){ - SQNativeClosure *nc = SQNativeClosure::Create(ss,funcz[i].f,0); - nc->_nparamscheck = funcz[i].nparamscheck; - nc->_name = SQString::Create(ss,funcz[i].name); - if(funcz[i].typemask && !CompileTypemask(nc->_typecheck,funcz[i].typemask)) - return NULL; - t->NewSlot(SQString::Create(ss,funcz[i].name),nc); - i++; - } - return t; -} - -void SQSharedState::Init() -{ - _scratchpad=NULL; - _scratchpadsize=0; -#ifndef NO_GARBAGE_COLLECTOR - _gc_chain=NULL; -#endif - _stringtable = (SQStringTable*)SQ_MALLOC(sizeof(SQStringTable)); - new (_stringtable) SQStringTable(this); - sq_new(_metamethods,SQObjectPtrVec); - sq_new(_systemstrings,SQObjectPtrVec); - sq_new(_types,SQObjectPtrVec); - _metamethodsmap = SQTable::Create(this,MT_LAST-1); - //adding type strings to avoid memory trashing - //types names - newsysstring(_SC("null")); - newsysstring(_SC("table")); - newsysstring(_SC("array")); - newsysstring(_SC("closure")); - newsysstring(_SC("string")); - newsysstring(_SC("userdata")); - newsysstring(_SC("integer")); - newsysstring(_SC("float")); - newsysstring(_SC("userpointer")); - newsysstring(_SC("function")); - newsysstring(_SC("generator")); - newsysstring(_SC("thread")); - newsysstring(_SC("class")); - newsysstring(_SC("instance")); - newsysstring(_SC("bool")); - //meta methods - newmetamethod(MM_ADD); - newmetamethod(MM_SUB); - newmetamethod(MM_MUL); - newmetamethod(MM_DIV); - newmetamethod(MM_UNM); - newmetamethod(MM_MODULO); - newmetamethod(MM_SET); - newmetamethod(MM_GET); - newmetamethod(MM_TYPEOF); - newmetamethod(MM_NEXTI); - newmetamethod(MM_CMP); - newmetamethod(MM_CALL); - newmetamethod(MM_CLONED); - newmetamethod(MM_NEWSLOT); - newmetamethod(MM_DELSLOT); - newmetamethod(MM_TOSTRING); - newmetamethod(MM_NEWMEMBER); - newmetamethod(MM_INHERITED); - - _constructoridx = SQString::Create(this,_SC("constructor")); - _registry = SQTable::Create(this,0); - _consts = SQTable::Create(this,0); - _table_default_delegate = CreateDefaultDelegate(this,_table_default_delegate_funcz); - _array_default_delegate = CreateDefaultDelegate(this,_array_default_delegate_funcz); - _string_default_delegate = CreateDefaultDelegate(this,_string_default_delegate_funcz); - _number_default_delegate = CreateDefaultDelegate(this,_number_default_delegate_funcz); - _closure_default_delegate = CreateDefaultDelegate(this,_closure_default_delegate_funcz); - _generator_default_delegate = CreateDefaultDelegate(this,_generator_default_delegate_funcz); - _thread_default_delegate = CreateDefaultDelegate(this,_thread_default_delegate_funcz); - _class_default_delegate = CreateDefaultDelegate(this,_class_default_delegate_funcz); - _instance_default_delegate = CreateDefaultDelegate(this,_instance_default_delegate_funcz); - _weakref_default_delegate = CreateDefaultDelegate(this,_weakref_default_delegate_funcz); -} - -SQSharedState::~SQSharedState() -{ - if(_releasehook) { _releasehook(_foreignptr,0); _releasehook = NULL; } - _constructoridx.Null(); - _table(_registry)->Finalize(); - _table(_consts)->Finalize(); - _table(_metamethodsmap)->Finalize(); - _registry.Null(); - _consts.Null(); - _metamethodsmap.Null(); - while(!_systemstrings->empty()) { - _systemstrings->back().Null(); - _systemstrings->pop_back(); - } - _thread(_root_vm)->Finalize(); - _root_vm.Null(); - _table_default_delegate.Null(); - _array_default_delegate.Null(); - _string_default_delegate.Null(); - _number_default_delegate.Null(); - _closure_default_delegate.Null(); - _generator_default_delegate.Null(); - _thread_default_delegate.Null(); - _class_default_delegate.Null(); - _instance_default_delegate.Null(); - _weakref_default_delegate.Null(); - _refs_table.Finalize(); -#ifndef NO_GARBAGE_COLLECTOR - SQCollectable *t = _gc_chain; - SQCollectable *nx = NULL; - if(t) { - t->_uiRef++; - while(t) { - t->Finalize(); - nx = t->_next; - if(nx) nx->_uiRef++; - if(--t->_uiRef == 0) - t->Release(); - t = nx; - } - } - assert(_gc_chain==NULL); //just to proove a theory - while(_gc_chain){ - _gc_chain->_uiRef++; - _gc_chain->Release(); - } -#endif - - sq_delete(_types,SQObjectPtrVec); - sq_delete(_systemstrings,SQObjectPtrVec); - sq_delete(_metamethods,SQObjectPtrVec); - sq_delete(_stringtable,SQStringTable); - if(_scratchpad)SQ_FREE(_scratchpad,_scratchpadsize); -} - - -SQInteger SQSharedState::GetMetaMethodIdxByName(const SQObjectPtr &name) -{ - if(sq_type(name) != OT_STRING) - return -1; - SQObjectPtr ret; - if(_table(_metamethodsmap)->Get(name,ret)) { - return _integer(ret); - } - return -1; -} - -#ifndef NO_GARBAGE_COLLECTOR - -void SQSharedState::MarkObject(SQObjectPtr &o,SQCollectable **chain) -{ - switch(sq_type(o)){ - case OT_TABLE:_table(o)->Mark(chain);break; - case OT_ARRAY:_array(o)->Mark(chain);break; - case OT_USERDATA:_userdata(o)->Mark(chain);break; - case OT_CLOSURE:_closure(o)->Mark(chain);break; - case OT_NATIVECLOSURE:_nativeclosure(o)->Mark(chain);break; - case OT_GENERATOR:_generator(o)->Mark(chain);break; - case OT_THREAD:_thread(o)->Mark(chain);break; - case OT_CLASS:_class(o)->Mark(chain);break; - case OT_INSTANCE:_instance(o)->Mark(chain);break; - case OT_OUTER:_outer(o)->Mark(chain);break; - case OT_FUNCPROTO:_funcproto(o)->Mark(chain);break; - default: break; //shutup compiler - } -} - -void SQSharedState::RunMark(SQVM* SQ_UNUSED_ARG(vm),SQCollectable **tchain) -{ - SQVM *vms = _thread(_root_vm); - - vms->Mark(tchain); - - _refs_table.Mark(tchain); - MarkObject(_registry,tchain); - MarkObject(_consts,tchain); - MarkObject(_metamethodsmap,tchain); - MarkObject(_table_default_delegate,tchain); - MarkObject(_array_default_delegate,tchain); - MarkObject(_string_default_delegate,tchain); - MarkObject(_number_default_delegate,tchain); - MarkObject(_generator_default_delegate,tchain); - MarkObject(_thread_default_delegate,tchain); - MarkObject(_closure_default_delegate,tchain); - MarkObject(_class_default_delegate,tchain); - MarkObject(_instance_default_delegate,tchain); - MarkObject(_weakref_default_delegate,tchain); - -} - -SQInteger SQSharedState::ResurrectUnreachable(SQVM *vm) -{ - SQInteger n=0; - SQCollectable *tchain=NULL; - - RunMark(vm,&tchain); - - SQCollectable *resurrected = _gc_chain; - SQCollectable *t = resurrected; - - _gc_chain = tchain; - - SQArray *ret = NULL; - if(resurrected) { - ret = SQArray::Create(this,0); - SQCollectable *rlast = NULL; - while(t) { - rlast = t; - SQObjectType type = t->GetType(); - if(type != OT_FUNCPROTO && type != OT_OUTER) { - SQObject sqo; - sqo._type = type; - sqo._unVal.pRefCounted = t; - ret->Append(sqo); - } - t = t->_next; - n++; - } - - assert(rlast->_next == NULL); - rlast->_next = _gc_chain; - if(_gc_chain) - { - _gc_chain->_prev = rlast; - } - _gc_chain = resurrected; - } - - t = _gc_chain; - while(t) { - t->UnMark(); - t = t->_next; - } - - if(ret) { - SQObjectPtr temp = ret; - vm->Push(temp); - } - else { - vm->PushNull(); - } - return n; -} - -SQInteger SQSharedState::CollectGarbage(SQVM *vm) -{ - SQInteger n = 0; - SQCollectable *tchain = NULL; - - RunMark(vm,&tchain); - - SQCollectable *t = _gc_chain; - SQCollectable *nx = NULL; - if(t) { - t->_uiRef++; - while(t) { - t->Finalize(); - nx = t->_next; - if(nx) nx->_uiRef++; - if(--t->_uiRef == 0) - t->Release(); - t = nx; - n++; - } - } - - t = tchain; - while(t) { - t->UnMark(); - t = t->_next; - } - _gc_chain = tchain; - - return n; -} -#endif - -#ifndef NO_GARBAGE_COLLECTOR -void SQCollectable::AddToChain(SQCollectable **chain,SQCollectable *c) -{ - c->_prev = NULL; - c->_next = *chain; - if(*chain) (*chain)->_prev = c; - *chain = c; -} - -void SQCollectable::RemoveFromChain(SQCollectable **chain,SQCollectable *c) -{ - if(c->_prev) c->_prev->_next = c->_next; - else *chain = c->_next; - if(c->_next) - c->_next->_prev = c->_prev; - c->_next = NULL; - c->_prev = NULL; -} -#endif - -SQChar* SQSharedState::GetScratchPad(SQInteger size) -{ - SQInteger newsize; - if(size>0) { - if(_scratchpadsize < size) { - newsize = size + (size>>1); - _scratchpad = (SQChar *)SQ_REALLOC(_scratchpad,_scratchpadsize,newsize); - _scratchpadsize = newsize; - - }else if(_scratchpadsize >= (size<<5)) { - newsize = _scratchpadsize >> 1; - _scratchpad = (SQChar *)SQ_REALLOC(_scratchpad,_scratchpadsize,newsize); - _scratchpadsize = newsize; - } - } - return _scratchpad; -} - -RefTable::RefTable() -{ - AllocNodes(4); -} - -void RefTable::Finalize() -{ - RefNode *nodes = _nodes; - for(SQUnsignedInteger n = 0; n < _numofslots; n++) { - nodes->obj.Null(); - nodes++; - } -} - -RefTable::~RefTable() -{ - SQ_FREE(_buckets,(_numofslots * sizeof(RefNode *)) + (_numofslots * sizeof(RefNode))); -} - -#ifndef NO_GARBAGE_COLLECTOR -void RefTable::Mark(SQCollectable **chain) -{ - RefNode *nodes = (RefNode *)_nodes; - for(SQUnsignedInteger n = 0; n < _numofslots; n++) { - if(sq_type(nodes->obj) != OT_NULL) { - SQSharedState::MarkObject(nodes->obj,chain); - } - nodes++; - } -} -#endif - -void RefTable::AddRef(SQObject &obj) -{ - SQHash mainpos; - RefNode *prev; - RefNode *ref = Get(obj,mainpos,&prev,true); - ref->refs++; -} - -SQUnsignedInteger RefTable::GetRefCount(SQObject &obj) -{ - SQHash mainpos; - RefNode *prev; - RefNode *ref = Get(obj,mainpos,&prev,true); - return ref->refs; -} - - -SQBool RefTable::Release(SQObject &obj) -{ - SQHash mainpos; - RefNode *prev; - RefNode *ref = Get(obj,mainpos,&prev,false); - if(ref) { - if(--ref->refs == 0) { - SQObjectPtr o = ref->obj; - if(prev) { - prev->next = ref->next; - } - else { - _buckets[mainpos] = ref->next; - } - ref->next = _freelist; - _freelist = ref; - _slotused--; - ref->obj.Null(); - //<>test for shrink? - return SQTrue; - } - } - else { - assert(0); - } - return SQFalse; -} - -void RefTable::Resize(SQUnsignedInteger size) -{ - RefNode **oldbucks = _buckets; - RefNode *t = _nodes; - SQUnsignedInteger oldnumofslots = _numofslots; - AllocNodes(size); - //rehash - SQUnsignedInteger nfound = 0; - for(SQUnsignedInteger n = 0; n < oldnumofslots; n++) { - if(sq_type(t->obj) != OT_NULL) { - //add back; - assert(t->refs != 0); - RefNode *nn = Add(::HashObj(t->obj)&(_numofslots-1),t->obj); - nn->refs = t->refs; - t->obj.Null(); - nfound++; - } - t++; - } - assert(nfound == oldnumofslots); - SQ_FREE(oldbucks,(oldnumofslots * sizeof(RefNode *)) + (oldnumofslots * sizeof(RefNode))); -} - -RefTable::RefNode *RefTable::Add(SQHash mainpos,SQObject &obj) -{ - RefNode *t = _buckets[mainpos]; - RefNode *newnode = _freelist; - newnode->obj = obj; - _buckets[mainpos] = newnode; - _freelist = _freelist->next; - newnode->next = t; - assert(newnode->refs == 0); - _slotused++; - return newnode; -} - -RefTable::RefNode *RefTable::Get(SQObject &obj,SQHash &mainpos,RefNode **prev,bool add) -{ - RefNode *ref; - mainpos = ::HashObj(obj)&(_numofslots-1); - *prev = NULL; - for (ref = _buckets[mainpos]; ref; ) { - if(_rawval(ref->obj) == _rawval(obj) && sq_type(ref->obj) == sq_type(obj)) - break; - *prev = ref; - ref = ref->next; - } - if(ref == NULL && add) { - if(_numofslots == _slotused) { - assert(_freelist == 0); - Resize(_numofslots*2); - mainpos = ::HashObj(obj)&(_numofslots-1); - } - ref = Add(mainpos,obj); - } - return ref; -} - -void RefTable::AllocNodes(SQUnsignedInteger size) -{ - RefNode **bucks; - RefNode *nodes; - bucks = (RefNode **)SQ_MALLOC((size * sizeof(RefNode *)) + (size * sizeof(RefNode))); - nodes = (RefNode *)&bucks[size]; - RefNode *temp = nodes; - SQUnsignedInteger n; - for(n = 0; n < size - 1; n++) { - bucks[n] = NULL; - temp->refs = 0; - new (&temp->obj) SQObjectPtr; - temp->next = temp+1; - temp++; - } - bucks[n] = NULL; - temp->refs = 0; - new (&temp->obj) SQObjectPtr; - temp->next = NULL; - _freelist = nodes; - _nodes = nodes; - _buckets = bucks; - _slotused = 0; - _numofslots = size; -} -////////////////////////////////////////////////////////////////////////// -//SQStringTable -/* -* The following code is based on Lua 4.0 (Copyright 1994-2002 Tecgraf, PUC-Rio.) -* http://www.lua.org/copyright.html#4 -* http://www.lua.org/source/4.0.1/src_lstring.c.html -*/ - -SQStringTable::SQStringTable(SQSharedState *ss) -{ - _sharedstate = ss; - AllocNodes(4); - _slotused = 0; -} - -SQStringTable::~SQStringTable() -{ - SQ_FREE(_strings,sizeof(SQString*)*_numofslots); - _strings = NULL; -} - -void SQStringTable::AllocNodes(SQInteger size) -{ - _numofslots = size; - _strings = (SQString**)SQ_MALLOC(sizeof(SQString*)*_numofslots); - memset(_strings,0,sizeof(SQString*)*_numofslots); -} - -SQString *SQStringTable::Add(const SQChar *news,SQInteger len) -{ - if(len<0) - len = (SQInteger)scstrlen(news); - SQHash newhash = ::_hashstr(news,len); - SQHash h = newhash&(_numofslots-1); - SQString *s; - for (s = _strings[h]; s; s = s->_next){ - if(s->_len == len && (!memcmp(news,s->_val,sq_rsl(len)))) - return s; //found - } - - SQString *t = (SQString *)SQ_MALLOC(sq_rsl(len)+sizeof(SQString)); - new (t) SQString; - t->_sharedstate = _sharedstate; - memcpy(t->_val,news,sq_rsl(len)); - t->_val[len] = _SC('\0'); - t->_len = len; - t->_hash = newhash; - t->_next = _strings[h]; - _strings[h] = t; - _slotused++; - if (_slotused > _numofslots) /* too crowded? */ - Resize(_numofslots*2); - return t; -} - -void SQStringTable::Resize(SQInteger size) -{ - SQInteger oldsize=_numofslots; - SQString **oldtable=_strings; - AllocNodes(size); - for (SQInteger i=0; i_next; - SQHash h = p->_hash&(_numofslots-1); - p->_next = _strings[h]; - _strings[h] = p; - p = next; - } - } - SQ_FREE(oldtable,oldsize*sizeof(SQString*)); -} - -void SQStringTable::Remove(SQString *bs) -{ - SQString *s; - SQString *prev=NULL; - SQHash h = bs->_hash&(_numofslots - 1); - - for (s = _strings[h]; s; ){ - if(s == bs){ - if(prev) - prev->_next = s->_next; - else - _strings[h] = s->_next; - _slotused--; - SQInteger slen = s->_len; - s->~SQString(); - SQ_FREE(s,sizeof(SQString) + sq_rsl(slen)); - return; - } - prev = s; - s = s->_next; - } - assert(0);//if this fail something is wrong -} diff --git a/m_packages/squirrel/squirrel/sqstate.h b/m_packages/squirrel/squirrel/sqstate.h deleted file mode 100644 index 2cdc8da4..00000000 --- a/m_packages/squirrel/squirrel/sqstate.h +++ /dev/null @@ -1,136 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQSTATE_H_ -#define _SQSTATE_H_ - -#include "squtils.h" -#include "sqobject.h" -struct SQString; -struct SQTable; -//max number of character for a printed number -#define NUMBER_MAX_CHAR 50 - -struct SQStringTable -{ - SQStringTable(SQSharedState*ss); - ~SQStringTable(); - SQString *Add(const SQChar *,SQInteger len); - void Remove(SQString *); -private: - void Resize(SQInteger size); - void AllocNodes(SQInteger size); - SQString **_strings; - SQUnsignedInteger _numofslots; - SQUnsignedInteger _slotused; - SQSharedState *_sharedstate; -}; - -struct RefTable { - struct RefNode { - SQObjectPtr obj; - SQUnsignedInteger refs; - struct RefNode *next; - }; - RefTable(); - ~RefTable(); - void AddRef(SQObject &obj); - SQBool Release(SQObject &obj); - SQUnsignedInteger GetRefCount(SQObject &obj); -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); -#endif - void Finalize(); -private: - RefNode *Get(SQObject &obj,SQHash &mainpos,RefNode **prev,bool add); - RefNode *Add(SQHash mainpos,SQObject &obj); - void Resize(SQUnsignedInteger size); - void AllocNodes(SQUnsignedInteger size); - SQUnsignedInteger _numofslots; - SQUnsignedInteger _slotused; - RefNode *_nodes; - RefNode *_freelist; - RefNode **_buckets; -}; - -#define ADD_STRING(ss,str,len) ss->_stringtable->Add(str,len) -#define REMOVE_STRING(ss,bstr) ss->_stringtable->Remove(bstr) - -struct SQObjectPtr; - -struct SQSharedState -{ - SQSharedState(); - ~SQSharedState(); - void Init(); -public: - SQChar* GetScratchPad(SQInteger size); - SQInteger GetMetaMethodIdxByName(const SQObjectPtr &name); -#ifndef NO_GARBAGE_COLLECTOR - SQInteger CollectGarbage(SQVM *vm); - void RunMark(SQVM *vm,SQCollectable **tchain); - SQInteger ResurrectUnreachable(SQVM *vm); - static void MarkObject(SQObjectPtr &o,SQCollectable **chain); -#endif - SQObjectPtrVec *_metamethods; - SQObjectPtr _metamethodsmap; - SQObjectPtrVec *_systemstrings; - SQObjectPtrVec *_types; - SQStringTable *_stringtable; - RefTable _refs_table; - SQObjectPtr _registry; - SQObjectPtr _consts; - SQObjectPtr _constructoridx; -#ifndef NO_GARBAGE_COLLECTOR - SQCollectable *_gc_chain; -#endif - SQObjectPtr _root_vm; - SQObjectPtr _table_default_delegate; - static const SQRegFunction _table_default_delegate_funcz[]; - SQObjectPtr _array_default_delegate; - static const SQRegFunction _array_default_delegate_funcz[]; - SQObjectPtr _string_default_delegate; - static const SQRegFunction _string_default_delegate_funcz[]; - SQObjectPtr _number_default_delegate; - static const SQRegFunction _number_default_delegate_funcz[]; - SQObjectPtr _generator_default_delegate; - static const SQRegFunction _generator_default_delegate_funcz[]; - SQObjectPtr _closure_default_delegate; - static const SQRegFunction _closure_default_delegate_funcz[]; - SQObjectPtr _thread_default_delegate; - static const SQRegFunction _thread_default_delegate_funcz[]; - SQObjectPtr _class_default_delegate; - static const SQRegFunction _class_default_delegate_funcz[]; - SQObjectPtr _instance_default_delegate; - static const SQRegFunction _instance_default_delegate_funcz[]; - SQObjectPtr _weakref_default_delegate; - static const SQRegFunction _weakref_default_delegate_funcz[]; - - SQCOMPILERERROR _compilererrorhandler; - SQPRINTFUNCTION _printfunc; - SQPRINTFUNCTION _errorfunc; - bool _debuginfo; - bool _notifyallexceptions; - SQUserPointer _foreignptr; - SQRELEASEHOOK _releasehook; -private: - SQChar *_scratchpad; - SQInteger _scratchpadsize; -}; - -#define _sp(s) (_sharedstate->GetScratchPad(s)) -#define _spval (_sharedstate->GetScratchPad(-1)) - -#define _table_ddel _table(_sharedstate->_table_default_delegate) -#define _array_ddel _table(_sharedstate->_array_default_delegate) -#define _string_ddel _table(_sharedstate->_string_default_delegate) -#define _number_ddel _table(_sharedstate->_number_default_delegate) -#define _generator_ddel _table(_sharedstate->_generator_default_delegate) -#define _closure_ddel _table(_sharedstate->_closure_default_delegate) -#define _thread_ddel _table(_sharedstate->_thread_default_delegate) -#define _class_ddel _table(_sharedstate->_class_default_delegate) -#define _instance_ddel _table(_sharedstate->_instance_default_delegate) -#define _weakref_ddel _table(_sharedstate->_weakref_default_delegate) - -bool CompileTypemask(SQIntVec &res,const SQChar *typemask); - - -#endif //_SQSTATE_H_ diff --git a/m_packages/squirrel/squirrel/sqstring.h b/m_packages/squirrel/squirrel/sqstring.h deleted file mode 100644 index 0099f3b4..00000000 --- a/m_packages/squirrel/squirrel/sqstring.h +++ /dev/null @@ -1,32 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQSTRING_H_ -#define _SQSTRING_H_ - -inline SQHash _hashstr (const SQChar *s, size_t l) -{ - SQHash h = (SQHash)l; /* seed */ - size_t step = (l >> 5) + 1; /* if string is too long, don't hash all its chars */ - size_t l1; - for (l1 = l; l1 >= step; l1 -= step) - h = h ^ ((h << 5) + (h >> 2) + ((unsigned short)s[l1 - 1])); - return h; -} - -struct SQString : public SQRefCounted -{ - SQString(){} - ~SQString(){} -public: - static SQString *Create(SQSharedState *ss, const SQChar *, SQInteger len = -1 ); - SQInteger Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval); - void Release(); - SQSharedState *_sharedstate; - SQString *_next; //chain for the string table - SQInteger _len; - SQHash _hash; - SQChar _val[1]; -}; - - - -#endif //_SQSTRING_H_ diff --git a/m_packages/squirrel/squirrel/sqtable.cpp b/m_packages/squirrel/squirrel/sqtable.cpp deleted file mode 100644 index 3a89c459..00000000 --- a/m_packages/squirrel/squirrel/sqtable.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/* -see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include "sqvm.h" -#include "sqtable.h" -#include "sqfuncproto.h" -#include "sqclosure.h" - -SQTable::SQTable(SQSharedState *ss,SQInteger nInitialSize) -{ - SQInteger pow2size=MINPOWER2; - while(nInitialSize>pow2size)pow2size=pow2size<<1; - AllocNodes(pow2size); - _usednodes = 0; - _delegate = NULL; - INIT_CHAIN(); - ADD_TO_CHAIN(&_sharedstate->_gc_chain,this); -} - -void SQTable::Remove(const SQObjectPtr &key) -{ - - _HashNode *n = _Get(key, HashObj(key) & (_numofnodes - 1)); - if (n) { - n->val.Null(); - n->key.Null(); - _usednodes--; - Rehash(false); - } -} - -void SQTable::AllocNodes(SQInteger nSize) -{ - _HashNode *nodes=(_HashNode *)SQ_MALLOC(sizeof(_HashNode)*nSize); - for(SQInteger i=0;i= oldsize-oldsize/4) /* using more than 3/4? */ - AllocNodes(oldsize*2); - else if (nelems <= oldsize/4 && /* less than 1/4? */ - oldsize > MINPOWER2) - AllocNodes(oldsize/2); - else if(force) - AllocNodes(oldsize); - else - return; - _usednodes = 0; - for (SQInteger i=0; ikey) != OT_NULL) - NewSlot(old->key,old->val); - } - for(SQInteger k=0;k_nodes; - _HashNode *src = _nodes; - _HashNode *dst = nt->_nodes; - SQInteger n = 0; - for(n = 0; n < _numofnodes; n++) { - dst->key = src->key; - dst->val = src->val; - if(src->next) { - assert(src->next > basesrc); - dst->next = basedst + (src->next - basesrc); - assert(dst != dst->next); - } - dst++; - src++; - } - assert(_firstfree > basesrc); - assert(_firstfree != NULL); - nt->_firstfree = basedst + (_firstfree - basesrc); - nt->_usednodes = _usednodes; -#else - SQInteger ridx=0; - SQObjectPtr key,val; - while((ridx=Next(true,ridx,key,val))!=-1){ - nt->NewSlot(key,val); - } -#endif - nt->SetDelegate(_delegate); - return nt; -} - -bool SQTable::Get(const SQObjectPtr &key,SQObjectPtr &val) -{ - if(sq_type(key) == OT_NULL) - return false; - _HashNode *n = _Get(key, HashObj(key) & (_numofnodes - 1)); - if (n) { - val = _realval(n->val); - return true; - } - return false; -} -bool SQTable::NewSlot(const SQObjectPtr &key,const SQObjectPtr &val) -{ - assert(sq_type(key) != OT_NULL); - SQHash h = HashObj(key) & (_numofnodes - 1); - _HashNode *n = _Get(key, h); - if (n) { - n->val = val; - return false; - } - _HashNode *mp = &_nodes[h]; - n = mp; - - - //key not found I'll insert it - //main pos is not free - - if(sq_type(mp->key) != OT_NULL) { - n = _firstfree; /* get a free place */ - SQHash mph = HashObj(mp->key) & (_numofnodes - 1); - _HashNode *othern; /* main position of colliding node */ - - if (mp > n && (othern = &_nodes[mph]) != mp){ - /* yes; move colliding node into free position */ - while (othern->next != mp){ - assert(othern->next != NULL); - othern = othern->next; /* find previous */ - } - othern->next = n; /* redo the chain with `n' in place of `mp' */ - n->key = mp->key; - n->val = mp->val;/* copy colliding node into free pos. (mp->next also goes) */ - n->next = mp->next; - mp->key.Null(); - mp->val.Null(); - mp->next = NULL; /* now `mp' is free */ - } - else{ - /* new node will go into free position */ - n->next = mp->next; /* chain new position */ - mp->next = n; - mp = n; - } - } - mp->key = key; - - for (;;) { /* correct `firstfree' */ - if (sq_type(_firstfree->key) == OT_NULL && _firstfree->next == NULL) { - mp->val = val; - _usednodes++; - return true; /* OK; table still has a free place */ - } - else if (_firstfree == _nodes) break; /* cannot decrement from here */ - else (_firstfree)--; - } - Rehash(true); - return NewSlot(key, val); -} - -SQInteger SQTable::Next(bool getweakrefs,const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval) -{ - SQInteger idx = (SQInteger)TranslateIndex(refpos); - while (idx < _numofnodes) { - if(sq_type(_nodes[idx].key) != OT_NULL) { - //first found - _HashNode &n = _nodes[idx]; - outkey = n.key; - outval = getweakrefs?(SQObject)n.val:_realval(n.val); - //return idx for the next iteration - return ++idx; - } - ++idx; - } - //nothing to iterate anymore - return -1; -} - - -bool SQTable::Set(const SQObjectPtr &key, const SQObjectPtr &val) -{ - _HashNode *n = _Get(key, HashObj(key) & (_numofnodes - 1)); - if (n) { - n->val = val; - return true; - } - return false; -} - -void SQTable::_ClearNodes() -{ - for(SQInteger i = 0;i < _numofnodes; i++) { _HashNode &n = _nodes[i]; n.key.Null(); n.val.Null(); } -} - -void SQTable::Finalize() -{ - _ClearNodes(); - SetDelegate(NULL); -} - -void SQTable::Clear() -{ - _ClearNodes(); - _usednodes = 0; - Rehash(true); -} diff --git a/m_packages/squirrel/squirrel/sqtable.h b/m_packages/squirrel/squirrel/sqtable.h deleted file mode 100644 index 8ca3ae7c..00000000 --- a/m_packages/squirrel/squirrel/sqtable.h +++ /dev/null @@ -1,110 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQTABLE_H_ -#define _SQTABLE_H_ -/* -* The following code is based on Lua 4.0 (Copyright 1994-2002 Tecgraf, PUC-Rio.) -* http://www.lua.org/copyright.html#4 -* http://www.lua.org/source/4.0.1/src_ltable.c.html -*/ - -#include "sqstring.h" - - -#define hashptr(p) ((SQHash)(((SQInteger)p) >> 3)) - -inline SQHash HashObj(const SQObject &key) -{ - switch(sq_type(key)) { - case OT_STRING: return _string(key)->_hash; - case OT_FLOAT: return (SQHash)((SQInteger)_float(key)); - case OT_BOOL: case OT_INTEGER: return (SQHash)((SQInteger)_integer(key)); - default: return hashptr(key._unVal.pRefCounted); - } -} - -struct SQTable : public SQDelegable -{ -private: - struct _HashNode - { - _HashNode() { next = NULL; } - SQObjectPtr val; - SQObjectPtr key; - _HashNode *next; - }; - _HashNode *_firstfree; - _HashNode *_nodes; - SQInteger _numofnodes; - SQInteger _usednodes; - -/////////////////////////// - void AllocNodes(SQInteger nSize); - void Rehash(bool force); - SQTable(SQSharedState *ss, SQInteger nInitialSize); - void _ClearNodes(); -public: - static SQTable* Create(SQSharedState *ss,SQInteger nInitialSize) - { - SQTable *newtable = (SQTable*)SQ_MALLOC(sizeof(SQTable)); - new (newtable) SQTable(ss, nInitialSize); - newtable->_delegate = NULL; - return newtable; - } - void Finalize(); - SQTable *Clone(); - ~SQTable() - { - SetDelegate(NULL); - REMOVE_FROM_CHAIN(&_sharedstate->_gc_chain, this); - for (SQInteger i = 0; i < _numofnodes; i++) _nodes[i].~_HashNode(); - SQ_FREE(_nodes, _numofnodes * sizeof(_HashNode)); - } -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - SQObjectType GetType() {return OT_TABLE;} -#endif - inline _HashNode *_Get(const SQObjectPtr &key,SQHash hash) - { - _HashNode *n = &_nodes[hash]; - do{ - if(_rawval(n->key) == _rawval(key) && sq_type(n->key) == sq_type(key)){ - return n; - } - }while((n = n->next)); - return NULL; - } - //for compiler use - inline bool GetStr(const SQChar* key,SQInteger keylen,SQObjectPtr &val) - { - SQHash hash = _hashstr(key,keylen); - _HashNode *n = &_nodes[hash & (_numofnodes - 1)]; - _HashNode *res = NULL; - do{ - if(sq_type(n->key) == OT_STRING && (scstrcmp(_stringval(n->key),key) == 0)){ - res = n; - break; - } - }while((n = n->next)); - if (res) { - val = _realval(res->val); - return true; - } - return false; - } - bool Get(const SQObjectPtr &key,SQObjectPtr &val); - void Remove(const SQObjectPtr &key); - bool Set(const SQObjectPtr &key, const SQObjectPtr &val); - //returns true if a new slot has been created false if it was already present - bool NewSlot(const SQObjectPtr &key,const SQObjectPtr &val); - SQInteger Next(bool getweakrefs,const SQObjectPtr &refpos, SQObjectPtr &outkey, SQObjectPtr &outval); - - SQInteger CountUsed(){ return _usednodes;} - void Clear(); - void Release() - { - sq_delete(this, SQTable); - } - -}; - -#endif //_SQTABLE_H_ diff --git a/m_packages/squirrel/squirrel/squirrel.dsp b/m_packages/squirrel/squirrel/squirrel.dsp deleted file mode 100644 index 66a84f7d..00000000 --- a/m_packages/squirrel/squirrel/squirrel.dsp +++ /dev/null @@ -1,302 +0,0 @@ -# Microsoft Developer Studio Project File - Name="squirrel" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=squirrel - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "squirrel.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "squirrel.mak" CFG="squirrel - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "squirrel - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "squirrel - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_LocalPath ".." -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "squirrel - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "GARBAGE_COLLECTOR" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\lib\squirrel.lib" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\lib\squirrel.lib" - -!ENDIF - -# Begin Target - -# Name "squirrel - Win32 Release" -# Name "squirrel - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sqapi.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqbaselib.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqcompiler.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqdebug.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqfuncstate.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqlexer.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqmem.cpp -# End Source File -# Begin Source File - -SOURCE=.\sqobject.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqstate.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqtable.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqclass.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sqvm.cpp - -!IF "$(CFG)" == "squirrel - Win32 Release" - -!ELSEIF "$(CFG)" == "squirrel - Win32 Debug" - -# ADD CPP /YX"stdafx.h" - -!ENDIF - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\sqarray.h -# End Source File -# Begin Source File - -SOURCE=.\sqclosure.h -# End Source File -# Begin Source File - -SOURCE=.\sqcompiler.h -# End Source File -# Begin Source File - -SOURCE=.\sqfuncproto.h -# End Source File -# Begin Source File - -SOURCE=.\sqfuncstate.h -# End Source File -# Begin Source File - -SOURCE=.\sqlexer.h -# End Source File -# Begin Source File - -SOURCE=.\sqobject.h -# End Source File -# Begin Source File - -SOURCE=.\sqopcodes.h -# End Source File -# Begin Source File - -SOURCE=.\sqpcheader.h -# End Source File -# Begin Source File - -SOURCE=.\sqstate.h -# End Source File -# Begin Source File - -SOURCE=.\sqstring.h -# End Source File -# Begin Source File - -SOURCE=.\sqtable.h -# End Source File -# Begin Source File - -SOURCE=.\squserdata.h -# End Source File -# Begin Source File - -SOURCE=.\squtils.h -# End Source File -# Begin Source File - -SOURCE=.\sqclass.h -# End Source File -# Begin Source File - -SOURCE=.\sqvm.h -# End Source File -# End Group -# End Target -# End Project diff --git a/m_packages/squirrel/squirrel/squserdata.h b/m_packages/squirrel/squirrel/squserdata.h deleted file mode 100644 index ec217313..00000000 --- a/m_packages/squirrel/squirrel/squserdata.h +++ /dev/null @@ -1,40 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQUSERDATA_H_ -#define _SQUSERDATA_H_ - -struct SQUserData : SQDelegable -{ - SQUserData(SQSharedState *ss){ _delegate = 0; _hook = NULL; INIT_CHAIN(); ADD_TO_CHAIN(&_ss(this)->_gc_chain, this); } - ~SQUserData() - { - REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain, this); - SetDelegate(NULL); - } - static SQUserData* Create(SQSharedState *ss, SQInteger size) - { - SQUserData* ud = (SQUserData*)SQ_MALLOC(sq_aligning(sizeof(SQUserData))+size); - new (ud) SQUserData(ss); - ud->_size = size; - ud->_typetag = 0; - return ud; - } -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - void Finalize(){SetDelegate(NULL);} - SQObjectType GetType(){ return OT_USERDATA;} -#endif - void Release() { - if (_hook) _hook((SQUserPointer)sq_aligning(this + 1),_size); - SQInteger tsize = _size; - this->~SQUserData(); - SQ_FREE(this, sq_aligning(sizeof(SQUserData)) + tsize); - } - - - SQInteger _size; - SQRELEASEHOOK _hook; - SQUserPointer _typetag; - //SQChar _val[1]; -}; - -#endif //_SQUSERDATA_H_ diff --git a/m_packages/squirrel/squirrel/squtils.h b/m_packages/squirrel/squirrel/squtils.h deleted file mode 100644 index f3e819a5..00000000 --- a/m_packages/squirrel/squirrel/squtils.h +++ /dev/null @@ -1,116 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQUTILS_H_ -#define _SQUTILS_H_ - -void *sq_vm_malloc(SQUnsignedInteger size); -void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size); -void sq_vm_free(void *p,SQUnsignedInteger size); - -#define sq_new(__ptr,__type) {__ptr=(__type *)sq_vm_malloc(sizeof(__type));new (__ptr) __type;} -#define sq_delete(__ptr,__type) {__ptr->~__type();sq_vm_free(__ptr,sizeof(__type));} -#define SQ_MALLOC(__size) sq_vm_malloc((__size)); -#define SQ_FREE(__ptr,__size) sq_vm_free((__ptr),(__size)); -#define SQ_REALLOC(__ptr,__oldsize,__size) sq_vm_realloc((__ptr),(__oldsize),(__size)); - -#define sq_aligning(v) (((size_t)(v) + (SQ_ALIGNMENT-1)) & (~(SQ_ALIGNMENT-1))) - -//sqvector mini vector class, supports objects by value -template class sqvector -{ -public: - sqvector() - { - _vals = NULL; - _size = 0; - _allocated = 0; - } - sqvector(const sqvector& v) - { - copy(v); - } - void copy(const sqvector& v) - { - if(_size) { - resize(0); //destroys all previous stuff - } - //resize(v._size); - if(v._size > _allocated) { - _realloc(v._size); - } - for(SQUnsignedInteger i = 0; i < v._size; i++) { - new ((void *)&_vals[i]) T(v._vals[i]); - } - _size = v._size; - } - ~sqvector() - { - if(_allocated) { - for(SQUnsignedInteger i = 0; i < _size; i++) - _vals[i].~T(); - SQ_FREE(_vals, (_allocated * sizeof(T))); - } - } - void reserve(SQUnsignedInteger newsize) { _realloc(newsize); } - void resize(SQUnsignedInteger newsize, const T& fill = T()) - { - if(newsize > _allocated) - _realloc(newsize); - if(newsize > _size) { - while(_size < newsize) { - new ((void *)&_vals[_size]) T(fill); - _size++; - } - } - else{ - for(SQUnsignedInteger i = newsize; i < _size; i++) { - _vals[i].~T(); - } - _size = newsize; - } - } - void shrinktofit() { if(_size > 4) { _realloc(_size); } } - T& top() const { return _vals[_size - 1]; } - inline SQUnsignedInteger size() const { return _size; } - bool empty() const { return (_size <= 0); } - inline T &push_back(const T& val = T()) - { - if(_allocated <= _size) - _realloc(_size * 2); - return *(new ((void *)&_vals[_size++]) T(val)); - } - inline void pop_back() - { - _size--; _vals[_size].~T(); - } - void insert(SQUnsignedInteger idx, const T& val) - { - resize(_size + 1); - for(SQUnsignedInteger i = _size - 1; i > idx; i--) { - _vals[i] = _vals[i - 1]; - } - _vals[idx] = val; - } - void remove(SQUnsignedInteger idx) - { - _vals[idx].~T(); - if(idx < (_size - 1)) { - memmove(&_vals[idx], &_vals[idx+1], sizeof(T) * (_size - idx - 1)); - } - _size--; - } - SQUnsignedInteger capacity() { return _allocated; } - inline T &back() const { return _vals[_size - 1]; } - inline T& operator[](SQUnsignedInteger pos) const{ return _vals[pos]; } - T* _vals; -private: - void _realloc(SQUnsignedInteger newsize) - { - newsize = (newsize > 0)?newsize:4; - _vals = (T*)SQ_REALLOC(_vals, _allocated * sizeof(T), newsize * sizeof(T)); - _allocated = newsize; - } - SQUnsignedInteger _size; - SQUnsignedInteger _allocated; -}; - -#endif //_SQUTILS_H_ diff --git a/m_packages/squirrel/squirrel/sqvm.cpp b/m_packages/squirrel/squirrel/sqvm.cpp deleted file mode 100644 index c70166da..00000000 --- a/m_packages/squirrel/squirrel/sqvm.cpp +++ /dev/null @@ -1,1811 +0,0 @@ -/* - see copyright notice in squirrel.h -*/ -#include "sqpcheader.h" -#include -#include -#include "sqopcodes.h" -#include "sqvm.h" -#include "sqfuncproto.h" -#include "sqclosure.h" -#include "sqstring.h" -#include "sqtable.h" -#include "squserdata.h" -#include "sqarray.h" -#include "sqclass.h" - -#define TOP() (_stack._vals[_top-1]) -#define TARGET _stack._vals[_stackbase+arg0] -#define STK(a) _stack._vals[_stackbase+(a)] - -bool SQVM::BW_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,const SQObjectPtr &o2) -{ - SQInteger res; - if((sq_type(o1)| sq_type(o2)) == OT_INTEGER) - { - SQInteger i1 = _integer(o1), i2 = _integer(o2); - switch(op) { - case BW_AND: res = i1 & i2; break; - case BW_OR: res = i1 | i2; break; - case BW_XOR: res = i1 ^ i2; break; - case BW_SHIFTL: res = i1 << i2; break; - case BW_SHIFTR: res = i1 >> i2; break; - case BW_USHIFTR:res = (SQInteger)(*((SQUnsignedInteger*)&i1) >> i2); break; - default: { Raise_Error(_SC("internal vm error bitwise op failed")); return false; } - } - } - else { Raise_Error(_SC("bitwise op between '%s' and '%s'"),GetTypeName(o1),GetTypeName(o2)); return false;} - trg = res; - return true; -} - -#define _ARITH_(op,trg,o1,o2) \ -{ \ - SQInteger tmask = sq_type(o1)|sq_type(o2); \ - switch(tmask) { \ - case OT_INTEGER: trg = _integer(o1) op _integer(o2);break; \ - case (OT_FLOAT|OT_INTEGER): \ - case (OT_FLOAT): trg = tofloat(o1) op tofloat(o2); break;\ - default: _GUARD(ARITH_OP((#op)[0],trg,o1,o2)); break;\ - } \ -} - -#define _ARITH_NOZERO(op,trg,o1,o2,err) \ -{ \ - SQInteger tmask = sq_type(o1)|sq_type(o2); \ - switch(tmask) { \ - case OT_INTEGER: { SQInteger i2 = _integer(o2); if(i2 == 0) { Raise_Error(err); SQ_THROW(); } trg = _integer(o1) op i2; } break;\ - case (OT_FLOAT|OT_INTEGER): \ - case (OT_FLOAT): trg = tofloat(o1) op tofloat(o2); break;\ - default: _GUARD(ARITH_OP((#op)[0],trg,o1,o2)); break;\ - } \ -} - -bool SQVM::ARITH_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,const SQObjectPtr &o2) -{ - SQInteger tmask = sq_type(o1)| sq_type(o2); - switch(tmask) { - case OT_INTEGER:{ - SQInteger res, i1 = _integer(o1), i2 = _integer(o2); - switch(op) { - case '+': res = i1 + i2; break; - case '-': res = i1 - i2; break; - case '/': if (i2 == 0) { Raise_Error(_SC("division by zero")); return false; } - else if (i2 == -1 && i1 == INT_MIN) { Raise_Error(_SC("integer overflow")); return false; } - res = i1 / i2; - break; - case '*': res = i1 * i2; break; - case '%': if (i2 == 0) { Raise_Error(_SC("modulo by zero")); return false; } - else if (i2 == -1 && i1 == INT_MIN) { res = 0; break; } - res = i1 % i2; - break; - default: res = 0xDEADBEEF; - } - trg = res; } - break; - case (OT_FLOAT|OT_INTEGER): - case (OT_FLOAT):{ - SQFloat res, f1 = tofloat(o1), f2 = tofloat(o2); - switch(op) { - case '+': res = f1 + f2; break; - case '-': res = f1 - f2; break; - case '/': res = f1 / f2; break; - case '*': res = f1 * f2; break; - case '%': res = SQFloat(fmod((double)f1,(double)f2)); break; - default: res = 0x0f; - } - trg = res; } - break; - default: - if(op == '+' && (tmask & _RT_STRING)){ - if(!StringCat(o1, o2, trg)) return false; - } - else if(!ArithMetaMethod(op,o1,o2,trg)) { - return false; - } - } - return true; -} - -SQVM::SQVM(SQSharedState *ss) -{ - _sharedstate=ss; - _suspended = SQFalse; - _suspended_target = -1; - _suspended_root = SQFalse; - _suspended_traps = -1; - _foreignptr = NULL; - _nnativecalls = 0; - _nmetamethodscall = 0; - _lasterror.Null(); - _errorhandler.Null(); - _debughook = false; - _debughook_native = NULL; - _debughook_closure.Null(); - _openouters = NULL; - ci = NULL; - _releasehook = NULL; - INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); -} - -void SQVM::Finalize() -{ - if(_releasehook) { _releasehook(_foreignptr,0); _releasehook = NULL; } - if(_openouters) CloseOuters(&_stack._vals[0]); - _roottable.Null(); - _lasterror.Null(); - _errorhandler.Null(); - _debughook = false; - _debughook_native = NULL; - _debughook_closure.Null(); - temp_reg.Null(); - _callstackdata.resize(0); - SQInteger size=_stack.size(); - for(SQInteger i=0;i_gc_chain,this); -} - -bool SQVM::ArithMetaMethod(SQInteger op,const SQObjectPtr &o1,const SQObjectPtr &o2,SQObjectPtr &dest) -{ - SQMetaMethod mm; - switch(op){ - case _SC('+'): mm=MT_ADD; break; - case _SC('-'): mm=MT_SUB; break; - case _SC('/'): mm=MT_DIV; break; - case _SC('*'): mm=MT_MUL; break; - case _SC('%'): mm=MT_MODULO; break; - default: mm = MT_ADD; assert(0); break; //shutup compiler - } - if(is_delegable(o1) && _delegable(o1)->_delegate) { - - SQObjectPtr closure; - if(_delegable(o1)->GetMetaMethod(this, mm, closure)) { - Push(o1);Push(o2); - return CallMetaMethod(closure,mm,2,dest); - } - } - Raise_Error(_SC("arith op %c on between '%s' and '%s'"),op,GetTypeName(o1),GetTypeName(o2)); - return false; -} - -bool SQVM::NEG_OP(SQObjectPtr &trg,const SQObjectPtr &o) -{ - - switch(sq_type(o)) { - case OT_INTEGER: - trg = -_integer(o); - return true; - case OT_FLOAT: - trg = -_float(o); - return true; - case OT_TABLE: - case OT_USERDATA: - case OT_INSTANCE: - if(_delegable(o)->_delegate) { - SQObjectPtr closure; - if(_delegable(o)->GetMetaMethod(this, MT_UNM, closure)) { - Push(o); - if(!CallMetaMethod(closure, MT_UNM, 1, temp_reg)) return false; - _Swap(trg,temp_reg); - return true; - - } - } - default:break; //shutup compiler - } - Raise_Error(_SC("attempt to negate a %s"), GetTypeName(o)); - return false; -} - -#define _RET_SUCCEED(exp) { result = (exp); return true; } -bool SQVM::ObjCmp(const SQObjectPtr &o1,const SQObjectPtr &o2,SQInteger &result) -{ - SQObjectType t1 = sq_type(o1), t2 = sq_type(o2); - if(t1 == t2) { - if(_rawval(o1) == _rawval(o2))_RET_SUCCEED(0); - SQObjectPtr res; - switch(t1){ - case OT_STRING: - _RET_SUCCEED(scstrcmp(_stringval(o1),_stringval(o2))); - case OT_INTEGER: - _RET_SUCCEED((_integer(o1)<_integer(o2))?-1:1); - case OT_FLOAT: - _RET_SUCCEED((_float(o1)<_float(o2))?-1:1); - case OT_TABLE: - case OT_USERDATA: - case OT_INSTANCE: - if(_delegable(o1)->_delegate) { - SQObjectPtr closure; - if(_delegable(o1)->GetMetaMethod(this, MT_CMP, closure)) { - Push(o1);Push(o2); - if(CallMetaMethod(closure,MT_CMP,2,res)) { - if(sq_type(res) != OT_INTEGER) { - Raise_Error(_SC("_cmp must return an integer")); - return false; - } - _RET_SUCCEED(_integer(res)) - } - return false; - } - } - //continues through (no break needed) - default: - _RET_SUCCEED( _userpointer(o1) < _userpointer(o2)?-1:1 ); - } - assert(0); - //if(type(res)!=OT_INTEGER) { Raise_CompareError(o1,o2); return false; } - // _RET_SUCCEED(_integer(res)); - - } - else{ - if(sq_isnumeric(o1) && sq_isnumeric(o2)){ - if((t1==OT_INTEGER) && (t2==OT_FLOAT)) { - if( _integer(o1)==_float(o2) ) { _RET_SUCCEED(0); } - else if( _integer(o1)<_float(o2) ) { _RET_SUCCEED(-1); } - _RET_SUCCEED(1); - } - else{ - if( _float(o1)==_integer(o2) ) { _RET_SUCCEED(0); } - else if( _float(o1)<_integer(o2) ) { _RET_SUCCEED(-1); } - _RET_SUCCEED(1); - } - } - else if(t1==OT_NULL) {_RET_SUCCEED(-1);} - else if(t2==OT_NULL) {_RET_SUCCEED(1);} - else { Raise_CompareError(o1,o2); return false; } - - } - assert(0); - _RET_SUCCEED(0); //cannot happen -} - -bool SQVM::CMP_OP(CmpOP op, const SQObjectPtr &o1,const SQObjectPtr &o2,SQObjectPtr &res) -{ - SQInteger r; - if(ObjCmp(o1,o2,r)) { - switch(op) { - case CMP_G: res = (r > 0); return true; - case CMP_GE: res = (r >= 0); return true; - case CMP_L: res = (r < 0); return true; - case CMP_LE: res = (r <= 0); return true; - case CMP_3W: res = r; return true; - } - assert(0); - } - return false; -} - -bool SQVM::ToString(const SQObjectPtr &o,SQObjectPtr &res) -{ - switch(sq_type(o)) { - case OT_STRING: - res = o; - return true; - case OT_FLOAT: - scsprintf(_sp(sq_rsl(NUMBER_MAX_CHAR+1)),sq_rsl(NUMBER_MAX_CHAR),_SC("%g"),_float(o)); - break; - case OT_INTEGER: - scsprintf(_sp(sq_rsl(NUMBER_MAX_CHAR+1)),sq_rsl(NUMBER_MAX_CHAR),_PRINT_INT_FMT,_integer(o)); - break; - case OT_BOOL: - scsprintf(_sp(sq_rsl(6)),sq_rsl(6),_integer(o)?_SC("true"):_SC("false")); - break; - case OT_NULL: - scsprintf(_sp(sq_rsl(5)),sq_rsl(5),_SC("null")); - break; - case OT_TABLE: - case OT_USERDATA: - case OT_INSTANCE: - if(_delegable(o)->_delegate) { - SQObjectPtr closure; - if(_delegable(o)->GetMetaMethod(this, MT_TOSTRING, closure)) { - Push(o); - if(CallMetaMethod(closure,MT_TOSTRING,1,res)) { - if(sq_type(res) == OT_STRING) - return true; - } - else { - return false; - } - } - } - default: - scsprintf(_sp(sq_rsl((sizeof(void*)*2)+NUMBER_MAX_CHAR)),sq_rsl((sizeof(void*)*2)+NUMBER_MAX_CHAR),_SC("(%s : 0x%p)"),GetTypeName(o),(void*)_rawval(o)); - } - res = SQString::Create(_ss(this),_spval); - return true; -} - - -bool SQVM::StringCat(const SQObjectPtr &str,const SQObjectPtr &obj,SQObjectPtr &dest) -{ - SQObjectPtr a, b; - if(!ToString(str, a)) return false; - if(!ToString(obj, b)) return false; - SQInteger l = _string(a)->_len , ol = _string(b)->_len; - SQChar *s = _sp(sq_rsl(l + ol + 1)); - memcpy(s, _stringval(a), sq_rsl(l)); - memcpy(s + l, _stringval(b), sq_rsl(ol)); - dest = SQString::Create(_ss(this), _spval, l + ol); - return true; -} - -bool SQVM::TypeOf(const SQObjectPtr &obj1,SQObjectPtr &dest) -{ - if(is_delegable(obj1) && _delegable(obj1)->_delegate) { - SQObjectPtr closure; - if(_delegable(obj1)->GetMetaMethod(this, MT_TYPEOF, closure)) { - Push(obj1); - return CallMetaMethod(closure,MT_TYPEOF,1,dest); - } - } - dest = SQString::Create(_ss(this),GetTypeName(obj1)); - return true; -} - -bool SQVM::Init(SQVM *friendvm, SQInteger stacksize) -{ - _stack.resize(stacksize); - _alloccallsstacksize = 4; - _callstackdata.resize(_alloccallsstacksize); - _callsstacksize = 0; - _callsstack = &_callstackdata[0]; - _stackbase = 0; - _top = 0; - if(!friendvm) { - _roottable = SQTable::Create(_ss(this), 0); - sq_base_register(this); - } - else { - _roottable = friendvm->_roottable; - _errorhandler = friendvm->_errorhandler; - _debughook = friendvm->_debughook; - _debughook_native = friendvm->_debughook_native; - _debughook_closure = friendvm->_debughook_closure; - } - - - return true; -} - - -bool SQVM::StartCall(SQClosure *closure,SQInteger target,SQInteger args,SQInteger stackbase,bool tailcall) -{ - SQFunctionProto *func = closure->_function; - - SQInteger paramssize = func->_nparameters; - const SQInteger newtop = stackbase + func->_stacksize; - SQInteger nargs = args; - if(func->_varparams) - { - paramssize--; - if (nargs < paramssize) { - Raise_Error(_SC("wrong number of parameters (%d passed, at least %d required)"), - (int)nargs, (int)paramssize); - return false; - } - - //dumpstack(stackbase); - SQInteger nvargs = nargs - paramssize; - SQArray *arr = SQArray::Create(_ss(this),nvargs); - SQInteger pbase = stackbase+paramssize; - for(SQInteger n = 0; n < nvargs; n++) { - arr->_values[n] = _stack._vals[pbase]; - _stack._vals[pbase].Null(); - pbase++; - - } - _stack._vals[stackbase+paramssize] = arr; - //dumpstack(stackbase); - } - else if (paramssize != nargs) { - SQInteger ndef = func->_ndefaultparams; - SQInteger diff; - if(ndef && nargs < paramssize && (diff = paramssize - nargs) <= ndef) { - for(SQInteger n = ndef - diff; n < ndef; n++) { - _stack._vals[stackbase + (nargs++)] = closure->_defaultparams[n]; - } - } - else { - Raise_Error(_SC("wrong number of parameters (%d passed, %d required)"), - (int)nargs, (int)paramssize); - return false; - } - } - - if(closure->_env) { - _stack._vals[stackbase] = closure->_env->_obj; - } - - if(!EnterFrame(stackbase, newtop, tailcall)) return false; - - ci->_closure = closure; - ci->_literals = func->_literals; - ci->_ip = func->_instructions; - ci->_target = (SQInt32)target; - - if (_debughook) { - CallDebugHook(_SC('c')); - } - - if (closure->_function->_bgenerator) { - SQFunctionProto *f = closure->_function; - SQGenerator *gen = SQGenerator::Create(_ss(this), closure); - if(!gen->Yield(this,f->_stacksize)) - return false; - SQObjectPtr temp; - Return(1, target, temp); - STK(target) = gen; - } - - - return true; -} - -bool SQVM::Return(SQInteger _arg0, SQInteger _arg1, SQObjectPtr &retval) -{ - SQBool _isroot = ci->_root; - SQInteger callerbase = _stackbase - ci->_prevstkbase; - - if (_debughook) { - for(SQInteger i=0; i_ncalls; i++) { - CallDebugHook(_SC('r')); - } - } - - SQObjectPtr *dest; - if (_isroot) { - dest = &(retval); - } else if (ci->_target == -1) { - dest = NULL; - } else { - dest = &_stack._vals[callerbase + ci->_target]; - } - if (dest) { - if(_arg0 != 0xFF) { - *dest = _stack._vals[_stackbase+_arg1]; - } - else { - dest->Null(); - } - //*dest = (_arg0 != 0xFF) ? _stack._vals[_stackbase+_arg1] : _null_; - } - LeaveFrame(); - return _isroot ? true : false; -} - -#define _RET_ON_FAIL(exp) { if(!exp) return false; } - -bool SQVM::PLOCAL_INC(SQInteger op,SQObjectPtr &target, SQObjectPtr &a, SQObjectPtr &incr) -{ - SQObjectPtr trg; - _RET_ON_FAIL(ARITH_OP( op , trg, a, incr)); - target = a; - a = trg; - return true; -} - -bool SQVM::DerefInc(SQInteger op,SQObjectPtr &target, SQObjectPtr &self, SQObjectPtr &key, SQObjectPtr &incr, bool postfix,SQInteger selfidx) -{ - SQObjectPtr tmp, tself = self, tkey = key; - if (!Get(tself, tkey, tmp, 0, selfidx)) { return false; } - _RET_ON_FAIL(ARITH_OP( op , target, tmp, incr)) - if (!Set(tself, tkey, target,selfidx)) { return false; } - if (postfix) target = tmp; - return true; -} - -#define arg0 (_i_._arg0) -#define sarg0 ((SQInteger)*((const signed char *)&_i_._arg0)) -#define arg1 (_i_._arg1) -#define sarg1 (*((const SQInt32 *)&_i_._arg1)) -#define arg2 (_i_._arg2) -#define arg3 (_i_._arg3) -#define sarg3 ((SQInteger)*((const signed char *)&_i_._arg3)) - -SQRESULT SQVM::Suspend() -{ - if (_suspended) - return sq_throwerror(this, _SC("cannot suspend an already suspended vm")); - if (_nnativecalls!=2) - return sq_throwerror(this, _SC("cannot suspend through native calls/metamethods")); - return SQ_SUSPEND_FLAG; -} - - -#define _FINISH(howmuchtojump) {jump = howmuchtojump; return true; } -bool SQVM::FOREACH_OP(SQObjectPtr &o1,SQObjectPtr &o2,SQObjectPtr -&o3,SQObjectPtr &o4,SQInteger SQ_UNUSED_ARG(arg_2),int exitpos,int &jump) -{ - SQInteger nrefidx; - switch(sq_type(o1)) { - case OT_TABLE: - if((nrefidx = _table(o1)->Next(false,o4, o2, o3)) == -1) _FINISH(exitpos); - o4 = (SQInteger)nrefidx; _FINISH(1); - case OT_ARRAY: - if((nrefidx = _array(o1)->Next(o4, o2, o3)) == -1) _FINISH(exitpos); - o4 = (SQInteger) nrefidx; _FINISH(1); - case OT_STRING: - if((nrefidx = _string(o1)->Next(o4, o2, o3)) == -1)_FINISH(exitpos); - o4 = (SQInteger)nrefidx; _FINISH(1); - case OT_CLASS: - if((nrefidx = _class(o1)->Next(o4, o2, o3)) == -1)_FINISH(exitpos); - o4 = (SQInteger)nrefidx; _FINISH(1); - case OT_USERDATA: - case OT_INSTANCE: - if(_delegable(o1)->_delegate) { - SQObjectPtr itr; - SQObjectPtr closure; - if(_delegable(o1)->GetMetaMethod(this, MT_NEXTI, closure)) { - Push(o1); - Push(o4); - if(CallMetaMethod(closure, MT_NEXTI, 2, itr)) { - o4 = o2 = itr; - if(sq_type(itr) == OT_NULL) _FINISH(exitpos); - if(!Get(o1, itr, o3, 0, DONT_FALL_BACK)) { - Raise_Error(_SC("_nexti returned an invalid idx")); // cloud be changed - return false; - } - _FINISH(1); - } - else { - return false; - } - } - Raise_Error(_SC("_nexti failed")); - return false; - } - break; - case OT_GENERATOR: - if(_generator(o1)->_state == SQGenerator::eDead) _FINISH(exitpos); - if(_generator(o1)->_state == SQGenerator::eSuspended) { - SQInteger idx = 0; - if(sq_type(o4) == OT_INTEGER) { - idx = _integer(o4) + 1; - } - o2 = idx; - o4 = idx; - _generator(o1)->Resume(this, o3); - _FINISH(0); - } - default: - Raise_Error(_SC("cannot iterate %s"), GetTypeName(o1)); - } - return false; //cannot be hit(just to avoid warnings) -} - -#define COND_LITERAL (arg3!=0?ci->_literals[arg1]:STK(arg1)) - -#define SQ_THROW() { goto exception_trap; } - -#define _GUARD(exp) { if(!exp) { SQ_THROW();} } - -bool SQVM::CLOSURE_OP(SQObjectPtr &target, SQFunctionProto *func,SQInteger boundtarget) -{ - SQInteger nouters; - SQClosure *closure = SQClosure::Create(_ss(this), func,_table(_roottable)->GetWeakRef(OT_TABLE)); - if((nouters = func->_noutervalues)) { - for(SQInteger i = 0; i_outervalues[i]; - switch(v._type){ - case otLOCAL: - FindOuter(closure->_outervalues[i], &STK(_integer(v._src))); - break; - case otOUTER: - closure->_outervalues[i] = _closure(ci->_closure)->_outervalues[_integer(v._src)]; - break; - } - } - } - SQInteger ndefparams; - if((ndefparams = func->_ndefaultparams)) { - for(SQInteger i = 0; i < ndefparams; i++) { - SQInteger spos = func->_defaultparams[i]; - closure->_defaultparams[i] = _stack._vals[_stackbase + spos]; - } - } - if (boundtarget != 0xFF) { - SQObjectPtr &val = _stack._vals[_stackbase + boundtarget]; - SQObjectType t = sq_type(val); - if (t == OT_TABLE || t == OT_CLASS || t == OT_INSTANCE || t == OT_ARRAY) { - closure->_env = _refcounted(val)->GetWeakRef(t); - __ObjAddRef(closure->_env); - } - else { - Raise_Error(_SC("cannot bind a %s as environment object"), IdType2Name(t)); - closure->Release(); - return false; - } - } - target = closure; - return true; - -} - - -bool SQVM::CLASS_OP(SQObjectPtr &target,SQInteger baseclass,SQInteger attributes) -{ - SQClass *base = NULL; - SQObjectPtr attrs; - if(baseclass != -1) { - if(sq_type(_stack._vals[_stackbase+baseclass]) != OT_CLASS) { Raise_Error(_SC("trying to inherit from a %s"),GetTypeName(_stack._vals[_stackbase+baseclass])); return false; } - base = _class(_stack._vals[_stackbase + baseclass]); - } - if(attributes != MAX_FUNC_STACKSIZE) { - attrs = _stack._vals[_stackbase+attributes]; - } - target = SQClass::Create(_ss(this),base); - if(sq_type(_class(target)->_metamethods[MT_INHERITED]) != OT_NULL) { - int nparams = 2; - SQObjectPtr ret; - Push(target); Push(attrs); - if(!Call(_class(target)->_metamethods[MT_INHERITED],nparams,_top - nparams, ret, false)) { - Pop(nparams); - return false; - } - Pop(nparams); - } - _class(target)->_attributes = attrs; - return true; -} - -bool SQVM::IsEqual(const SQObjectPtr &o1,const SQObjectPtr &o2,bool &res) -{ - SQObjectType t1 = sq_type(o1), t2 = sq_type(o2); - if(t1 == t2) { - if (t1 == OT_FLOAT) { - res = (_float(o1) == _float(o2)); - } - else { - res = (_rawval(o1) == _rawval(o2)); - } - } - else { - if(sq_isnumeric(o1) && sq_isnumeric(o2)) { - res = (tofloat(o1) == tofloat(o2)); - } - else { - res = false; - } - } - return true; -} - -bool SQVM::IsFalse(SQObjectPtr &o) -{ - if(((sq_type(o) & SQOBJECT_CANBEFALSE) - && ( ((sq_type(o) == OT_FLOAT) && (_float(o) == SQFloat(0.0))) )) -#if !defined(SQUSEDOUBLE) || (defined(SQUSEDOUBLE) && defined(_SQ64)) - || (_integer(o) == 0) ) //OT_NULL|OT_INTEGER|OT_BOOL -#else - || (((sq_type(o) != OT_FLOAT) && (_integer(o) == 0))) ) //OT_NULL|OT_INTEGER|OT_BOOL -#endif - { - return true; - } - return false; -} -extern SQInstructionDesc g_InstrDesc[]; -bool SQVM::Execute(SQObjectPtr &closure, SQInteger nargs, SQInteger stackbase,SQObjectPtr &outres, SQBool raiseerror,ExecutionType et) -{ - if ((_nnativecalls + 1) > MAX_NATIVE_CALLS) { Raise_Error(_SC("Native stack overflow")); return false; } - _nnativecalls++; - AutoDec ad(&_nnativecalls); - SQInteger traps = 0; - CallInfo *prevci = ci; - - switch(et) { - case ET_CALL: { - temp_reg = closure; - if(!StartCall(_closure(temp_reg), _top - nargs, nargs, stackbase, false)) { - //call the handler if there are no calls in the stack, if not relies on the previous node - if(ci == NULL) CallErrorHandler(_lasterror); - return false; - } - if(ci == prevci) { - outres = STK(_top-nargs); - return true; - } - ci->_root = SQTrue; - } - break; - case ET_RESUME_GENERATOR: - if(!_generator(closure)->Resume(this, outres)) { - return false; - } - ci->_root = SQTrue; - traps += ci->_etraps; - break; - case ET_RESUME_VM: - case ET_RESUME_THROW_VM: - traps = _suspended_traps; - ci->_root = _suspended_root; - _suspended = SQFalse; - if(et == ET_RESUME_THROW_VM) { SQ_THROW(); } - break; - } - -exception_restore: - // - { - for(;;) - { - const SQInstruction &_i_ = *ci->_ip++; - //dumpstack(_stackbase); - //scprintf("\n[%d] %s %d %d %d %d\n",ci->_ip-_closure(ci->_closure)->_function->_instructions,g_InstrDesc[_i_.op].name,arg0,arg1,arg2,arg3); - switch(_i_.op) - { - case _OP_LINE: if (_debughook) CallDebugHook(_SC('l'),arg1); continue; - case _OP_LOAD: TARGET = ci->_literals[arg1]; continue; - case _OP_LOADINT: -#ifndef _SQ64 - TARGET = (SQInteger)arg1; continue; -#else - TARGET = (SQInteger)((SQInt32)arg1); continue; -#endif - case _OP_LOADFLOAT: TARGET = *((const SQFloat *)&arg1); continue; - case _OP_DLOAD: TARGET = ci->_literals[arg1]; STK(arg2) = ci->_literals[arg3];continue; - case _OP_TAILCALL:{ - SQObjectPtr &t = STK(arg1); - if (sq_type(t) == OT_CLOSURE - && (!_closure(t)->_function->_bgenerator)){ - SQObjectPtr clo = t; - SQInteger last_top = _top; - if(_openouters) CloseOuters(&(_stack._vals[_stackbase])); - for (SQInteger i = 0; i < arg3; i++) STK(i) = STK(arg2 + i); - _GUARD(StartCall(_closure(clo), ci->_target, arg3, _stackbase, true)); - if (last_top >= _top) { - _top = last_top; - } - continue; - } - } - case _OP_CALL: { - SQObjectPtr clo = STK(arg1); - switch (sq_type(clo)) { - case OT_CLOSURE: - _GUARD(StartCall(_closure(clo), sarg0, arg3, _stackbase+arg2, false)); - continue; - case OT_NATIVECLOSURE: { - bool suspend; - bool tailcall; - _GUARD(CallNative(_nativeclosure(clo), arg3, _stackbase+arg2, clo, (SQInt32)sarg0, suspend, tailcall)); - if(suspend){ - _suspended = SQTrue; - _suspended_target = sarg0; - _suspended_root = ci->_root; - _suspended_traps = traps; - outres = clo; - return true; - } - if(sarg0 != -1 && !tailcall) { - STK(arg0) = clo; - } - } - continue; - case OT_CLASS:{ - SQObjectPtr inst; - _GUARD(CreateClassInstance(_class(clo),inst,clo)); - if(sarg0 != -1) { - STK(arg0) = inst; - } - SQInteger stkbase; - switch(sq_type(clo)) { - case OT_CLOSURE: - stkbase = _stackbase+arg2; - _stack._vals[stkbase] = inst; - _GUARD(StartCall(_closure(clo), -1, arg3, stkbase, false)); - break; - case OT_NATIVECLOSURE: - bool dummy; - stkbase = _stackbase+arg2; - _stack._vals[stkbase] = inst; - _GUARD(CallNative(_nativeclosure(clo), arg3, stkbase, clo, -1, dummy, dummy)); - break; - default: break; //shutup GCC 4.x - } - } - break; - case OT_TABLE: - case OT_USERDATA: - case OT_INSTANCE:{ - SQObjectPtr closure; - if(_delegable(clo)->_delegate && _delegable(clo)->GetMetaMethod(this,MT_CALL,closure)) { - Push(clo); - for (SQInteger i = 0; i < arg3; i++) Push(STK(arg2 + i)); - if(!CallMetaMethod(closure, MT_CALL, arg3+1, clo)) SQ_THROW(); - if(sarg0 != -1) { - STK(arg0) = clo; - } - break; - } - - //Raise_Error(_SC("attempt to call '%s'"), GetTypeName(clo)); - //SQ_THROW(); - } - default: - Raise_Error(_SC("attempt to call '%s'"), GetTypeName(clo)); - SQ_THROW(); - } - } - continue; - case _OP_PREPCALL: - case _OP_PREPCALLK: { - SQObjectPtr &key = _i_.op == _OP_PREPCALLK?(ci->_literals)[arg1]:STK(arg1); - SQObjectPtr &o = STK(arg2); - if (!Get(o, key, temp_reg,0,arg2)) { - SQ_THROW(); - } - STK(arg3) = o; - _Swap(TARGET,temp_reg);//TARGET = temp_reg; - } - continue; - case _OP_GETK: - if (!Get(STK(arg2), ci->_literals[arg1], temp_reg, 0,arg2)) { SQ_THROW();} - _Swap(TARGET,temp_reg);//TARGET = temp_reg; - continue; - case _OP_MOVE: TARGET = STK(arg1); continue; - case _OP_NEWSLOT: - _GUARD(NewSlot(STK(arg1), STK(arg2), STK(arg3),false)); - if(arg0 != 0xFF) TARGET = STK(arg3); - continue; - case _OP_DELETE: _GUARD(DeleteSlot(STK(arg1), STK(arg2), TARGET)); continue; - case _OP_SET: - if (!Set(STK(arg1), STK(arg2), STK(arg3),arg1)) { SQ_THROW(); } - if (arg0 != 0xFF) TARGET = STK(arg3); - continue; - case _OP_GET: - if (!Get(STK(arg1), STK(arg2), temp_reg, 0,arg1)) { SQ_THROW(); } - _Swap(TARGET,temp_reg);//TARGET = temp_reg; - continue; - case _OP_EQ:{ - bool res; - if(!IsEqual(STK(arg2),COND_LITERAL,res)) { SQ_THROW(); } - TARGET = res?true:false; - }continue; - case _OP_NE:{ - bool res; - if(!IsEqual(STK(arg2),COND_LITERAL,res)) { SQ_THROW(); } - TARGET = (!res)?true:false; - } continue; - case _OP_ADD: _ARITH_(+,TARGET,STK(arg2),STK(arg1)); continue; - case _OP_SUB: _ARITH_(-,TARGET,STK(arg2),STK(arg1)); continue; - case _OP_MUL: _ARITH_(*,TARGET,STK(arg2),STK(arg1)); continue; - case _OP_DIV: _ARITH_NOZERO(/,TARGET,STK(arg2),STK(arg1),_SC("division by zero")); continue; - case _OP_MOD: ARITH_OP('%',TARGET,STK(arg2),STK(arg1)); continue; - case _OP_BITW: _GUARD(BW_OP( arg3,TARGET,STK(arg2),STK(arg1))); continue; - case _OP_RETURN: - if((ci)->_generator) { - (ci)->_generator->Kill(); - } - if(Return(arg0, arg1, temp_reg)){ - assert(traps==0); - //outres = temp_reg; - _Swap(outres,temp_reg); - return true; - } - continue; - case _OP_LOADNULLS:{ for(SQInt32 n=0; n < arg1; n++) STK(arg0+n).Null(); }continue; - case _OP_LOADROOT: { - SQWeakRef *w = _closure(ci->_closure)->_root; - if(sq_type(w->_obj) != OT_NULL) { - TARGET = w->_obj; - } else { - TARGET = _roottable; //shoud this be like this? or null - } - } - continue; - case _OP_LOADBOOL: TARGET = arg1?true:false; continue; - case _OP_DMOVE: STK(arg0) = STK(arg1); STK(arg2) = STK(arg3); continue; - case _OP_JMP: ci->_ip += (sarg1); continue; - //case _OP_JNZ: if(!IsFalse(STK(arg0))) ci->_ip+=(sarg1); continue; - case _OP_JCMP: - _GUARD(CMP_OP((CmpOP)arg3,STK(arg2),STK(arg0),temp_reg)); - if(IsFalse(temp_reg)) ci->_ip+=(sarg1); - continue; - case _OP_JZ: if(IsFalse(STK(arg0))) ci->_ip+=(sarg1); continue; - case _OP_GETOUTER: { - SQClosure *cur_cls = _closure(ci->_closure); - SQOuter *otr = _outer(cur_cls->_outervalues[arg1]); - TARGET = *(otr->_valptr); - } - continue; - case _OP_SETOUTER: { - SQClosure *cur_cls = _closure(ci->_closure); - SQOuter *otr = _outer(cur_cls->_outervalues[arg1]); - *(otr->_valptr) = STK(arg2); - if(arg0 != 0xFF) { - TARGET = STK(arg2); - } - } - continue; - case _OP_NEWOBJ: - switch(arg3) { - case NOT_TABLE: TARGET = SQTable::Create(_ss(this), arg1); continue; - case NOT_ARRAY: TARGET = SQArray::Create(_ss(this), 0); _array(TARGET)->Reserve(arg1); continue; - case NOT_CLASS: _GUARD(CLASS_OP(TARGET,arg1,arg2)); continue; - default: assert(0); continue; - } - case _OP_APPENDARRAY: - { - SQObject val; - val._unVal.raw = 0; - switch(arg2) { - case AAT_STACK: - val = STK(arg1); break; - case AAT_LITERAL: - val = ci->_literals[arg1]; break; - case AAT_INT: - val._type = OT_INTEGER; -#ifndef _SQ64 - val._unVal.nInteger = (SQInteger)arg1; -#else - val._unVal.nInteger = (SQInteger)((SQInt32)arg1); -#endif - break; - case AAT_FLOAT: - val._type = OT_FLOAT; - val._unVal.fFloat = *((const SQFloat *)&arg1); - break; - case AAT_BOOL: - val._type = OT_BOOL; - val._unVal.nInteger = arg1; - break; - default: val._type = OT_INTEGER; assert(0); break; - - } - _array(STK(arg0))->Append(val); continue; - } - case _OP_COMPARITH: { - SQInteger selfidx = (((SQUnsignedInteger)arg1&0xFFFF0000)>>16); - _GUARD(DerefInc(arg3, TARGET, STK(selfidx), STK(arg2), STK(arg1&0x0000FFFF), false, selfidx)); - } - continue; - case _OP_INC: {SQObjectPtr o(sarg3); _GUARD(DerefInc('+',TARGET, STK(arg1), STK(arg2), o, false, arg1));} continue; - case _OP_INCL: { - SQObjectPtr &a = STK(arg1); - if(sq_type(a) == OT_INTEGER) { - a._unVal.nInteger = _integer(a) + sarg3; - } - else { - SQObjectPtr o(sarg3); //_GUARD(LOCAL_INC('+',TARGET, STK(arg1), o)); - _ARITH_(+,a,a,o); - } - } continue; - case _OP_PINC: {SQObjectPtr o(sarg3); _GUARD(DerefInc('+',TARGET, STK(arg1), STK(arg2), o, true, arg1));} continue; - case _OP_PINCL: { - SQObjectPtr &a = STK(arg1); - if(sq_type(a) == OT_INTEGER) { - TARGET = a; - a._unVal.nInteger = _integer(a) + sarg3; - } - else { - SQObjectPtr o(sarg3); _GUARD(PLOCAL_INC('+',TARGET, STK(arg1), o)); - } - - } continue; - case _OP_CMP: _GUARD(CMP_OP((CmpOP)arg3,STK(arg2),STK(arg1),TARGET)) continue; - case _OP_EXISTS: TARGET = Get(STK(arg1), STK(arg2), temp_reg, GET_FLAG_DO_NOT_RAISE_ERROR | GET_FLAG_RAW, DONT_FALL_BACK) ? true : false; continue; - case _OP_INSTANCEOF: - if(sq_type(STK(arg1)) != OT_CLASS) - {Raise_Error(_SC("cannot apply instanceof between a %s and a %s"),GetTypeName(STK(arg1)),GetTypeName(STK(arg2))); SQ_THROW();} - TARGET = (sq_type(STK(arg2)) == OT_INSTANCE) ? (_instance(STK(arg2))->InstanceOf(_class(STK(arg1)))?true:false) : false; - continue; - case _OP_AND: - if(IsFalse(STK(arg2))) { - TARGET = STK(arg2); - ci->_ip += (sarg1); - } - continue; - case _OP_OR: - if(!IsFalse(STK(arg2))) { - TARGET = STK(arg2); - ci->_ip += (sarg1); - } - continue; - case _OP_NEG: _GUARD(NEG_OP(TARGET,STK(arg1))); continue; - case _OP_NOT: TARGET = IsFalse(STK(arg1)); continue; - case _OP_BWNOT: - if(sq_type(STK(arg1)) == OT_INTEGER) { - SQInteger t = _integer(STK(arg1)); - TARGET = SQInteger(~t); - continue; - } - Raise_Error(_SC("attempt to perform a bitwise op on a %s"), GetTypeName(STK(arg1))); - SQ_THROW(); - case _OP_CLOSURE: { - SQClosure *c = ci->_closure._unVal.pClosure; - SQFunctionProto *fp = c->_function; - if(!CLOSURE_OP(TARGET,fp->_functions[arg1]._unVal.pFunctionProto,arg2)) { SQ_THROW(); } - continue; - } - case _OP_YIELD:{ - if(ci->_generator) { - if(sarg1 != MAX_FUNC_STACKSIZE) temp_reg = STK(arg1); - if (_openouters) CloseOuters(&_stack._vals[_stackbase]); - _GUARD(ci->_generator->Yield(this,arg2)); - traps -= ci->_etraps; - if(sarg1 != MAX_FUNC_STACKSIZE) _Swap(STK(arg1),temp_reg);//STK(arg1) = temp_reg; - } - else { Raise_Error(_SC("trying to yield a '%s',only genenerator can be yielded"), GetTypeName(ci->_generator)); SQ_THROW();} - if(Return(arg0, arg1, temp_reg)){ - assert(traps == 0); - outres = temp_reg; - return true; - } - - } - continue; - case _OP_RESUME: - if(sq_type(STK(arg1)) != OT_GENERATOR){ Raise_Error(_SC("trying to resume a '%s',only genenerator can be resumed"), GetTypeName(STK(arg1))); SQ_THROW();} - _GUARD(_generator(STK(arg1))->Resume(this, TARGET)); - traps += ci->_etraps; - continue; - case _OP_FOREACH:{ int tojump; - _GUARD(FOREACH_OP(STK(arg0),STK(arg2),STK(arg2+1),STK(arg2+2),arg2,sarg1,tojump)); - ci->_ip += tojump; } - continue; - case _OP_POSTFOREACH: - assert(sq_type(STK(arg0)) == OT_GENERATOR); - if(_generator(STK(arg0))->_state == SQGenerator::eDead) - ci->_ip += (sarg1 - 1); - continue; - case _OP_CLONE: _GUARD(Clone(STK(arg1), TARGET)); continue; - case _OP_TYPEOF: _GUARD(TypeOf(STK(arg1), TARGET)) continue; - case _OP_PUSHTRAP:{ - SQInstruction *_iv = _closure(ci->_closure)->_function->_instructions; - _etraps.push_back(SQExceptionTrap(_top,_stackbase, &_iv[(ci->_ip-_iv)+arg1], arg0)); traps++; - ci->_etraps++; - } - continue; - case _OP_POPTRAP: { - for(SQInteger i = 0; i < arg0; i++) { - _etraps.pop_back(); traps--; - ci->_etraps--; - } - } - continue; - case _OP_THROW: Raise_Error(TARGET); SQ_THROW(); continue; - case _OP_NEWSLOTA: - _GUARD(NewSlotA(STK(arg1),STK(arg2),STK(arg3),(arg0&NEW_SLOT_ATTRIBUTES_FLAG) ? STK(arg2-1) : SQObjectPtr(),(arg0&NEW_SLOT_STATIC_FLAG)?true:false,false)); - continue; - case _OP_GETBASE:{ - SQClosure *clo = _closure(ci->_closure); - if(clo->_base) { - TARGET = clo->_base; - } - else { - TARGET.Null(); - } - continue; - } - case _OP_CLOSE: - if(_openouters) CloseOuters(&(STK(arg1))); - continue; - } - - } - } -exception_trap: - { - SQObjectPtr currerror = _lasterror; -// dumpstack(_stackbase); -// SQInteger n = 0; - SQInteger last_top = _top; - - if(_ss(this)->_notifyallexceptions || (!traps && raiseerror)) CallErrorHandler(currerror); - - while( ci ) { - if(ci->_etraps > 0) { - SQExceptionTrap &et = _etraps.top(); - ci->_ip = et._ip; - _top = et._stacksize; - _stackbase = et._stackbase; - _stack._vals[_stackbase + et._extarget] = currerror; - _etraps.pop_back(); traps--; ci->_etraps--; - while(last_top >= _top) _stack._vals[last_top--].Null(); - goto exception_restore; - } - else if (_debughook) { - //notify debugger of a "return" - //even if it really an exception unwinding the stack - for(SQInteger i = 0; i < ci->_ncalls; i++) { - CallDebugHook(_SC('r')); - } - } - if(ci->_generator) ci->_generator->Kill(); - bool mustbreak = ci && ci->_root; - LeaveFrame(); - if(mustbreak) break; - } - - _lasterror = currerror; - return false; - } - assert(0); - return false; -} - -bool SQVM::CreateClassInstance(SQClass *theclass, SQObjectPtr &inst, SQObjectPtr &constructor) -{ - inst = theclass->CreateInstance(); - if(!theclass->GetConstructor(constructor)) { - constructor.Null(); - } - return true; -} - -void SQVM::CallErrorHandler(SQObjectPtr &error) -{ - if(sq_type(_errorhandler) != OT_NULL) { - SQObjectPtr out; - Push(_roottable); Push(error); - Call(_errorhandler, 2, _top-2, out,SQFalse); - Pop(2); - } -} - - -void SQVM::CallDebugHook(SQInteger type,SQInteger forcedline) -{ - _debughook = false; - SQFunctionProto *func=_closure(ci->_closure)->_function; - if(_debughook_native) { - const SQChar *src = sq_type(func->_sourcename) == OT_STRING?_stringval(func->_sourcename):NULL; - const SQChar *fname = sq_type(func->_name) == OT_STRING?_stringval(func->_name):NULL; - SQInteger line = forcedline?forcedline:func->GetLine(ci->_ip); - _debughook_native(this,type,src,line,fname); - } - else { - SQObjectPtr temp_reg; - SQInteger nparams=5; - Push(_roottable); Push(type); Push(func->_sourcename); Push(forcedline?forcedline:func->GetLine(ci->_ip)); Push(func->_name); - Call(_debughook_closure,nparams,_top-nparams,temp_reg,SQFalse); - Pop(nparams); - } - _debughook = true; -} - -bool SQVM::CallNative(SQNativeClosure *nclosure, SQInteger nargs, SQInteger newbase, SQObjectPtr &retval, SQInt32 target,bool &suspend, bool &tailcall) -{ - SQInteger nparamscheck = nclosure->_nparamscheck; - SQInteger newtop = newbase + nargs + nclosure->_noutervalues; - - if (_nnativecalls + 1 > MAX_NATIVE_CALLS) { - Raise_Error(_SC("Native stack overflow")); - return false; - } - - if(nparamscheck && (((nparamscheck > 0) && (nparamscheck != nargs)) || - ((nparamscheck < 0) && (nargs < (-nparamscheck))))) - { - Raise_Error(_SC("wrong number of parameters")); - return false; - } - - SQInteger tcs; - SQIntVec &tc = nclosure->_typecheck; - if((tcs = tc.size())) { - for(SQInteger i = 0; i < nargs && i < tcs; i++) { - if((tc._vals[i] != -1) && !(sq_type(_stack._vals[newbase+i]) & tc._vals[i])) { - Raise_ParamTypeError(i,tc._vals[i], sq_type(_stack._vals[newbase+i])); - return false; - } - } - } - - if(!EnterFrame(newbase, newtop, false)) return false; - ci->_closure = nclosure; - ci->_target = target; - - SQInteger outers = nclosure->_noutervalues; - for (SQInteger i = 0; i < outers; i++) { - _stack._vals[newbase+nargs+i] = nclosure->_outervalues[i]; - } - if(nclosure->_env) { - _stack._vals[newbase] = nclosure->_env->_obj; - } - - _nnativecalls++; - SQInteger ret = (nclosure->_function)(this); - _nnativecalls--; - - suspend = false; - tailcall = false; - if (ret == SQ_TAILCALL_FLAG) { - tailcall = true; - return true; - } - else if (ret == SQ_SUSPEND_FLAG) { - suspend = true; - } - else if (ret < 0) { - LeaveFrame(); - Raise_Error(_lasterror); - return false; - } - if(ret) { - retval = _stack._vals[_top-1]; - } - else { - retval.Null(); - } - //retval = ret ? _stack._vals[_top-1] : _null_; - LeaveFrame(); - return true; -} - -bool SQVM::TailCall(SQClosure *closure, SQInteger parambase,SQInteger nparams) -{ - SQInteger last_top = _top; - SQObjectPtr clo = closure; - if (ci->_root) - { - Raise_Error("root calls cannot invoke tailcalls"); - return false; - } - for (SQInteger i = 0; i < nparams; i++) STK(i) = STK(parambase + i); - bool ret = StartCall(closure, ci->_target, nparams, _stackbase, true); - if (last_top >= _top) { - _top = last_top; - } - return ret; -} - -#define FALLBACK_OK 0 -#define FALLBACK_NO_MATCH 1 -#define FALLBACK_ERROR 2 - -bool SQVM::Get(const SQObjectPtr &self, const SQObjectPtr &key, SQObjectPtr &dest, SQUnsignedInteger getflags, SQInteger selfidx) -{ - switch(sq_type(self)){ - case OT_TABLE: - if(_table(self)->Get(key,dest))return true; - break; - case OT_ARRAY: - if (sq_isnumeric(key)) { if (_array(self)->Get(tointeger(key), dest)) { return true; } if ((getflags & GET_FLAG_DO_NOT_RAISE_ERROR) == 0) Raise_IdxError(key); return false; } - break; - case OT_INSTANCE: - if(_instance(self)->Get(key,dest)) return true; - break; - case OT_CLASS: - if(_class(self)->Get(key,dest)) return true; - break; - case OT_STRING: - if(sq_isnumeric(key)){ - SQInteger n = tointeger(key); - SQInteger len = _string(self)->_len; - if (n < 0) { n += len; } - if (n >= 0 && n < len) { - dest = SQInteger(_stringval(self)[n]); - return true; - } - if ((getflags & GET_FLAG_DO_NOT_RAISE_ERROR) == 0) Raise_IdxError(key); - return false; - } - break; - default:break; //shut up compiler - } - if ((getflags & GET_FLAG_RAW) == 0) { - switch(FallBackGet(self,key,dest)) { - case FALLBACK_OK: return true; //okie - case FALLBACK_NO_MATCH: break; //keep falling back - case FALLBACK_ERROR: return false; // the metamethod failed - } - if(InvokeDefaultDelegate(self,key,dest)) { - return true; - } - } -//#ifdef ROOT_FALLBACK - if(selfidx == 0) { - SQWeakRef *w = _closure(ci->_closure)->_root; - if(sq_type(w->_obj) != OT_NULL) - { - if(Get(*((const SQObjectPtr *)&w->_obj),key,dest,0,DONT_FALL_BACK)) return true; - } - - } -//#endif - if ((getflags & GET_FLAG_DO_NOT_RAISE_ERROR) == 0) Raise_IdxError(key); - return false; -} - -bool SQVM::InvokeDefaultDelegate(const SQObjectPtr &self,const SQObjectPtr &key,SQObjectPtr &dest) -{ - SQTable *ddel = NULL; - switch(sq_type(self)) { - case OT_CLASS: ddel = _class_ddel; break; - case OT_TABLE: ddel = _table_ddel; break; - case OT_ARRAY: ddel = _array_ddel; break; - case OT_STRING: ddel = _string_ddel; break; - case OT_INSTANCE: ddel = _instance_ddel; break; - case OT_INTEGER:case OT_FLOAT:case OT_BOOL: ddel = _number_ddel; break; - case OT_GENERATOR: ddel = _generator_ddel; break; - case OT_CLOSURE: case OT_NATIVECLOSURE: ddel = _closure_ddel; break; - case OT_THREAD: ddel = _thread_ddel; break; - case OT_WEAKREF: ddel = _weakref_ddel; break; - default: return false; - } - return ddel->Get(key,dest); -} - - -SQInteger SQVM::FallBackGet(const SQObjectPtr &self,const SQObjectPtr &key,SQObjectPtr &dest) -{ - switch(sq_type(self)){ - case OT_TABLE: - case OT_USERDATA: - //delegation - if(_delegable(self)->_delegate) { - if(Get(SQObjectPtr(_delegable(self)->_delegate),key,dest, GET_FLAG_DO_NOT_RAISE_ERROR,DONT_FALL_BACK)) return FALLBACK_OK; - } - else { - return FALLBACK_NO_MATCH; - } - //go through - case OT_INSTANCE: { - SQObjectPtr closure; - if(_delegable(self)->GetMetaMethod(this, MT_GET, closure)) { - Push(self);Push(key); - _nmetamethodscall++; - AutoDec ad(&_nmetamethodscall); - if(Call(closure, 2, _top - 2, dest, SQFalse)) { - Pop(2); - return FALLBACK_OK; - } - else { - Pop(2); - if(sq_type(_lasterror) != OT_NULL) { //NULL means "clean failure" (not found) - return FALLBACK_ERROR; - } - } - } - } - break; - default: break;//shutup GCC 4.x - } - // no metamethod or no fallback type - return FALLBACK_NO_MATCH; -} - -bool SQVM::Set(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr &val,SQInteger selfidx) -{ - switch(sq_type(self)){ - case OT_TABLE: - if(_table(self)->Set(key,val)) return true; - break; - case OT_INSTANCE: - if(_instance(self)->Set(key,val)) return true; - break; - case OT_ARRAY: - if(!sq_isnumeric(key)) { Raise_Error(_SC("indexing %s with %s"),GetTypeName(self),GetTypeName(key)); return false; } - if(!_array(self)->Set(tointeger(key),val)) { - Raise_IdxError(key); - return false; - } - return true; - case OT_USERDATA: break; // must fall back - default: - Raise_Error(_SC("trying to set '%s'"),GetTypeName(self)); - return false; - } - - switch(FallBackSet(self,key,val)) { - case FALLBACK_OK: return true; //okie - case FALLBACK_NO_MATCH: break; //keep falling back - case FALLBACK_ERROR: return false; // the metamethod failed - } - if(selfidx == 0) { - if(_table(_roottable)->Set(key,val)) - return true; - } - Raise_IdxError(key); - return false; -} - -SQInteger SQVM::FallBackSet(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr &val) -{ - switch(sq_type(self)) { - case OT_TABLE: - if(_table(self)->_delegate) { - if(Set(_table(self)->_delegate,key,val,DONT_FALL_BACK)) return FALLBACK_OK; - } - //keps on going - case OT_INSTANCE: - case OT_USERDATA:{ - SQObjectPtr closure; - SQObjectPtr t; - if(_delegable(self)->GetMetaMethod(this, MT_SET, closure)) { - Push(self);Push(key);Push(val); - _nmetamethodscall++; - AutoDec ad(&_nmetamethodscall); - if(Call(closure, 3, _top - 3, t, SQFalse)) { - Pop(3); - return FALLBACK_OK; - } - else { - Pop(3); - if(sq_type(_lasterror) != OT_NULL) { //NULL means "clean failure" (not found) - return FALLBACK_ERROR; - } - } - } - } - break; - default: break;//shutup GCC 4.x - } - // no metamethod or no fallback type - return FALLBACK_NO_MATCH; -} - -bool SQVM::Clone(const SQObjectPtr &self,SQObjectPtr &target) -{ - SQObjectPtr temp_reg; - SQObjectPtr newobj; - switch(sq_type(self)){ - case OT_TABLE: - newobj = _table(self)->Clone(); - goto cloned_mt; - case OT_INSTANCE: { - newobj = _instance(self)->Clone(_ss(this)); -cloned_mt: - SQObjectPtr closure; - if(_delegable(newobj)->_delegate && _delegable(newobj)->GetMetaMethod(this,MT_CLONED,closure)) { - Push(newobj); - Push(self); - if(!CallMetaMethod(closure,MT_CLONED,2,temp_reg)) - return false; - } - } - target = newobj; - return true; - case OT_ARRAY: - target = _array(self)->Clone(); - return true; - default: - Raise_Error(_SC("cloning a %s"), GetTypeName(self)); - return false; - } -} - -bool SQVM::NewSlotA(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr &val,const SQObjectPtr &attrs,bool bstatic,bool raw) -{ - if(sq_type(self) != OT_CLASS) { - Raise_Error(_SC("object must be a class")); - return false; - } - SQClass *c = _class(self); - if(!raw) { - SQObjectPtr &mm = c->_metamethods[MT_NEWMEMBER]; - if(sq_type(mm) != OT_NULL ) { - Push(self); Push(key); Push(val); - Push(attrs); - Push(bstatic); - return CallMetaMethod(mm,MT_NEWMEMBER,5,temp_reg); - } - } - if(!NewSlot(self, key, val,bstatic)) - return false; - if(sq_type(attrs) != OT_NULL) { - c->SetAttributes(key,attrs); - } - return true; -} - -bool SQVM::NewSlot(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr &val,bool bstatic) -{ - if(sq_type(key) == OT_NULL) { Raise_Error(_SC("null cannot be used as index")); return false; } - switch(sq_type(self)) { - case OT_TABLE: { - bool rawcall = true; - if(_table(self)->_delegate) { - SQObjectPtr res; - if(!_table(self)->Get(key,res)) { - SQObjectPtr closure; - if(_delegable(self)->_delegate && _delegable(self)->GetMetaMethod(this,MT_NEWSLOT,closure)) { - Push(self);Push(key);Push(val); - if(!CallMetaMethod(closure,MT_NEWSLOT,3,res)) { - return false; - } - rawcall = false; - } - else { - rawcall = true; - } - } - } - if(rawcall) _table(self)->NewSlot(key,val); //cannot fail - - break;} - case OT_INSTANCE: { - SQObjectPtr res; - SQObjectPtr closure; - if(_delegable(self)->_delegate && _delegable(self)->GetMetaMethod(this,MT_NEWSLOT,closure)) { - Push(self);Push(key);Push(val); - if(!CallMetaMethod(closure,MT_NEWSLOT,3,res)) { - return false; - } - break; - } - Raise_Error(_SC("class instances do not support the new slot operator")); - return false; - break;} - case OT_CLASS: - if(!_class(self)->NewSlot(_ss(this),key,val,bstatic)) { - if(_class(self)->_locked) { - Raise_Error(_SC("trying to modify a class that has already been instantiated")); - return false; - } - else { - SQObjectPtr oval = PrintObjVal(key); - Raise_Error(_SC("the property '%s' already exists"),_stringval(oval)); - return false; - } - } - break; - default: - Raise_Error(_SC("indexing %s with %s"),GetTypeName(self),GetTypeName(key)); - return false; - break; - } - return true; -} - - - -bool SQVM::DeleteSlot(const SQObjectPtr &self,const SQObjectPtr &key,SQObjectPtr &res) -{ - switch(sq_type(self)) { - case OT_TABLE: - case OT_INSTANCE: - case OT_USERDATA: { - SQObjectPtr t; - //bool handled = false; - SQObjectPtr closure; - if(_delegable(self)->_delegate && _delegable(self)->GetMetaMethod(this,MT_DELSLOT,closure)) { - Push(self);Push(key); - return CallMetaMethod(closure,MT_DELSLOT,2,res); - } - else { - if(sq_type(self) == OT_TABLE) { - if(_table(self)->Get(key,t)) { - _table(self)->Remove(key); - } - else { - Raise_IdxError((const SQObject &)key); - return false; - } - } - else { - Raise_Error(_SC("cannot delete a slot from %s"),GetTypeName(self)); - return false; - } - } - res = t; - } - break; - default: - Raise_Error(_SC("attempt to delete a slot from a %s"),GetTypeName(self)); - return false; - } - return true; -} - -bool SQVM::Call(SQObjectPtr &closure,SQInteger nparams,SQInteger stackbase,SQObjectPtr &outres,SQBool raiseerror) -{ -#ifdef _DEBUG -SQInteger prevstackbase = _stackbase; -#endif - switch(sq_type(closure)) { - case OT_CLOSURE: - return Execute(closure, nparams, stackbase, outres, raiseerror); - break; - case OT_NATIVECLOSURE:{ - bool dummy; - return CallNative(_nativeclosure(closure), nparams, stackbase, outres, -1, dummy, dummy); - - } - break; - case OT_CLASS: { - SQObjectPtr constr; - SQObjectPtr temp; - CreateClassInstance(_class(closure),outres,constr); - SQObjectType ctype = sq_type(constr); - if (ctype == OT_NATIVECLOSURE || ctype == OT_CLOSURE) { - _stack[stackbase] = outres; - return Call(constr,nparams,stackbase,temp,raiseerror); - } - return true; - } - break; - default: - Raise_Error(_SC("attempt to call '%s'"), GetTypeName(closure)); - return false; - } -#ifdef _DEBUG - if(!_suspended) { - assert(_stackbase == prevstackbase); - } -#endif - return true; -} - -bool SQVM::CallMetaMethod(SQObjectPtr &closure,SQMetaMethod SQ_UNUSED_ARG(mm),SQInteger nparams,SQObjectPtr &outres) -{ - //SQObjectPtr closure; - - _nmetamethodscall++; - if(Call(closure, nparams, _top - nparams, outres, SQFalse)) { - _nmetamethodscall--; - Pop(nparams); - return true; - } - _nmetamethodscall--; - //} - Pop(nparams); - return false; -} - -void SQVM::FindOuter(SQObjectPtr &target, SQObjectPtr *stackindex) -{ - SQOuter **pp = &_openouters; - SQOuter *p; - SQOuter *otr; - - while ((p = *pp) != NULL && p->_valptr >= stackindex) { - if (p->_valptr == stackindex) { - target = SQObjectPtr(p); - return; - } - pp = &p->_next; - } - otr = SQOuter::Create(_ss(this), stackindex); - otr->_next = *pp; - otr->_idx = (stackindex - _stack._vals); - __ObjAddRef(otr); - *pp = otr; - target = SQObjectPtr(otr); -} - -bool SQVM::EnterFrame(SQInteger newbase, SQInteger newtop, bool tailcall) -{ - if( !tailcall ) { - if( _callsstacksize == _alloccallsstacksize ) { - GrowCallStack(); - } - ci = &_callsstack[_callsstacksize++]; - ci->_prevstkbase = (SQInt32)(newbase - _stackbase); - ci->_prevtop = (SQInt32)(_top - _stackbase); - ci->_etraps = 0; - ci->_ncalls = 1; - ci->_generator = NULL; - ci->_root = SQFalse; - } - else { - ci->_ncalls++; - } - - _stackbase = newbase; - _top = newtop; - if(newtop + MIN_STACK_OVERHEAD > (SQInteger)_stack.size()) { - if(_nmetamethodscall) { - Raise_Error(_SC("stack overflow, cannot resize stack while in a metamethod")); - return false; - } - _stack.resize(newtop + (MIN_STACK_OVERHEAD << 2)); - RelocateOuters(); - } - return true; -} - -void SQVM::LeaveFrame() { - SQInteger last_top = _top; - SQInteger last_stackbase = _stackbase; - SQInteger css = --_callsstacksize; - - /* First clean out the call stack frame */ - ci->_closure.Null(); - _stackbase -= ci->_prevstkbase; - _top = _stackbase + ci->_prevtop; - ci = (css) ? &_callsstack[css-1] : NULL; - - if(_openouters) CloseOuters(&(_stack._vals[last_stackbase])); - while (last_top >= _top) { - _stack._vals[last_top--].Null(); - } -} - -void SQVM::RelocateOuters() -{ - SQOuter *p = _openouters; - while (p) { - p->_valptr = _stack._vals + p->_idx; - p = p->_next; - } -} - -void SQVM::CloseOuters(SQObjectPtr *stackindex) { - SQOuter *p; - while ((p = _openouters) != NULL && p->_valptr >= stackindex) { - p->_value = *(p->_valptr); - p->_valptr = &p->_value; - _openouters = p->_next; - __ObjRelease(p); - } -} - -void SQVM::Remove(SQInteger n) { - n = (n >= 0)?n + _stackbase - 1:_top + n; - for(SQInteger i = n; i < _top; i++){ - _stack[i] = _stack[i+1]; - } - _stack[_top].Null(); - _top--; -} - -void SQVM::Pop() { - _stack[--_top].Null(); -} - -void SQVM::Pop(SQInteger n) { - for(SQInteger i = 0; i < n; i++){ - _stack[--_top].Null(); - } -} - -void SQVM::PushNull() { _stack[_top++].Null(); } -void SQVM::Push(const SQObjectPtr &o) { _stack[_top++] = o; } -SQObjectPtr &SQVM::Top() { return _stack[_top-1]; } -SQObjectPtr &SQVM::PopGet() { return _stack[--_top]; } -SQObjectPtr &SQVM::GetUp(SQInteger n) { return _stack[_top+n]; } -SQObjectPtr &SQVM::GetAt(SQInteger n) { return _stack[n]; } - -#ifdef _DEBUG_DUMP -void SQVM::dumpstack(SQInteger stackbase,bool dumpall) -{ - SQInteger size=dumpall?_stack.size():_top; - SQInteger n=0; - scprintf(_SC("\n>>>>stack dump<<<<\n")); - CallInfo &ci=_callsstack[_callsstacksize-1]; - scprintf(_SC("IP: %p\n"),ci._ip); - scprintf(_SC("prev stack base: %d\n"),ci._prevstkbase); - scprintf(_SC("prev top: %d\n"),ci._prevtop); - for(SQInteger i=0;i"));else scprintf(_SC(" ")); - scprintf(_SC("[" _PRINT_INT_FMT "]:"),n); - switch(sq_type(obj)){ - case OT_FLOAT: scprintf(_SC("FLOAT %.3f"),_float(obj));break; - case OT_INTEGER: scprintf(_SC("INTEGER " _PRINT_INT_FMT),_integer(obj));break; - case OT_BOOL: scprintf(_SC("BOOL %s"),_integer(obj)?"true":"false");break; - case OT_STRING: scprintf(_SC("STRING %s"),_stringval(obj));break; - case OT_NULL: scprintf(_SC("NULL")); break; - case OT_TABLE: scprintf(_SC("TABLE %p[%p]"),_table(obj),_table(obj)->_delegate);break; - case OT_ARRAY: scprintf(_SC("ARRAY %p"),_array(obj));break; - case OT_CLOSURE: scprintf(_SC("CLOSURE [%p]"),_closure(obj));break; - case OT_NATIVECLOSURE: scprintf(_SC("NATIVECLOSURE"));break; - case OT_USERDATA: scprintf(_SC("USERDATA %p[%p]"),_userdataval(obj),_userdata(obj)->_delegate);break; - case OT_GENERATOR: scprintf(_SC("GENERATOR %p"),_generator(obj));break; - case OT_THREAD: scprintf(_SC("THREAD [%p]"),_thread(obj));break; - case OT_USERPOINTER: scprintf(_SC("USERPOINTER %p"),_userpointer(obj));break; - case OT_CLASS: scprintf(_SC("CLASS %p"),_class(obj));break; - case OT_INSTANCE: scprintf(_SC("INSTANCE %p"),_instance(obj));break; - case OT_WEAKREF: scprintf(_SC("WEAKREF %p"),_weakref(obj));break; - default: - assert(0); - break; - }; - scprintf(_SC("\n")); - ++n; - } -} - - - -#endif diff --git a/m_packages/squirrel/squirrel/sqvm.h b/m_packages/squirrel/squirrel/sqvm.h deleted file mode 100644 index 50927507..00000000 --- a/m_packages/squirrel/squirrel/sqvm.h +++ /dev/null @@ -1,213 +0,0 @@ -/* see copyright notice in squirrel.h */ -#ifndef _SQVM_H_ -#define _SQVM_H_ - -#include "sqopcodes.h" -#include "sqobject.h" -#define MAX_NATIVE_CALLS 100 -#define MIN_STACK_OVERHEAD 15 - -#define SQ_SUSPEND_FLAG -666 -#define SQ_TAILCALL_FLAG -777 -#define DONT_FALL_BACK 666 -//#define EXISTS_FALL_BACK -1 - -#define GET_FLAG_RAW 0x00000001 -#define GET_FLAG_DO_NOT_RAISE_ERROR 0x00000002 -//base lib -void sq_base_register(HSQUIRRELVM v); - -struct SQExceptionTrap{ - SQExceptionTrap() {} - SQExceptionTrap(SQInteger ss, SQInteger stackbase,SQInstruction *ip, SQInteger ex_target){ _stacksize = ss; _stackbase = stackbase; _ip = ip; _extarget = ex_target;} - SQExceptionTrap(const SQExceptionTrap &et) { (*this) = et; } - SQInteger _stackbase; - SQInteger _stacksize; - SQInstruction *_ip; - SQInteger _extarget; -}; - -#define _INLINE - -typedef sqvector ExceptionsTraps; - -struct SQVM : public CHAINABLE_OBJ -{ - struct CallInfo{ - //CallInfo() { _generator = NULL;} - SQInstruction *_ip; - SQObjectPtr *_literals; - SQObjectPtr _closure; - SQGenerator *_generator; - SQInt32 _etraps; - SQInt32 _prevstkbase; - SQInt32 _prevtop; - SQInt32 _target; - SQInt32 _ncalls; - SQBool _root; - }; - -typedef sqvector CallInfoVec; -public: - void DebugHookProxy(SQInteger type, const SQChar * sourcename, SQInteger line, const SQChar * funcname); - static void _DebugHookProxy(HSQUIRRELVM v, SQInteger type, const SQChar * sourcename, SQInteger line, const SQChar * funcname); - enum ExecutionType { ET_CALL, ET_RESUME_GENERATOR, ET_RESUME_VM,ET_RESUME_THROW_VM }; - SQVM(SQSharedState *ss); - ~SQVM(); - bool Init(SQVM *friendvm, SQInteger stacksize); - bool Execute(SQObjectPtr &func, SQInteger nargs, SQInteger stackbase, SQObjectPtr &outres, SQBool raiseerror, ExecutionType et = ET_CALL); - //starts a native call return when the NATIVE closure returns - bool CallNative(SQNativeClosure *nclosure, SQInteger nargs, SQInteger newbase, SQObjectPtr &retval, SQInt32 target, bool &suspend,bool &tailcall); - bool TailCall(SQClosure *closure, SQInteger firstparam, SQInteger nparams); - //starts a SQUIRREL call in the same "Execution loop" - bool StartCall(SQClosure *closure, SQInteger target, SQInteger nargs, SQInteger stackbase, bool tailcall); - bool CreateClassInstance(SQClass *theclass, SQObjectPtr &inst, SQObjectPtr &constructor); - //call a generic closure pure SQUIRREL or NATIVE - bool Call(SQObjectPtr &closure, SQInteger nparams, SQInteger stackbase, SQObjectPtr &outres,SQBool raiseerror); - SQRESULT Suspend(); - - void CallDebugHook(SQInteger type,SQInteger forcedline=0); - void CallErrorHandler(SQObjectPtr &e); - bool Get(const SQObjectPtr &self, const SQObjectPtr &key, SQObjectPtr &dest, SQUnsignedInteger getflags, SQInteger selfidx); - SQInteger FallBackGet(const SQObjectPtr &self,const SQObjectPtr &key,SQObjectPtr &dest); - bool InvokeDefaultDelegate(const SQObjectPtr &self,const SQObjectPtr &key,SQObjectPtr &dest); - bool Set(const SQObjectPtr &self, const SQObjectPtr &key, const SQObjectPtr &val, SQInteger selfidx); - SQInteger FallBackSet(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr &val); - bool NewSlot(const SQObjectPtr &self, const SQObjectPtr &key, const SQObjectPtr &val,bool bstatic); - bool NewSlotA(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr &val,const SQObjectPtr &attrs,bool bstatic,bool raw); - bool DeleteSlot(const SQObjectPtr &self, const SQObjectPtr &key, SQObjectPtr &res); - bool Clone(const SQObjectPtr &self, SQObjectPtr &target); - bool ObjCmp(const SQObjectPtr &o1, const SQObjectPtr &o2,SQInteger &res); - bool StringCat(const SQObjectPtr &str, const SQObjectPtr &obj, SQObjectPtr &dest); - static bool IsEqual(const SQObjectPtr &o1,const SQObjectPtr &o2,bool &res); - bool ToString(const SQObjectPtr &o,SQObjectPtr &res); - SQString *PrintObjVal(const SQObjectPtr &o); - - - void Raise_Error(const SQChar *s, ...); - void Raise_Error(const SQObjectPtr &desc); - void Raise_IdxError(const SQObjectPtr &o); - void Raise_CompareError(const SQObject &o1, const SQObject &o2); - void Raise_ParamTypeError(SQInteger nparam,SQInteger typemask,SQInteger type); - - void FindOuter(SQObjectPtr &target, SQObjectPtr *stackindex); - void RelocateOuters(); - void CloseOuters(SQObjectPtr *stackindex); - - bool TypeOf(const SQObjectPtr &obj1, SQObjectPtr &dest); - bool CallMetaMethod(SQObjectPtr &closure, SQMetaMethod mm, SQInteger nparams, SQObjectPtr &outres); - bool ArithMetaMethod(SQInteger op, const SQObjectPtr &o1, const SQObjectPtr &o2, SQObjectPtr &dest); - bool Return(SQInteger _arg0, SQInteger _arg1, SQObjectPtr &retval); - //new stuff - _INLINE bool ARITH_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,const SQObjectPtr &o2); - _INLINE bool BW_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,const SQObjectPtr &o2); - _INLINE bool NEG_OP(SQObjectPtr &trg,const SQObjectPtr &o1); - _INLINE bool CMP_OP(CmpOP op, const SQObjectPtr &o1,const SQObjectPtr &o2,SQObjectPtr &res); - bool CLOSURE_OP(SQObjectPtr &target, SQFunctionProto *func, SQInteger boundtarget); - bool CLASS_OP(SQObjectPtr &target,SQInteger base,SQInteger attrs); - //return true if the loop is finished - bool FOREACH_OP(SQObjectPtr &o1,SQObjectPtr &o2,SQObjectPtr &o3,SQObjectPtr &o4,SQInteger arg_2,int exitpos,int &jump); - //_INLINE bool LOCAL_INC(SQInteger op,SQObjectPtr &target, SQObjectPtr &a, SQObjectPtr &incr); - _INLINE bool PLOCAL_INC(SQInteger op,SQObjectPtr &target, SQObjectPtr &a, SQObjectPtr &incr); - _INLINE bool DerefInc(SQInteger op,SQObjectPtr &target, SQObjectPtr &self, SQObjectPtr &key, SQObjectPtr &incr, bool postfix,SQInteger arg0); -#ifdef _DEBUG_DUMP - void dumpstack(SQInteger stackbase=-1, bool dumpall = false); -#endif - -#ifndef NO_GARBAGE_COLLECTOR - void Mark(SQCollectable **chain); - SQObjectType GetType() {return OT_THREAD;} -#endif - void Finalize(); - void GrowCallStack() { - SQInteger newsize = _alloccallsstacksize*2; - _callstackdata.resize(newsize); - _callsstack = &_callstackdata[0]; - _alloccallsstacksize = newsize; - } - bool EnterFrame(SQInteger newbase, SQInteger newtop, bool tailcall); - void LeaveFrame(); - void Release(){ sq_delete(this,SQVM); } -//////////////////////////////////////////////////////////////////////////// - //stack functions for the api - void Remove(SQInteger n); - - static bool IsFalse(SQObjectPtr &o); - - void Pop(); - void Pop(SQInteger n); - void Push(const SQObjectPtr &o); - void PushNull(); - SQObjectPtr &Top(); - SQObjectPtr &PopGet(); - SQObjectPtr &GetUp(SQInteger n); - SQObjectPtr &GetAt(SQInteger n); - - SQObjectPtrVec _stack; - - SQInteger _top; - SQInteger _stackbase; - SQOuter *_openouters; - SQObjectPtr _roottable; - SQObjectPtr _lasterror; - SQObjectPtr _errorhandler; - - bool _debughook; - SQDEBUGHOOK _debughook_native; - SQObjectPtr _debughook_closure; - - SQObjectPtr temp_reg; - - - CallInfo* _callsstack; - SQInteger _callsstacksize; - SQInteger _alloccallsstacksize; - sqvector _callstackdata; - - ExceptionsTraps _etraps; - CallInfo *ci; - SQUserPointer _foreignptr; - //VMs sharing the same state - SQSharedState *_sharedstate; - SQInteger _nnativecalls; - SQInteger _nmetamethodscall; - SQRELEASEHOOK _releasehook; - //suspend infos - SQBool _suspended; - SQBool _suspended_root; - SQInteger _suspended_target; - SQInteger _suspended_traps; -}; - -struct AutoDec{ - AutoDec(SQInteger *n) { _n = n; } - ~AutoDec() { (*_n)--; } - SQInteger *_n; -}; - -inline SQObjectPtr &stack_get(HSQUIRRELVM v,SQInteger idx){return ((idx>=0)?(v->GetAt(idx+v->_stackbase-1)):(v->GetUp(idx)));} - -#define _ss(_vm_) (_vm_)->_sharedstate - -#ifndef NO_GARBAGE_COLLECTOR -#define _opt_ss(_vm_) (_vm_)->_sharedstate -#else -#define _opt_ss(_vm_) NULL -#endif - -#define PUSH_CALLINFO(v,nci){ \ - SQInteger css = v->_callsstacksize; \ - if(css == v->_alloccallsstacksize) { \ - v->GrowCallStack(); \ - } \ - v->ci = &v->_callsstack[css]; \ - *(v->ci) = nci; \ - v->_callsstacksize++; \ -} - -#define POP_CALLINFO(v){ \ - SQInteger css = --v->_callsstacksize; \ - v->ci->_closure.Null(); \ - v->ci = css?&v->_callsstack[css-1]:NULL; \ -} -#endif //_SQVM_H_ diff --git a/packages.config b/packages.config deleted file mode 100644 index 56146d73..00000000 --- a/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/packages/zlib-msvc-x64.1.2.11.8900/.signature.p7s b/packages/zlib-msvc-x64.1.2.11.8900/.signature.p7s deleted file mode 100644 index 4943e933..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/.signature.p7s and /dev/null differ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/FAQ b/packages/zlib-msvc-x64.1.2.11.8900/FAQ deleted file mode 100644 index 99b7cf92..00000000 --- a/packages/zlib-msvc-x64.1.2.11.8900/FAQ +++ /dev/null @@ -1,368 +0,0 @@ - - Frequently Asked Questions about zlib - - -If your question is not there, please check the zlib home page -http://zlib.net/ which may have more recent information. -The lastest zlib FAQ is at http://zlib.net/zlib_faq.html - - - 1. Is zlib Y2K-compliant? - - Yes. zlib doesn't handle dates. - - 2. Where can I get a Windows DLL version? - - The zlib sources can be compiled without change to produce a DLL. See the - file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the - precompiled DLL are found in the zlib web site at http://zlib.net/ . - - 3. Where can I get a Visual Basic interface to zlib? - - See - * http://marknelson.us/1997/01/01/zlib-engine/ - * win32/DLL_FAQ.txt in the zlib distribution - - 4. compress() returns Z_BUF_ERROR. - - Make sure that before the call of compress(), the length of the compressed - buffer is equal to the available size of the compressed buffer and not - zero. For Visual Basic, check that this parameter is passed by reference - ("as any"), not by value ("as long"). - - 5. deflate() or inflate() returns Z_BUF_ERROR. - - Before making the call, make sure that avail_in and avail_out are not zero. - When setting the parameter flush equal to Z_FINISH, also make sure that - avail_out is big enough to allow processing all pending input. Note that a - Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be - made with more input or output space. A Z_BUF_ERROR may in fact be - unavoidable depending on how the functions are used, since it is not - possible to tell whether or not there is more output pending when - strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a - heavily annotated example. - - 6. Where's the zlib documentation (man pages, etc.)? - - It's in zlib.h . Examples of zlib usage are in the files test/example.c - and test/minigzip.c, with more in examples/ . - - 7. Why don't you use GNU autoconf or libtool or ...? - - Because we would like to keep zlib as a very small and simple package. - zlib is rather portable and doesn't need much configuration. - - 8. I found a bug in zlib. - - Most of the time, such problems are due to an incorrect usage of zlib. - Please try to reproduce the problem with a small program and send the - corresponding source to us at zlib@gzip.org . Do not send multi-megabyte - data files without prior agreement. - - 9. Why do I get "undefined reference to gzputc"? - - If "make test" produces something like - - example.o(.text+0x154): undefined reference to `gzputc' - - check that you don't have old files libz.* in /usr/lib, /usr/local/lib or - /usr/X11R6/lib. Remove any old versions, then do "make install". - -10. I need a Delphi interface to zlib. - - See the contrib/delphi directory in the zlib distribution. - -11. Can zlib handle .zip archives? - - Not by itself, no. See the directory contrib/minizip in the zlib - distribution. - -12. Can zlib handle .Z files? - - No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt - the code of uncompress on your own. - -13. How can I make a Unix shared library? - - By default a shared (and a static) library is built for Unix. So: - - make distclean - ./configure - make - -14. How do I install a shared zlib library on Unix? - - After the above, then: - - make install - - However, many flavors of Unix come with a shared zlib already installed. - Before going to the trouble of compiling a shared version of zlib and - trying to install it, you may want to check if it's already there! If you - can #include , it's there. The -lz option will probably link to - it. You can check the version at the top of zlib.h or with the - ZLIB_VERSION symbol defined in zlib.h . - -15. I have a question about OttoPDF. - - We are not the authors of OttoPDF. The real author is on the OttoPDF web - site: Joel Hainley, jhainley@myndkryme.com. - -16. Can zlib decode Flate data in an Adobe PDF file? - - Yes. See http://www.pdflib.com/ . To modify PDF forms, see - http://sourceforge.net/projects/acroformtool/ . - -17. Why am I getting this "register_frame_info not found" error on Solaris? - - After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib - generates an error such as: - - ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: - symbol __register_frame_info: referenced symbol not found - - The symbol __register_frame_info is not part of zlib, it is generated by - the C compiler (cc or gcc). You must recompile applications using zlib - which have this problem. This problem is specific to Solaris. See - http://www.sunfreeware.com for Solaris versions of zlib and applications - using zlib. - -18. Why does gzip give an error on a file I make with compress/deflate? - - The compress and deflate functions produce data in the zlib format, which - is different and incompatible with the gzip format. The gz* functions in - zlib on the other hand use the gzip format. Both the zlib and gzip formats - use the same compressed data format internally, but have different headers - and trailers around the compressed data. - -19. Ok, so why are there two different formats? - - The gzip format was designed to retain the directory information about a - single file, such as the name and last modification date. The zlib format - on the other hand was designed for in-memory and communication channel - applications, and has a much more compact header and trailer and uses a - faster integrity check than gzip. - -20. Well that's nice, but how do I make a gzip file in memory? - - You can request that deflate write the gzip format instead of the zlib - format using deflateInit2(). You can also request that inflate decode the - gzip format using inflateInit2(). Read zlib.h for more details. - -21. Is zlib thread-safe? - - Yes. However any library routines that zlib uses and any application- - provided memory allocation routines must also be thread-safe. zlib's gz* - functions use stdio library routines, and most of zlib's functions use the - library memory allocation routines by default. zlib's *Init* functions - allow for the application to provide custom memory allocation routines. - - Of course, you should only operate on any given zlib or gzip stream from a - single thread at a time. - -22. Can I use zlib in my commercial application? - - Yes. Please read the license in zlib.h. - -23. Is zlib under the GNU license? - - No. Please read the license in zlib.h. - -24. The license says that altered source versions must be "plainly marked". So - what exactly do I need to do to meet that requirement? - - You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In - particular, the final version number needs to be changed to "f", and an - identification string should be appended to ZLIB_VERSION. Version numbers - x.x.x.f are reserved for modifications to zlib by others than the zlib - maintainers. For example, if the version of the base zlib you are altering - is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and - ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also - update the version strings in deflate.c and inftrees.c. - - For altered source distributions, you should also note the origin and - nature of the changes in zlib.h, as well as in ChangeLog and README, along - with the dates of the alterations. The origin should include at least your - name (or your company's name), and an email address to contact for help or - issues with the library. - - Note that distributing a compiled zlib library along with zlib.h and - zconf.h is also a source distribution, and so you should change - ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes - in zlib.h as you would for a full source distribution. - -25. Will zlib work on a big-endian or little-endian architecture, and can I - exchange compressed data between them? - - Yes and yes. - -26. Will zlib work on a 64-bit machine? - - Yes. It has been tested on 64-bit machines, and has no dependence on any - data types being limited to 32-bits in length. If you have any - difficulties, please provide a complete problem report to zlib@gzip.org - -27. Will zlib decompress data from the PKWare Data Compression Library? - - No. The PKWare DCL uses a completely different compressed data format than - does PKZIP and zlib. However, you can look in zlib's contrib/blast - directory for a possible solution to your problem. - -28. Can I access data randomly in a compressed stream? - - No, not without some preparation. If when compressing you periodically use - Z_FULL_FLUSH, carefully write all the pending data at those points, and - keep an index of those locations, then you can start decompression at those - points. You have to be careful to not use Z_FULL_FLUSH too often, since it - can significantly degrade compression. Alternatively, you can scan a - deflate stream once to generate an index, and then use that index for - random access. See examples/zran.c . - -29. Does zlib work on MVS, OS/390, CICS, etc.? - - It has in the past, but we have not heard of any recent evidence. There - were working ports of zlib 1.1.4 to MVS, but those links no longer work. - If you know of recent, successful applications of zlib on these operating - systems, please let us know. Thanks. - -30. Is there some simpler, easier to read version of inflate I can look at to - understand the deflate format? - - First off, you should read RFC 1951. Second, yes. Look in zlib's - contrib/puff directory. - -31. Does zlib infringe on any patents? - - As far as we know, no. In fact, that was originally the whole point behind - zlib. Look here for some more information: - - http://www.gzip.org/#faq11 - -32. Can zlib work with greater than 4 GB of data? - - Yes. inflate() and deflate() will process any amount of data correctly. - Each call of inflate() or deflate() is limited to input and output chunks - of the maximum value that can be stored in the compiler's "unsigned int" - type, but there is no limit to the number of chunks. Note however that the - strm.total_in and strm_total_out counters may be limited to 4 GB. These - counters are provided as a convenience and are not used internally by - inflate() or deflate(). The application can easily set up its own counters - updated after each call of inflate() or deflate() to count beyond 4 GB. - compress() and uncompress() may be limited to 4 GB, since they operate in a - single call. gzseek() and gztell() may be limited to 4 GB depending on how - zlib is compiled. See the zlibCompileFlags() function in zlib.h. - - The word "may" appears several times above since there is a 4 GB limit only - if the compiler's "long" type is 32 bits. If the compiler's "long" type is - 64 bits, then the limit is 16 exabytes. - -33. Does zlib have any security vulnerabilities? - - The only one that we are aware of is potentially in gzprintf(). If zlib is - compiled to use sprintf() or vsprintf(), then there is no protection - against a buffer overflow of an 8K string space (or other value as set by - gzbuffer()), other than the caller of gzprintf() assuring that the output - will not exceed 8K. On the other hand, if zlib is compiled to use - snprintf() or vsnprintf(), which should normally be the case, then there is - no vulnerability. The ./configure script will display warnings if an - insecure variation of sprintf() will be used by gzprintf(). Also the - zlibCompileFlags() function will return information on what variant of - sprintf() is used by gzprintf(). - - If you don't have snprintf() or vsnprintf() and would like one, you can - find a portable implementation here: - - http://www.ijs.si/software/snprintf/ - - Note that you should be using the most recent version of zlib. Versions - 1.1.3 and before were subject to a double-free vulnerability, and versions - 1.2.1 and 1.2.2 were subject to an access exception when decompressing - invalid compressed data. - -34. Is there a Java version of zlib? - - Probably what you want is to use zlib in Java. zlib is already included - as part of the Java SDK in the java.util.zip package. If you really want - a version of zlib written in the Java language, look on the zlib home - page for links: http://zlib.net/ . - -35. I get this or that compiler or source-code scanner warning when I crank it - up to maximally-pedantic. Can't you guys write proper code? - - Many years ago, we gave up attempting to avoid warnings on every compiler - in the universe. It just got to be a waste of time, and some compilers - were downright silly as well as contradicted each other. So now, we simply - make sure that the code always works. - -36. Valgrind (or some similar memory access checker) says that deflate is - performing a conditional jump that depends on an uninitialized value. - Isn't that a bug? - - No. That is intentional for performance reasons, and the output of deflate - is not affected. This only started showing up recently since zlib 1.2.x - uses malloc() by default for allocations, whereas earlier versions used - calloc(), which zeros out the allocated memory. Even though the code was - correct, versions 1.2.4 and later was changed to not stimulate these - checkers. - -37. Will zlib read the (insert any ancient or arcane format here) compressed - data format? - - Probably not. Look in the comp.compression FAQ for pointers to various - formats and associated software. - -38. How can I encrypt/decrypt zip files with zlib? - - zlib doesn't support encryption. The original PKZIP encryption is very - weak and can be broken with freely available programs. To get strong - encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib - compression. For PKZIP compatible "encryption", look at - http://www.info-zip.org/ - -39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? - - "gzip" is the gzip format, and "deflate" is the zlib format. They should - probably have called the second one "zlib" instead to avoid confusion with - the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 - correctly points to the zlib specification in RFC 1950 for the "deflate" - transfer encoding, there have been reports of servers and browsers that - incorrectly produce or expect raw deflate data per the deflate - specification in RFC 1951, most notably Microsoft. So even though the - "deflate" transfer encoding using the zlib format would be the more - efficient approach (and in fact exactly what the zlib format was designed - for), using the "gzip" transfer encoding is probably more reliable due to - an unfortunate choice of name on the part of the HTTP 1.1 authors. - - Bottom line: use the gzip format for HTTP 1.1 encoding. - -40. Does zlib support the new "Deflate64" format introduced by PKWare? - - No. PKWare has apparently decided to keep that format proprietary, since - they have not documented it as they have previous compression formats. In - any case, the compression improvements are so modest compared to other more - modern approaches, that it's not worth the effort to implement. - -41. I'm having a problem with the zip functions in zlib, can you help? - - There are no zip functions in zlib. You are probably using minizip by - Giles Vollant, which is found in the contrib directory of zlib. It is not - part of zlib. In fact none of the stuff in contrib is part of zlib. The - files in there are not supported by the zlib authors. You need to contact - the authors of the respective contribution for help. - -42. The match.asm code in contrib is under the GNU General Public License. - Since it's part of zlib, doesn't that mean that all of zlib falls under the - GNU GPL? - - No. The files in contrib are not part of zlib. They were contributed by - other authors and are provided as a convenience to the user within the zlib - distribution. Each item in contrib has its own license. - -43. Is zlib subject to export controls? What is its ECCN? - - zlib is not subject to export controls, and so is classified as EAR99. - -44. Can you please sign these lengthy legal documents and fax them back to us - so that we can use your software in our product? - - No. Go away. Shoo. diff --git a/packages/zlib-msvc-x64.1.2.11.8900/README b/packages/zlib-msvc-x64.1.2.11.8900/README deleted file mode 100644 index 51106de4..00000000 --- a/packages/zlib-msvc-x64.1.2.11.8900/README +++ /dev/null @@ -1,115 +0,0 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.2.11 is a general purpose data compression library. All the code is -thread safe. The data format used by the zlib library is described by RFCs -(Request for Comments) 1950 to 1952 in the files -http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and -rfc1952 (gzip format). - -All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example -of the library is given in the file test/example.c which also tests that -the library is working correctly. Another example is given in the file -test/minigzip.c. The compression library itself is composed of all source -files in the root directory. - -To compile all files and run the test program, follow the instructions given at -the top of Makefile.in. In short "./configure; make test", and if that goes -well, "make install" should work for most flavors of Unix. For Windows, use -one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use -make_vms.com. - -Questions about zlib should be sent to , or to Gilles Vollant - for the Windows DLL version. The zlib home page is -http://zlib.net/ . Before reporting a problem, please check this site to -verify that you have the latest version of zlib; otherwise get the latest -version and check whether the problem still exists or not. - -PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. - -Mark Nelson wrote an article about zlib for the Jan. 1997 -issue of Dr. Dobb's Journal; a copy of the article is available at -http://marknelson.us/1997/01/01/zlib-engine/ . - -The changes made in version 1.2.11 are documented in the file ChangeLog. - -Unsupported third party contributions are provided in directory contrib/ . - -zlib is available in Java using the java.util.zip package, documented at -http://java.sun.com/developer/technicalArticles/Programming/compression/ . - -A Perl interface to zlib written by Paul Marquess is available -at CPAN (Comprehensive Perl Archive Network) sites, including -http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . - -A Python interface to zlib written by A.M. Kuchling is -available in Python 1.5 and later versions, see -http://docs.python.org/library/zlib.html . - -zlib is built into tcl: http://wiki.tcl.tk/4610 . - -An experimental package to read and write files in .zip format, written on top -of zlib by Gilles Vollant , is available in the -contrib/minizip directory of zlib. - - -Notes for some targets: - -- For Windows DLL versions, please see win32/DLL_FAQ.txt - -- For 64-bit Irix, deflate.c must be compiled without any optimization. With - -O, one libpng test fails. The test works in 32 bit mode (with the -n32 - compiler flag). The compiler bug has been reported to SGI. - -- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works - when compiled with cc. - -- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is - necessary to get gzprintf working correctly. This is done by configure. - -- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with - other compilers. Use "make test" to check your compiler. - -- gzdopen is not supported on RISCOS or BEOS. - -- For PalmOs, see http://palmzlib.sourceforge.net/ - - -Acknowledgments: - - The deflate format used by zlib was defined by Phil Katz. The deflate and - zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; they - are too numerous to cite here. - -Copyright notice: - - (C) 1995-2017 Jean-loup Gailly and Mark Adler - - 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 redistribute it - freely, subject to the following restrictions: - - 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 must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving -lengthy legal documents to sign. The sources are provided for free but without -warranty of any kind. The library has been entirely written by Jean-loup -Gailly and Mark Adler; it does not include third-party code. - -If you redistribute modified sources, we would appreciate that you include in -the file ChangeLog history information documenting your changes. Please read -the FAQ for more information on the distribution of modified source versions. diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/bin_debug/zlibd.dll b/packages/zlib-msvc-x64.1.2.11.8900/build/native/bin_debug/zlibd.dll deleted file mode 100644 index d41753de..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/build/native/bin_debug/zlibd.dll and /dev/null differ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/bin_release/zlib.dll b/packages/zlib-msvc-x64.1.2.11.8900/build/native/bin_release/zlib.dll deleted file mode 100644 index eadc847b..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/build/native/bin_release/zlib.dll and /dev/null differ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/include/zconf.h b/packages/zlib-msvc-x64.1.2.11.8900/build/native/include/zconf.h deleted file mode 100644 index 352f552b..00000000 --- a/packages/zlib-msvc-x64.1.2.11.8900/build/native/include/zconf.h +++ /dev/null @@ -1,536 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H -/* #undef Z_PREFIX */ -/* #undef Z_HAVE_UNISTD_H */ - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -#ifdef Z_SOLO - typedef unsigned long z_size_t; -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/include/zlib.h b/packages/zlib-msvc-x64.1.2.11.8900/build/native/include/zlib.h deleted file mode 100644 index f09cdaf1..00000000 --- a/packages/zlib-msvc-x64.1.2.11.8900/build/native/include/zlib.h +++ /dev/null @@ -1,1912 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.11, January 15th, 2017 - - Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler - - 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 redistribute it - freely, subject to the following restrictions: - - 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 must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 - (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.11" -#define ZLIB_VERNUM 0x12b0 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 11 -#define ZLIB_VER_SUBREVISION 0 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed data. - This version of the library supports only one compression method (deflation) - but other algorithms will be added later and will have the same stream - interface. - - Compression can be done in a single step if the buffers are large enough, - or can be done by repeated calls of the compression function. In the latter - case, the application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip and raw deflate streams in - memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never crash - even in the case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - z_const Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ - - Bytef *next_out; /* next output byte will go here */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ - - z_const char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text - for deflate, or the decoding state for inflate */ - uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has dropped - to zero. It must update next_out and avail_out when avail_out has dropped - to zero. The application must initialize zalloc, zfree and opaque before - calling the init function. All other fields are set by the compression - library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. In that case, zlib is thread-safe. When zalloc and zfree are - Z_NULL on entry to the initialization function, they are set to internal - routines that use the standard library functions malloc() and free(). - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this if - the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers - returned by zalloc for objects of exactly 65536 bytes *must* have their - offset normalized to zero. The default allocation function provided by this - library ensures this (see zutil.c). To reduce memory requirements and avoid - any allocation of 64K objects, at the expense of compression ratio, compile - the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or progress - reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use by the decompressor (particularly - if the decompressor wants to decompress everything in a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -#define Z_TREES 6 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field for deflate() */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is not - compatible with the zlib.h header file used by the application. This check - is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. If - zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at all - (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION - requests a default compromise between speed and compression (currently - equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if level is not a valid compression level, or - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). msg is set to null - if there is no error message. deflateInit does not perform any compression: - this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Generate more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary. Some output may be provided even if - flush is zero. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating avail_in or avail_out accordingly; avail_out should - never be zero before the call. The application can consume the compressed - output when it wants, for example when the output buffer is full (avail_out - == 0), or after each call of deflate(). If deflate returns Z_OK and with - zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. See deflatePending(), - which can be used if desired to determine whether or not there is more ouput - in that case. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumulate before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In - particular avail_in is zero after the call if enough output space has been - provided before the call.) Flushing may degrade compression for some - compression algorithms and so it should be used only when necessary. This - completes the current deflate block and follows it with an empty stored block - that is three bits plus filler bits to the next byte, followed by four bytes - (00 00 ff ff). - - If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the - output buffer, but the output is not aligned to a byte boundary. All of the - input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. - This completes the current deflate block and follows it with an empty fixed - codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed - codes block. - - If flush is set to Z_BLOCK, a deflate block is completed and emitted, as - for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to - seven bits of the current block are held to be written as the next byte after - the next deflate block is completed. In this case, the decompressor may not - be provided enough bits at this point in order to complete decompression of - the data provided so far to the compressor. It may need to wait for the next - block to be emitted. This is for advanced applications that need to control - the emission of deflate blocks. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this - function must be called again with Z_FINISH and more output space (updated - avail_out) but no more input data, until it returns with Z_STREAM_END or an - error. After deflate has returned Z_STREAM_END, the only possible operations - on the stream are deflateReset or deflateEnd. - - Z_FINISH can be used in the first deflate call after deflateInit if all the - compression is to be done in a single step. In order to complete in one - call, avail_out must be at least the value returned by deflateBound (see - below). Then deflate is guaranteed to return Z_STREAM_END. If not enough - output space is provided, deflate will not return Z_STREAM_END, and it must - be called again as described above. - - deflate() sets strm->adler to the Adler-32 checksum of all input read - so far (that is, total_in bytes). If a gzip stream is being generated, then - strm->adler will be the CRC-32 checksum of the input read so far. (See - deflateInit2 below.) - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is - considered binary. This field is only for information purposes and does not - affect the compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL or the state was inadvertently written over - by the application), or Z_BUF_ERROR if no progress is possible (for example - avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and - deflate() can be called again with more input and more output space to - continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. In the current version of inflate, the provided input is not - read or consumed. The allocation of a sliding window will be deferred to - the first call of inflate (if the decompression does not complete on the - first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression. - Actual decompression will be done by inflate(). So next_in, and avail_in, - next_out, and avail_out are unused and unchanged. The current - implementation of inflateInit() does not process any header information -- - that is deferred until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), then next_in and avail_in are updated - accordingly, and processing will resume at this point for the next call of - inflate(). - - - Generate more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. If the - caller of inflate() does not provide both available input and available - output space, it is possible that there will be no progress made. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - To assist in this, on return inflate() always sets strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed Adler-32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained unless inflateGetHeader() is used. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - produced so far. The CRC-32 is checked against the gzip trailer, as is the - uncompressed length, modulo 2^32. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value, in which case strm->msg points to a string with a more specific - error), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL, or the state was inadvertently written over - by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR - if no progress was possible or if there was not enough room in the output - buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is to be attempted. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state - was inconsistent. -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by the - caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - For the current implementation of deflate(), a windowBits value of 8 (a - window size of 256 bytes) is not supported. As a result, a request for 8 - will result in 9 (a 512-byte window). In that case, providing 8 to - inflateInit2() will result in an error when the zlib header with 9 is - checked against the initialization of inflate(). The remedy is to not use 8 - with deflateInit2() with this initialization, or at least in that case use 9 - with inflateInit2(). - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute a check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to the appropriate value, - if the operating system was determined at compile time. If a gzip stream is - being written, strm->adler is a CRC-32 instead of an Adler-32. - - For raw deflate or gzip encoding, a request for a 256-byte window is - rejected as invalid, since only the zlib header provides a means of - transmitting the window size to the decompressor. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the Adler-32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The Adler-32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - Adler-32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by deflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If deflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - deflateGetDictionary() may return a length less than the window size, even - when more than the window size in input has been provided. It may return up - to 258 bytes less in that case, due to how zlib's implementation of deflate - manages the sliding window and lookahead for matches, where matches can be - up to 258 bytes long. If the application needs the last window-size bytes of - input, then that would need to be saved by the application outside of zlib. - - deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, but - does not free and reallocate the internal compression state. The stream - will leave the compression level and any other attributes that may have been - set unchanged. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2(). This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression approach (which is a function of the level) or the - strategy is changed, and if any input has been consumed in a previous - deflate() call, then the input available so far is compressed with the old - level and strategy using deflate(strm, Z_BLOCK). There are three approaches - for the compression levels 0, 1..3, and 4..9 respectively. The new level - and strategy will take effect at the next call of deflate(). - - If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does - not have enough output space to complete, then the parameter change will not - take effect. In this case, deflateParams() can be called again with the - same parameters and more output space to try again. - - In order to assure a change in the parameters on the first try, the - deflate stream should be flushed using deflate() with Z_BLOCK or other flush - request until strm.avail_out is not zero, before calling deflateParams(). - Then no more input data should be provided before the deflateParams() call. - If this is done, the old level and strategy will be applied to the data - compressed before deflateParams(), and the new level and strategy will be - applied to the the data compressed after deflateParams(). - - deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream - state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if - there was not enough output space to complete the compression of the - available input data before a change in the strategy or approach. Note that - in the case of a Z_BUF_ERROR, the parameters are not changed. A return - value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be - retried with more output space. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an Adler-32 or a CRC-32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see - below), inflate() will not automatically decode concatenated gzip streams. - inflate() will return Z_STREAM_END at the end of the gzip stream. The state - would need to be reset to continue decoding a subsequent gzip stream. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the Adler-32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect Adler-32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. If the window size is changed, then the - memory allocated for the window is freed, and the window will be reallocated - by inflate() if needed. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above, or -65536 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the default - behavior of inflate(), which expects a zlib header and trailer around the - deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero -- buf is ignored in that - case -- and inflateBack() will return a buffer error. inflateBack() will - call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. - out() should return zero on success, or non-zero on failure. If out() - returns non-zero, inflateBack() will return with an error. Neither in() nor - out() are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: ZLIB_DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. compress() is equivalent to compress2() with a level - parameter of Z_DEFAULT_COMPRESSION. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed data. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen)); -/* - Same as uncompress, except that sourceLen is a pointer, where the - length of the source is *sourceLen. On return, *sourceLen is the number of - source bytes consumed. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - - Opens a gzip (.gz) file for reading or writing. The mode parameter is as - in fopen ("rb" or "wb") but can also include a compression level ("wb9") or - a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only - compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' - for fixed code compression as in "wb9F". (See the description of - deflateInit2 for more information about the strategy parameter.) 'T' will - request transparent writing or appending with no compression and not using - the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen associates a gzFile with the file descriptor fd. File descriptors - are obtained from calls like open, dup, creat, pipe or fileno (if the file - has been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions. The - default buffer size is 8192 bytes. This function must be called after - gzopen() or gzdopen(), and before any other calls that read or write the - file. The buffer memory allocation is always deferred to the first read or - write. Three times that size in buffer space is allocated. A larger buffer - size of, for example, 64K or 128K bytes will noticeably increase the speed - of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. Previously provided - data is flushed before the parameter change. - - gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not - opened for writing, Z_ERRNO if there is an error writing the flushed data, - or Z_MEM_ERROR if there is a memory allocation error. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. If len is too large to fit in an int, - then nothing is read, -1 is returned, and the error state is set to - Z_STREAM_ERROR. -*/ - -ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, - gzFile file)); -/* - Read up to nitems items of size size from file to buf, otherwise operating - as gzread() does. This duplicates the interface of stdio's fread(), with - size_t request and return types. If the library defines size_t, then - z_size_t is identical to size_t. If not, then z_size_t is an unsigned - integer type that can contain a pointer. - - gzfread() returns the number of full items read of size size, or zero if - the end of the file was reached and a full item could not be read, or if - there was an error. gzerror() must be consulted if zero is returned in - order to determine if there was an error. If the multiplication of size and - nitems overflows, i.e. the product does not fit in a z_size_t, then nothing - is read, zero is returned, and the error state is set to Z_STREAM_ERROR. - - In the event that the end of file is reached and only a partial item is - available at the end, i.e. the remaining uncompressed data length is not a - multiple of size, then the final partial item is nevetheless read into buf - and the end-of-file flag is set. The length of the partial item read is not - provided, but could be inferred from the result of gztell(). This behavior - is the same as the behavior of fread() implementations in common libraries, - but it prevents the direct use of gzfread() to read a concurrently written - file, reseting and retrying on end-of-file, when size is not 1. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes written or 0 in case of - error. -*/ - -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, - z_size_t nitems, gzFile file)); -/* - gzfwrite() writes nitems items of size size from buf to file, duplicating - the interface of stdio's fwrite(), with size_t request and return types. If - the library defines size_t, then z_size_t is identical to size_t. If not, - then z_size_t is an unsigned integer type that can contain a pointer. - - gzfwrite() returns the number of full items written of size size, or zero - if there was an error. If the multiplication of size and nitems overflows, - i.e. the product does not fit in a z_size_t, then nothing is written, zero - is returned, and the error state is set to Z_STREAM_ERROR. -*/ - -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the arguments to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or a negative zlib error code in case - of error. The number of uncompressed bytes written is limited to 8191, or - one less than the buffer size given to gzbuffer(). The caller should assure - that this limit is not exceeded. If it is exceeded, then gzprintf() will - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf() - because the secure snprintf() or vsnprintf() functions were not available. - This can be determined using zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or a - newline character is read and transferred to buf, or an end-of-file - condition is encountered. If any characters are read or if len == 1, the - string is terminated with a null character. If no characters are read due - to an end-of-file or len < 1, then the buffer is left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read as the first character - on the next read. At least one character of push-back is allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter flush - is as in the deflate() function. The return value is the zlib error number - (see function gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatenated gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - - Returns the starting position for the next gzread or gzwrite on the given - compressed file. This position represents a number of bytes in the - uncompressed data stream, and is zero when starting, even if appending or - reading a gzip stream from the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - - Returns the current offset in the file being read or written. This offset - includes the count of bytes that precede the gzip stream, for example when - appending or when using gzdopen() for reading. When reading, the offset - does not include as yet unused buffered input. This information can be used - for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Returns true (1) if the end-of-file indicator has been set while reading, - false (0) otherwise. Note that the end-of-file indicator is set only if the - read tried to go past the end of the input, but came up short. Therefore, - just like feof(), gzeof() may return false even if there is no more data to - read, in the event that the last read request was for the exact number of - bytes remaining in the input file. This will happen if the input file size - is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Returns true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file and - deallocates the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the given - compressed file. errnum is set to zlib error number. If an error occurred - in the file system and not in the compression library, errnum is set to - Z_ERRNO and the application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is Z_NULL, this function returns the - required initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); -/* - Same as adler32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is Z_NULL, this function returns the required - initial value for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); -/* - Same as crc32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#ifdef Z_PREFIX_SET -# define z_deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define z_inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#else -# define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#endif - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - -#endif /* !Z_SOLO */ - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_debug/zlibd.lib b/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_debug/zlibd.lib deleted file mode 100644 index f0cf7b5d..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_debug/zlibd.lib and /dev/null differ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_debug/zlibstaticd.lib b/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_debug/zlibstaticd.lib deleted file mode 100644 index 55b2c26a..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_debug/zlibstaticd.lib and /dev/null differ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_release/zlib.lib b/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_release/zlib.lib deleted file mode 100644 index 16b46b68..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_release/zlib.lib and /dev/null differ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_release/zlibstatic.lib b/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_release/zlibstatic.lib deleted file mode 100644 index 42ad7567..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/build/native/lib_release/zlibstatic.lib and /dev/null differ diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/share/man/man3/zlib.3 b/packages/zlib-msvc-x64.1.2.11.8900/build/native/share/man/man3/zlib.3 deleted file mode 100644 index bda4eb07..00000000 --- a/packages/zlib-msvc-x64.1.2.11.8900/build/native/share/man/man3/zlib.3 +++ /dev/null @@ -1,149 +0,0 @@ -.TH ZLIB 3 "15 Jan 2017" -.SH NAME -zlib \- compression/decompression library -.SH SYNOPSIS -[see -.I zlib.h -for full description] -.SH DESCRIPTION -The -.I zlib -library is a general purpose data compression library. -The code is thread safe, assuming that the standard library functions -used are thread safe, such as memory allocation routines. -It provides in-memory compression and decompression functions, -including integrity checks of the uncompressed data. -This version of the library supports only one compression method (deflation) -but other algorithms may be added later -with the same stream interface. -.LP -Compression can be done in a single step if the buffers are large enough -or can be done by repeated calls of the compression function. -In the latter case, -the application must provide more input and/or consume the output -(providing more output space) before each call. -.LP -The library also supports reading and writing files in -.IR gzip (1) -(.gz) format -with an interface similar to that of stdio. -.LP -The library does not install any signal handler. -The decoder checks the consistency of the compressed data, -so the library should never crash even in the case of corrupted input. -.LP -All functions of the compression library are documented in the file -.IR zlib.h . -The distribution source includes examples of use of the library -in the files -.I test/example.c -and -.IR test/minigzip.c, -as well as other examples in the -.IR examples/ -directory. -.LP -Changes to this version are documented in the file -.I ChangeLog -that accompanies the source. -.LP -.I zlib -is built in to many languages and operating systems, including but not limited to -Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go. -.LP -An experimental package to read and write files in the .zip format, -written on top of -.I zlib -by Gilles Vollant (info@winimage.com), -is available at: -.IP -http://www.winimage.com/zLibDll/minizip.html -and also in the -.I contrib/minizip -directory of the main -.I zlib -source distribution. -.SH "SEE ALSO" -The -.I zlib -web site can be found at: -.IP -http://zlib.net/ -.LP -The data format used by the -.I zlib -library is described by RFC -(Request for Comments) 1950 to 1952 in the files: -.IP -http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format) -.br -http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format) -.br -http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format) -.LP -Mark Nelson wrote an article about -.I zlib -for the Jan. 1997 issue of Dr. Dobb's Journal; -a copy of the article is available at: -.IP -http://marknelson.us/1997/01/01/zlib-engine/ -.SH "REPORTING PROBLEMS" -Before reporting a problem, -please check the -.I zlib -web site to verify that you have the latest version of -.IR zlib ; -otherwise, -obtain the latest version and see if the problem still exists. -Please read the -.I zlib -FAQ at: -.IP -http://zlib.net/zlib_faq.html -.LP -before asking for help. -Send questions and/or comments to zlib@gzip.org, -or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). -.SH AUTHORS AND LICENSE -Version 1.2.11 -.LP -Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler -.LP -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. -.LP -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: -.LP -.nr step 1 1 -.IP \n[step]. 3 -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. -.IP \n+[step]. -Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -.IP \n+[step]. -This notice may not be removed or altered from any source distribution. -.LP -Jean-loup Gailly Mark Adler -.br -jloup@gzip.org madler@alumni.caltech.edu -.LP -The deflate format used by -.I zlib -was defined by Phil Katz. -The deflate and -.I zlib -specifications were written by L. Peter Deutsch. -Thanks to all the people who reported problems and suggested various -improvements in -.IR zlib ; -who are too numerous to cite here. -.LP -UNIX manual page by R. P. C. Rodgers, -U.S. National Library of Medicine (rodgers@nlm.nih.gov). -.\" end of man page diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/share/pkgconfig/zlib.pc b/packages/zlib-msvc-x64.1.2.11.8900/build/native/share/pkgconfig/zlib.pc deleted file mode 100644 index cb1f1aef..00000000 --- a/packages/zlib-msvc-x64.1.2.11.8900/build/native/share/pkgconfig/zlib.pc +++ /dev/null @@ -1,13 +0,0 @@ -prefix=D:/GIT/zlib/build-nuget -exec_prefix=D:/GIT/zlib/build-nuget -libdir=D:/GIT/zlib/build-nuget/lib -sharedlibdir=D:/GIT/zlib/build-nuget/lib -includedir=D:/GIT/zlib/build-nuget/include - -Name: zlib -Description: zlib compression library -Version: 1.2.11 - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -lz -Cflags: -I${includedir} diff --git a/packages/zlib-msvc-x64.1.2.11.8900/build/native/zlib-msvc-x64.targets b/packages/zlib-msvc-x64.1.2.11.8900/build/native/zlib-msvc-x64.targets deleted file mode 100644 index dd345f7b..00000000 --- a/packages/zlib-msvc-x64.1.2.11.8900/build/native/zlib-msvc-x64.targets +++ /dev/null @@ -1,29 +0,0 @@ - - - - - HAS_zlib;%(PreprocessorDefinitions) - $(MSBuildThisFileDirectory)../..//build/native/include;%(AdditionalIncludeDirectories) - - - $(MSBuildThisFileDirectory)../..//build/native/include;%(AdditionalIncludeDirectories) - - - $(MSBuildThisFileDirectory)../..//build/native/lib_release/zlibstatic.lib;%(AdditionalDependencies) - - - - - HAS_zlib;%(PreprocessorDefinitions) - $(MSBuildThisFileDirectory)../..//build/native/include;%(AdditionalIncludeDirectories) - - - $(MSBuildThisFileDirectory)../..//build/native/include;%(AdditionalIncludeDirectories) - - - $(MSBuildThisFileDirectory)../..//build/native/lib_debug/zlibstaticd.lib;%(AdditionalDependencies) - - - - - diff --git a/packages/zlib-msvc-x64.1.2.11.8900/zlib-msvc-x64.1.2.11.8900.nupkg b/packages/zlib-msvc-x64.1.2.11.8900/zlib-msvc-x64.1.2.11.8900.nupkg deleted file mode 100644 index b9157d69..00000000 Binary files a/packages/zlib-msvc-x64.1.2.11.8900/zlib-msvc-x64.1.2.11.8900.nupkg and /dev/null differ