diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index 94b8fc7..c32330b 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -106,7 +106,7 @@
 		cmdedit_termw = w;
 		cmdedit_scroll = w / 3;
 	} else {
-		errorMsg("\n*** Error: minimum screen width is 21\n");
+		error_msg("\n*** Error: minimum screen width is 21\n");
 	}
 }
 
diff --git a/shell/lash.c b/shell/lash.c
index bb8a456..4b1ae6d 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -250,7 +250,7 @@
 	{
 		cmd->progs[0].argv++;
 		execvp(cmd->progs[0].argv[0], cmd->progs[0].argv);
-		fatalError("Exec to %s failed: %s\n", cmd->progs[0].argv[0],
+		error_msg_and_die("Exec to %s failed: %s\n", cmd->progs[0].argv[0],
 				strerror(errno));
 	}
 	return EXIT_SUCCESS;
@@ -273,12 +273,12 @@
 
 	if (!jobList->head) {
 		if (!cmd->progs[0].argv[1] || cmd->progs[0].argv[2]) {
-			errorMsg("%s: exactly one argument is expected\n",
+			error_msg("%s: exactly one argument is expected\n",
 					cmd->progs[0].argv[0]);
 			return EXIT_FAILURE;
 		}
 		if (sscanf(cmd->progs[0].argv[1], "%%%d", &jobNum) != 1) {
-			errorMsg("%s: bad argument '%s'\n",
+			error_msg("%s: bad argument '%s'\n",
 					cmd->progs[0].argv[0], cmd->progs[0].argv[1]);
 			return EXIT_FAILURE;
 			for (job = jobList->head; job; job = job->next) {
@@ -292,7 +292,7 @@
 	}
 
 	if (!job) {
-		errorMsg("%s: unknown job %d\n",
+		error_msg("%s: unknown job %d\n",
 				cmd->progs[0].argv[0], jobNum);
 		return EXIT_FAILURE;
 	}
@@ -444,7 +444,7 @@
 	char* charptr1=cmd->text+5; /* skip over the leading 'then ' */
 
 	if (! (cmd->jobContext & (IF_TRUE_CONTEXT|IF_FALSE_CONTEXT))) {
-		errorMsg("unexpected token `then'\n");
+		error_msg("unexpected token `then'\n");
 		return EXIT_FAILURE;
 	}
 	/* If the if result was FALSE, skip the 'then' stuff */
@@ -471,7 +471,7 @@
 	char* charptr1=cmd->text+5; /* skip over the leading 'else ' */
 
 	if (! (cmd->jobContext & (IF_TRUE_CONTEXT|IF_FALSE_CONTEXT))) {
-		errorMsg("unexpected token `else'\n");
+		error_msg("unexpected token `else'\n");
 		return EXIT_FAILURE;
 	}
 	/* If the if result was TRUE, skip the 'else' stuff */
@@ -495,7 +495,7 @@
 static int builtin_fi(struct job *cmd, struct jobSet *junk)
 {
 	if (! (cmd->jobContext & (IF_TRUE_CONTEXT|IF_FALSE_CONTEXT))) {
-		errorMsg("unexpected token `fi'\n");
+		error_msg("unexpected token `fi'\n");
 		return EXIT_FAILURE;
 	}
 	/* Clear out the if and then context bits */
@@ -646,7 +646,7 @@
 		if (openfd < 0) {
 			/* this could get lost if stderr has been redirected, but
 			   bash and ash both lose it as well (though zsh doesn't!) */
-			errorMsg("error opening %s: %s\n", redir->filename,
+			error_msg("error opening %s: %s\n", redir->filename,
 					strerror(errno));
 			return 1;
 		}
@@ -820,7 +820,7 @@
 	if (strpbrk(prog->argv[argc_l - 1],"*[]?")!= NULL){
 		rc = glob(prog->argv[argc_l - 1], flags, NULL, &prog->globResult);
 		if (rc == GLOB_NOSPACE) {
-			errorMsg("out of space during glob operation\n");
+			error_msg("out of space during glob operation\n");
 			return;
 		} else if (rc == GLOB_NOMATCH ||
 			   (!rc && (prog->globResult.gl_pathc - i) == 1 &&
@@ -927,7 +927,7 @@
 			if (*src == '\\') {
 				src++;
 				if (!*src) {
-					errorMsg("character expected after \\\n");
+					error_msg("character expected after \\\n");
 					freeJob(job);
 					return 1;
 				}
@@ -1009,7 +1009,7 @@
 					chptr++;
 
 				if (!*chptr) {
-					errorMsg("file name expected after %c\n", *src);
+					error_msg("file name expected after %c\n", *src);
 					freeJob(job);
 					job->numProgs=0;
 					return 1;
@@ -1028,7 +1028,7 @@
 				if (*prog->argv[argc_l])
 					argc_l++;
 				if (!argc_l) {
-					errorMsg("empty command in pipe\n");
+					error_msg("empty command in pipe\n");
 					freeJob(job);
 					job->numProgs=0;
 					return 1;
@@ -1055,7 +1055,7 @@
 					src++;
 
 				if (!*src) {
-					errorMsg("empty command in pipe\n");
+					error_msg("empty command in pipe\n");
 					freeJob(job);
 					job->numProgs=0;
 					return 1;
@@ -1114,7 +1114,7 @@
 					 * command line, making extra room as needed  */
 					--src;
 					charptr1 = xmalloc(BUFSIZ);
-					while ( (size=fullRead(pipefd[0], charptr1, BUFSIZ-1)) >0) {
+					while ( (size=full_read(pipefd[0], charptr1, BUFSIZ-1)) >0) {
 						int newSize=src - *commandPtr + size + 1 + strlen(charptr2);
 						if (newSize > BUFSIZ) {
 							*commandPtr=xrealloc(*commandPtr, src - *commandPtr + 
@@ -1145,7 +1145,7 @@
 			case '\\':
 				src++;
 				if (!*src) {
-					errorMsg("character expected after \\\n");
+					error_msg("character expected after \\\n");
 					freeJob(job);
 					return 1;
 				}
@@ -1291,7 +1291,7 @@
 #endif
 
 			execvp(newJob->progs[i].argv[0], newJob->progs[i].argv);
-			fatalError("%s: %s\n", newJob->progs[i].argv[0],
+			error_msg_and_die("%s: %s\n", newJob->progs[i].argv[0],
 					strerror(errno));
 		}
 		if (outPipe[1]!=-1) {
@@ -1495,7 +1495,7 @@
 			case 'c':
 				input = NULL;
 				if (local_pending_command != 0)
-					fatalError("multiple -c arguments\n");
+					error_msg_and_die("multiple -c arguments\n");
 				local_pending_command = xstrdup(argv[optind]);
 				optind++;
 				argv = argv+optind;
