diff --git a/editors/sed.c b/editors/sed.c
index f26e6e3..812f621 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -215,14 +215,14 @@
 	else if (my_str[idx] == '/') {
 		idx = index_of_next_unescaped_slash(my_str, ++idx);
 		if (idx == -1)
-			fatalError("unterminated match expression\n");
+			error_msg_and_die("unterminated match expression\n");
 		my_str[idx] = '\0';
 		*regex = (regex_t *)xmalloc(sizeof(regex_t));
 		xregcomp(*regex, my_str+1, 0);
 		idx++; /* so it points to the next character after the last '/' */
 	}
 	else {
-		errorMsg("get_address: no address found in string\n"
+		error_msg("get_address: no address found in string\n"
 				"\t(you probably didn't check the string you passed me)\n");
 		idx = -1;
 	}
@@ -258,13 +258,13 @@
 
 	/* verify that the 's' is followed by a 'slash' */
 	if (substr[++idx] != '/')
-		fatalError("bad format in substitution expression\n");
+		error_msg_and_die("bad format in substitution expression\n");
 
 	/* save the match string */
 	oldidx = idx+1;
 	idx = index_of_next_unescaped_slash(substr, ++idx);
 	if (idx == -1)
-		fatalError("bad format in substitution expression\n");
+		error_msg_and_die("bad format in substitution expression\n");
 	match = strdup_substr(substr, oldidx, idx);
 
 	/* determine the number of back references in the match string */
@@ -283,7 +283,7 @@
 	oldidx = idx+1;
 	idx = index_of_next_unescaped_slash(substr, ++idx);
 	if (idx == -1)
-		fatalError("bad format in substitution expression\n");
+		error_msg_and_die("bad format in substitution expression\n");
 	sed_cmd->replace = strdup_substr(substr, oldidx, idx);
 
 	/* process the flags */
@@ -303,7 +303,7 @@
 				if (strchr("; \t\v\n\r", substr[idx]))
 					goto out;
 				/* else */
-				fatalError("bad option in substitution expression\n");
+				error_msg_and_die("bad option in substitution expression\n");
 		}
 	}
 
@@ -345,7 +345,7 @@
 	 */
 
 	if (editstr[1] != '\\' && (editstr[2] != '\n' || editstr[2] != '\r'))
-		fatalError("bad format in edit expression\n");
+		error_msg_and_die("bad format in edit expression\n");
 
 	/* store the edit line text */
 	/* make editline big enough to accomodate the extra '\n' we will tack on
@@ -409,9 +409,9 @@
 
 	/* last part (mandatory) will be a command */
 	if (cmdstr[idx] == '\0')
-		fatalError("missing command\n");
+		error_msg_and_die("missing command\n");
 	if (!strchr("pdsaic", cmdstr[idx])) /* <-- XXX add new commands here */
-		fatalError("invalid command\n");
+		error_msg_and_die("invalid command\n");
 	sed_cmd->cmd = cmdstr[idx];
 
 	/* special-case handling for (s)ubstitution */
@@ -421,7 +421,7 @@
 	/* special-case handling for (a)ppend, (i)nsert, and (c)hange */
 	else if (strchr("aic", cmdstr[idx])) {
 		if (sed_cmd->end_line || sed_cmd->end_match)
-			fatalError("only a beginning address can be specified for edit commands\n");
+			error_msg_and_die("only a beginning address can be specified for edit commands\n");
 		idx += parse_edit_cmd(sed_cmd, &cmdstr[idx]);
 	}
 	/* if it was a single-letter command (such as 'p' or 'd') we need to
@@ -757,7 +757,7 @@
 		for (i = optind; i < argc; i++) {
 			file = fopen(argv[i], "r");
 			if (file == NULL) {
-				errorMsg("%s: %s\n", argv[i], strerror(errno));
+				error_msg("%s: %s\n", argv[i], strerror(errno));
 			} else {
 				process_file(file);
 				fclose(file);
