diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-03-30 09:38:40 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-03-30 09:38:40 +0000 |
commit | 9a52bb6878ff9cf6aca9f834cdc8406f6e74d646 (patch) | |
tree | 12eb04522f17b817f0a068782c7a567cfba62522 | |
parent | 30b47df86be1b7be99dc0987c3f397f09086bd6e (diff) | |
download | busybox-w32-9a52bb6878ff9cf6aca9f834cdc8406f6e74d646.tar.gz busybox-w32-9a52bb6878ff9cf6aca9f834cdc8406f6e74d646.tar.bz2 busybox-w32-9a52bb6878ff9cf6aca9f834cdc8406f6e74d646.zip |
Group common string
-rw-r--r-- | editors/sed.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/sed.c b/editors/sed.c index 13155a97e..c03924917 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -65,7 +65,7 @@ extern char *optarg; /* ditto */ | |||
65 | 65 | ||
66 | /* options */ | 66 | /* options */ |
67 | static int be_quiet = 0; | 67 | static int be_quiet = 0; |
68 | 68 | static const char bad_format_in_subst[] = "bad format in substitution expression"; | |
69 | 69 | ||
70 | typedef struct sed_cmd_s { | 70 | typedef struct sed_cmd_s { |
71 | /* Order by alignment requirements */ | 71 | /* Order by alignment requirements */ |
@@ -190,7 +190,7 @@ static int parse_regex_delim(const char *cmdstr, char **match, char **replace) | |||
190 | /* verify that the 's' is followed by something. That something | 190 | /* verify that the 's' is followed by something. That something |
191 | * (typically a 'slash') is now our regexp delimiter... */ | 191 | * (typically a 'slash') is now our regexp delimiter... */ |
192 | if (*cmdstr == '\0') | 192 | if (*cmdstr == '\0') |
193 | bb_error_msg_and_die("bad format in substitution expression"); | 193 | bb_error_msg_and_die(bad_format_in_subst); |
194 | else | 194 | else |
195 | delimiter = *cmdstr_ptr; | 195 | delimiter = *cmdstr_ptr; |
196 | 196 | ||
@@ -199,7 +199,7 @@ static int parse_regex_delim(const char *cmdstr, char **match, char **replace) | |||
199 | /* save the match string */ | 199 | /* save the match string */ |
200 | idx = index_of_next_unescaped_regexp_delim(delimiter, cmdstr_ptr); | 200 | idx = index_of_next_unescaped_regexp_delim(delimiter, cmdstr_ptr); |
201 | if (idx == -1) { | 201 | if (idx == -1) { |
202 | bb_error_msg_and_die("bad format in substitution expression"); | 202 | bb_error_msg_and_die(bad_format_in_subst); |
203 | } | 203 | } |
204 | *match = bb_xstrndup(cmdstr_ptr, idx); | 204 | *match = bb_xstrndup(cmdstr_ptr, idx); |
205 | 205 | ||
@@ -207,7 +207,7 @@ static int parse_regex_delim(const char *cmdstr, char **match, char **replace) | |||
207 | cmdstr_ptr += idx + 1; | 207 | cmdstr_ptr += idx + 1; |
208 | idx = index_of_next_unescaped_regexp_delim(delimiter, cmdstr_ptr); | 208 | idx = index_of_next_unescaped_regexp_delim(delimiter, cmdstr_ptr); |
209 | if (idx == -1) { | 209 | if (idx == -1) { |
210 | bb_error_msg_and_die("bad format in substitution expression"); | 210 | bb_error_msg_and_die(bad_format_in_subst); |
211 | } | 211 | } |
212 | *replace = bb_xstrndup(cmdstr_ptr, idx); | 212 | *replace = bb_xstrndup(cmdstr_ptr, idx); |
213 | 213 | ||