*** empty log message ***

This commit is contained in:
hyung-hwan 2007-04-14 15:30:14 +00:00
parent 7e7e88dc5b
commit 10e4d27cf2
7 changed files with 75 additions and 67 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp,v 1.30 2007-03-24 05:18:31 bacon Exp $
* $Id: Awk.cpp,v 1.31 2007-04-14 15:30:14 bacon Exp $
*
* {License}
*/
@ -442,7 +442,7 @@ static int __handle_bfn (
}
ase_awk_val_t* ret;
int n = awk->Fire_HandleBuiltinFunction (run, name, aa, &ret);
int n = awk->Fire_HandleFunction (run, name, aa, &ret);
if (n == 1)
{
ase_char_t buf[128];
@ -471,7 +471,7 @@ static int __handle_bfn (
return -1;
}
/* name and aa are destroyed in HandleBuiltinFunction */
/* name and aa are destroyed in HandleFunction */
//SafeArrayDestroy (aa);
//SysFreeString (name);
@ -788,7 +788,7 @@ HRESULT CAwk::Run (int* ret)
return S_OK;
}
STDMETHODIMP CAwk::AddBuiltinFunction (
STDMETHODIMP CAwk::AddFunction (
BSTR name, int min_args, int max_args, int* ret)
{
bfn_t* bfn;
@ -851,7 +851,7 @@ STDMETHODIMP CAwk::AddBuiltinFunction (
return S_OK;
}
STDMETHODIMP CAwk::DeleteBuiltinFunction (BSTR name, int* ret)
STDMETHODIMP CAwk::DeleteFunction (BSTR name, int* ret)
{
size_t name_len = SysStringLen(name);
bfn_t* bfn, * next, * prev = NULL;

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.h,v 1.17 2007-03-24 05:18:32 bacon Exp $
* $Id: Awk.h,v 1.18 2007-04-14 15:30:14 bacon Exp $
*
* {License}
*/
@ -152,8 +152,8 @@ public:
STDMETHOD(get_ErrorMessage)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_ErrorLine)(/*[out, retval]*/ int *pVal);
STDMETHOD(get_ErrorCode)(/*[out, retval]*/ int *pVal);
STDMETHOD(DeleteBuiltinFunction)(/*[in]*/ BSTR name, /*[out, retval]*/ int* ret);
STDMETHOD(AddBuiltinFunction)(/*[in]*/ BSTR name, /*[in]*/ int min_args, /*[in]*/ int max_args, /*[out, retval]*/ int* ret);
STDMETHOD(DeleteFunction)(/*[in]*/ BSTR name, /*[out, retval]*/ int* ret);
STDMETHOD(AddFunction)(/*[in]*/ BSTR name, /*[in]*/ int min_args, /*[in]*/ int max_args, /*[out, retval]*/ int* ret);
STDMETHOD(get_UseLongLong)(/*[out, retval]*/ BOOL *pVal);
HRESULT __stdcall Parse (/*[out, retval]*/ int* ret);
HRESULT __stdcall Run (/*[out, retval]*/ int* ret);

View File

@ -1,5 +1,5 @@
/*
* $Id: asecom.idl,v 1.1 2007-03-24 05:18:32 bacon Exp $
* $Id: asecom.idl,v 1.2 2007-04-14 15:30:14 bacon Exp $
*/
import "oaidl.idl";
@ -16,133 +16,133 @@ import "ocidl.idl";
interface IAwk : IDispatch
{
[id(1), helpstring("method Parse")]
HRESULT Parse([out, retval] int* ret);
HRESULT Parse([out,retval] int* ret);
[id(2), helpstring("method Run")]
HRESULT Run([out, retval] int* ret);
HRESULT Run([out,retval] int* ret);
[id(3), helpstring("method AddBuiltinFunction")]
HRESULT AddBuiltinFunction([in] BSTR name, [in] int min_args, [in] int max_args, [out, retval] int* ret);
[id(3), helpstring("method AddFunction")]
HRESULT AddFunction([in] BSTR name, [in] int min_args, [in] int max_args, [out,retval] int* ret);
[id(4), helpstring("method DeleteBuiltinFunction")]
HRESULT DeleteBuiltinFunction([in] BSTR name, [out, retval] int* ret);
[id(4), helpstring("method DeleteFunction")]
HRESULT DeleteFunction([in] BSTR name, [out,retval] int* ret);
[propget, id(5), helpstring("property ErrorCode")]
HRESULT ErrorCode([out, retval] int *pVal);
HRESULT ErrorCode([out,retval] int *pVal);
[propget, id(6), helpstring("property ErrorLine")]
HRESULT ErrorLine([out, retval] int *pVal);
HRESULT ErrorLine([out,retval] int *pVal);
[propget, id(7), helpstring("property ErrorMessage")]
HRESULT ErrorMessage([out, retval] BSTR *pVal);
HRESULT ErrorMessage([out,retval] BSTR *pVal);
[propget, id(8), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([out, retval] BOOL *pVal);
HRESULT ImplicitVariable([out,retval] BOOL *pVal);
[propput, id(8), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([in] BOOL newVal);
[propget, id(9), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([out, retval] BOOL *pVal);
HRESULT ExplicitVariable([out,retval] BOOL *pVal);
[propput, id(9), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([in] BOOL newVal);
[propget, id(10), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([out, retval] BOOL *pVal);
HRESULT UniqueFunction([out,retval] BOOL *pVal);
[propput, id(10), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([in] BOOL newVal);
[propget, id(11), helpstring("property VariableShading")]
HRESULT VariableShading([out, retval] BOOL *pVal);
HRESULT VariableShading([out,retval] BOOL *pVal);
[propput, id(11), helpstring("property VariableShading")]
HRESULT VariableShading([in] BOOL newVal);
[propget, id(12), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([out, retval] BOOL *pVal);
HRESULT ShiftOperators([out,retval] BOOL *pVal);
[propput, id(12), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([in] BOOL newVal);
[propget, id(13), helpstring("property IdivOperator")]
HRESULT IdivOperator([out, retval] BOOL *pVal);
HRESULT IdivOperator([out,retval] BOOL *pVal);
[propput, id(13), helpstring("property IdivOperator")]
HRESULT IdivOperator([in] BOOL newVal);
[propget, id(14), helpstring("property ConcatString")]
HRESULT ConcatString([out, retval] BOOL *pVal);
HRESULT ConcatString([out,retval] BOOL *pVal);
[propput, id(14), helpstring("property ConcatString")]
HRESULT ConcatString([in] BOOL newVal);
[propget, id(15), helpstring("property SupportExtio")]
HRESULT SupportExtio([out, retval] BOOL *pVal);
HRESULT SupportExtio([out,retval] BOOL *pVal);
[propput, id(15), helpstring("property SupportExtio")]
HRESULT SupportExtio([in] BOOL newVal);
[propget, id(16), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([out, retval] BOOL *pVal);
HRESULT SupportBlockless([out,retval] BOOL *pVal);
[propput, id(16), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([in] BOOL newVal);
[propget, id(17), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([out, retval] BOOL *pVal);
HRESULT StringBaseOne([out,retval] BOOL *pVal);
[propput, id(17), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([in] BOOL newVal);
[propget, id(18), helpstring("property StripSpaces")]
HRESULT StripSpaces([out, retval] BOOL *pVal);
HRESULT StripSpaces([out,retval] BOOL *pVal);
[propput, id(18), helpstring("property StripSpaces")]
HRESULT StripSpaces([in] BOOL newVal);
[propget, id(19), helpstring("property Nextofile")]
HRESULT Nextofile([out, retval] BOOL *pVal);
HRESULT Nextofile([out,retval] BOOL *pVal);
[propput, id(19), helpstring("property Nextofile")]
HRESULT Nextofile([in] BOOL newVal);
[propget, id(20), helpstring("property UseCrlf")]
HRESULT UseCrlf([out, retval] BOOL *pVal);
HRESULT UseCrlf([out,retval] BOOL *pVal);
[propput, id(20), helpstring("property UseCrlf")]
HRESULT UseCrlf([in] BOOL newVal);
[propget, id(21), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([out, retval] int *pVal);
HRESULT MaxDepthForBlockParse([out,retval] int *pVal);
[propput, id(21), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([in] int newVal);
[propget, id(22), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([out, retval] int *pVal);
HRESULT MaxDepthForBlockRun([out,retval] int *pVal);
[propput, id(22), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([in] int newVal);
[propget, id(23), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([out, retval] int *pVal);
HRESULT MaxDepthForExprParse([out,retval] int *pVal);
[propput, id(23), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([in] int newVal);
[propget, id(24), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([out, retval] int *pVal);
HRESULT MaxDepthForExprRun([out,retval] int *pVal);
[propput, id(24), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([in] int newVal);
[propget, id(25), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([out, retval] int *pVal);
HRESULT MaxDepthForRexBuild([out,retval] int *pVal);
[propput, id(25), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([in] int newVal);
[propget, id(26), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([out, retval] int *pVal);
HRESULT MaxDepthForRexMatch([out,retval] int *pVal);
[propput, id(26), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([in] int newVal);
[propget, id(27), helpstring("property EntryPoint")]
HRESULT EntryPoint([out, retval] BSTR *pVal);
HRESULT EntryPoint([out,retval] BSTR *pVal);
[propput, id(27), helpstring("property EntryPoint")]
HRESULT EntryPoint([in] BSTR newVal);
[propget, id(28), helpstring("property Debug")]
HRESULT Debug([out, retval] BOOL *pVal);
HRESULT Debug([out,retval] BOOL *pVal);
[propput, id(28), helpstring("property Debug")]
HRESULT Debug([in] BOOL newVal);
[propget, id(29), helpstring("property UseLongLong")]
HRESULT UseLongLong([out, retval] BOOL *pVal);
HRESULT UseLongLong([out,retval] BOOL *pVal);
[propput, id(29), helpstring("property UseLongLong")]
HRESULT UseLongLong([in] BOOL newVal);
};
@ -158,7 +158,14 @@ library ASELib
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[helpstring("AwkExtio tpe")]
[helpstring("Awk source mode")]
typedef [v1_enum] enum AwkSourceMode
{
AWK_SOURCE_READ = 0,
AWK_SOURCE_WRITE = 1
} AwkSourceMode;
[helpstring("AwkExtio type")]
typedef [v1_enum] enum AwkExtioType
{
AWK_EXTIO_PIPE = 0,
@ -196,7 +203,7 @@ library ASELib
interface IBuffer : IDispatch
{
[propget, id(1), helpstring("property Value")]
HRESULT Value([out, retval] BSTR *pVal);
HRESULT Value([out,retval] BSTR *pVal);
[propput, id(1), helpstring("property Value")]
HRESULT Value([in] BSTR newVal);
@ -213,16 +220,16 @@ library ASELib
interface IAwkExtio : IDispatch
{
[propget, id(1), helpstring("property Name")]
HRESULT Name([out, retval] BSTR *pVal);
HRESULT Name([out,retval] BSTR *pVal);
[propget, id(2), helpstring("property Type")]
HRESULT Type([out, retval] int *pVal);
HRESULT Type([out,retval] int *pVal);
[propget, id(3), helpstring("property Mode")]
HRESULT Mode([out, retval] int *pVal);
HRESULT Mode([out,retval] int *pVal);
[propget, id(4), helpstring("property Handle")]
HRESULT Handle([out, retval] VARIANT *pVal);
HRESULT Handle([out,retval] VARIANT *pVal);
[propput, id(4), helpstring("property Handle")]
HRESULT Handle([in] VARIANT newVal);
};
@ -237,37 +244,37 @@ library ASELib
properties:
methods:
[id(1), helpstring("open the source code")]
int OpenSource([in] int mode);
HRESULT OpenSource([in] AwkSourceMode mode, [out,retval] int* ret);
[id(2), helpstring("close the source code")]
int CloseSource([in] int mode);
HRESULT CloseSource([in] AwkSourceMode mode, [out,retval] int* ret);
[id(3), helpstring("read the source code")]
int ReadSource([in] IBuffer* buf);
HRESULT ReadSource([in] IBuffer* buf, [out,retval] int* ret);
[id(4), helpstring("write the source code")]
int WriteSource([in] IBuffer* buf);
HRESULT WriteSource([in] IBuffer* buf, [out,retval] int* ret);
[id(5), helpstring("method OpenExtio")]
int OpenExtio([in] IAwkExtio* extio);
HRESULT OpenExtio([in] IAwkExtio* extio, [out,retval] int* ret);
[id(6), helpstring("method CloseExtio")]
int CloseExtio([in] IAwkExtio* extio);
HRESULT CloseExtio([in] IAwkExtio* extio, [out,retval] int* ret);
[id(7), helpstring("method ReadExtio")]
int ReadExtio([in] IAwkExtio* extio, [in] IBuffer* buf);
HRESULT ReadExtio([in] IAwkExtio* extio, [in] IBuffer* buf, [out,retval] int* ret);
[id(8), helpstring("method WriteExtio")]
int WriteExtio([in] IAwkExtio* extio, [in] IBuffer* buf);
HRESULT WriteExtio([in] IAwkExtio* extio, [in] IBuffer* buf, [out,retval] int* ret);
[id(9), helpstring("method FlushExtio")]
int FlushExtio([in] IAwkExtio* extio);
HRESULT FlushExtio([in] IAwkExtio* extio, [out,retval] int* ret);
[id(10), helpstring("method NextExtio")]
int NextExtio([in] IAwkExtio* extio);
HRESULT NextExtio([in] IAwkExtio* extio, [out,retval] int* ret);
[id(11), helpstring("method HandleBuiltinFunction")]
int HandleBuiltinFunction([in] BSTR name, [in] VARIANT argarray, [out, retval] VARIANT* ret);
[id(11), helpstring("method HandleFunction")]
HRESULT HandleFunction([in] BSTR name, [in] VARIANT argarray, [out,retval] VARIANT* ret);
};
/* Awk */

View File

@ -1,5 +1,5 @@
/*
* $Id: awk_cp.h,v 1.9 2007-02-03 10:52:12 bacon Exp $
* $Id: awk_cp.h,v 1.10 2007-04-14 15:30:14 bacon Exp $
*
* {License}
*/
@ -506,7 +506,7 @@ public:
return -1;
}
int Fire_HandleBuiltinFunction (
int Fire_HandleFunction (
ase_awk_run_t* run, BSTR name, SAFEARRAY* argarray, ase_awk_val_t** retv)
{
T* pT = static_cast<T*>(this);
@ -595,7 +595,6 @@ public:
return 2; /* no proper handler */
}
};
#endif

View File

@ -1,5 +1,5 @@
/*
* $Id: mem.c,v 1.35 2007-04-13 10:06:25 bacon Exp $
* $Id: mem.c,v 1.36 2007-04-14 15:30:14 bacon Exp $
*
* {License}
*/
@ -350,6 +350,7 @@ static void __sweep_unmarked_objs (ase_lsp_mem_t* mem)
ASE_LSP_PERM(obj) == 0)
{
/* dispose of unused objects */
/*
if (i == ASE_LSP_OBJ_INT)
ase_printf (ASE_T("disposing....%d [%d]\n"), i, (int)ASE_LSP_IVAL(obj));
if (i == ASE_LSP_OBJ_REAL)
@ -360,6 +361,7 @@ else if (i == ASE_LSP_OBJ_STR)
ase_printf (ASE_T("disposing....%d [%s]\n"), i, ASE_LSP_STRPTR(obj));
else
ase_printf (ASE_T("disposing....%d\n"), i);
*/
ase_lsp_dispose (mem, prev, obj);
}
else

View File

@ -184,7 +184,7 @@ Private Sub Execute_Click()
Exit Sub
End If
Call Awk.AddBuiltinFunction("tan", 1, 1)
Call Awk.AddBuiltinFunction("sqr", 1, 1)
Call Awk.AddBuiltinFunction("sqrt", 1, 1)
Call Awk.AddBuiltinFunction("trim", 1, 1)
'Call Awk.DeleteBuiltinFunction("tan")
@ -201,11 +201,11 @@ Private Sub Execute_Click()
End Sub
Function Awk_OpenSource(ByVal mode As Long) As Long
Function Awk_OpenSource(ByVal mode As ASELib.AwkSourceMode) As Long
Awk_OpenSource = 1
End Function
Function Awk_CloseSource(ByVal mode As Long) As Long
Function Awk_CloseSource(ByVal mode As ASELib.AwkSourceMode) As Long
Awk_CloseSource = 0
End Function
@ -435,7 +435,7 @@ Function Awk_HandleBuiltinFunction(ByVal name As String, ByVal args As Variant)
ElseIf TypeName(args(0)) = "Null" Then
Awk_HandleBuiltinFunction = Tan(0)
End If
ElseIf name = "sqr" Then
ElseIf name = "sqrt" Then
If IsNull(args(0)) Then
Awk_HandleBuiltinFunction = Sqr(0)
ElseIf IsNumeric(args(0)) Then

View File

@ -1,6 +1,6 @@
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOWS\System32\stdole2.tlb#OLE Automation
Reference=*\G{F9C69806-16A1-4162-998A-876B33C470BF}#1.0#0#..\..\debug\ase.dll#ASE Awk 1.0 Type Library
Reference=*\G{F9C69806-16A1-4162-998A-876B33C470BF}#1.0#0#..\..\release\lib\asecom.dll#ASE Awk 1.0 Type Library
Form=AwkForm.frm
Class=AwkExtioConsole; AwkExtioConsole.cls
IconForm="AwkForm"