changed code to allow an empty label when QSE_SED_STRICT is not set
added qse_sed_stop() and qse_sed_isstop()
This commit is contained in:
		| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: Awk.hpp 516 2011-07-23 09:03:48Z hyunghwan.chung $ | ||||
|  * $Id: Awk.hpp 570 2011-09-20 04:40:45Z hyunghwan.chung $ | ||||
|  * | ||||
|     Copyright 2006-2011 Chung, Hyung-Hwan. | ||||
|     This file is part of QSE. | ||||
| @ -743,7 +743,7 @@ public: | ||||
| 		operator rtx_t* () const; | ||||
|  | ||||
| 		void stop () const; | ||||
| 		bool pendingStop () const; | ||||
| 		bool isStop () const; | ||||
|  | ||||
| 		errnum_t getErrorNumber () const; | ||||
| 		loc_t getErrorLocation () const; | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: awk.h 568 2011-09-17 15:41:26Z hyunghwan.chung $ | ||||
|  * $Id: awk.h 570 2011-09-20 04:40:45Z hyunghwan.chung $ | ||||
|  * | ||||
|     Copyright 2006-2011 Chung, Hyung-Hwan. | ||||
|     This file is part of QSE. | ||||
| @ -1639,10 +1639,10 @@ void qse_awk_stopall ( | ||||
| ); | ||||
|  | ||||
| /** | ||||
|  * The qse_awk_pendingstop() function tests if qse_awk_rtx_stop() has been  | ||||
|  * The qse_awk_rtx_isstop() function tests if qse_awk_rtx_stop() has been  | ||||
|  * called. | ||||
|  */ | ||||
| qse_bool_t qse_awk_rtx_pendingstop ( | ||||
| qse_bool_t qse_awk_rtx_isstop ( | ||||
| 	qse_awk_rtx_t* rtx /**< runtime context */ | ||||
| ); | ||||
|  | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: sed.h 569 2011-09-19 06:51:02Z hyunghwan.chung $ | ||||
|  * $Id: sed.h 570 2011-09-20 04:40:45Z hyunghwan.chung $ | ||||
|  * | ||||
|     Copyright 2006-2011 Chung, Hyung-Hwan. | ||||
|     This file is part of QSE. | ||||
| @ -138,7 +138,7 @@ enum qse_sed_option_t | ||||
| 	QSE_SED_KEEPTBS      = (1 << 1), /**< keep an trailing backslash */ | ||||
| 	QSE_SED_ENSURENL     = (1 << 2), /**< ensure NL at the text end */ | ||||
| 	QSE_SED_QUIET        = (1 << 3), /**< do not print pattern space */ | ||||
| 	QSE_SED_STRICT       = (1 << 4), /**< do strict address check */ | ||||
| 	QSE_SED_STRICT       = (1 << 4), /**< do strict address and label check */ | ||||
| 	QSE_SED_STARTSTEP    = (1 << 5), /**< allow start~step */ | ||||
| 	QSE_SED_ZEROA1       = (1 << 6), /**< allow 0,/regex/ */ | ||||
| 	QSE_SED_SAMELINE     = (1 << 7), /**< allow text on the same line as c, a, i */ | ||||
| @ -366,6 +366,21 @@ int qse_sed_exec ( | ||||
| 	qse_sed_io_fun_t  outf  /**< stream writer */ | ||||
| ); | ||||
|  | ||||
| /** | ||||
|  * The qse_sed_stop() function breaks running loop in qse_sed_exec(). | ||||
|  * It doesn't affect blocking calls in stream handlers. | ||||
|  */ | ||||
| void qse_sed_stop ( | ||||
| 	qse_sed_t* sed   /**< stream editor */ | ||||
| ); | ||||
|  | ||||
| /** | ||||
|  * The qse_sed_isstop() functions tests if qse_sed_stop() is called. | ||||
|  */ | ||||
| int qse_sed_isstop ( | ||||
| 	qse_sed_t* sed   /**< stream editor */ | ||||
| ); | ||||
| 	 | ||||
| /** | ||||
|  * The qse_sed_getlformatter() function gets the text formatter for the 'l' | ||||
|  * command. | ||||
|  | ||||
		Reference in New Issue
	
	Block a user