coded more commands to sed

This commit is contained in:
hyung-hwan 2009-05-17 07:09:59 +00:00
parent 164b3d9a98
commit 1eeeee562a
3 changed files with 317 additions and 232 deletions

View File

@ -150,12 +150,15 @@ struct qse_sed_t
qse_map_t labs; /* label map */ qse_map_t labs; /* label map */
struct
{
/* current level of command group nesting */ /* current level of command group nesting */
int grplvl; int level;
/* temporary storage to keep track of the begining of a command group */ /* temporary storage to keep track of the begining of a command group */
qse_sed_cmd_t* grpcmd[128]; qse_sed_cmd_t* cmd[128];
} grp;
/* io data for execution */ /* data for execution */
struct struct
{ {
struct struct
@ -192,14 +195,16 @@ struct qse_sed_t
qse_size_t num; qse_size_t num;
} in; } in;
} eio;
struct struct
{ {
qse_lda_t appended; qse_lda_t appended;
qse_str_t read;
qse_str_t held; qse_str_t held;
qse_str_t subst; qse_str_t subst;
} text; } text;
int subst_done;
} e;
}; };

File diff suppressed because it is too large Load Diff

View File

@ -76,9 +76,8 @@ struct qse_sed_cmd_t
QSE_SED_CMD_NEXT = QSE_T('n'), QSE_SED_CMD_NEXT = QSE_T('n'),
QSE_SED_CMD_NEXT_APPEND = QSE_T('N'), QSE_SED_CMD_NEXT_APPEND = QSE_T('N'),
/* branch */
QSE_SED_CMD_BRANCH = QSE_T('b'), QSE_SED_CMD_BRANCH = QSE_T('b'),
QSE_SED_CMD_T = QSE_T('t'), QSE_SED_CMD_BRANCH_COND = QSE_T('t'),
QSE_SED_CMD_READ_FILE = QSE_T('r'), QSE_SED_CMD_READ_FILE = QSE_T('r'),
QSE_SED_CMD_READ_FILELN = QSE_T('R'), QSE_SED_CMD_READ_FILELN = QSE_T('R'),