From 91fbbedd062b4b0ad8396461c399389fca7d8ff5 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 24 Jun 2007 20:14:00 +0000 Subject: [PATCH] Recovered from cvs revision 2007-06-24 11:14:00 --- ase/awk/Awk.cpp | 14 ++++++++++---- ase/awk/Awk.hpp | 11 +++++++---- ase/change.log | 1 + 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ase/awk/Awk.cpp b/ase/awk/Awk.cpp index 0c95a53a..5ef77f72 100644 --- a/ase/awk/Awk.cpp +++ b/ase/awk/Awk.cpp @@ -1,5 +1,5 @@ /* - * $Id: Awk.cpp,v 1.42 2007/06/19 03:59:38 bacon Exp $ + * $Id: Awk.cpp,v 1.43 2007/06/23 17:17:03 bacon Exp $ */ #include @@ -574,14 +574,20 @@ namespace ASE return ase_awk_getmaxdepth (awk, id); } - int Awk::setWord (const ase_char_t* ow, const ase_char_t* nw) + int Awk::setErrorString (ErrorCode num, const char_t* str) + { + ASE_ASSERT (awk != ASE_NULL); + return ase_awk_seterrstr (awk, (int)num, str); + } + + int Awk::setWord (const char_t* ow, const char_t* nw) { return setWord (ow, ase_strlen(ow), nw, ase_strlen(nw)); } int Awk::setWord ( - const ase_char_t* ow, ase_size_t owl, - const ase_char_t* nw, ase_size_t nwl) + const char_t* ow, ase_size_t owl, + const char_t* nw, ase_size_t nwl) { ASE_ASSERT (awk != ASE_NULL); return ase_awk_setword (awk, ow, owl, nw, nwl); diff --git a/ase/awk/Awk.hpp b/ase/awk/Awk.hpp index 9e03680e..103dff71 100644 --- a/ase/awk/Awk.hpp +++ b/ase/awk/Awk.hpp @@ -1,5 +1,5 @@ /* - * $Id: Awk.hpp,v 1.40 2007/06/19 03:59:38 bacon Exp $ + * $Id: Awk.hpp,v 1.41 2007/06/23 17:17:03 bacon Exp $ */ #ifndef _ASE_AWK_AWK_HPP_ @@ -411,11 +411,14 @@ namespace ASE virtual void setMaxDepth (int ids, size_t depth); virtual int getMaxDepth (int id) const; + virtual int setErrorString (ErrorCode num, const char_t* str); + virtual int setWord ( - const ase_char_t* ow, const ase_char_t* nw); + const char_t* ow, const char_t* nw); virtual int setWord ( - const ase_char_t* ow, ase_size_t owl, - const ase_char_t* nw, ase_size_t nwl); + const char_t* ow, ase_size_t owl, + const char_t* nw, ase_size_t nwl); + virtual int parse (); virtual int run (const char_t* main = ASE_NULL, diff --git a/ase/change.log b/ase/change.log index 0aee8e9c..bf901268 100644 --- a/ase/change.log +++ b/ase/change.log @@ -3,6 +3,7 @@ * added ase_awk_setword to enable customization of keywords and intrinsic function names. * added setWord method to the awk c++ class. +* added setErrorString method to the awk c++ class. * changed the wrong macro name WIN32 to _WIN32 in utl/stdio.h * changed test/awk/Awk.cpp to include an option(-w) to utilize