added qse_sed_getlinnum() and qse_sed_setlinnum()
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user