Recovered from cvs revision 2007-06-24 11:14:00

This commit is contained in:
hyung-hwan 2007-06-24 20:14:00 +00:00
parent 6c73b9f606
commit 91fbbedd06
3 changed files with 18 additions and 8 deletions

View File

@ -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 <ase/awk/Awk.hpp> #include <ase/awk/Awk.hpp>
@ -574,14 +574,20 @@ namespace ASE
return ase_awk_getmaxdepth (awk, id); 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)); return setWord (ow, ase_strlen(ow), nw, ase_strlen(nw));
} }
int Awk::setWord ( int Awk::setWord (
const ase_char_t* ow, ase_size_t owl, const char_t* ow, ase_size_t owl,
const ase_char_t* nw, ase_size_t nwl) const char_t* nw, ase_size_t nwl)
{ {
ASE_ASSERT (awk != ASE_NULL); ASE_ASSERT (awk != ASE_NULL);
return ase_awk_setword (awk, ow, owl, nw, nwl); return ase_awk_setword (awk, ow, owl, nw, nwl);

View File

@ -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_ #ifndef _ASE_AWK_AWK_HPP_
@ -411,11 +411,14 @@ namespace ASE
virtual void setMaxDepth (int ids, size_t depth); virtual void setMaxDepth (int ids, size_t depth);
virtual int getMaxDepth (int id) const; virtual int getMaxDepth (int id) const;
virtual int setErrorString (ErrorCode num, const char_t* str);
virtual int setWord ( virtual int setWord (
const ase_char_t* ow, const ase_char_t* nw); const char_t* ow, const char_t* nw);
virtual int setWord ( virtual int setWord (
const ase_char_t* ow, ase_size_t owl, const char_t* ow, ase_size_t owl,
const ase_char_t* nw, ase_size_t nwl); const char_t* nw, ase_size_t nwl);
virtual int parse (); virtual int parse ();
virtual int run (const char_t* main = ASE_NULL, virtual int run (const char_t* main = ASE_NULL,

View File

@ -3,6 +3,7 @@
* added ase_awk_setword to enable customization of keywords and * added ase_awk_setword to enable customization of keywords and
intrinsic function names. intrinsic function names.
* added setWord method to the awk c++ class. * 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 the wrong macro name WIN32 to _WIN32 in utl/stdio.h
* changed test/awk/Awk.cpp to include an option(-w) to utilize * changed test/awk/Awk.cpp to include an option(-w) to utilize