Recovered from cvs revision 2007-11-09 07:43:00

This commit is contained in:
2007-11-10 00:20:00 +00:00
parent c1b6c78f76
commit 795c082519
21 changed files with 4152 additions and 190 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp,v 1.34 2007/10/10 13:22:12 bacon Exp $
* $Id: Awk.cpp,v 1.35 2007/11/08 15:08:06 bacon Exp $
*
* {License}
*/
@ -155,19 +155,30 @@ public:
if ((ASE::Net::Awk^)this->wrapper != nullptr) ASE::Awk::stop ();
}
int getWord (ASE::Net::Awk^ wrapper, const char_t* ow, size_t olen, const char_t** nw, size_t* nlen)
{
ASE::Net::Awk^ old = this->wrapper;
this->wrapper = wrapper;
int n = ASE::Awk::getWord (ow, olen, nw, nlen);
this->wrapper = old;
return n;
}
int setWord (ASE::Net::Awk^ wrapper, const char_t* ow, size_t olen, const char_t* nw, size_t nlen)
{
ASE::Net::Awk^ old = this->wrapper;
this->wrapper = wrapper;
int n = ASE::Awk::setWord (ow, olen, nw, nlen);
this->wrapper = nullptr;
this->wrapper = old;
return n;
}
int unsetWord (ASE::Net::Awk^ wrapper, const char_t* ow, size_t olen)
{
ASE::Net::Awk^ old = this->wrapper;
this->wrapper = wrapper;
int n = ASE::Awk::unsetWord (ow, olen);
this->wrapper = nullptr;
this->wrapper = old;
return n;
}
@ -1011,6 +1022,27 @@ bool Awk::DispatchFunction (
return n;
}
System::String^ Awk::GetWord (System::String^ ow)
{
if (awk == NULL)
{
SetError (ERROR::NOPER);
return nullptr;
}
const char_t* nptr;
size_t nlen;
cli::pin_ptr<const ASE::Awk::char_t> optr = PtrToStringChars(ow);
if (awk->getWord (this, optr, ow->Length, &nptr, &nlen) == -1)
{
RetrieveError ();
return nullptr;
}
return gcnew System::String (nptr, 0, nlen);
}
bool Awk::SetWord (System::String^ ow, System::String^ nw)
{
if (awk == NULL)

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.hpp,v 1.41 2007/10/26 12:49:24 bacon Exp $
* $Id: Awk.hpp,v 1.42 2007/11/08 15:08:06 bacon Exp $
*
* {License}
*/
@ -732,6 +732,7 @@ public:
int maxArgs, FunctionHandler^ handler);
virtual bool DeleteFunction (System::String^ name);
virtual System::String^ GetWord (System::String^ ow);
virtual bool SetWord (System::String^ ow, System::String^ nw);
virtual bool UnsetWord (System::String^ ow);
virtual bool UnsetAllWords ();

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -242,6 +245,236 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
ManagedExtensions="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../.."
PreprocessorDefinitions="WIN32;_DEBUG"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
AssemblyDebug="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
ManagedExtensions="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../.."
PreprocessorDefinitions="WIN32;NDEBUG"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug MD|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
ManagedExtensions="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../.."
PreprocessorDefinitions="WIN32;_DEBUG"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
AssemblyDebug="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
<AssemblyReference
@ -298,6 +531,30 @@
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug MD|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\StdAwk.cpp"