diff options
Diffstat (limited to 'editors/sed.c')
-rw-r--r-- | editors/sed.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editors/sed.c b/editors/sed.c index a93e5494a..b269b58d8 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -321,7 +321,7 @@ static int parse_regex_delim(const char *cmdstr, char **match, char **replace) | |||
321 | /* verify that the 's' or 'y' is followed by something. That something | 321 | /* verify that the 's' or 'y' is followed by something. That something |
322 | * (typically a 'slash') is now our regexp delimiter... */ | 322 | * (typically a 'slash') is now our regexp delimiter... */ |
323 | if (*cmdstr == '\0') | 323 | if (*cmdstr == '\0') |
324 | bb_error_msg_and_die("bad format in substitution expression"); | 324 | bb_simple_error_msg_and_die("bad format in substitution expression"); |
325 | delimiter = *cmdstr_ptr++; | 325 | delimiter = *cmdstr_ptr++; |
326 | 326 | ||
327 | /* save the match string */ | 327 | /* save the match string */ |
@@ -366,7 +366,7 @@ static int get_address(const char *my_str, int *linenum, regex_t ** regex) | |||
366 | } else { | 366 | } else { |
367 | *regex = G.previous_regex_ptr; | 367 | *regex = G.previous_regex_ptr; |
368 | if (!G.previous_regex_ptr) | 368 | if (!G.previous_regex_ptr) |
369 | bb_error_msg_and_die("no previous regexp"); | 369 | bb_simple_error_msg_and_die("no previous regexp"); |
370 | } | 370 | } |
371 | /* Move position to next character after last delimiter */ | 371 | /* Move position to next character after last delimiter */ |
372 | pos += (next+1); | 372 | pos += (next+1); |
@@ -384,7 +384,7 @@ static int parse_file_cmd(/*sed_cmd_t *sed_cmd,*/ const char *filecmdstr, char * | |||
384 | start = skip_whitespace(filecmdstr); | 384 | start = skip_whitespace(filecmdstr); |
385 | eol = strchrnul(start, '\n'); | 385 | eol = strchrnul(start, '\n'); |
386 | if (eol == start) | 386 | if (eol == start) |
387 | bb_error_msg_and_die("empty filename"); | 387 | bb_simple_error_msg_and_die("empty filename"); |
388 | 388 | ||
389 | if (*eol) { | 389 | if (*eol) { |
390 | /* If lines glued together, put backslash back. */ | 390 | /* If lines glued together, put backslash back. */ |
@@ -474,7 +474,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr) | |||
474 | goto out; | 474 | goto out; |
475 | default: | 475 | default: |
476 | dbg("s bad flags:'%s'", substr + idx); | 476 | dbg("s bad flags:'%s'", substr + idx); |
477 | bb_error_msg_and_die("bad option in substitution expression"); | 477 | bb_simple_error_msg_and_die("bad option in substitution expression"); |
478 | } | 478 | } |
479 | } | 479 | } |
480 | out: | 480 | out: |
@@ -694,7 +694,7 @@ static void add_cmd(const char *cmdstr) | |||
694 | idx--; /* if 0, trigger error check below */ | 694 | idx--; /* if 0, trigger error check below */ |
695 | } | 695 | } |
696 | if (idx < 0) | 696 | if (idx < 0) |
697 | bb_error_msg_and_die("no address after comma"); | 697 | bb_simple_error_msg_and_die("no address after comma"); |
698 | sed_cmd->end_line_orig = sed_cmd->end_line; | 698 | sed_cmd->end_line_orig = sed_cmd->end_line; |
699 | } | 699 | } |
700 | 700 | ||
@@ -712,7 +712,7 @@ static void add_cmd(const char *cmdstr) | |||
712 | 712 | ||
713 | /* last part (mandatory) will be a command */ | 713 | /* last part (mandatory) will be a command */ |
714 | if (!*cmdstr) | 714 | if (!*cmdstr) |
715 | bb_error_msg_and_die("missing command"); | 715 | bb_simple_error_msg_and_die("missing command"); |
716 | sed_cmd->cmd = *cmdstr++; | 716 | sed_cmd->cmd = *cmdstr++; |
717 | cmdstr = parse_cmd_args(sed_cmd, cmdstr); | 717 | cmdstr = parse_cmd_args(sed_cmd, cmdstr); |
718 | 718 | ||
@@ -797,7 +797,7 @@ static int do_subst_command(sed_cmd_t *sed_cmd, char **line_p) | |||
797 | if (!current_regex) { | 797 | if (!current_regex) { |
798 | current_regex = G.previous_regex_ptr; | 798 | current_regex = G.previous_regex_ptr; |
799 | if (!current_regex) | 799 | if (!current_regex) |
800 | bb_error_msg_and_die("no previous regexp"); | 800 | bb_simple_error_msg_and_die("no previous regexp"); |
801 | } | 801 | } |
802 | G.previous_regex_ptr = current_regex; | 802 | G.previous_regex_ptr = current_regex; |
803 | 803 | ||
@@ -968,7 +968,7 @@ static void puts_maybe_newline(char *s, FILE *file, char *last_puts_char, char l | |||
968 | 968 | ||
969 | if (ferror(file)) { | 969 | if (ferror(file)) { |
970 | xfunc_error_retval = 4; /* It's what gnu sed exits with... */ | 970 | xfunc_error_retval = 4; /* It's what gnu sed exits with... */ |
971 | bb_error_msg_and_die(bb_msg_write_error); | 971 | bb_simple_error_msg_and_die(bb_msg_write_error); |
972 | } | 972 | } |
973 | *last_puts_char = lpc; | 973 | *last_puts_char = lpc; |
974 | } | 974 | } |
@@ -1203,7 +1203,7 @@ static void process_files(void) | |||
1203 | } | 1203 | } |
1204 | sed_cmd = sed_cmd->next; | 1204 | sed_cmd = sed_cmd->next; |
1205 | if (!sed_cmd) | 1205 | if (!sed_cmd) |
1206 | bb_error_msg_and_die("unterminated {"); | 1206 | bb_simple_error_msg_and_die("unterminated {"); |
1207 | } | 1207 | } |
1208 | } | 1208 | } |
1209 | continue; | 1209 | continue; |