added qse_sed_getlinnum() and qse_sed_setlinnum()
This commit is contained in:
parent
4914825a7a
commit
681d6f7068
@ -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 <b a c o n e v i @ g m a i l . c o m>
|
||||
Chung, Hyung-Hwan <bacon@abiyo.net>
|
||||
|
||||
|
@ -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
|
||||
|
@ -9,7 +9,7 @@ QSE는 여러가지 스크립팅 언어처리기와 유틸리티들을 포함하
|
||||
프로젝트 홈페이지: http://qse.googlecode.com/
|
||||
|
||||
더 많은 정보가 필요하면
|
||||
정형환 <b a c o n @ a b i y o . n e t>
|
||||
정형환 <bacon@abiyo.net>
|
||||
에게 연락하세요.
|
||||
|
||||
@section modules 구성요소
|
||||
|
@ -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 <b a c o n @ a b i y o . n e t>
|
||||
Chung, Hyung-Hwan <bacon@abiyo.net>
|
||||
|
||||
@section INSTALLATION
|
||||
Cross compiling for WIN32 with MINGW32
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user