added a bit of code into sed

This commit is contained in:
2009-02-10 08:14:00 +00:00
parent b1211d6e58
commit 79c1d6b861
4 changed files with 17 additions and 5 deletions

View File

@ -198,7 +198,12 @@ static const qse_char_t* command (
#if 0
case QSE_T('{'):
cmd = QSE_SED_C_B;
/* insert a negaited branch command at the beginning
* of a group. this way, all the commands in a group
* can be skipped. the branch target is set once a
* corresponding } is met. */
cmd.type = QSE_SED_C_BRANCH;
cmd.negfl = !cmd.negfl;
break;
case QSE_T('}'):

View File

@ -51,8 +51,8 @@ struct qse_sed_c_t
union
{
void* rex; /* regular expression */
qse_char_t* text; /* added text or file name */
void* rex; /* regular expression */
qse_char_t* text; /* added text or file name */
qse_sed_c_t* lbl; /* destination command of branch */
} u;
@ -88,7 +88,10 @@ struct qse_sed_c_t
QSE_SED_C_CW,
QSE_SED_C_Y,
QSE_SED_C_X
} cmd;
} type;
/* TODO: change the data type to a shorter one to save space */
int negfl;
};
struct qse_sed_l_t