Recovered from cvs revision 2007-06-28 15:13:00

This commit is contained in:
hyung-hwan 2007-06-29 00:45:00 +00:00
parent e4fcbe9db9
commit 135bfc1626
3 changed files with 83 additions and 67 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: Awk.cpp,v 1.3 2007/04/30 06:04:43 bacon Exp $ * $Id: Awk.cpp,v 1.4 2007/06/27 15:27:21 bacon Exp $
* *
* {License} * {License}
*/ */
@ -528,6 +528,7 @@ HRESULT CAwk::Parse (VARIANT_BOOL* ret)
return S_OK; return S_OK;
} }
else DBGOUT (_T("opened awk successfully")); else DBGOUT (_T("opened awk successfully"));
}
ase_awk_setoption (handle, option); ase_awk_setoption (handle, option);
@ -543,7 +544,6 @@ HRESULT CAwk::Parse (VARIANT_BOOL* ret)
ASE_AWK_DEPTH_REX_BUILD, max_depth.rex.build); ASE_AWK_DEPTH_REX_BUILD, max_depth.rex.build);
ase_awk_setmaxdepth (handle, ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_REX_MATCH, max_depth.rex.match); ASE_AWK_DEPTH_REX_MATCH, max_depth.rex.match);
}
ase_awk_clrbfn (handle); ase_awk_clrbfn (handle);
@ -981,6 +981,17 @@ STDMETHODIMP CAwk::DeleteFunction (BSTR name, VARIANT_BOOL* ret)
return S_OK; return S_OK;
} }
STDMETHODIMP CAwk::SetWord (BSTR ow, BSTR nw, VARIANT_BOOL* ret)
{
size_t ow_len = SysStringLen(ow);
size_t nw_len = SysStringLen(nw);
// TODO:
*ret = (ase_awk_setword (handle, ow, ow_len, nw, nw_len) == -1)?
VARIANT_FALSE: VARIANT_TRUE;
return S_OK;
}
STDMETHODIMP CAwk::get_ErrorCode(int *pVal) STDMETHODIMP CAwk::get_ErrorCode(int *pVal)
{ {
*pVal = errnum; *pVal = errnum;

View File

@ -1,5 +1,5 @@
/* /*
* $Id: Awk.h,v 1.3 2007/04/30 06:04:43 bacon Exp $ * $Id: Awk.h,v 1.4 2007/06/27 15:27:21 bacon Exp $
* *
* {License} * {License}
*/ */
@ -156,6 +156,8 @@ public:
STDMETHOD(get_ErrorLine)(/*[out, retval]*/ int *pVal); STDMETHOD(get_ErrorLine)(/*[out, retval]*/ int *pVal);
STDMETHOD(get_ErrorCode)(/*[out, retval]*/ int *pVal); STDMETHOD(get_ErrorCode)(/*[out, retval]*/ int *pVal);
HRESULT __stdcall SetWord (
/*[in]*/ BSTR ow, /*[in]*/ BSTR nw, /*[out, retval]*/ VARIANT_BOOL* ret);
HRESULT __stdcall DeleteFunction ( HRESULT __stdcall DeleteFunction (
/*[in]*/ BSTR name, /*[out, retval]*/ VARIANT_BOOL* ret); /*[in]*/ BSTR name, /*[out, retval]*/ VARIANT_BOOL* ret);

View File

@ -1,5 +1,5 @@
/* /*
* $Id: asecom.idl,v 1.3 2007/04/30 06:04:43 bacon Exp $ * $Id: asecom.idl,v 1.4 2007/06/27 15:27:21 bacon Exp $
*/ */
import "oaidl.idl"; import "oaidl.idl";
@ -27,128 +27,131 @@ interface IAwk : IDispatch
[id(4), helpstring("method DeleteFunction")] [id(4), helpstring("method DeleteFunction")]
HRESULT DeleteFunction([in] BSTR name, [out,retval] VARIANT_BOOL* ret); HRESULT DeleteFunction([in] BSTR name, [out,retval] VARIANT_BOOL* ret);
[propget, id(5), helpstring("property ErrorCode")] [id(5), helpstring("method SetWord")]
HRESULT SetWord([in] BSTR ow, [in] BSTR nw, [out,retval] VARIANT_BOOL* ret);
[propget, id(6), helpstring("property ErrorCode")]
HRESULT ErrorCode([out,retval] int *pVal); HRESULT ErrorCode([out,retval] int *pVal);
[propget, id(6), helpstring("property ErrorLine")] [propget, id(7), helpstring("property ErrorLine")]
HRESULT ErrorLine([out,retval] int *pVal); HRESULT ErrorLine([out,retval] int *pVal);
[propget, id(7), helpstring("property ErrorMessage")] [propget, id(8), helpstring("property ErrorMessage")]
HRESULT ErrorMessage([out,retval] BSTR *pVal); HRESULT ErrorMessage([out,retval] BSTR *pVal);
[propget, id(8), helpstring("property ImplicitVariable")] [propget, id(9), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([out,retval] VARIANT_BOOL *pVal); HRESULT ImplicitVariable([out,retval] VARIANT_BOOL *pVal);
[propput, id(8), helpstring("property ImplicitVariable")] [propput, id(9), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([in] VARIANT_BOOL newVal); HRESULT ImplicitVariable([in] VARIANT_BOOL newVal);
[propget, id(9), helpstring("property ExplicitVariable")] [propget, id(10), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([out,retval] VARIANT_BOOL *pVal); HRESULT ExplicitVariable([out,retval] VARIANT_BOOL *pVal);
[propput, id(9), helpstring("property ExplicitVariable")] [propput, id(10), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([in] VARIANT_BOOL newVal); HRESULT ExplicitVariable([in] VARIANT_BOOL newVal);
[propget, id(10), helpstring("property UniqueFunction")] [propget, id(11), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([out,retval] VARIANT_BOOL *pVal); HRESULT UniqueFunction([out,retval] VARIANT_BOOL *pVal);
[propput, id(10), helpstring("property UniqueFunction")] [propput, id(11), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([in] VARIANT_BOOL newVal); HRESULT UniqueFunction([in] VARIANT_BOOL newVal);
[propget, id(11), helpstring("property VariableShading")] [propget, id(12), helpstring("property VariableShading")]
HRESULT VariableShading([out,retval] VARIANT_BOOL *pVal); HRESULT VariableShading([out,retval] VARIANT_BOOL *pVal);
[propput, id(11), helpstring("property VariableShading")] [propput, id(12), helpstring("property VariableShading")]
HRESULT VariableShading([in] VARIANT_BOOL newVal); HRESULT VariableShading([in] VARIANT_BOOL newVal);
[propget, id(12), helpstring("property ShiftOperators")] [propget, id(13), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([out,retval] VARIANT_BOOL *pVal); HRESULT ShiftOperators([out,retval] VARIANT_BOOL *pVal);
[propput, id(12), helpstring("property ShiftOperators")] [propput, id(13), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([in] VARIANT_BOOL newVal); HRESULT ShiftOperators([in] VARIANT_BOOL newVal);
[propget, id(13), helpstring("property IdivOperator")] [propget, id(14), helpstring("property IdivOperator")]
HRESULT IdivOperator([out,retval] VARIANT_BOOL *pVal); HRESULT IdivOperator([out,retval] VARIANT_BOOL *pVal);
[propput, id(13), helpstring("property IdivOperator")] [propput, id(14), helpstring("property IdivOperator")]
HRESULT IdivOperator([in] VARIANT_BOOL newVal); HRESULT IdivOperator([in] VARIANT_BOOL newVal);
[propget, id(14), helpstring("property ConcatString")] [propget, id(15), helpstring("property ConcatString")]
HRESULT ConcatString([out,retval] VARIANT_BOOL *pVal); HRESULT ConcatString([out,retval] VARIANT_BOOL *pVal);
[propput, id(14), helpstring("property ConcatString")] [propput, id(15), helpstring("property ConcatString")]
HRESULT ConcatString([in] VARIANT_BOOL newVal); HRESULT ConcatString([in] VARIANT_BOOL newVal);
[propget, id(15), helpstring("property SupportExtio")] [propget, id(16), helpstring("property SupportExtio")]
HRESULT SupportExtio([out,retval] VARIANT_BOOL *pVal); HRESULT SupportExtio([out,retval] VARIANT_BOOL *pVal);
[propput, id(15), helpstring("property SupportExtio")] [propput, id(16), helpstring("property SupportExtio")]
HRESULT SupportExtio([in] VARIANT_BOOL newVal); HRESULT SupportExtio([in] VARIANT_BOOL newVal);
[propget, id(16), helpstring("property SupportBlockless")] [propget, id(17), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([out,retval] VARIANT_BOOL *pVal); HRESULT SupportBlockless([out,retval] VARIANT_BOOL *pVal);
[propput, id(16), helpstring("property SupportBlockless")] [propput, id(17), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([in] VARIANT_BOOL newVal); HRESULT SupportBlockless([in] VARIANT_BOOL newVal);
[propget, id(17), helpstring("property StringBaseOne")] [propget, id(18), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([out,retval] VARIANT_BOOL *pVal); HRESULT StringBaseOne([out,retval] VARIANT_BOOL *pVal);
[propput, id(17), helpstring("property StringBaseOne")] [propput, id(18), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([in] VARIANT_BOOL newVal); HRESULT StringBaseOne([in] VARIANT_BOOL newVal);
[propget, id(18), helpstring("property StripSpaces")] [propget, id(19), helpstring("property StripSpaces")]
HRESULT StripSpaces([out,retval] VARIANT_BOOL *pVal); HRESULT StripSpaces([out,retval] VARIANT_BOOL *pVal);
[propput, id(18), helpstring("property StripSpaces")] [propput, id(19), helpstring("property StripSpaces")]
HRESULT StripSpaces([in] VARIANT_BOOL newVal); HRESULT StripSpaces([in] VARIANT_BOOL newVal);
[propget, id(19), helpstring("property Nextofile")] [propget, id(20), helpstring("property Nextofile")]
HRESULT Nextofile([out,retval] VARIANT_BOOL *pVal); HRESULT Nextofile([out,retval] VARIANT_BOOL *pVal);
[propput, id(19), helpstring("property Nextofile")] [propput, id(20), helpstring("property Nextofile")]
HRESULT Nextofile([in] VARIANT_BOOL newVal); HRESULT Nextofile([in] VARIANT_BOOL newVal);
[propget, id(20), helpstring("property UseCrlf")] [propget, id(21), helpstring("property UseCrlf")]
HRESULT UseCrlf([out,retval] VARIANT_BOOL *pVal); HRESULT UseCrlf([out,retval] VARIANT_BOOL *pVal);
[propput, id(20), helpstring("property UseCrlf")] [propput, id(21), helpstring("property UseCrlf")]
HRESULT UseCrlf([in] VARIANT_BOOL newVal); HRESULT UseCrlf([in] VARIANT_BOOL newVal);
[propget, id(21), helpstring("property ArgumentsToEntryPoint")] [propget, id(22), helpstring("property ArgumentsToEntryPoint")]
HRESULT ArgumentsToEntryPoint([out,retval] VARIANT_BOOL *pVal); HRESULT ArgumentsToEntryPoint([out,retval] VARIANT_BOOL *pVal);
[propput, id(21), helpstring("property ArgumentsToEntryPoint")] [propput, id(22), helpstring("property ArgumentsToEntryPoint")]
HRESULT ArgumentsToEntryPoint([in] VARIANT_BOOL newVal); HRESULT ArgumentsToEntryPoint([in] VARIANT_BOOL newVal);
[propget, id(22), helpstring("property MaxDepthForBlockParse")] [propget, id(23), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([out,retval] int *pVal); HRESULT MaxDepthForBlockParse([out,retval] int *pVal);
[propput, id(22), helpstring("property MaxDepthForBlockParse")] [propput, id(23), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([in] int newVal); HRESULT MaxDepthForBlockParse([in] int newVal);
[propget, id(23), helpstring("property MaxDepthForBlockRun")] [propget, id(24), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([out,retval] int *pVal); HRESULT MaxDepthForBlockRun([out,retval] int *pVal);
[propput, id(23), helpstring("property MaxDepthForBlockRun")] [propput, id(24), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([in] int newVal); HRESULT MaxDepthForBlockRun([in] int newVal);
[propget, id(24), helpstring("property MaxDepthForExprParse")] [propget, id(25), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([out,retval] int *pVal); HRESULT MaxDepthForExprParse([out,retval] int *pVal);
[propput, id(24), helpstring("property MaxDepthForExprParse")] [propput, id(25), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([in] int newVal); HRESULT MaxDepthForExprParse([in] int newVal);
[propget, id(25), helpstring("property MaxDepthForExprRun")] [propget, id(26), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([out,retval] int *pVal); HRESULT MaxDepthForExprRun([out,retval] int *pVal);
[propput, id(25), helpstring("property MaxDepthForExprRun")] [propput, id(26), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([in] int newVal); HRESULT MaxDepthForExprRun([in] int newVal);
[propget, id(26), helpstring("property MaxDepthForRexBuild")] [propget, id(27), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([out,retval] int *pVal); HRESULT MaxDepthForRexBuild([out,retval] int *pVal);
[propput, id(26), helpstring("property MaxDepthForRexBuild")] [propput, id(27), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([in] int newVal); HRESULT MaxDepthForRexBuild([in] int newVal);
[propget, id(27), helpstring("property MaxDepthForRexMatch")] [propget, id(28), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([out,retval] int *pVal); HRESULT MaxDepthForRexMatch([out,retval] int *pVal);
[propput, id(27), helpstring("property MaxDepthForRexMatch")] [propput, id(28), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([in] int newVal); HRESULT MaxDepthForRexMatch([in] int newVal);
[propget, id(28), helpstring("property EntryPoint")] [propget, id(29), helpstring("property EntryPoint")]
HRESULT EntryPoint([out,retval] BSTR *pVal); HRESULT EntryPoint([out,retval] BSTR *pVal);
[propput, id(28), helpstring("property EntryPoint")] [propput, id(29), helpstring("property EntryPoint")]
HRESULT EntryPoint([in] BSTR newVal); HRESULT EntryPoint([in] BSTR newVal);
[propget, id(29), helpstring("property Debug")] [propget, id(30), helpstring("property Debug")]
HRESULT Debug([out,retval] VARIANT_BOOL *pVal); HRESULT Debug([out,retval] VARIANT_BOOL *pVal);
[propput, id(29), helpstring("property Debug")] [propput, id(30), helpstring("property Debug")]
HRESULT Debug([in] VARIANT_BOOL newVal); HRESULT Debug([in] VARIANT_BOOL newVal);
[propget, id(30), helpstring("property UseLongLong")] [propget, id(31), helpstring("property UseLongLong")]
HRESULT UseLongLong([out,retval] VARIANT_BOOL *pVal); HRESULT UseLongLong([out,retval] VARIANT_BOOL *pVal);
[propput, id(30), helpstring("property UseLongLong")] [propput, id(31), helpstring("property UseLongLong")]
HRESULT UseLongLong([in] VARIANT_BOOL newVal); HRESULT UseLongLong([in] VARIANT_BOOL newVal);
}; };