*** empty log message ***
This commit is contained in:
parent
9af74c5502
commit
44194e7c5f
38
ase/ase.sln
38
ase/ase.sln
@ -12,20 +12,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk", "awk\aseawk.vcproj
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aesawk_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}
|
||||
{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}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83}
|
||||
{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}") = "asetestawk", "test\awk\asetestawk.vcproj", "{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83}
|
||||
{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}") = "aselsp", "lsp\aselsp.vcproj", "{42FE7CED-34B7-45C8-92C9-8856E16640D2}"
|
||||
@ -35,19 +35,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aselsp", "lsp\aselsp.vcproj
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asetestlsp", "test\lsp\asetestlsp.vcproj", "{868702B0-CB6B-4F1D-B98A-32193347EFAF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2} = {42FE7CED-34B7-45C8-92C9-8856E16640D2}
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2} = {42FE7CED-34B7-45C8-92C9-8856E16640D2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asecom_net", "com\asecom_net.csproj", "{89660879-3897-4078-A9C3-9C4667233E0A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B} = {963AF7B5-12E6-42B6-8CBE-89136C1A109B}
|
||||
EndProjectSection
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asetestcom", "test\com\asetestcom.csproj", "{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asetestcom_net", "test\com\asetestcom_net.csproj", "{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A} = {89660879-3897-4078-A9C3-9C4667233E0A}
|
||||
EndProjectSection
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asenet", "net\asenet.vcproj", "{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -139,16 +133,6 @@ 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
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{89660879-3897-4078-A9C3-9C4667233E0A}.Release|Win32.ActiveCfg = Release|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
|
||||
@ -159,6 +143,16 @@ Global
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
40
ase/net/AssemblyInfo.cpp
Normal file
40
ase/net/AssemblyInfo.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Reflection;
|
||||
using namespace System::Runtime::CompilerServices;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
using namespace System::Security::Permissions;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly:AssemblyTitleAttribute("asenet")];
|
||||
[assembly:AssemblyDescriptionAttribute("")];
|
||||
[assembly:AssemblyConfigurationAttribute("")];
|
||||
[assembly:AssemblyCompanyAttribute("")];
|
||||
[assembly:AssemblyProductAttribute("asenet")];
|
||||
[assembly:AssemblyCopyrightAttribute("Copyright (c) 2007")];
|
||||
[assembly:AssemblyTrademarkAttribute("")];
|
||||
[assembly:AssemblyCultureAttribute("")];
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the value or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly:AssemblyVersionAttribute("1.0.*")];
|
||||
|
||||
[assembly:ComVisible(false)];
|
||||
|
||||
[assembly:CLSCompliantAttribute(true)];
|
||||
|
||||
[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
|
5
ase/net/Stdafx.cpp
Normal file
5
ase/net/Stdafx.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// asenet.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
7
ase/net/Stdafx.h
Normal file
7
ase/net/Stdafx.h
Normal file
@ -0,0 +1,7 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
|
BIN
ase/net/app.ico
Normal file
BIN
ase/net/app.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
63
ase/net/app.rc
Normal file
63
ase/net/app.rc
Normal file
@ -0,0 +1,63 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon placed first or with lowest ID value becomes application icon
|
||||
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
1 ICON "app.ico"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
"\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
242
ase/net/asenet.vcproj
Normal file
242
ase/net/asenet.vcproj
Normal file
@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="asenet"
|
||||
ProjectGUID="{4CBF0E86-D018-49D7-A6B8-0CDA698203F7}"
|
||||
RootNamespace="asenet"
|
||||
Keyword="ManagedCProj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
ManagedExtensions="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(NoInherit)"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
AssemblyDebug="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<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|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
ManagedExtensions="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<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
|
||||
RelativePath="System.dll"
|
||||
AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Data.dll"
|
||||
AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.XML.dll"
|
||||
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\AssemblyInfo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Stdafx.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\app.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\app.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
3
ase/net/resource.h
Normal file
3
ase/net/resource.h
Normal file
@ -0,0 +1,3 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by app.rc
|
398
ase/test/cnt/Awk.cs
Normal file
398
ase/test/cnt/Awk.cs
Normal file
@ -0,0 +1,398 @@
|
||||
/*
|
||||
* $Id: Awk.cs,v 1.1 2007-04-22 08:30:33 bacon Exp $
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
using COM = System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
namespace ASE
|
||||
{
|
||||
public class Awk : ASECOM.IAwkEvents
|
||||
{
|
||||
private ASECOM.Awk awk;
|
||||
|
||||
private int cookie = -1;
|
||||
private COM.IConnectionPoint icp;
|
||||
|
||||
private Stream sourceInputStream = null;
|
||||
private Stream sourceOutputStream = null;
|
||||
private StreamReader sourceInputReader;
|
||||
private StreamWriter sourceOutputWriter;
|
||||
|
||||
private Stream consoleInputStream = null;
|
||||
private Stream consoleOutputStream = null;
|
||||
private StreamReader consoleInputReader;
|
||||
private StreamWriter consoleOutputWriter;
|
||||
|
||||
public delegate object FunctionHandler (object[] args);
|
||||
private System.Collections.Hashtable funcTable;
|
||||
|
||||
public Awk()
|
||||
{
|
||||
this.funcTable = new System.Collections.Hashtable();
|
||||
|
||||
this.awk = new ASECOM.Awk();
|
||||
this.awk.UseLongLong = true;
|
||||
|
||||
COM.IConnectionPointContainer icpc =
|
||||
(COM.IConnectionPointContainer)awk;
|
||||
Guid g = typeof(ASECOM.IAwkEvents).GUID;
|
||||
|
||||
try
|
||||
{
|
||||
icpc.FindConnectionPoint(ref g, out icp);
|
||||
icp.Advise(this, out this.cookie);
|
||||
}
|
||||
catch (System.Runtime.InteropServices.COMException ex)
|
||||
{
|
||||
this.cookie = -1;
|
||||
//System.Windows.Forms.MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/*~Awk()
|
||||
{
|
||||
if (cookie != -1 && icp != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
icp.Unadvise(cookie);
|
||||
cookie = -1;
|
||||
}
|
||||
catch (System.Runtime.InteropServices.COMException ex)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public int ErrorCode
|
||||
{
|
||||
get { return awk.ErrorCode; }
|
||||
}
|
||||
|
||||
public int ErrorLine
|
||||
{
|
||||
get { return awk.ErrorLine; }
|
||||
}
|
||||
|
||||
public string ErrorMessage
|
||||
{
|
||||
get { return awk.ErrorMessage; }
|
||||
}
|
||||
|
||||
public bool ImplicitVariable
|
||||
{
|
||||
get { return awk.ImplicitVariable; }
|
||||
set { awk.ImplicitVariable = value; }
|
||||
}
|
||||
|
||||
public bool ExplicitVariable
|
||||
{
|
||||
get { return awk.ExplicitVariable; }
|
||||
set { awk.ExplicitVariable = value; }
|
||||
}
|
||||
|
||||
public bool UniqueFunction
|
||||
{
|
||||
get { return awk.UniqueFunction; }
|
||||
set { awk.UniqueFunction = value; }
|
||||
}
|
||||
|
||||
public bool VariableShading
|
||||
{
|
||||
get { return awk.VariableShading; }
|
||||
set { awk.VariableShading = value; }
|
||||
}
|
||||
|
||||
public bool ShiftOperators
|
||||
{
|
||||
get { return awk.ShiftOperators; }
|
||||
set { awk.ShiftOperators = value; }
|
||||
}
|
||||
|
||||
public bool IdivOperator
|
||||
{
|
||||
get { return awk.IdivOperator; }
|
||||
set { awk.IdivOperator = value; }
|
||||
}
|
||||
|
||||
public bool ConcatString
|
||||
{
|
||||
get { return awk.ConcatString; }
|
||||
set { awk.ConcatString = value; }
|
||||
}
|
||||
|
||||
public bool SupportExtio
|
||||
{
|
||||
get { return awk.SupportExtio; }
|
||||
set { awk.SupportExtio = value; }
|
||||
}
|
||||
|
||||
public bool SupportBlockless
|
||||
{
|
||||
get { return awk.SupportBlockless; }
|
||||
set { awk.SupportBlockless = value; }
|
||||
}
|
||||
|
||||
public bool StringBaseOne
|
||||
{
|
||||
get { return awk.StringBaseOne; }
|
||||
set { awk.StringBaseOne = value; }
|
||||
}
|
||||
|
||||
public bool StripSpaces
|
||||
{
|
||||
get { return awk.StripSpaces; }
|
||||
set { awk.StripSpaces = value; }
|
||||
}
|
||||
|
||||
public bool Nextofile
|
||||
{
|
||||
get { return awk.Nextofile; }
|
||||
set { awk.Nextofile = value; }
|
||||
}
|
||||
|
||||
public bool Usecrlf
|
||||
{
|
||||
get { return awk.UseCrlf; }
|
||||
set { awk.UseCrlf = value; }
|
||||
}
|
||||
|
||||
public string EntryPoint
|
||||
{
|
||||
get { return awk.EntryPoint; }
|
||||
set { awk.EntryPoint = value; }
|
||||
}
|
||||
|
||||
public bool ArgumentsToEntryPoint
|
||||
{
|
||||
get { return awk.ArgumentsToEntryPoint; }
|
||||
set { awk.ArgumentsToEntryPoint = value; }
|
||||
}
|
||||
|
||||
public bool Debug
|
||||
{
|
||||
get { return awk.Debug; }
|
||||
set { awk.Debug = value; }
|
||||
}
|
||||
|
||||
/* this property doesn't need to be available to the public
|
||||
* as it can be always true in .NET environment. However,
|
||||
* it is kept private here for reference */
|
||||
private bool UseLongLong
|
||||
{
|
||||
get { return awk.UseLongLong; }
|
||||
set { awk.UseLongLong = value; }
|
||||
}
|
||||
|
||||
public int MaxDepthForBlockParse
|
||||
{
|
||||
get { return awk.MaxDepthForBlockParse; }
|
||||
set { awk.MaxDepthForBlockParse = value; }
|
||||
}
|
||||
|
||||
public int MaxDepthForBlockRun
|
||||
{
|
||||
get { return awk.MaxDepthForBlockRun; }
|
||||
set { awk.MaxDepthForBlockRun = value; }
|
||||
}
|
||||
|
||||
public int MaxDepthForExprParse
|
||||
{
|
||||
get { return awk.MaxDepthForExprParse; }
|
||||
set { awk.MaxDepthForExprParse = value; }
|
||||
}
|
||||
|
||||
public int MaxDepthForExprRun
|
||||
{
|
||||
get { return awk.MaxDepthForExprRun; }
|
||||
set { awk.MaxDepthForExprRun = value; }
|
||||
}
|
||||
|
||||
public int MaxDepthForRexBuild
|
||||
{
|
||||
get { return awk.MaxDepthForRexBuild; }
|
||||
set { awk.MaxDepthForRexBuild = value; }
|
||||
}
|
||||
|
||||
public int MaxDepthForRexMatch
|
||||
{
|
||||
get { return awk.MaxDepthForRexMatch; }
|
||||
set { awk.MaxDepthForRexMatch = value; }
|
||||
}
|
||||
|
||||
public virtual bool AddFunction(string name, int minArgs, int maxArgs, FunctionHandler handler)
|
||||
{
|
||||
if (funcTable.ContainsKey(name)) return false;
|
||||
|
||||
funcTable.Add(name, handler);
|
||||
if (!awk.AddFunction(name, minArgs, maxArgs))
|
||||
{
|
||||
funcTable.Remove(name);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool DeleteFunction(string name)
|
||||
{
|
||||
if (!funcTable.ContainsKey(name)) return false;
|
||||
|
||||
if (awk.DeleteFunction(name))
|
||||
{
|
||||
funcTable.Remove(name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool Parse()
|
||||
{
|
||||
return awk.Parse();
|
||||
}
|
||||
|
||||
public virtual bool Run ()
|
||||
{
|
||||
return awk.Run(null);
|
||||
}
|
||||
|
||||
public virtual bool Run(string[] args)
|
||||
{
|
||||
return awk.Run(args);
|
||||
}
|
||||
|
||||
public Stream SourceInputStream
|
||||
{
|
||||
get { return this.sourceInputStream; }
|
||||
set { this.sourceInputStream = value; }
|
||||
}
|
||||
|
||||
public Stream SourceOutputStream
|
||||
{
|
||||
get { return this.sourceOutputStream; }
|
||||
set { this.sourceOutputStream = value; }
|
||||
}
|
||||
|
||||
public Stream ConsoleInputStream
|
||||
{
|
||||
get { return this.consoleInputStream; }
|
||||
set { this.consoleInputStream = value; }
|
||||
}
|
||||
|
||||
public Stream ConsoleOutputStream
|
||||
{
|
||||
get { return this.consoleOutputStream; }
|
||||
set { this.consoleOutputStream = value; }
|
||||
}
|
||||
|
||||
public virtual int OpenSource(ASECOM.AwkSourceMode mode)
|
||||
{
|
||||
if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_READ)
|
||||
{
|
||||
if (this.sourceInputStream == null) return 0;
|
||||
this.sourceInputReader = new StreamReader (this.sourceInputStream);
|
||||
return 1;
|
||||
}
|
||||
else if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_WRITE)
|
||||
{
|
||||
if (this.sourceOutputStream == null) return 0;
|
||||
this.sourceOutputWriter = new StreamWriter (this.sourceOutputStream);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public virtual int CloseSource(ASECOM.AwkSourceMode mode)
|
||||
{
|
||||
if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_READ)
|
||||
{
|
||||
this.sourceInputReader.Close ();
|
||||
return 0;
|
||||
}
|
||||
else if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_WRITE)
|
||||
{
|
||||
this.sourceOutputWriter.Close ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public virtual int ReadSource(ASECOM.Buffer buf)
|
||||
{
|
||||
buf.Value = this.sourceInputReader.ReadLine();
|
||||
if (buf.Value == null) return 0;
|
||||
return buf.Value.Length;
|
||||
}
|
||||
|
||||
public virtual int WriteSource(ASECOM.Buffer buf)
|
||||
{
|
||||
this.sourceOutputWriter.Write(buf.Value);
|
||||
return buf.Value.Length;
|
||||
}
|
||||
|
||||
public virtual int OpenExtio(ASECOM.AwkExtio extio)
|
||||
{
|
||||
if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_WRITE)
|
||||
{
|
||||
if (this.consoleOutputStream == null) return 0;
|
||||
this.consoleOutputWriter = new StreamWriter(this.consoleOutputStream);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public virtual int CloseExtio(ASECOM.AwkExtio extio)
|
||||
{
|
||||
if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_WRITE)
|
||||
{
|
||||
this.consoleOutputWriter.Close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public virtual int ReadExtio(ASECOM.AwkExtio extio, ASECOM.Buffer buf)
|
||||
{
|
||||
throw new Exception("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
public virtual int WriteExtio(ASECOM.AwkExtio extio, ASECOM.Buffer buf)
|
||||
{
|
||||
if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_WRITE)
|
||||
{
|
||||
this.consoleOutputWriter.Write(buf.Value);
|
||||
return buf.Value.Length;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public virtual int FlushExtio(ASECOM.AwkExtio extio)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
public virtual int NextExtio(ASECOM.AwkExtio extio)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public virtual object HandleFunction(string name, object argarray)
|
||||
{
|
||||
FunctionHandler handler = (FunctionHandler)funcTable[name];
|
||||
return handler((object[])argarray);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
ase/test/cnt/StdAwk.cs
Normal file
60
ase/test/cnt/StdAwk.cs
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* $Id: StdAwk.cs,v 1.1 2007-04-22 08:30:33 bacon Exp $
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ASE
|
||||
{
|
||||
public class StdAwk: Awk
|
||||
{
|
||||
public StdAwk(): base ()
|
||||
{
|
||||
AddFunction("sin", 1, 1, new FunctionHandler(handleSin));
|
||||
AddFunction("cos", 1, 1, new FunctionHandler(handleCos));
|
||||
AddFunction("tan", 1, 1, new FunctionHandler(handleTan));
|
||||
}
|
||||
|
||||
protected virtual object handleSin(object[] args)
|
||||
{
|
||||
if (args[0] is System.Double)
|
||||
{
|
||||
return System.Math.Sin((double)args[0]);
|
||||
}
|
||||
else if (args[0] is System.Int32)
|
||||
{
|
||||
return System.Math.Sin((double)(int)args[0]);
|
||||
}
|
||||
else if (args[0] is System.Int64)
|
||||
{
|
||||
return System.Math.Sin((double)(long)args[0]);
|
||||
}
|
||||
else if (args[0] is string)
|
||||
{
|
||||
double t;
|
||||
|
||||
/* TODO: atoi */
|
||||
try { t = System.Double.Parse((string)args[0]); }
|
||||
catch (System.Exception e) { t = 0; }
|
||||
|
||||
return System.Math.Sin(t);
|
||||
}
|
||||
else
|
||||
{
|
||||
return System.Math.Sin(0.0);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual object handleCos(object[] args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected virtual object handleTan(object[] args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
88
ase/test/cnt/asetestcnt.csproj
Normal file
88
ase/test/cnt/asetestcnt.csproj
Normal file
@ -0,0 +1,88 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>asetestcom_net</RootNamespace>
|
||||
<AssemblyName>asecom_net</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Debug\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\Release\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="asecom_net, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<ExecutableExtension>.exe</ExecutableExtension>
|
||||
<HintPath>..\..\release\lib\asecom_net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.ASECOM, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\release\lib\Interop.ASECOM.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AwkForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AwkForm.Designer.cs">
|
||||
<DependentUpon>AwkForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="AwkForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>AwkForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user