diff --git a/qse/README b/qse/README index 0340abb1..cca8111f 100644 --- a/qse/README +++ b/qse/README @@ -5,5 +5,5 @@ The library is licended under the Apache License, Version 2.0. The project webpage: http://qse.googlecode.com/ For furthur information, contact: -Chung, Hyung-Hwan +Chung, Hyung-Hwan diff --git a/qse/doc/gendoc.sh b/qse/doc/gendoc.sh index 21600544..8fb20d13 100755 --- a/qse/doc/gendoc.sh +++ b/qse/doc/gendoc.sh @@ -6,5 +6,15 @@ SED="../test/sed/sed01" /^OUTPUT_DIRECTORY[[:space:]]*=/s/qse/qse.ko/ /^INPUT[[:space:]]*=/s/page/page.ko/' < Doxyfile > Doxyfile.ko +#"${SED}" '/^OUTPUT_LANGUAGE[[:space:]]*=/s/English/Chinese/ +# /^OUTPUT_DIRECTORY[[:space:]]*=/s/qse/qse.cn/ +# /^INPUT[[:space:]]*=/s/page/page.cn/' < Doxyfile > Doxyfile.cn + +#"${SED}" '/^OUTPUT_LANGUAGE[[:space:]]*=/s/English/Japanese/ +# /^OUTPUT_DIRECTORY[[:space:]]*=/s/qse/qse.ja/ +# /^INPUT[[:space:]]*=/s/page/page.ja/' < Doxyfile > Doxyfile.ja + doxygen Doxyfile doxygen Doxyfile.ko +#doxygen Doxyfile.cn +#doxygen Doxyfile.ja diff --git a/qse/doc/page.ko/main.doc b/qse/doc/page.ko/main.doc index ed2430d7..6958fbc0 100644 --- a/qse/doc/page.ko/main.doc +++ b/qse/doc/page.ko/main.doc @@ -9,7 +9,7 @@ QSE는 여러가지 스크립팅 언어처리기와 유틸리티들을 포함하 프로젝트 홈페이지: http://qse.googlecode.com/ 더 많은 정보가 필요하면 -정형환 +정형환 에게 연락하세요. @section modules 구성요소 diff --git a/qse/doc/page/main.doc b/qse/doc/page/main.doc index 01c48f62..a5f39d9b 100644 --- a/qse/doc/page/main.doc +++ b/qse/doc/page/main.doc @@ -9,7 +9,7 @@ The library is licended under the Apache License, Version 2.0. The project webpage: http://qse.googlecode.com/ For furthur information, contact: -Chung, Hyung-Hwan +Chung, Hyung-Hwan @section INSTALLATION Cross compiling for WIN32 with MINGW32 diff --git a/qse/include/qse/sed/Sed.hpp b/qse/include/qse/sed/Sed.hpp index 042d9d18..f19fd216 100644 --- a/qse/include/qse/sed/Sed.hpp +++ b/qse/include/qse/sed/Sed.hpp @@ -127,6 +127,21 @@ public: */ errnum_t getErrorNumber () const throw (); + /** + * The getConsoleLine() function returns the current line + * number from an input console. + * @return current line number + */ + size_t getConsoleLine () throw (); + + /** + * The setConsoleLine() function changes the current line + * number from an input console. + */ + void setConsoleLine ( + size_t num ///< a line number + ) throw (); + protected: /** * The IOBase class is a base class for IO operation. It wraps around @@ -182,8 +197,9 @@ protected: } protected: + Sed* sed; io_arg_t* arg; - Mode mode; + Mode mode; }; /** diff --git a/qse/include/qse/sed/sed.h b/qse/include/qse/sed/sed.h index 298f407f..5da40e41 100644 --- a/qse/include/qse/sed/sed.h +++ b/qse/include/qse/sed/sed.h @@ -35,6 +35,10 @@ * qse_sed_close (sed); * @endcode * + * @todo + * - to allow flexible numbers of commands + * - to allow configurable recursion depth for a regular expression + * * @example sed01.c * This example shows how to embed a basic stream editor. */ @@ -320,6 +324,23 @@ int qse_sed_exec ( qse_sed_io_fun_t outf /**< stream writer */ ); +/** + * The qse_sed_getlinnum() function gets the current input line number. + * @return current input line number + */ +qse_size_t qse_sed_getlinnum ( + qse_sed_t* sed /**< a stream editor */ +); + +/** + * The qse_sed_setlinnum() function changes the current input line number. + * It affects the '=' command. + */ +void qse_sed_setlinnum ( + qse_sed_t* sed, /**< a stream editor */ + qse_size_t num /**< a line number */ +); + #ifdef __cplusplus } #endif diff --git a/qse/lib/sed/Sed.cpp b/qse/lib/sed/Sed.cpp index 6d5b432d..280d9850 100644 --- a/qse/lib/sed/Sed.cpp +++ b/qse/lib/sed/Sed.cpp @@ -89,6 +89,18 @@ Sed::errnum_t Sed::getErrorNumber () const throw () return (sed == QSE_NULL)? QSE_SED_ENOERR: qse_sed_geterrnum (sed); } +Sed::size_t Sed::getConsoleLine () throw () +{ + QSE_ASSERT (sed != QSE_NULL); + return qse_sed_getlinnum (sed); +} + +void Sed::setConsoleLine (size_t num) throw () +{ + QSE_ASSERT (sed != QSE_NULL); + qse_sed_setlinnum (sed, num); +} + Sed::ssize_t Sed::xin (sed_t* s, io_cmd_t cmd, io_arg_t* arg) throw () { Sed* sed = *(Sed**)QSE_XTN(s); diff --git a/qse/lib/sed/sed.c b/qse/lib/sed/sed.c index f680f22c..407bcf7c 100644 --- a/qse/lib/sed/sed.c +++ b/qse/lib/sed/sed.c @@ -2642,3 +2642,13 @@ done3: qse_map_fini (&sed->e.out.files); return ret; } + +qse_size_t qse_sed_getlinenum (qse_sed_t* sed) +{ + return sed->e.in.num; +} + +void qse_sed_setlinenum (qse_sed_t* sed, qse_size_t num) +{ + sed->e.in.num = num; +}