From 841afe975d0ad7ac616eb0de82d6ac897e60e5c1 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 20 Sep 2007 00:34:00 +0000 Subject: [PATCH] Recovered from cvs revision 2007-09-19 11:38:00 --- ase/awk/Awk.hpp | 28 ++++++++++++++++++++++------ ase/test/com/Awk.cs | 4 ++-- ase/test/com/StdAwk.cs | 4 ++-- ase/test/com/asecom.csproj | 14 ++++++++++---- 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/ase/awk/Awk.hpp b/ase/awk/Awk.hpp index dfa5ae0b..c82f4373 100644 --- a/ase/awk/Awk.hpp +++ b/ase/awk/Awk.hpp @@ -1,5 +1,5 @@ /* - * $Id: Awk.hpp,v 1.53 2007/09/07 05:40:16 bacon Exp $ + * $Id: Awk.hpp,v 1.54 2007/09/18 14:30:41 bacon Exp $ */ #ifndef _ASE_AWK_AWK_HPP_ @@ -561,13 +561,29 @@ protected: /** * @name Source code I/O handlers - * A subclass should override the following methods to - * support the source code input and output. - * The awk interpreter calls the following methods when - * the parse method is invoked. + * A subclass should override the following methods to support the + * source code input and output. The awk interpreter calls the + * following methods when the parse method is invoked. + * + * To read the source code, the interpter calls Awk::openSource with + * an Awk::Source object whose mode is set to Awk::Source::READ. + * If Awk::openSource returns 1, it calls Awk::readSource with + * the Awk::Source object subsequently until it returns 0. Finally, + * it calls Awk::closeSource with the same Awk::Source object. + * If Awk::openSource returns 0, the interpreter calls Awk::closeSource + * immediately without calling Awk::readSource. If Awk::openSource + * returns -1, Awk::closeSource is not called. If readSource returns + * -1, the source code reading is aborted and Awk::closeSource is + * called. + * + * The interpter is able to write back the internal parse tree + * if openSource returns 1 when the mode of the Source object + * is set to Awk::Source::WRITE. Then it calls writeSource until + * it has finished writing the parse tree, and calls closeSource. + * */ /*@{*/ - /** opens the source stream */ + /** opens the source stream. */ virtual int openSource (Source& io) = 0; /** closes the source stream */ virtual int closeSource (Source& io) = 0; diff --git a/ase/test/com/Awk.cs b/ase/test/com/Awk.cs index d753fe9b..9e5fe8df 100644 --- a/ase/test/com/Awk.cs +++ b/ase/test/com/Awk.cs @@ -1,5 +1,5 @@ /* - * $Id: Awk.cs,v 1.2 2007/09/06 09:37:42 bacon Exp $ + * $Id: Awk.cs,v 1.3 2007/09/18 14:30:41 bacon Exp $ */ using System; @@ -50,7 +50,7 @@ namespace ase.com icpc.FindConnectionPoint(ref g, out icp); icp.Advise(this, out this.cookie); } - catch (System.Runtime.InteropServices.COMException ex) + catch (System.Runtime.InteropServices.COMException) { this.cookie = -1; //System.Windows.Forms.MessageBox.Show(ex.Message); diff --git a/ase/test/com/StdAwk.cs b/ase/test/com/StdAwk.cs index 2e324130..c543ec6f 100644 --- a/ase/test/com/StdAwk.cs +++ b/ase/test/com/StdAwk.cs @@ -1,5 +1,5 @@ /* - * $Id: StdAwk.cs,v 1.1 2007/09/03 03:50:39 bacon Exp $ + * $Id: StdAwk.cs,v 1.2 2007/09/18 14:30:41 bacon Exp $ */ using System; @@ -37,7 +37,7 @@ namespace ase.com /* TODO: atoi */ try { t = System.Double.Parse((string)args[0]); } - catch (System.Exception e) { t = 0; } + catch (System.Exception) { t = 0; } return System.Math.Sin(t); } diff --git a/ase/test/com/asecom.csproj b/ase/test/com/asecom.csproj index 317bccd3..ebdf9899 100644 --- a/ase/test/com/asecom.csproj +++ b/ase/test/com/asecom.csproj @@ -29,10 +29,6 @@ 4 - - False - ..\..\cnt\obj\Debug\Interop.ASECOM.dll - @@ -75,6 +71,16 @@ + + + {F9C69806-16A1-4162-998A-876B33C470BF} + 1 + 0 + 0 + tlbimp + False + +