[BusyBox-cvs] busybox/editors sed.c,1.118,1.119

Glenn McGrath bug1 at busybox.net
Sun Mar 30 09:38:43 UTC 2003


Update of /var/cvs/busybox/editors
In directory winder:/tmp/cvs-serv15272/editors

Modified Files:
	sed.c 
Log Message:
Group common string


Index: sed.c
===================================================================
RCS file: /var/cvs/busybox/editors/sed.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- sed.c	30 Mar 2003 08:40:09 -0000	1.118
+++ sed.c	30 Mar 2003 09:38:40 -0000	1.119
@@ -65,7 +65,7 @@
 
 /* options */
 static int be_quiet = 0;
-
+static const char bad_format_in_subst[] = "bad format in substitution expression";
 
 typedef struct sed_cmd_s {
 	/* Order by alignment requirements */
@@ -190,7 +190,7 @@
 	/* verify that the 's' is followed by something.  That something
 	 * (typically a 'slash') is now our regexp delimiter... */
 	if (*cmdstr == '\0')
-		bb_error_msg_and_die("bad format in substitution expression");
+		bb_error_msg_and_die(bad_format_in_subst);
 	else
 		delimiter = *cmdstr_ptr;
 
@@ -199,7 +199,7 @@
 	/* save the match string */
 	idx = index_of_next_unescaped_regexp_delim(delimiter, cmdstr_ptr);
 	if (idx == -1) {
-		bb_error_msg_and_die("bad format in substitution expression");
+		bb_error_msg_and_die(bad_format_in_subst);
 	}
 	*match = bb_xstrndup(cmdstr_ptr, idx);
 
@@ -207,7 +207,7 @@
 	cmdstr_ptr += idx + 1;
 	idx = index_of_next_unescaped_regexp_delim(delimiter, cmdstr_ptr);
 	if (idx == -1) {
-		bb_error_msg_and_die("bad format in substitution expression");
+		bb_error_msg_and_die(bad_format_in_subst);
 	}
 	*replace = bb_xstrndup(cmdstr_ptr, idx);
 




More information about the busybox-cvs mailing list