added QSE_SED_SAMELINE to sed
This commit is contained in:
		| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: pio.c 244 2009-07-24 12:22:00Z hyunghwan.chung $ | ||||
|  * $Id: pio.c 276 2009-08-31 13:24:06Z hyunghwan.chung $ | ||||
|  * | ||||
|    Copyright 2006-2009 Chung, Hyung-Hwan. | ||||
|  | ||||
| @ -479,7 +479,9 @@ qse_pio_t* qse_pio_init ( | ||||
| 			argv[2] = mcmd; | ||||
| 			argv[3] = QSE_NULL; | ||||
|  | ||||
| 			QSE_EXECVE (QSE_MT("/bin/sh"), argv, environ); | ||||
| 			QSE_EXECVE ( | ||||
| 				QSE_MT("/bin/sh"), | ||||
| 				(qse_mchar_t*const*)argv, environ); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * $Id: sed.c 269 2009-08-26 03:03:51Z hyunghwan.chung $ | ||||
|  * $Id: sed.c 276 2009-08-31 13:24:06Z hyunghwan.chung $ | ||||
|  * | ||||
|    Copyright 2006-2009 Chung, Hyung-Hwan. | ||||
|  | ||||
| @ -1142,12 +1142,16 @@ static int get_command (qse_sed_t* sed, qse_sed_cmd_t* cmd) | ||||
|  | ||||
| 			if (c != QSE_CHAR_EOF && c != QSE_T('\n')) | ||||
| 			{ | ||||
| 				if (sed->option & QSE_SED_SAMELINE)  | ||||
| 					goto sameline_ok; | ||||
|  | ||||
| 				SETERR0 (sed, QSE_SED_EGBABS, &sed->src.loc); | ||||
| 				return -1; | ||||
| 			} | ||||
| 			 | ||||
| 			NXTSC (sed); /* skip the new line */ | ||||
|  | ||||
| 		sameline_ok: | ||||
| 			/* get_text() starts from the next line */ | ||||
| 			if (get_text (sed, cmd) <= -1) return -1; | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user