*** 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";
@ -21,11 +21,11 @@ interface IAwk : IDispatch
[id(2), helpstring("method Run")]
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);
@ -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,
@ -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"