*** empty log message ***

This commit is contained in:
hyung-hwan 2007-04-15 14:25:35 +00:00
parent 8536529c43
commit 8932f06fdd
4 changed files with 124 additions and 124 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp,v 1.32 2007-04-15 13:15:35 bacon Exp $
* $Id: Awk.cpp,v 1.33 2007-04-15 14:25:35 bacon Exp $
*
* {License}
*/
@ -480,7 +480,7 @@ static int __handle_bfn (
return 0;
}
HRESULT CAwk::Parse (int* ret)
HRESULT CAwk::Parse (VARIANT_BOOL* ret)
{
if (handle == NULL)
{
@ -518,7 +518,7 @@ HRESULT CAwk::Parse (int* ret)
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, ASE_AWK_ENOMEM));
*ret = -1;
*ret = VARIANT_FALSE;
DBGOUT (_T("cannot open awk"));
return S_OK;
@ -557,7 +557,7 @@ HRESULT CAwk::Parse (int* ret)
ase_awk_geterror (handle, &errnum, &errlin, &msg);
ase_strxcpy (errmsg, ASE_COUNTOF(errmsg), msg);
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
}
@ -577,12 +577,12 @@ HRESULT CAwk::Parse (int* ret)
DBGOUT (_T("cannot parse the source code"));
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
else DBGOUT (_T("parsed the source code successfully"));
*ret = 0;
*ret = VARIANT_TRUE;
return S_OK;
}
@ -748,7 +748,7 @@ static ase_ssize_t __process_extio (
return -1;
}
HRESULT CAwk::Run (int* ret)
HRESULT CAwk::Run (VARIANT_BOOL* ret)
{
const ase_char_t* entry = NULL;
@ -758,7 +758,7 @@ HRESULT CAwk::Run (int* ret)
errlin = 0;
_tcscpy (errmsg, _T("parse not called yet"));
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
@ -780,17 +780,17 @@ HRESULT CAwk::Run (int* ret)
ase_strxcpy (errmsg, ASE_COUNTOF(errmsg), msg);
DBGOUT (_T("cannot run the program"));
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
else DBGOUT (_T("run the program successfully"));
*ret = 0;
*ret = VARIANT_TRUE;
return S_OK;
}
STDMETHODIMP CAwk::AddFunction (
BSTR name, int min_args, int max_args, int* ret)
BSTR name, int min_args, int max_args, VARIANT_BOOL* ret)
{
bfn_t* bfn;
size_t name_len = SysStringLen(name);
@ -808,7 +808,7 @@ STDMETHODIMP CAwk::AddFunction (
_T("'%.*s' added already"),
bfn->name.len, bfn->name.ptr);
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
}
@ -822,7 +822,7 @@ STDMETHODIMP CAwk::AddFunction (
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, errnum));
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
@ -838,7 +838,7 @@ STDMETHODIMP CAwk::AddFunction (
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, errnum));
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
memcpy (bfn->name.ptr, name, sizeof(TCHAR) * bfn->name.len);
@ -848,11 +848,11 @@ STDMETHODIMP CAwk::AddFunction (
bfn->next = bfn_list;
bfn_list = bfn;
*ret = 0;
*ret = VARIANT_TRUE;
return S_OK;
}
STDMETHODIMP CAwk::DeleteFunction (BSTR name, int* ret)
STDMETHODIMP CAwk::DeleteFunction (BSTR name, VARIANT_BOOL* ret)
{
size_t name_len = SysStringLen(name);
bfn_t* bfn, * next, * prev = NULL;
@ -871,7 +871,7 @@ STDMETHODIMP CAwk::DeleteFunction (BSTR name, int* ret)
if (prev == NULL) bfn_list = next;
else prev->next = next;
*ret = 0;
*ret = VARIANT_TRUE;
return S_OK;
}
@ -884,7 +884,7 @@ STDMETHODIMP CAwk::DeleteFunction (BSTR name, int* ret)
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, errnum));
*ret = -1;
*ret = VARIANT_FALSE;
return S_OK;
}
@ -908,14 +908,14 @@ STDMETHODIMP CAwk::get_ErrorMessage(BSTR *pVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ImplicitVariable(BOOL *pVal)
STDMETHODIMP CAwk::get_ImplicitVariable(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_IMPLICIT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ImplicitVariable(BOOL newVal)
STDMETHODIMP CAwk::put_ImplicitVariable(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_IMPLICIT;
else option = option & ~ASE_AWK_IMPLICIT;
@ -923,14 +923,14 @@ STDMETHODIMP CAwk::put_ImplicitVariable(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ExplicitVariable(BOOL *pVal)
STDMETHODIMP CAwk::get_ExplicitVariable(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_EXPLICIT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ExplicitVariable(BOOL newVal)
STDMETHODIMP CAwk::put_ExplicitVariable(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_EXPLICIT;
else option = option & ~ASE_AWK_EXPLICIT;
@ -938,14 +938,14 @@ STDMETHODIMP CAwk::put_ExplicitVariable(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_UniqueFunction(BOOL *pVal)
STDMETHODIMP CAwk::get_UniqueFunction(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_UNIQUEFN) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_UniqueFunction(BOOL newVal)
STDMETHODIMP CAwk::put_UniqueFunction(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_UNIQUEFN;
else option = option & ~ASE_AWK_UNIQUEFN;
@ -953,14 +953,14 @@ STDMETHODIMP CAwk::put_UniqueFunction(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_VariableShading(BOOL *pVal)
STDMETHODIMP CAwk::get_VariableShading(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_SHADING) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_VariableShading(BOOL newVal)
STDMETHODIMP CAwk::put_VariableShading(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_SHADING;
else option = option & ~ASE_AWK_SHADING;
@ -968,14 +968,14 @@ STDMETHODIMP CAwk::put_VariableShading(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ShiftOperators(BOOL *pVal)
STDMETHODIMP CAwk::get_ShiftOperators(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_SHIFT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ShiftOperators(BOOL newVal)
STDMETHODIMP CAwk::put_ShiftOperators(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_SHIFT;
else option = option & ~ASE_AWK_SHIFT;
@ -983,14 +983,14 @@ STDMETHODIMP CAwk::put_ShiftOperators(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_IdivOperator(BOOL *pVal)
STDMETHODIMP CAwk::get_IdivOperator(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_IDIV) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_IdivOperator(BOOL newVal)
STDMETHODIMP CAwk::put_IdivOperator(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_IDIV;
else option = option & ~ASE_AWK_IDIV;
@ -998,14 +998,14 @@ STDMETHODIMP CAwk::put_IdivOperator(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ConcatString(BOOL *pVal)
STDMETHODIMP CAwk::get_ConcatString(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_STRCONCAT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ConcatString(BOOL newVal)
STDMETHODIMP CAwk::put_ConcatString(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_STRCONCAT;
else option = option & ~ASE_AWK_STRCONCAT;
@ -1013,14 +1013,14 @@ STDMETHODIMP CAwk::put_ConcatString(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_SupportExtio(BOOL *pVal)
STDMETHODIMP CAwk::get_SupportExtio(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_EXTIO) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_SupportExtio(BOOL newVal)
STDMETHODIMP CAwk::put_SupportExtio(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_EXTIO;
else option = option & ~ASE_AWK_EXTIO;
@ -1028,14 +1028,14 @@ STDMETHODIMP CAwk::put_SupportExtio(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_SupportBlockless(BOOL *pVal)
STDMETHODIMP CAwk::get_SupportBlockless(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_BLOCKLESS) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_SupportBlockless(BOOL newVal)
STDMETHODIMP CAwk::put_SupportBlockless(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_BLOCKLESS;
else option = option & ~ASE_AWK_BLOCKLESS;
@ -1043,14 +1043,14 @@ STDMETHODIMP CAwk::put_SupportBlockless(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_StringBaseOne(BOOL *pVal)
STDMETHODIMP CAwk::get_StringBaseOne(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_STRBASEONE) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_StringBaseOne(BOOL newVal)
STDMETHODIMP CAwk::put_StringBaseOne(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_STRBASEONE;
else option = option & ~ASE_AWK_STRBASEONE;
@ -1058,14 +1058,14 @@ STDMETHODIMP CAwk::put_StringBaseOne(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_StripSpaces(BOOL *pVal)
STDMETHODIMP CAwk::get_StripSpaces(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_STRIPSPACES) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_StripSpaces(BOOL newVal)
STDMETHODIMP CAwk::put_StripSpaces(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_STRIPSPACES;
else option = option & ~ASE_AWK_STRIPSPACES;
@ -1073,14 +1073,14 @@ STDMETHODIMP CAwk::put_StripSpaces(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_Nextofile(BOOL *pVal)
STDMETHODIMP CAwk::get_Nextofile(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_NEXTOFILE) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_Nextofile(BOOL newVal)
STDMETHODIMP CAwk::put_Nextofile(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_NEXTOFILE;
else option = option & ~ASE_AWK_NEXTOFILE;
@ -1088,14 +1088,14 @@ STDMETHODIMP CAwk::put_Nextofile(BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_UseCrlf(BOOL *pVal)
STDMETHODIMP CAwk::get_UseCrlf(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_CRLF) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_UseCrlf(BOOL newVal)
STDMETHODIMP CAwk::put_UseCrlf(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_CRLF;
else option = option & ~ASE_AWK_CRLF;
@ -1262,25 +1262,25 @@ STDMETHODIMP CAwk::put_EntryPoint(BSTR newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_Debug(BOOL *pVal)
STDMETHODIMP CAwk::get_Debug(VARIANT_BOOL *pVal)
{
*pVal = debug;
return S_OK;
}
STDMETHODIMP CAwk::put_Debug(BOOL newVal)
STDMETHODIMP CAwk::put_Debug(VARIANT_BOOL newVal)
{
debug = newVal;
return S_OK;
}
STDMETHODIMP CAwk::get_UseLongLong(BOOL *pVal)
STDMETHODIMP CAwk::get_UseLongLong(VARIANT_BOOL *pVal)
{
*pVal = use_longlong;
return S_OK;
}
STDMETHODIMP CAwk::put_UseLongLong(BOOL newVal)
STDMETHODIMP CAwk::put_UseLongLong(VARIANT_BOOL newVal)
{
use_longlong = newVal;
return S_OK;

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.h,v 1.19 2007-04-15 13:15:35 bacon Exp $
* $Id: Awk.h,v 1.20 2007-04-15 14:25:35 bacon Exp $
*
* {License}
*/
@ -77,8 +77,8 @@ public:
} * bfn_list;
BSTR entry_point;
BOOL debug;
BOOL use_longlong;
VARIANT_BOOL debug;
VARIANT_BOOL use_longlong;
public:
CAwk();
~CAwk ();
@ -106,10 +106,10 @@ DECLARE_REGISTRY_RESOURCEID(IDR_AWK)
// IAwk
public:
STDMETHOD(get_UseLongLong)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_UseLongLong)(/*[in]*/ BOOL newVal);
STDMETHOD(get_Debug)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_Debug)(/*[in]*/ BOOL newVal);
STDMETHOD(get_UseLongLong)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_UseLongLong)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_Debug)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_Debug)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_EntryPoint)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(put_EntryPoint)(/*[in]*/ BSTR newVal);
STDMETHOD(get_MaxDepthForRexMatch)(/*[out, retval]*/ int *pVal);
@ -124,40 +124,40 @@ public:
STDMETHOD(put_MaxDepthForBlockRun)(/*[in]*/ int newVal);
STDMETHOD(get_MaxDepthForBlockParse)(/*[out, retval]*/ int *pVal);
STDMETHOD(put_MaxDepthForBlockParse)(/*[in]*/ int newVal);
STDMETHOD(get_UseCrlf)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_UseCrlf)(/*[in]*/ BOOL newVal);
STDMETHOD(get_Nextofile)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_Nextofile)(/*[in]*/ BOOL newVal);
STDMETHOD(get_StripSpaces)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_StripSpaces)(/*[in]*/ BOOL newVal);
STDMETHOD(get_StringBaseOne)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_StringBaseOne)(/*[in]*/ BOOL newVal);
STDMETHOD(get_SupportBlockless)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_SupportBlockless)(/*[in]*/ BOOL newVal);
STDMETHOD(get_SupportExtio)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_SupportExtio)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ConcatString)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ConcatString)(/*[in]*/ BOOL newVal);
STDMETHOD(get_IdivOperator)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_IdivOperator)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ShiftOperators)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ShiftOperators)(/*[in]*/ BOOL newVal);
STDMETHOD(get_VariableShading)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_VariableShading)(/*[in]*/ BOOL newVal);
STDMETHOD(get_UniqueFunction)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_UniqueFunction)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ExplicitVariable)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ExplicitVariable)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ImplicitVariable)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ImplicitVariable)(/*[in]*/ BOOL newVal);
STDMETHOD(get_UseCrlf)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_UseCrlf)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_Nextofile)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_Nextofile)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_StripSpaces)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_StripSpaces)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_StringBaseOne)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_StringBaseOne)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_SupportBlockless)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_SupportBlockless)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_SupportExtio)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_SupportExtio)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ConcatString)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ConcatString)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_IdivOperator)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_IdivOperator)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ShiftOperators)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ShiftOperators)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_VariableShading)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_VariableShading)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_UniqueFunction)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_UniqueFunction)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ExplicitVariable)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ExplicitVariable)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ImplicitVariable)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ImplicitVariable)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ErrorMessage)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_ErrorLine)(/*[out, retval]*/ int *pVal);
STDMETHOD(get_ErrorCode)(/*[out, retval]*/ int *pVal);
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);
HRESULT __stdcall Parse (/*[out, retval]*/ int* ret);
HRESULT __stdcall Run (/*[out, retval]*/ int* ret);
STDMETHOD(DeleteFunction)(/*[in]*/ BSTR name, /*[out, retval]*/ VARIANT_BOOL* ret);
STDMETHOD(AddFunction)(/*[in]*/ BSTR name, /*[in]*/ int min_args, /*[in]*/ int max_args, /*[out, retval]*/ VARIANT_BOOL* ret);
HRESULT __stdcall Parse (/*[out, retval]*/ VARIANT_BOOL* ret);
HRESULT __stdcall Run (/*[out, retval]*/ VARIANT_BOOL* ret);
};
#endif

View File

@ -1,5 +1,5 @@
/*
* $Id: asecom.idl,v 1.3 2007-04-15 13:15:35 bacon Exp $
* $Id: asecom.idl,v 1.4 2007-04-15 14:25:35 bacon Exp $
*/
import "oaidl.idl";
@ -16,16 +16,16 @@ import "ocidl.idl";
interface IAwk : IDispatch
{
[id(1), helpstring("method Parse")]
HRESULT Parse([out,retval] int* ret);
HRESULT Parse([out,retval] VARIANT_BOOL* ret);
[id(2), helpstring("method Run")]
HRESULT Run([out,retval] int* ret);
HRESULT Run([out,retval] VARIANT_BOOL* ret);
[id(3), helpstring("method AddFunction")]
HRESULT AddFunction([in] BSTR name, [in] int min_args, [in] int max_args, [out,retval] int* ret);
HRESULT AddFunction([in] BSTR name, [in] int min_args, [in] int max_args, [out,retval] VARIANT_BOOL* ret);
[id(4), helpstring("method DeleteFunction")]
HRESULT DeleteFunction([in] BSTR name, [out,retval] int* ret);
HRESULT DeleteFunction([in] BSTR name, [out,retval] VARIANT_BOOL* ret);
[propget, id(5), helpstring("property ErrorCode")]
HRESULT ErrorCode([out,retval] int *pVal);
@ -37,69 +37,69 @@ interface IAwk : IDispatch
HRESULT ErrorMessage([out,retval] BSTR *pVal);
[propget, id(8), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([out,retval] BOOL *pVal);
HRESULT ImplicitVariable([out,retval] VARIANT_BOOL *pVal);
[propput, id(8), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([in] BOOL newVal);
HRESULT ImplicitVariable([in] VARIANT_BOOL newVal);
[propget, id(9), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([out,retval] BOOL *pVal);
HRESULT ExplicitVariable([out,retval] VARIANT_BOOL *pVal);
[propput, id(9), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([in] BOOL newVal);
HRESULT ExplicitVariable([in] VARIANT_BOOL newVal);
[propget, id(10), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([out,retval] BOOL *pVal);
HRESULT UniqueFunction([out,retval] VARIANT_BOOL *pVal);
[propput, id(10), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([in] BOOL newVal);
HRESULT UniqueFunction([in] VARIANT_BOOL newVal);
[propget, id(11), helpstring("property VariableShading")]
HRESULT VariableShading([out,retval] BOOL *pVal);
HRESULT VariableShading([out,retval] VARIANT_BOOL *pVal);
[propput, id(11), helpstring("property VariableShading")]
HRESULT VariableShading([in] BOOL newVal);
HRESULT VariableShading([in] VARIANT_BOOL newVal);
[propget, id(12), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([out,retval] BOOL *pVal);
HRESULT ShiftOperators([out,retval] VARIANT_BOOL *pVal);
[propput, id(12), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([in] BOOL newVal);
HRESULT ShiftOperators([in] VARIANT_BOOL newVal);
[propget, id(13), helpstring("property IdivOperator")]
HRESULT IdivOperator([out,retval] BOOL *pVal);
HRESULT IdivOperator([out,retval] VARIANT_BOOL *pVal);
[propput, id(13), helpstring("property IdivOperator")]
HRESULT IdivOperator([in] BOOL newVal);
HRESULT IdivOperator([in] VARIANT_BOOL newVal);
[propget, id(14), helpstring("property ConcatString")]
HRESULT ConcatString([out,retval] BOOL *pVal);
HRESULT ConcatString([out,retval] VARIANT_BOOL *pVal);
[propput, id(14), helpstring("property ConcatString")]
HRESULT ConcatString([in] BOOL newVal);
HRESULT ConcatString([in] VARIANT_BOOL newVal);
[propget, id(15), helpstring("property SupportExtio")]
HRESULT SupportExtio([out,retval] BOOL *pVal);
HRESULT SupportExtio([out,retval] VARIANT_BOOL *pVal);
[propput, id(15), helpstring("property SupportExtio")]
HRESULT SupportExtio([in] BOOL newVal);
HRESULT SupportExtio([in] VARIANT_BOOL newVal);
[propget, id(16), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([out,retval] BOOL *pVal);
HRESULT SupportBlockless([out,retval] VARIANT_BOOL *pVal);
[propput, id(16), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([in] BOOL newVal);
HRESULT SupportBlockless([in] VARIANT_BOOL newVal);
[propget, id(17), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([out,retval] BOOL *pVal);
HRESULT StringBaseOne([out,retval] VARIANT_BOOL *pVal);
[propput, id(17), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([in] BOOL newVal);
HRESULT StringBaseOne([in] VARIANT_BOOL newVal);
[propget, id(18), helpstring("property StripSpaces")]
HRESULT StripSpaces([out,retval] BOOL *pVal);
HRESULT StripSpaces([out,retval] VARIANT_BOOL *pVal);
[propput, id(18), helpstring("property StripSpaces")]
HRESULT StripSpaces([in] BOOL newVal);
HRESULT StripSpaces([in] VARIANT_BOOL newVal);
[propget, id(19), helpstring("property Nextofile")]
HRESULT Nextofile([out,retval] BOOL *pVal);
HRESULT Nextofile([out,retval] VARIANT_BOOL *pVal);
[propput, id(19), helpstring("property Nextofile")]
HRESULT Nextofile([in] BOOL newVal);
HRESULT Nextofile([in] VARIANT_BOOL newVal);
[propget, id(20), helpstring("property UseCrlf")]
HRESULT UseCrlf([out,retval] BOOL *pVal);
HRESULT UseCrlf([out,retval] VARIANT_BOOL *pVal);
[propput, id(20), helpstring("property UseCrlf")]
HRESULT UseCrlf([in] BOOL newVal);
HRESULT UseCrlf([in] VARIANT_BOOL newVal);
[propget, id(21), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([out,retval] int *pVal);
@ -137,14 +137,14 @@ interface IAwk : IDispatch
HRESULT EntryPoint([in] BSTR newVal);
[propget, id(28), helpstring("property Debug")]
HRESULT Debug([out,retval] BOOL *pVal);
HRESULT Debug([out,retval] VARIANT_BOOL *pVal);
[propput, id(28), helpstring("property Debug")]
HRESULT Debug([in] BOOL newVal);
HRESULT Debug([in] VARIANT_BOOL newVal);
[propget, id(29), helpstring("property UseLongLong")]
HRESULT UseLongLong([out,retval] BOOL *pVal);
HRESULT UseLongLong([out,retval] VARIANT_BOOL *pVal);
[propput, id(29), helpstring("property UseLongLong")]
HRESULT UseLongLong([in] BOOL newVal);
HRESULT UseLongLong([in] VARIANT_BOOL newVal);
};
/* ASELib */

View File

@ -175,11 +175,11 @@ Private Sub Execute_Click()
Awk.UseLongLong = False
Awk.Debug = True
If Awk.AddFunction("sin", 1, 1) = -1 Then
If Not Awk.AddFunction("sin", 1, 1) Then
MsgBox "Cannot add builtin function - " + Awk.ErrorMessage
Exit Sub
End If
If Awk.AddFunction("cos", 1, 1) = -1 Then
If Not Awk.AddFunction("cos", 1, 1) Then
MsgBox "Cannot add builtin function - " + Awk.ErrorMessage
Exit Sub
End If
@ -188,11 +188,11 @@ Private Sub Execute_Click()
Call Awk.AddFunction("trim", 1, 1)
'Call Awk.DeleteFunction("tan")
If Awk.Parse() = -1 Then
If Not Awk.Parse() Then
MsgBox "PARSE ERROR [" + Str(Awk.ErrorLine) + "]" + Awk.ErrorMessage
Else
Awk.EntryPoint = Trim(EntryPoint.Text)
If Awk.Run() = -1 Then
If Not Awk.Run() Then
MsgBox "RUN ERROR [" + Str(Awk.ErrorLine) + "]" + Awk.ErrorMessage
End If
End If