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}
*/
@ -528,23 +528,23 @@ HRESULT CAwk::Parse (VARIANT_BOOL* ret)
return S_OK;
}
else DBGOUT (_T("opened awk successfully"));
ase_awk_setoption (handle, option);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_BLOCK_PARSE, max_depth.block.parse);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_BLOCK_RUN, max_depth.block.run);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_EXPR_PARSE, max_depth.expr.parse);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_EXPR_RUN, max_depth.expr.run);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_REX_BUILD, max_depth.rex.build);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_REX_MATCH, max_depth.rex.match);
}
ase_awk_setoption (handle, option);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_BLOCK_PARSE, max_depth.block.parse);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_BLOCK_RUN, max_depth.block.run);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_EXPR_PARSE, max_depth.expr.parse);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_EXPR_RUN, max_depth.expr.run);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_REX_BUILD, max_depth.rex.build);
ase_awk_setmaxdepth (handle,
ASE_AWK_DEPTH_REX_MATCH, max_depth.rex.match);
ase_awk_clrbfn (handle);
for (bfn_t* bfn = bfn_list; bfn != NULL; bfn = bfn->next)
@ -981,6 +981,17 @@ STDMETHODIMP CAwk::DeleteFunction (BSTR name, VARIANT_BOOL* ret)
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)
{
*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}
*/
@ -156,6 +156,8 @@ public:
STDMETHOD(get_ErrorLine)(/*[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 (
/*[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";
@ -27,128 +27,131 @@ interface IAwk : IDispatch
[id(4), helpstring("method DeleteFunction")]
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);
[propget, id(6), helpstring("property ErrorLine")]
[propget, id(7), helpstring("property ErrorLine")]
HRESULT ErrorLine([out,retval] int *pVal);
[propget, id(7), helpstring("property ErrorMessage")]
[propget, id(8), helpstring("property ErrorMessage")]
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);
[propput, id(8), helpstring("property ImplicitVariable")]
[propput, id(9), helpstring("property ImplicitVariable")]
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);
[propput, id(9), helpstring("property ExplicitVariable")]
[propput, id(10), helpstring("property ExplicitVariable")]
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);
[propput, id(10), helpstring("property UniqueFunction")]
[propput, id(11), helpstring("property UniqueFunction")]
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);
[propput, id(11), helpstring("property VariableShading")]
[propput, id(12), helpstring("property VariableShading")]
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);
[propput, id(12), helpstring("property ShiftOperators")]
[propput, id(13), helpstring("property ShiftOperators")]
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);
[propput, id(13), helpstring("property IdivOperator")]
[propput, id(14), helpstring("property IdivOperator")]
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);
[propput, id(14), helpstring("property ConcatString")]
[propput, id(15), helpstring("property ConcatString")]
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);
[propput, id(15), helpstring("property SupportExtio")]
[propput, id(16), helpstring("property SupportExtio")]
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);
[propput, id(16), helpstring("property SupportBlockless")]
[propput, id(17), helpstring("property SupportBlockless")]
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);
[propput, id(17), helpstring("property StringBaseOne")]
[propput, id(18), helpstring("property StringBaseOne")]
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);
[propput, id(18), helpstring("property StripSpaces")]
[propput, id(19), helpstring("property StripSpaces")]
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);
[propput, id(19), helpstring("property Nextofile")]
[propput, id(20), helpstring("property Nextofile")]
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);
[propput, id(20), helpstring("property UseCrlf")]
[propput, id(21), helpstring("property UseCrlf")]
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);
[propput, id(21), helpstring("property ArgumentsToEntryPoint")]
[propput, id(22), helpstring("property ArgumentsToEntryPoint")]
HRESULT ArgumentsToEntryPoint([in] VARIANT_BOOL newVal);
[propget, id(22), helpstring("property MaxDepthForBlockParse")]
[propget, id(23), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([out,retval] int *pVal);
[propput, id(22), helpstring("property MaxDepthForBlockParse")]
[propput, id(23), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([in] int newVal);
[propget, id(23), helpstring("property MaxDepthForBlockRun")]
[propget, id(24), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([out,retval] int *pVal);
[propput, id(23), helpstring("property MaxDepthForBlockRun")]
[propput, id(24), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([in] int newVal);
[propget, id(24), helpstring("property MaxDepthForExprParse")]
[propget, id(25), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([out,retval] int *pVal);
[propput, id(24), helpstring("property MaxDepthForExprParse")]
[propput, id(25), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([in] int newVal);
[propget, id(25), helpstring("property MaxDepthForExprRun")]
[propget, id(26), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([out,retval] int *pVal);
[propput, id(25), helpstring("property MaxDepthForExprRun")]
[propput, id(26), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([in] int newVal);
[propget, id(26), helpstring("property MaxDepthForRexBuild")]
[propget, id(27), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([out,retval] int *pVal);
[propput, id(26), helpstring("property MaxDepthForRexBuild")]
[propput, id(27), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([in] int newVal);
[propget, id(27), helpstring("property MaxDepthForRexMatch")]
[propget, id(28), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([out,retval] int *pVal);
[propput, id(27), helpstring("property MaxDepthForRexMatch")]
[propput, id(28), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([in] int newVal);
[propget, id(28), helpstring("property EntryPoint")]
[propget, id(29), helpstring("property EntryPoint")]
HRESULT EntryPoint([out,retval] BSTR *pVal);
[propput, id(28), helpstring("property EntryPoint")]
[propput, id(29), helpstring("property EntryPoint")]
HRESULT EntryPoint([in] BSTR newVal);
[propget, id(29), helpstring("property Debug")]
[propget, id(30), helpstring("property Debug")]
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);
[propget, id(30), helpstring("property UseLongLong")]
[propget, id(31), helpstring("property UseLongLong")]
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);
};