diff --git a/ase/ase.sln b/ase/ase.sln index c869c127..9a36c4ba 100644 --- a/ase/ase.sln +++ b/ase/ase.sln @@ -12,8 +12,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk", "awk\aseawk.vcproj EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk_jni", "awk\aseawk_jni.vcproj", "{23B58791-FD44-4F95-9F77-34E4AF45A296}" ProjectSection(ProjectDependencies) = postProject - {5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83} {17621C83-40C9-4305-BAF9-132E250B5FE3} = {17621C83-40C9-4305-BAF9-132E250B5FE3} + {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} + {5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asecom", "com\asecom.vcproj", "{963AF7B5-12E6-42B6-8CBE-89136C1A109B}" @@ -67,6 +68,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asecom", "test\com\asecom.c EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug MD|Any CPU = Debug MD|Any CPU + Debug MD|Mixed Platforms = Debug MD|Mixed Platforms + Debug MD|Win32 = Debug MD|Win32 Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms Debug|Win32 = Debug|Win32 @@ -75,6 +79,11 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug MD|Win32.Build.0 = Debug MD|Win32 {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|Any CPU.ActiveCfg = Debug|Win32 {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -85,6 +94,11 @@ Global {17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|Mixed Platforms.Build.0 = Release|Win32 {17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|Win32.ActiveCfg = Release|Win32 {17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|Win32.Build.0 = Release|Win32 + {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug MD|Win32.Build.0 = Debug MD|Win32 {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|Any CPU.ActiveCfg = Debug|Win32 {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -95,6 +109,11 @@ Global {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|Mixed Platforms.Build.0 = Release|Win32 {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|Win32.ActiveCfg = Release|Win32 {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|Win32.Build.0 = Release|Win32 + {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug MD|Win32.Build.0 = Debug MD|Win32 {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|Any CPU.ActiveCfg = Debug|Win32 {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -105,6 +124,11 @@ Global {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|Mixed Platforms.Build.0 = Release|Win32 {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|Win32.ActiveCfg = Release|Win32 {5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|Win32.Build.0 = Release|Win32 + {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug MD|Win32.Build.0 = Debug MD|Win32 {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|Any CPU.ActiveCfg = Debug|Win32 {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -115,6 +139,11 @@ Global {23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|Mixed Platforms.Build.0 = Release|Win32 {23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|Win32.ActiveCfg = Release|Win32 {23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|Win32.Build.0 = Release|Win32 + {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug MD|Win32.Build.0 = Debug MD|Win32 {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|Any CPU.ActiveCfg = Debug|Win32 {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -125,6 +154,11 @@ Global {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|Mixed Platforms.Build.0 = Release|Win32 {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|Win32.ActiveCfg = Release|Win32 {963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|Win32.Build.0 = Release|Win32 + {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug MD|Win32.Build.0 = Debug MD|Win32 {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|Any CPU.ActiveCfg = Debug|Win32 {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -135,6 +169,11 @@ Global {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|Mixed Platforms.Build.0 = Release|Win32 {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|Win32.ActiveCfg = Release|Win32 {57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|Win32.Build.0 = Release|Win32 + {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug MD|Win32.Build.0 = Debug MD|Win32 {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|Any CPU.ActiveCfg = Debug|Win32 {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -145,6 +184,11 @@ Global {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|Mixed Platforms.Build.0 = Release|Win32 {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|Win32.ActiveCfg = Release|Win32 {42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|Win32.Build.0 = Release|Win32 + {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug MD|Win32.Build.0 = Debug MD|Win32 {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|Any CPU.ActiveCfg = Debug|Win32 {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -155,6 +199,11 @@ Global {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Mixed Platforms.Build.0 = Release|Win32 {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Win32.ActiveCfg = Release|Win32 {868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Win32.Build.0 = Release|Win32 + {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug MD|Win32.Build.0 = Debug MD|Win32 {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Any CPU.ActiveCfg = Debug|Win32 {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -165,6 +214,11 @@ Global {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|Mixed Platforms.Build.0 = Release|Win32 {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|Win32.ActiveCfg = Release|Win32 {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|Win32.Build.0 = Release|Win32 + {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug MD|Win32.Build.0 = Debug MD|Win32 {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|Any CPU.ActiveCfg = Debug|Win32 {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|Mixed Platforms.Build.0 = Debug|Win32 @@ -175,16 +229,23 @@ Global {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|Mixed Platforms.Build.0 = Release|Win32 {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|Win32.ActiveCfg = Release|Win32 {3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|Win32.Build.0 = Release|Win32 + {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug MD|Any CPU.ActiveCfg = Debug MD|Win32 + {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Win32 + {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Win32 + {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug MD|Win32.ActiveCfg = Debug MD|Win32 + {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug MD|Win32.Build.0 = Debug MD|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Any CPU.ActiveCfg = Debug|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Win32.ActiveCfg = Debug|Win32 - {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Win32.Build.0 = Debug|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Any CPU.ActiveCfg = Release|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Mixed Platforms.Build.0 = Release|Win32 {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Win32.ActiveCfg = Release|Win32 - {A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Win32.Build.0 = Release|Win32 + {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug MD|Any CPU.ActiveCfg = Debug MD|Any CPU + {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Any CPU + {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Any CPU + {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug MD|Win32.ActiveCfg = Debug MD|Any CPU {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -195,6 +256,10 @@ Global {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Mixed Platforms.Build.0 = Release|Any CPU {7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Win32.ActiveCfg = Release|Any CPU + {F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug MD|Any CPU.ActiveCfg = Debug MD|Any CPU + {F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug MD|Mixed Platforms.ActiveCfg = Debug MD|Any CPU + {F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug MD|Mixed Platforms.Build.0 = Debug MD|Any CPU + {F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug MD|Win32.ActiveCfg = Debug MD|Any CPU {F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Any CPU.Build.0 = Debug|Any CPU {F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU diff --git a/ase/awk/Awk.cpp b/ase/awk/Awk.cpp index d17bc1f2..d80c04b4 100644 --- a/ase/awk/Awk.cpp +++ b/ase/awk/Awk.cpp @@ -1,5 +1,7 @@ /* - * $Id: Awk.cpp,v 1.56 2007/09/23 16:48:55 bacon Exp $ + * $Id: Awk.cpp,v 1.58 2007/09/24 11:22:22 bacon Exp $ + * + * {License} */ @@ -264,19 +266,23 @@ int Awk::Argument::init (run_t* run, val_t* v) Awk::long_t Awk::Argument::toInt () const { - ASE_ASSERT (this->run != ASE_NULL && this->val != ASE_NULL); + if (this->run == ASE_NULL || this->val == ASE_NULL) return 0; return this->inum; } Awk::real_t Awk::Argument::toReal () const { - ASE_ASSERT (this->run != ASE_NULL && this->val != ASE_NULL); + if (this->run == ASE_NULL || this->val == ASE_NULL) return 0.0; return this->rnum; } const Awk::char_t* Awk::Argument::toStr (size_t* len) const { - ASE_ASSERT (this->run != ASE_NULL && this->val != ASE_NULL); + if (this->run == ASE_NULL || this->val == ASE_NULL) + { + *len = 0; + return ASE_NULL; + } if (this->str.ptr != ASE_NULL) { @@ -476,7 +482,7 @@ int Awk::Run::getGlobal (int id, Argument& global) const ASE_ASSERT (run != ASE_NULL); global.clear (); - return global.init (run,ase_awk_getglobal (this->run, id)); + return global.init (run, ase_awk_getglobal(this->run,id)); } ////////////////////////////////////////////////////////////////// diff --git a/ase/awk/Awk.hpp b/ase/awk/Awk.hpp index cf8af4ad..8cb2fad0 100644 --- a/ase/awk/Awk.hpp +++ b/ase/awk/Awk.hpp @@ -1,5 +1,7 @@ /* - * $Id: Awk.hpp,v 1.58 2007/09/23 16:48:55 bacon Exp $ + * $Id: Awk.hpp,v 1.60 2007/09/24 11:22:22 bacon Exp $ + * + * {License} */ #ifndef _ASE_AWK_AWK_HPP_ @@ -283,13 +285,14 @@ public: */ class Argument { - protected: + public: friend class Awk; friend class Awk::Run; Argument (); ~Argument (); + protected: void clear (); // initialization diff --git a/ase/awk/StdAwk.cpp b/ase/awk/StdAwk.cpp index 5bf849be..fd0044db 100644 --- a/ase/awk/StdAwk.cpp +++ b/ase/awk/StdAwk.cpp @@ -1,5 +1,7 @@ /* - * $Id: StdAwk.cpp,v 1.27 2007/09/23 16:48:55 bacon Exp $ + * $Id: StdAwk.cpp,v 1.28 2007/09/24 11:22:22 bacon Exp $ + * + * {License} */ #include diff --git a/ase/awk/StdAwk.hpp b/ase/awk/StdAwk.hpp index 0e498d96..10e850ff 100644 --- a/ase/awk/StdAwk.hpp +++ b/ase/awk/StdAwk.hpp @@ -1,5 +1,7 @@ /* - * $Id: StdAwk.hpp,v 1.16 2007/09/23 16:48:55 bacon Exp $ + * $Id: StdAwk.hpp,v 1.17 2007/09/24 11:22:22 bacon Exp $ + * + * {License} */ #ifndef _ASE_AWK_STDAWK_HPP_ diff --git a/ase/awk/aseawk++.vcproj b/ase/awk/aseawk++.vcproj index cd874729..bf34caea 100644 --- a/ase/awk/aseawk++.vcproj +++ b/ase/awk/aseawk++.vcproj @@ -16,8 +16,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - @@ -185,6 +254,15 @@ PreprocessorDefinitions="" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + src.shared.buf_pos = 0; awk->src.shared.buf_len = 0; - ase_awk_tab_clear (&awk->parse.globals); + /*ase_awk_tab_clear (&awk->parse.globals);*/ + ASE_ASSERT (awk->parse.globals.size == awk->tree.nglobals); + ase_awk_tab_remove ( + &awk->parse.globals, awk->tree.nbglobals, + awk->parse.globals.size - awk->tree.nbglobals); + ase_awk_tab_clear (&awk->parse.locals); ase_awk_tab_clear (&awk->parse.params); @@ -231,8 +236,10 @@ int ase_awk_clear (ase_awk_t* awk) /* clear parse trees */ awk->tree.ok = 0; - awk->tree.nbglobals = 0; - awk->tree.nglobals = 0; + /*awk->tree.nbglobals = 0; + awk->tree.nglobals = 0; */ + awk->tree.nglobals = awk->tree.nbglobals; + awk->tree.cur_afn.ptr = ASE_NULL; awk->tree.cur_afn.len = 0; ase_awk_map_clear (awk->tree.afns); diff --git a/ase/awk/jni.c b/ase/awk/jni.c index c77cf278..4fdd4579 100644 --- a/ase/awk/jni.c +++ b/ase/awk/jni.c @@ -1,5 +1,5 @@ /* - * $Id: jni.c,v 1.14 2007/09/23 16:48:55 bacon Exp $ + * $Id: jni.c,v 1.15 2007/09/24 11:15:58 bacon Exp $ * * {License} */ @@ -2635,7 +2635,11 @@ JNIEXPORT jint JNICALL Java_ase_awk_Awk_system ( if (mbs == ASE_NULL) return -1; size_t mbl = wcstombs (mbs, tmp, len*5); - if (mbl == (size_t)-1) return -1; + if (mbl == (size_t)-1) + { + free (mbs); + return -1; + } mbs[mbl] = '\0'; ret = system(mbs); free (mbs); diff --git a/ase/awk/parse.c b/ase/awk/parse.c index e8217b46..019a5aeb 100644 --- a/ase/awk/parse.c +++ b/ase/awk/parse.c @@ -1,5 +1,5 @@ /* - * $Id: parse.c,v 1.14 2007/09/23 16:48:55 bacon Exp $ + * $Id: parse.c,v 1.15 2007/09/24 08:21:25 bacon Exp $ * * {License} */ @@ -130,7 +130,7 @@ static int parse (ase_awk_t* awk); static ase_awk_t* parse_progunit (ase_awk_t* awk); static ase_awk_t* collect_globals (ase_awk_t* awk); -static int adjust_static_globals (ase_awk_t* awk); +static void adjust_static_globals (ase_awk_t* awk); static int add_global ( ase_awk_t* awk, const ase_char_t* name, ase_size_t len, @@ -295,8 +295,7 @@ static global_t gtab[] = { ASE_T("RLENGTH"), 7, 0 }, { ASE_T("RS"), 2, 0 }, { ASE_T("RSTART"), 6, 0 }, - { ASE_T("SUBSEP"), 6, 0 }, - { ASE_NULL, 0, 0 } + { ASE_T("SUBSEP"), 6, 0 } }; #define GET_CHAR(awk) \ @@ -480,11 +479,7 @@ static int parse (ase_awk_t* awk) return -1; } - if (adjust_static_globals (awk) == -1) - { - n = -1; - goto exit_parse; - } + adjust_static_globals (awk); /* the user io handler for the source code input returns 0 when * it doesn't have any files to open. this is the same condition @@ -519,7 +514,7 @@ static int parse (ase_awk_t* awk) } } - awk->tree.nglobals = ase_awk_tab_getsize(&awk->parse.globals); + ASE_ASSERT (awk->tree.nglobals == ase_awk_tab_getsize(&awk->parse.globals)); if (awk->src.ios.out != ASE_NULL) { @@ -567,12 +562,14 @@ static ase_awk_t* parse_progunit (ase_awk_t* awk) if (get_token(awk) == -1) return ASE_NULL; - nglobals = ase_awk_tab_getsize(&awk->parse.globals); + ASE_ASSERT (awk->tree.nglobals == ase_awk_tab_getsize(&awk->parse.globals)); + nglobals = awk->tree.nglobals; if (collect_globals (awk) == ASE_NULL) { ase_awk_tab_remove ( &awk->parse.globals, nglobals, ase_awk_tab_getsize(&awk->parse.globals) - nglobals); + awk->tree.nglobals = nglobals; return ASE_NULL; } } @@ -1173,9 +1170,17 @@ static ase_awk_nde_t* parse_block ( } /* remove unnecessary statements */ - if (nde->type == ASE_AWK_NDE_NULL || - (nde->type == ASE_AWK_NDE_BLK && - ((ase_awk_nde_blk_t*)nde)->body == ASE_NULL)) continue; + if (nde->type == ASE_AWK_NDE_NULL) + { + ase_awk_clrpt (awk, nde); + continue; + } + if (nde->type == ASE_AWK_NDE_BLK && + ((ase_awk_nde_blk_t*)nde)->body == ASE_NULL) + { + ase_awk_clrpt (awk, nde); + continue; + } if (curr == ASE_NULL) head = nde; else curr->next = nde; @@ -1198,8 +1203,8 @@ static ase_awk_nde_t* parse_block ( tmp = ase_awk_tab_getsize(&awk->parse.locals); if (tmp > awk->parse.nlocals_max) awk->parse.nlocals_max = tmp; - ase_awk_tab_remove ( - &awk->parse.locals, nlocals, tmp - nlocals); + /* remove all locals to move it up to the top level */ + ase_awk_tab_remove (&awk->parse.locals, nlocals, tmp - nlocals); /* adjust the number of locals for a block without any statements */ /* if (head == ASE_NULL) tmp = 0; */ @@ -1209,9 +1214,9 @@ static ase_awk_nde_t* parse_block ( block->next = ASE_NULL; block->body = head; -/* TODO: not only local variables but also nested blocks, -unless it is part of other constructs such as if, can be promoted -and merged to top-level block */ + /* TODO: not only local variables but also nested blocks, + unless it is part of other constructs such as if, can be promoted + and merged to top-level block */ /* migrate all block-local variables to a top-level block */ if (is_top) @@ -1250,7 +1255,6 @@ static ase_awk_nde_t* parse_block_dc ( int ase_awk_initglobals (ase_awk_t* awk) { - global_t* p = gtab; int id; /* ase_awk_initglobals is not generic-purpose. call this from @@ -1258,61 +1262,46 @@ int ase_awk_initglobals (ase_awk_t* awk) ASE_ASSERT (awk->tree.nbglobals == 0 && awk->tree.nglobals == 0); awk->tree.nbglobals = 0; - while (p->name != ASE_NULL) + awk->tree.nglobals = 0; + + for (id = ASE_AWK_MIN_GLOBAL_ID; id <= ASE_AWK_MAX_GLOBAL_ID; id++) { - if (ase_awk_tab_add ( - &awk->parse.globals, p->name, p->name_len) == (ase_size_t)-1) - { - return -1; - } + ase_size_t g; + + g = ase_awk_tab_add (&awk->parse.globals, + gtab[id].name, gtab[id].name_len); + if (g == (ase_size_t)-1) return -1; + + ASE_ASSERT (g == id); awk->tree.nbglobals++; - p++; + awk->tree.nglobals++; } + ASE_ASSERT (awk->tree.nbglobals == + ASE_AWK_MAX_GLOBAL_ID-ASE_AWK_MIN_GLOBAL_ID+1); return 0; } -static int adjust_static_globals (ase_awk_t* awk) +static void adjust_static_globals (ase_awk_t* awk) { - /* TODO: */ - return 0; -} - -#if 0 -static ase_awk_t* add_static_globals (ase_awk_t* awk) -{ - global_t* p = gtab; int id; - awk->tree.nbglobals = 0; - while (p->name != ASE_NULL) + ASE_ASSERT (awk->tree.nbglobals >= + ASE_AWK_MAX_GLOBAL_ID - ASE_AWK_MAX_GLOBAL_ID + 1); + + for (id = ASE_AWK_MIN_GLOBAL_ID; id <= ASE_AWK_MAX_GLOBAL_ID; id++) { - - if (p->valid != 0 && (awk->option & p->valid) == 0) + if (gtab[id].valid != 0 && (awk->option & gtab[id].valid) == 0) { - #if 0 - /* an invalid global variable are still added - * to the global variable table with an empty name. - * this is to prevent the run-time from looking up - * the variable */ - id = add_global (awk, ASE_T(""), 0, 0, 1); - #endif - id = add_global (awk, p->name, p->name_len, 0, 1); + awk->parse.globals.buf[id].name.len = 0; } - else + else { - id = add_global (awk, p->name, p->name_len, 0, 0); + awk->parse.globals.buf[id].name.len = gtab[id].name_len; } - if (id == -1) return ASE_NULL; - - awk->tree.nbglobals++; - p++; } - - return awk; } -#endif static int add_global ( ase_awk_t* awk, const ase_char_t* name, ase_size_t len, @@ -1320,39 +1309,35 @@ static int add_global ( { ase_size_t nglobals; - /* - if (!force) - {*/ - if (awk->option & ASE_AWK_UNIQUEFN) + if (awk->option & ASE_AWK_UNIQUEFN) + { + /* check if it conflict with a builtin function name */ + if (ase_awk_getbfn (awk, name, len) != ASE_NULL) { - /* check if it conflict with a builtin function name */ - if (ase_awk_getbfn (awk, name, len) != ASE_NULL) - { - SETERRARG ( - awk, ASE_AWK_EBFNRED, awk->token.line, - name, len); - return -1; - } - - /* check if it conflict with a function name */ - if (ase_awk_map_get ( - awk->tree.afns, name, len) != ASE_NULL) - { - SETERRARG ( - awk, ASE_AWK_EAFNRED, line, - name, len); - return -1; - } - } - - /* check if it conflicts with other global variable names */ - if (ase_awk_tab_find ( - &awk->parse.globals, 0, name, len) != (ase_size_t)-1) - { - SETERRARG (awk, ASE_AWK_EDUPGBL, line, name, len); + SETERRARG ( + awk, ASE_AWK_EBFNRED, awk->token.line, + name, len); return -1; } - /*}*/ + + /* check if it conflict with a function name */ + if (ase_awk_map_get ( + awk->tree.afns, name, len) != ASE_NULL) + { + SETERRARG ( + awk, ASE_AWK_EAFNRED, line, + name, len); + return -1; + } + } + + /* check if it conflicts with other global variable names */ + if (ase_awk_tab_find ( + &awk->parse.globals, 0, name, len) != (ase_size_t)-1) + { + SETERRARG (awk, ASE_AWK_EDUPGBL, line, name, len); + return -1; + } nglobals = ase_awk_tab_getsize (&awk->parse.globals); if (nglobals >= ASE_AWK_MAX_GLOBALS) @@ -1371,6 +1356,9 @@ static int add_global ( * the name length is reset to zero. */ if (disabled) awk->parse.globals.buf[nglobals].name.len = 0; + awk->tree.nglobals = ase_awk_tab_getsize (&awk->parse.globals); + ASE_ASSERT (nglobals == awk->tree.nglobals-1); + /* return the id which is the index to the global table. */ return (int)nglobals; } @@ -1378,7 +1366,22 @@ static int add_global ( int ase_awk_addglobal ( ase_awk_t* awk, const ase_char_t* name, ase_size_t len) { - return add_global (awk, name, len, 0, 0); + int n; + + if (awk->tree.nglobals > awk->tree.nbglobals) + { + /* this function is not allow after ase_awk_parse is called */ + SETERR (awk, ASE_AWK_ENOPER); + return -1; + } + + n = add_global (awk, name, len, 0, 0); + + /* update the count of the static globals. + * the total global count has been updated inside add_global. */ + if (n >= 0) awk->tree.nbglobals++; + + return n; } int ase_awk_delglobal ( @@ -1386,19 +1389,29 @@ int ase_awk_delglobal ( { ase_size_t n; - n = ase_awk_tab_find (&awk->parse.globals, 0, name, len); +#define ASE_AWK_NUM_STATIC_GLOBALS \ + (ASE_AWK_MAX_GLOBAL_ID-ASE_AWK_MIN_GLOBAL_ID+1) + + if (awk->tree.nglobals > awk->tree.nbglobals) + { + /* this function is not allow after ase_awk_parse is called */ + SETERR (awk, ASE_AWK_ENOPER); + return -1; + } + + n = ase_awk_tab_find (&awk->parse.globals, + ASE_AWK_NUM_STATIC_GLOBALS, name, len); if (n == (ase_size_t)-1) { SETERRARG (awk, ASE_AWK_ENOENT, 0, name, len); return -1; } - /* clear the name to emulate the action. this approach is - * in align with ase_awk_addglobal adding an ineffective global. - * anyway, this function cannot physically remove the entry - * because the existing global ID's known can all go wrong if - * it does so. the best is not to use this function as a normal - * program has no reason to do so. */ + /* invalidate the name if deletion is requested. + * this approach does not delete the entry. + * if ase_awk_addglobal is called with the same name + * again, the entry will be appended again. + * never call this funciton unless it is really required. */ awk->parse.globals.buf[n].name.ptr[0] = ASE_T('\0');; awk->parse.globals.buf[n].name.len = 0; @@ -1444,6 +1457,7 @@ static ase_awk_t* collect_locals (ase_awk_t* awk, ase_size_t nlocals) { ase_char_t* local; ase_size_t local_len; + ase_size_t n; while (1) { @@ -1456,8 +1470,6 @@ static ase_awk_t* collect_locals (ase_awk_t* awk, ase_size_t nlocals) local = ASE_STR_BUF(&awk->token.name); local_len = ASE_STR_LEN(&awk->token.name); - /* NOTE: it is not checked againt globals names */ - if (awk->option & ASE_AWK_UNIQUEFN) { /* check if it conflict with a builtin function name */ @@ -1484,8 +1496,8 @@ static ase_awk_t* collect_locals (ase_awk_t* awk, ase_size_t nlocals) } /* check if it conflicts with a paremeter name */ - if (ase_awk_tab_find (&awk->parse.params, - 0, local, local_len) != (ase_size_t)-1) + n = ase_awk_tab_find (&awk->parse.params, 0, local, local_len); + if (n != (ase_size_t)-1) { SETERRARG ( awk, ASE_AWK_EPARRED, awk->token.line, @@ -1494,17 +1506,40 @@ static ase_awk_t* collect_locals (ase_awk_t* awk, ase_size_t nlocals) } /* check if it conflicts with other local variable names */ - if (ase_awk_tab_find (&awk->parse.locals, + n = ase_awk_tab_find ( + &awk->parse.locals, ((awk->option & ASE_AWK_SHADING)? nlocals: 0), - local, local_len) != (ase_size_t)-1) + local, local_len); + if (n != (ase_size_t)-1) { SETERRARG ( awk, ASE_AWK_EDUPLCL, awk->token.line, local, local_len); - return ASE_NULL; } + /* check if it conflicts with global variable names */ + n = ase_awk_tab_find (&awk->parse.globals, 0, local, local_len); + if (n != (ase_size_t)-1) + { + if (n < awk->tree.nbglobals) + { + /* conflicting with a static global variable */ + SETERRARG ( + awk, ASE_AWK_EDUPLCL, awk->token.line, + local, local_len); + return ASE_NULL; + } + if ((awk->option & ASE_AWK_SHADING) == 0) + { + /* conflicting with a normal global variable */ + SETERRARG ( + awk, ASE_AWK_EDUPLCL, awk->token.line, + local, local_len); + return ASE_NULL; + } + } + if (ase_awk_tab_getsize(&awk->parse.locals) >= ASE_AWK_MAX_LOCALS) { SETERRLIN (awk, ASE_AWK_ELCLTM, awk->token.line); diff --git a/ase/awk/run.h b/ase/awk/run.h index 3d43177f..87bccf76 100644 --- a/ase/awk/run.h +++ b/ase/awk/run.h @@ -1,5 +1,5 @@ /* - * $Id: run.h,v 1.5 2007/09/23 16:48:55 bacon Exp $ + * $Id: run.h,v 1.6 2007/09/24 08:21:25 bacon Exp $ * * {License} */ @@ -102,7 +102,11 @@ enum ase_awk_global_id_t ASE_AWK_GLOBAL_RSTART, ASE_AWK_GLOBAL_SUBSEP, - ASE_AWK_GLOBAL_MAX /* this is not the actual id. used internally */ + /* these are not not the actual IDs and are used internally only + * Make sure you update these values properly if you add more + * ID definitions, however */ + ASE_AWK_MIN_GLOBAL_ID = ASE_AWK_GLOBAL_ARGC, + ASE_AWK_MAX_GLOBAL_ID = ASE_AWK_GLOBAL_SUBSEP }; #ifdef __cplusplus diff --git a/ase/change.log b/ase/change.log index bd16962f..6c95b00a 100644 --- a/ase/change.log +++ b/ase/change.log @@ -1,18 +1,23 @@ [0.3.1] +* added to the awk interpreter the capibility to manipulate global variables + - ase_awk_addglobal, ase_awk_delglobal (awk/parse.c) + - Awk::addGlobal, Awk::deleteGlobal (awk/Awk.hpp, awk/Awk.cpp) + - Awk::Run::setGlobal, Awk::Run::getGlobal (awk/Awk.hpp, awk/Awk.cpp) + +* enhanced Awk::dispatchFunction to set a more accurate error code (awk/Awk.cpp) + +* fixed a bug + - memory leak if a null statement or a block with no statements are + present in an AWK program. (awk/parse.c) + * changed the access modifier for the Awk::Source::Source from public to protected. -* started adding the source code documentation of awk/Awk.hpp. - -* added to the awk interpreter the capibility to add a global variable. - - ase_awk_addglobal (awk/parse.c) - - Awk::addGlobal (awk/Awk.cpp) - -* enhanced Awk::dispatchFunction to set more specific error code (awk/Awk.cpp) - * renamed ase_awk_addbfn & ase_awk_delbfn to ase_awk_addfunc & ase_awk_delfunc respectively. +* started the source code documentation of awk/Awk.hpp. + [0.3.0] * added ase_awk_setword to enable customization of keywords and diff --git a/ase/cmn/asecmn.vcproj b/ase/cmn/asecmn.vcproj index 9f558775..b3c125b8 100644 --- a/ase/cmn/asecmn.vcproj +++ b/ase/cmn/asecmn.vcproj @@ -16,8 +16,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - @@ -183,6 +251,15 @@ PreprocessorDefinitions="" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - @@ -245,6 +344,15 @@ PreprocessorDefinitions="" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nptr = PtrToStringChars(name); diff --git a/ase/net/Awk.hpp b/ase/net/Awk.hpp index 62708451..3a8d356e 100644 --- a/ase/net/Awk.hpp +++ b/ase/net/Awk.hpp @@ -1,5 +1,7 @@ /* - * $Id: Awk.hpp,v 1.22 2007/09/23 16:48:55 bacon Exp $ + * $Id: Awk.hpp,v 1.24 2007/09/24 15:12:16 bacon Exp $ + * + * {License} */ #pragma once @@ -169,10 +171,74 @@ namespace ASE } } - public: + protected: ASE::Awk::Return& ret; }; + ref class Run + { + public protected: + Run (ASE::Awk::Run& run): run (run) + { + } + + public: + bool SetGlobal (int id, long_t v) + { + return run.setGlobal (id, v) == 0; + } + bool SetGlobal (int id, System::SByte^ v) + { + return run.setGlobal (id, (long_t)(__int8)v) == 0; + } + bool SetGlobal (int id, System::Int16^ v) + { + return run.setGlobal (id, (long_t)(__int16)v) == 0; + } + bool SetGlobal (int id, System::Int32^ v) + { + return run.setGlobal (id, (long_t)(__int32)v) == 0; + } + bool SetGlobal (int id, System::Int64^ v) + { + return run.setGlobal (id, (long_t)(__int64)v) == 0; + } + bool SetGlobal (int id, System::Byte^ v) + { + return run.setGlobal (id, (long_t)(unsigned __int8)v) == 0; + } + bool SetGlobal (int id, System::UInt16^ v) + { + return run.setGlobal (id, (long_t)(unsigned __int16)v) == 0; + } + bool SetGlobal (int id, System::UInt32^ v) + { + return run.setGlobal (id, (long_t)(unsigned __int32)v) == 0; + } + bool SetGlobal (int id, System::UInt64^ v) + { + return run.setGlobal (id, (long_t)(unsigned __int64)v) == 0; + } + + bool SetGlobal (int id, real_t v) + { + return run.setGlobal (id, v) == 0; + } + bool SetGlobal (int id, System::Single^ v) + { + return run.setGlobal (id, (real_t)(float)v) == 0; + } + bool SetGlobal (int id, System::Double^ v) + { + return run.setGlobal (id, (real_t)(double)v) == 0; + } + + // TODO: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + protected: + ASE::Awk::Run& run; + }; + ref class Source { public: diff --git a/ase/net/StdAwk.cpp b/ase/net/StdAwk.cpp index c89efaee..ff39a9c1 100644 --- a/ase/net/StdAwk.cpp +++ b/ase/net/StdAwk.cpp @@ -1,5 +1,7 @@ /* - * $Id: StdAwk.cpp,v 1.12 2007/09/06 09:23:34 bacon Exp $ + * $Id: StdAwk.cpp,v 1.13 2007/09/24 11:22:22 bacon Exp $ + * + * {License} */ #include "stdafx.h" diff --git a/ase/net/asenet.cpp b/ase/net/asenet.cpp index cb77187f..8e0def02 100644 --- a/ase/net/asenet.cpp +++ b/ase/net/asenet.cpp @@ -1,5 +1,7 @@ /* - * $Id: asenet.cpp,v 1.1 2007/05/15 08:29:30 bacon Exp $ + * $Id: asenet.cpp,v 1.2 2007/09/24 11:22:22 bacon Exp $ + * + * {License} */ #include "stdafx.h" diff --git a/ase/net/asenet.h b/ase/net/asenet.h index 4b385f7f..d9748f28 100644 --- a/ase/net/asenet.h +++ b/ase/net/asenet.h @@ -1,5 +1,7 @@ /* - * $Id: asenet.h,v 1.2 2007/07/15 16:31:59 bacon Exp $ + * $Id: asenet.h,v 1.3 2007/09/24 11:22:22 bacon Exp $ + * + * {License} */ #pragma once diff --git a/ase/net/asenet.vcproj b/ase/net/asenet.vcproj index 67a78230..2f96ba77 100644 --- a/ase/net/asenet.vcproj +++ b/ase/net/asenet.vcproj @@ -166,6 +166,82 @@ Name="VCPostBuildEventTool" /> + + + + + + + + + + + + + + + + + + + + + + + @@ -91,7 +91,15 @@ public: const char_t* name, size_t len) { long_t x = args[0].toInt(); - run.setGlobal (idLastSleep, x); + + /*Argument arg; + if (run.getGlobal(idLastSleep, arg) == 0) + ase_printf (ASE_T("GOOD: [%d]\n"), (int)arg.toInt()); + else { ase_printf (ASE_T("BAD:\n")); } + */ + + if (run.setGlobal (idLastSleep, x) == -1) return -1; + #ifdef _WIN32 ::Sleep (x * 1000); return ret.set ((long_t)0); @@ -569,7 +577,7 @@ int awk_main (int argc, ase_char_t* argv[]) else if (ase_strcmp(argv[i], ASE_T("-a")) == 0) mode = 5; else if (ase_strcmp(argv[i], ASE_T("-m")) == 0) mode = 6; else if (ase_strcmp(argv[i], ASE_T("-w")) == 0) mode = 7; - else if (ase_strcmp(argv[i], ASE_T("-ns")) == 0) + else if (ase_strcmp(argv[i], ASE_T("-nostripspaces")) == 0) { awk.setOption (awk.getOption () & ~TestAwk::OPT_STRIPSPACES); } @@ -577,6 +585,14 @@ int awk_main (int argc, ase_char_t* argv[]) { awk.setOption (awk.getOption () & ~TestAwk::OPT_IMPLICIT); } + else if (ase_strcmp(argv[i], ASE_T("-noexplicit")) == 0) + { + awk.setOption (awk.getOption () & ~TestAwk::OPT_EXPLICIT); + } + else if (ase_strcmp(argv[i], ASE_T("-noshading")) == 0) + { + awk.setOption (awk.getOption () & ~TestAwk::OPT_SHADING); + } else { print_usage (argv[0]); diff --git a/ase/test/awk/aseawk++.vcproj b/ase/test/awk/aseawk++.vcproj index f549c25b..617aa4e1 100644 --- a/ase/test/awk/aseawk++.vcproj +++ b/ase/test/awk/aseawk++.vcproj @@ -16,8 +16,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + prompt 4 + + true + bin\Debug MD\ + DEBUG;TRACE + full + AnyCPU + prompt + diff --git a/ase/test/lsp/aselsp.vcproj b/ase/test/lsp/aselsp.vcproj index 708877c1..119b70c9 100644 --- a/ase/test/lsp/aselsp.vcproj +++ b/ase/test/lsp/aselsp.vcproj @@ -16,8 +16,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - @@ -219,6 +308,15 @@ PreprocessorDefinitions="" /> + + + prompt 4 + + true + bin\Debug MD\ + DEBUG;TRACE + full + AnyCPU + prompt + diff --git a/ase/utl/aseutl.vcproj b/ase/utl/aseutl.vcproj index 91aef65a..732c3551 100644 --- a/ase/utl/aseutl.vcproj +++ b/ase/utl/aseutl.vcproj @@ -16,8 +16,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +