ping

On 12/02/15 20:36, Martijn van Duren wrote:
Hello tech@,

I've had a discussion with bentley@ about some patches for vi. Some of
which I've send to Zhihao from the nvi2 project to keep the projects
somewhat in sync. I'm still awaiting his response on those before
sending them here.

nvi2 switched with catalog support to using the cat{open,gets,close}.
Since OpenBSD moved away from translations in general and catopen is
limited in it's usability since the default NL_CAT_LOCALE is removed I
think we should remove catalog support. bentley@ agrees with me on this
point.

Attached are four diffs, for easier reviewing, to incrementally remove
support. After the last diff the catalog directory can be removed entirely.

Martijn van Duren
diff --git common/gs.h common/gs.h
index 8d64493..8859ba7 100644
--- common/gs.h
+++ common/gs.h
@@ -74,7 +74,6 @@ struct _gs {
 #define	GO_TERM		3		/* Global options: terminal type. */
 	OPTION	 opts[GO_TERM + 1];
 
-	DB	*msg;			/* Message catalog DB. */
 	MSGH	 msgq;			/* User message list. */
 #define	DEFAULT_NOPRINT	'\1'		/* Emergency non-printable character. */
 	CHAR_T	 noprint;		/* Cached, unprintable character. */
diff --git common/main.c common/main.c
index 4669fd3..7d0fc5c 100644
--- common/main.c
+++ common/main.c
@@ -493,9 +493,6 @@ v_end(GS *gp)
 
 	/* Free default buffer storage. */
 	(void)text_lfree(&gp->dcb_store.textq);
-
-	/* Close message catalogs. */
-	msg_close(gp);
 #endif
 
 	/* Ring the bell if scheduled. */
diff --git common/msg.c common/msg.c
index 8e0a653..f10cc91 100644
--- common/msg.c
+++ common/msg.c
@@ -497,88 +497,6 @@ alloc_err:
 }
 
 /*
- * msg_open --
- *	Open the message catalogs.
- *
- * PUBLIC: int msg_open(SCR *, char *);
- */
-int
-msg_open(SCR *sp, char *file)
-{
-	/*
-	 * !!!
-	 * Assume that the first file opened is the system default, and that
-	 * all subsequent ones user defined.  Only display error messages
-	 * if we can't open the user defined ones -- it's useful to know if
-	 * the system one wasn't there, but if nvi is being shipped with an
-	 * installed system, the file will be there, if it's not, then the
-	 * message will be repeated every time nvi is started up.
-	 */
-	static int first = 1;
-	DB *db;
-	DBT data, key;
-	recno_t msgno;
-	char *p, *t, buf[PATH_MAX];
-
-	if ((p = strrchr(file, '/')) != NULL && p[1] == '\0' &&
-	    (((t = getenv("LC_MESSAGES")) != NULL && t[0] != '\0') ||
-	    ((t = getenv("LANG")) != NULL && t[0] != '\0'))) {
-		(void)snprintf(buf, sizeof(buf), "%s%s", file, t);
-		p = buf;
-	} else
-		p = file;
-	if ((db = dbopen(p,
-	    O_NONBLOCK | O_RDONLY, 0, DB_RECNO, NULL)) == NULL) {
-		if (first) {
-			first = 0;
-			return (1);
-		}
-		msgq_str(sp, M_SYSERR, p, "%s");
-		return (1);
-	}
-
-	/*
-	 * Test record 1 for the magic string.  The msgq call is here so
-	 * the message catalog build finds it.
-	 */
-#define	VMC	"VI_MESSAGE_CATALOG"
-	key.data = &msgno;
-	key.size = sizeof(recno_t);
-	msgno = 1;
-	if (db->get(db, &key, &data, 0) != 0 ||
-	    data.size != sizeof(VMC) - 1 ||
-	    memcmp(data.data, VMC, sizeof(VMC) - 1)) {
-		(void)db->close(db);
-		if (first) {
-			first = 0;
-			return (1);
-		}
-		msgq_str(sp, M_ERR, p,
-		    "030|The file %s is not a message catalog");
-		return (1);
-	}
-	first = 0;
-
-	if (sp->gp->msg != NULL)
-		(void)sp->gp->msg->close(sp->gp->msg);
-	sp->gp->msg = db;
-	return (0);
-}
-
-/*
- * msg_close --
- *	Close the message catalogs.
- *
- * PUBLIC: void msg_close(GS *);
- */
-void
-msg_close(GS *gp)
-{
-	if (gp->msg != NULL)
-		(void)gp->msg->close(gp->msg);
-}
-
-/*
  * msg_cont --
  *	Return common continuation messages.
  *
@@ -613,10 +531,6 @@ msg_cmsg(SCR *sp, cmsg_t which, size_t *lenp)
  * msg_cat --
  *	Return a single message from the catalog, plus its length.
  *
- * !!!
- * Only a single catalog message can be accessed at a time, if multiple
- * ones are needed, they must be copied into local memory.
- *
  * PUBLIC: const char *msg_cat(SCR *, const char *, size_t *);
  */
 const char *
@@ -631,30 +545,8 @@ msg_cat(SCR *sp, const char *str, size_t *lenp)
 	 * number and '|' symbol, we're done.
 	 */
 	if (isdigit(str[0]) &&
-	    isdigit(str[1]) && isdigit(str[2]) && str[3] == '|') {
-		key.data = &msgno;
-		key.size = sizeof(recno_t);
-		msgno = atoi(str);
-
-		/*
-		 * XXX
-		 * Really sleazy hack -- we put an extra character on the
-		 * end of the format string, and then we change it to be
-		 * the nul termination of the string.  There ought to be
-		 * a better way.  Once we can allocate multiple temporary
-		 * memory buffers, maybe we can use one of them instead.
-		 */
-		gp = sp == NULL ? NULL : sp->gp;
-		if (gp != NULL && gp->msg != NULL &&
-		    gp->msg->get(gp->msg, &key, &data, 0) == 0 &&
-		    data.size != 0) {
-			if (lenp != NULL)
-				*lenp = data.size - 1;
-			((char *)data.data)[data.size - 1] = '\0';
-			return (data.data);
-		}
+	    isdigit(str[1]) && isdigit(str[2]) && str[3] == '|')
 		str = &str[4];
-	}
 	if (lenp != NULL)
 		*lenp = strlen(str);
 	return (str);
diff --git common/options.c common/options.c
index 361bafd..9a03b31 100644
--- common/options.c
+++ common/options.c
@@ -120,8 +120,6 @@ OPTLIST const optlist[] = {
  *	mixing code and data.  Don't add it, or I will kill you.
  */
 	{"modeline",	NULL,		OPT_0BOOL,	OPT_NOSET},
-/* O_MSGCAT	  4.4BSD */
-	{"msgcat",	f_msgcat,	OPT_STR,	0},
 /* O_NOPRINT	  4.4BSD */
 	{"noprint",	f_print,	OPT_STR,	OPT_EARLYSET},
 /* O_NUMBER	    4BSD */
@@ -350,8 +348,6 @@ opts_init(SCR *sp, int *oargs)
 	OI(O_FILEC, "filec=\t");
 	OI(O_KEYTIME, "keytime=6");
 	OI(O_MATCHTIME, "matchtime=7");
-	(void)snprintf(b1, sizeof(b1), "msgcat=%s", _PATH_MSGCAT);
-	OI(O_MSGCAT, b1);
 	OI(O_REPORT, "report=5");
 	OI(O_PARAGRAPHS, "paragraphs=IPLPPPQPP LIpplpipbp");
 	(void)snprintf(b1, sizeof(b1), "path=%s", "");
diff --git common/options_f.c common/options_f.c
index 86d90cf..a5b7276 100644
--- common/options_f.c
+++ common/options_f.c
@@ -131,16 +131,6 @@ f_lisp(SCR *sp, OPTION *op, char *str, u_long *valp)
 }
 
 /*
- * PUBLIC: int f_msgcat(SCR *, OPTION *, char *, u_long *);
- */
-int
-f_msgcat(SCR *sp, OPTION *op, char *str, u_long *valp)
-{
-	(void)msg_open(sp, str);
-	return (0);
-}
-
-/*
  * PUBLIC: int f_paragraph(SCR *, OPTION *, char *, u_long *);
  */
 int
diff --git include/com_extern.h include/com_extern.h
index 7fe7e1b..d65c664 100644
--- include/com_extern.h
+++ include/com_extern.h
@@ -54,8 +54,6 @@ void msgq(SCR *, mtype_t, const char *, ...);
 void msgq_str(SCR *, mtype_t, char *, char *);
 void mod_rpt(SCR *);
 void msgq_status(SCR *, recno_t, u_int);
-int msg_open(SCR *, char *);
-void msg_close(GS *);
 const char *msg_cmsg(SCR *, cmsg_t, size_t *);
 const char *msg_cat(SCR *, const char *, size_t *);
 char *msg_print(SCR *, const char *, int *);
diff --git include/options_def.h include/options_def.h
index 7d6c022..7a47b84 100644
--- include/options_def.h
+++ include/options_def.h
@@ -31,51 +31,50 @@
 #define O_MATCHTIME 28
 #define O_MESG 29
 #define O_MODELINE 30
-#define O_MSGCAT 31
-#define O_NOPRINT 32
-#define O_NUMBER 33
-#define O_OCTAL 34
-#define O_OPEN 35
-#define O_OPTIMIZE 36
-#define O_PARAGRAPHS 37
-#define O_PATH 38
-#define O_PRINT 39
-#define O_PROMPT 40
-#define O_READONLY 41
-#define O_RECDIR 42
-#define O_REDRAW 43
-#define O_REMAP 44
-#define O_REPORT 45
-#define O_RULER 46
-#define O_SCROLL 47
-#define O_SEARCHINCR 48
-#define O_SECTIONS 49
-#define O_SECURE 50
-#define O_SHELL 51
-#define O_SHELLMETA 52
-#define O_SHIFTWIDTH 53
-#define O_SHOWMATCH 54
-#define O_SHOWMODE 55
-#define O_SIDESCROLL 56
-#define O_SLOWOPEN 57
-#define O_SOURCEANY 58
-#define O_TABSTOP 59
-#define O_TAGLENGTH 60
-#define O_TAGS 61
-#define O_TERM 62
-#define O_TERSE 63
-#define O_TILDEOP 64
-#define O_TIMEOUT 65
-#define O_TTYWERASE 66
-#define O_VERBOSE 67
-#define O_W1200 68
-#define O_W300 69
-#define O_W9600 70
-#define O_WARN 71
-#define O_WINDOW 72
-#define O_WINDOWNAME 73
-#define O_WRAPLEN 74
-#define O_WRAPMARGIN 75
-#define O_WRAPSCAN 76
-#define O_WRITEANY 77
-#define O_OPTIONCOUNT 78
+#define O_NOPRINT 31
+#define O_NUMBER 32
+#define O_OCTAL 33
+#define O_OPEN 34
+#define O_OPTIMIZE 35
+#define O_PARAGRAPHS 36
+#define O_PATH 37
+#define O_PRINT 38
+#define O_PROMPT 39
+#define O_READONLY 40
+#define O_RECDIR 41
+#define O_REDRAW 42
+#define O_REMAP 43
+#define O_REPORT 44
+#define O_RULER 45
+#define O_SCROLL 46
+#define O_SEARCHINCR 47
+#define O_SECTIONS 48
+#define O_SECURE 49
+#define O_SHELL 50
+#define O_SHELLMETA 51
+#define O_SHIFTWIDTH 52
+#define O_SHOWMATCH 53
+#define O_SHOWMODE 54
+#define O_SIDESCROLL 55
+#define O_SLOWOPEN 56
+#define O_SOURCEANY 57
+#define O_TABSTOP 58
+#define O_TAGLENGTH 59
+#define O_TAGS 60
+#define O_TERM 61
+#define O_TERSE 62
+#define O_TILDEOP 63
+#define O_TIMEOUT 64
+#define O_TTYWERASE 65
+#define O_VERBOSE 66
+#define O_W1200 67
+#define O_W300 68
+#define O_W9600 69
+#define O_WARN 70
+#define O_WINDOW 71
+#define O_WINDOWNAME 72
+#define O_WRAPLEN 73
+#define O_WRAPMARGIN 74
+#define O_WRAPSCAN 75
+#define O_WRITEANY 76
+#define O_OPTIONCOUNT 77
diff --git cl/cl_screen.c cl/cl_screen.c
index 6fafff1..24255af 100644
--- cl/cl_screen.c
+++ cl/cl_screen.c
@@ -190,7 +190,7 @@ cl_vi_init(SCR *sp)
 	/* Curses vi always reads from (and writes to) a terminal. */
 	if (!F_ISSET(clp, CL_STDIN_TTY) || !isatty(STDOUT_FILENO)) {
 		msgq(sp, M_ERR,
-		    "016|Vi's standard input and output must be a terminal");
+		    "Vi's standard input and output must be a terminal");
 		return (1);
 	}
 
diff --git cl/cl_term.c cl/cl_term.c
index ea5a8bd..98c2eda 100644
--- cl/cl_term.c
+++ cl/cl_term.c
@@ -201,7 +201,7 @@ cl_pfmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to,
 	    p == (char *)-1 || strlen(p) == 0)
 		p = NULL;
 	if (p == NULL) {
-		msgq_str(sp, M_ERR, from, "233|This terminal has no %s key");
+		msgq_str(sp, M_ERR, from, "This terminal has no %s key");
 		return (1);
 	}
 
@@ -294,14 +294,14 @@ cl_omesg(SCR *sp, CL_PRIVATE *clp, int on)
 		if (chmod(tty, sb.st_mode | S_IWGRP) < 0) {
 			if (sp != NULL)
 				msgq(sp, M_SYSERR,
-				    "046|messages not turned on: %s", tty);
+				    "messages not turned on: %s", tty);
 			return (1);
 		}
 	} else
 		if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) {
 			if (sp != NULL)
 				msgq(sp, M_SYSERR,
-				    "045|messages not turned off: %s", tty);
+				    "messages not turned off: %s", tty);
 			return (1);
 		}
 	return (0);
diff --git common/delete.c common/delete.c
index 33cf796..3ef0ed1 100644
--- common/delete.c
+++ common/delete.c
@@ -114,7 +114,7 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmode)
 		goto err;
 	if (len != 0 && tm->cno != len - 1) {
 		if (len < tm->cno + 1 || len - (tm->cno + 1) > SIZE_MAX - tlen) {
-			msgq(sp, M_ERR, "002|Line length overflow");
+			msgq(sp, M_ERR, "Line length overflow");
 			goto err;
 		}
 		nlen = (len - (tm->cno + 1)) + tlen;
diff --git common/exf.c common/exf.c
index 863eb0f..514c9d0 100644
--- common/exf.c
+++ common/exf.c
@@ -188,7 +188,7 @@ file_init(SCR *sp, FREF *frp, char *rcv_name, int flags)
 		if (fd == -1 || fstat(fd, &sb) == -1 ||
 		    fchmod(fd, S_IRUSR | S_IWUSR) == -1) {
 			msgq(sp, M_SYSERR,
-			    "237|Unable to create temporary file");
+			    "Unable to create temporary file");
 			if (fd != -1) {
 				close(fd);
 				(void)unlink(tname);
@@ -227,7 +227,7 @@ file_init(SCR *sp, FREF *frp, char *rcv_name, int flags)
 
 		if (!S_ISREG(sb.st_mode))
 			msgq_str(sp, M_ERR, oname,
-			    "238|Warning: %s is not a regular file");
+			    "Warning: %s is not a regular file");
 	}
 
 	/* Save device, inode and modification time. */
@@ -344,7 +344,7 @@ file_init(SCR *sp, FREF *frp, char *rcv_name, int flags)
 		case LOCK_UNAVAIL:
 			readonly = 1;
 			msgq_str(sp, M_INFO, oname,
-			    "239|%s already locked, session is read-only");
+			    "%s already locked, session is read-only");
 			break;
 		case LOCK_SUCCESS:
 			break;
@@ -658,7 +658,7 @@ file_end(SCR *sp, EXF *ep, int force)
 	 */
 	if (!F_ISSET(frp, FR_DONTDELETE) && frp->tname != NULL) {
 		if (unlink(frp->tname))
-			msgq_str(sp, M_SYSERR, frp->tname, "240|%s: remove");
+			msgq_str(sp, M_SYSERR, frp->tname, "%s: remove");
 		free(frp->tname);
 		frp->tname = NULL;
 		if (F_ISSET(frp, FR_TMPFILE)) {
@@ -676,7 +676,7 @@ file_end(SCR *sp, EXF *ep, int force)
 	 * Close the db structure.
 	 */
 	if (ep->db->close != NULL && ep->db->close(ep->db) && !force) {
-		msgq_str(sp, M_SYSERR, frp->name, "241|%s: close");
+		msgq_str(sp, M_SYSERR, frp->name, "%s: close");
 		++ep->refcnt;
 		return (1);
 	}
@@ -700,9 +700,9 @@ file_end(SCR *sp, EXF *ep, int force)
 	 */
 	if (!F_ISSET(ep, F_RCV_NORM)) {
 		if (ep->rcv_path != NULL && unlink(ep->rcv_path))
-			msgq_str(sp, M_SYSERR, ep->rcv_path, "242|%s: remove");
+			msgq_str(sp, M_SYSERR, ep->rcv_path, "%s: remove");
 		if (ep->rcv_mpath != NULL && unlink(ep->rcv_mpath))
-			msgq_str(sp, M_SYSERR, ep->rcv_mpath, "243|%s: remove");
+			msgq_str(sp, M_SYSERR, ep->rcv_mpath, "%s: remove");
 	}
 	if (ep->fcntl_fd != -1)
 		(void)close(ep->fcntl_fd);
@@ -756,8 +756,8 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 	/* Can't write files marked read-only, unless forced. */
 	if (!LF_ISSET(FS_FORCE) && noname && O_ISSET(sp, O_READONLY)) {
 		msgq(sp, M_ERR, LF_ISSET(FS_POSSIBLE) ?
-		    "244|Read-only file, not written; use ! to override" :
-		    "245|Read-only file, not written");
+		    "Read-only file, not written; use ! to override" :
+		    "Read-only file, not written");
 		return (1);
 	}
 
@@ -768,8 +768,8 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 		    !stat(name, &sb)) {
 			msgq_str(sp, M_ERR, name,
 			    LF_ISSET(FS_POSSIBLE) ?
-			    "246|%s exists, not written; use ! to override" :
-			    "247|%s exists, not written");
+			    "%s exists, not written; use ! to override" :
+			    "%s exists, not written");
 			return (1);
 		}
 
@@ -779,8 +779,8 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 		 */
 		if (!LF_ISSET(FS_ALL) && noname && !stat(name, &sb)) {
 			msgq(sp, M_ERR, LF_ISSET(FS_POSSIBLE) ?
-			    "248|Partial file, not written; use ! to override" :
-			    "249|Partial file, not written");
+			    "Partial file, not written; use ! to override" :
+			    "Partial file, not written");
 			return (1);
 		}
 	}
@@ -804,8 +804,8 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 		    (sb.st_dev != ep->mdev || sb.st_ino != ep->minode)) ||
 		    timespeccmp(&sb.st_mtim, &ep->mtim, !=))) {
 			msgq_str(sp, M_ERR, name, LF_ISSET(FS_POSSIBLE) ?
-"250|%s: file modified more recently than this copy; use ! to override" :
-"251|%s: file modified more recently than this copy");
+"%s: file modified more recently than this copy; use ! to override" :
+"%s: file modified more recently than this copy");
 			return (1);
 		}
 
@@ -831,7 +831,7 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 	/* Try and get a lock. */
 	if (!noname && file_lock(sp, NULL, NULL, fd, 0) == LOCK_UNAVAIL)
 		msgq_str(sp, M_ERR, name,
-		    "252|%s: write lock was unavailable");
+		    "%s: write lock was unavailable");
 
 	/*
 	 * Use stdio for buffering.
@@ -883,7 +883,7 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 	if (rval) {
 		if (!LF_ISSET(FS_APPEND))
 			msgq_str(sp, M_ERR, name,
-			    "254|%s: WARNING: FILE TRUNCATED");
+			    "%s: WARNING: FILE TRUNCATED");
 		return (1);
 	}
 
@@ -915,15 +915,15 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 	switch (mtype) {
 	case NEWFILE:
 		msgstr = msg_cat(sp,
-		    "256|%s: new file: %lu lines, %lu characters", NULL);
+		    "%s: new file: %lu lines, %lu characters", NULL);
 		len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch);
 		if (len >= sizeof(buf))
 			len = sizeof(buf) - 1;
 		break;
 	case OLDFILE:
 		msgstr = msg_cat(sp, LF_ISSET(FS_APPEND) ?
-		    "315|%s: appended: %lu lines, %lu characters" :
-		    "257|%s: %lu lines, %lu characters", NULL);
+		    "%s: appended: %lu lines, %lu characters" :
+		    "%s: %lu lines, %lu characters", NULL);
 		len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch);
 		if (len >= sizeof(buf))
 			len = sizeof(buf) - 1;
@@ -1026,7 +1026,7 @@ file_backup(SCR *sp, char *name, char *bname)
 	 */
 	if (cmd.argc != 1) {
 		msgq_str(sp, M_ERR, bname,
-		    "258|%s expanded into too many file names");
+		    "%s expanded into too many file names");
 		(void)close(rfd);
 		return (1);
 	}
@@ -1084,16 +1084,16 @@ file_backup(SCR *sp, char *name, char *bname)
 	if (stat(wfname, &sb) == 0) {
 		if (!S_ISREG(sb.st_mode)) {
 			msgq_str(sp, M_ERR, bname,
-			    "259|%s: not a regular file");
+			    "%s: not a regular file");
 			goto err;
 		}
 		if (sb.st_uid != getuid()) {
-			msgq_str(sp, M_ERR, bname, "260|%s: not owned by you");
+			msgq_str(sp, M_ERR, bname, "%s: not owned by you");
 			goto err;
 		}
 		if (sb.st_mode & (S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) {
 			msgq_str(sp, M_ERR, bname,
-			   "261|%s: accessible by a user other than the owner");
+			   "%s: accessible by a user other than the owner");
 			goto err;
 		}
 		flags = O_TRUNC;
@@ -1221,8 +1221,8 @@ file_m1(SCR *sp, int force, int flags)
 				return (1);
 		} else if (ep->refcnt <= 1 && !force) {
 			msgq(sp, M_ERR, LF_ISSET(FS_POSSIBLE) ?
-"262|File modified since last complete write; write or use ! to override" :
-"263|File modified since last complete write; write or use :edit! to override");
+"File modified since last complete write; write or use ! to override" :
+"File modified since last complete write; write or use :edit! to override");
 			return (1);
 		}
 	}
@@ -1254,7 +1254,7 @@ file_m2(SCR *sp, int force)
 	 */
 	if (F_ISSET(ep, F_MODIFIED) && ep->refcnt <= 1 && !force) {
 		msgq(sp, M_ERR,
-"264|File modified since last complete write; write or use ! to override");
+"File modified since last complete write; write or use ! to override");
 		return (1);
 	}
 
@@ -1287,7 +1287,7 @@ file_m3(SCR *sp, int force)
 	 */
 	if (F_ISSET(sp->frp, FR_TMPEXIT) && ep->refcnt <= 1 && !force) {
 		msgq(sp, M_ERR,
-		    "265|File is a temporary; exit will discard modifications");
+		    "File is a temporary; exit will discard modifications");
 		return (1);
 	}
 	return (0);
@@ -1320,7 +1320,7 @@ file_aw(SCR *sp, int flags)
 	 */
 	if (O_ISSET(sp, O_READONLY)) {
 		msgq(sp, M_INFO,
-		    "266|File readonly, modifications not auto-written");
+		    "File readonly, modifications not auto-written");
 		return (1);
 	}
 	return (file_write(sp, NULL, NULL, NULL, flags));
diff --git common/key.c common/key.c
index 63421dd..e3536b0 100644
--- common/key.c
+++ common/key.c
@@ -139,7 +139,7 @@ v_key_init(SCR *sp)
 			break;
 		}
 	if (ch != gp->noprint) {
-		msgq(sp, M_ERR, "079|No non-printable character found");
+		msgq(sp, M_ERR, "No non-printable character found");
 		return (1);
 	}
 	return (0);
@@ -733,31 +733,31 @@ v_event_err(SCR *sp, EVENT *evp)
 {
 	switch (evp->e_event) {
 	case E_CHARACTER:
-		msgq(sp, M_ERR, "276|Unexpected character event");
+		msgq(sp, M_ERR, "Unexpected character event");
 		break;
 	case E_EOF:
-		msgq(sp, M_ERR, "277|Unexpected end-of-file event");
+		msgq(sp, M_ERR, "Unexpected end-of-file event");
 		break;
 	case E_INTERRUPT:
-		msgq(sp, M_ERR, "279|Unexpected interrupt event");
+		msgq(sp, M_ERR, "Unexpected interrupt event");
 		break;
 	case E_QUIT:
-		msgq(sp, M_ERR, "280|Unexpected quit event");
+		msgq(sp, M_ERR, "Unexpected quit event");
 		break;
 	case E_REPAINT:
-		msgq(sp, M_ERR, "281|Unexpected repaint event");
+		msgq(sp, M_ERR, "Unexpected repaint event");
 		break;
 	case E_STRING:
-		msgq(sp, M_ERR, "285|Unexpected string event");
+		msgq(sp, M_ERR, "Unexpected string event");
 		break;
 	case E_TIMEOUT:
-		msgq(sp, M_ERR, "286|Unexpected timeout event");
+		msgq(sp, M_ERR, "Unexpected timeout event");
 		break;
 	case E_WRESIZE:
-		msgq(sp, M_ERR, "316|Unexpected resize event");
+		msgq(sp, M_ERR, "Unexpected resize event");
 		break;
 	case E_WRITE:
-		msgq(sp, M_ERR, "287|Unexpected write event");
+		msgq(sp, M_ERR, "Unexpected write event");
 		break;
 
 	/*
diff --git common/line.c common/line.c
index 549f79b..5576c2c 100644
--- common/line.c
+++ common/line.c
@@ -205,7 +205,7 @@ db_delete(SCR *sp, recno_t lno)
 	key.size = sizeof(lno);
 	if (ep->db->del(ep->db, &key, 0) == 1) {
 		msgq(sp, M_SYSERR,
-		    "003|unable to delete line %lu", (u_long)lno);
+		    "unable to delete line %lu", (u_long)lno);
 		return (1);
 	}
 
@@ -253,7 +253,7 @@ db_append(SCR *sp, int update, recno_t lno, char *p, size_t len)
 	data.size = len;
 	if (ep->db->put(ep->db, &key, &data, R_IAFTER) == -1) {
 		msgq(sp, M_SYSERR,
-		    "004|unable to append to line %lu", (u_long)lno);
+		    "unable to append to line %lu", (u_long)lno);
 		return (1);
 	}
 
@@ -321,7 +321,7 @@ db_insert(SCR *sp, recno_t lno, char *p, size_t len)
 	data.size = len;
 	if (ep->db->put(ep->db, &key, &data, R_IBEFORE) == -1) {
 		msgq(sp, M_SYSERR,
-		    "005|unable to insert at line %lu", (u_long)lno);
+		    "unable to insert at line %lu", (u_long)lno);
 		return (1);
 	}
 
@@ -383,7 +383,7 @@ db_set(SCR *sp, recno_t lno, char *p, size_t len)
 	data.size = len;
 	if (ep->db->put(ep->db, &key, &data, 0) == -1) {
 		msgq(sp, M_SYSERR,
-		    "006|unable to store line %lu", (u_long)lno);
+		    "unable to store line %lu", (u_long)lno);
 		return (1);
 	}
 
@@ -472,7 +472,7 @@ db_last(SCR *sp, recno_t *lnop)
 
 	switch (ep->db->seq(ep->db, &key, &data, R_LAST)) {
         case -1:
-		msgq(sp, M_SYSERR, "007|unable to get last line");
+		msgq(sp, M_SYSERR, "unable to get last line");
 		*lnop = 0;
 		return (1);
         case 1:
@@ -505,7 +505,7 @@ void
 db_err(SCR *sp, recno_t lno)
 {
 	msgq(sp, M_ERR,
-	    "008|Error: unable to retrieve line %lu", (u_long)lno);
+	    "Error: unable to retrieve line %lu", (u_long)lno);
 }
 
 /*
diff --git common/log.c common/log.c
index a830f29..c12453c 100644
--- common/log.c
+++ common/log.c
@@ -98,7 +98,7 @@ log_init(SCR *sp, EXF *ep)
 	ep->log = dbopen(NULL, O_CREAT | O_NONBLOCK | O_RDWR,
 	    S_IRUSR | S_IWUSR, DB_RECNO, NULL);
 	if (ep->log == NULL) {
-		msgq(sp, M_SYSERR, "009|Log file");
+		msgq(sp, M_SYSERR, "Log file");
 		F_SET(ep, F_NOLOG);
 		return (1);
 	}
@@ -357,12 +357,12 @@ log_backward(SCR *sp, MARK *rp)
 	ep = sp->ep;
 	if (F_ISSET(ep, F_NOLOG)) {
 		msgq(sp, M_ERR,
-		    "010|Logging not being performed, undo not possible");
+		    "Logging not being performed, undo not possible");
 		return (1);
 	}
 
 	if (ep->l_cur == 1) {
-		msgq(sp, M_BERR, "011|No changes to undo");
+		msgq(sp, M_BERR, "No changes to undo");
 		return (1);
 	}
 
@@ -460,7 +460,7 @@ log_setline(SCR *sp)
 	ep = sp->ep;
 	if (F_ISSET(ep, F_NOLOG)) {
 		msgq(sp, M_ERR,
-		    "012|Logging not being performed, undo not possible");
+		    "Logging not being performed, undo not possible");
 		return (1);
 	}
 
@@ -547,12 +547,12 @@ log_forward(SCR *sp, MARK *rp)
 	ep = sp->ep;
 	if (F_ISSET(ep, F_NOLOG)) {
 		msgq(sp, M_ERR,
-	    "013|Logging not being performed, roll-forward not possible");
+	    "Logging not being performed, roll-forward not possible");
 		return (1);
 	}
 
 	if (ep->l_cur == ep->l_high) {
-		msgq(sp, M_BERR, "014|No changes to re-do");
+		msgq(sp, M_BERR, "No changes to re-do");
 		return (1);
 	}
 
@@ -635,11 +635,11 @@ log_err(SCR *sp, char *file, int line)
 {
 	EXF *ep;
 
-	msgq(sp, M_SYSERR, "015|%s/%d: log put error", tail(file), line);
+	msgq(sp, M_SYSERR, "%s/%d: log put error", tail(file), line);
 	ep = sp->ep;
 	(void)ep->log->close(ep->log);
 	if (!log_init(sp, ep))
-		msgq(sp, M_ERR, "267|Log restarted");
+		msgq(sp, M_ERR, "Log restarted");
 }
 
 #if defined(DEBUG) && 0
diff --git common/mark.c common/mark.c
index b845e47..d35d445 100644
--- common/mark.c
+++ common/mark.c
@@ -113,12 +113,12 @@ mark_get(SCR *sp, ARG_CHAR_T key, MARK *mp, mtype_t mtype)
 
 	lmp = mark_find(sp, key);
 	if (lmp == NULL || lmp->name != key) {
-		msgq(sp, mtype, "017|Mark %s: not set", KEY_NAME(sp, key));
+		msgq(sp, mtype, "Mark %s: not set", KEY_NAME(sp, key));
                 return (1);
 	}
 	if (F_ISSET(lmp, MARK_DELETED)) {
 		msgq(sp, mtype,
-		    "018|Mark %s: the line was deleted", KEY_NAME(sp, key));
+		    "Mark %s: the line was deleted", KEY_NAME(sp, key));
                 return (1);
 	}
 
@@ -129,7 +129,7 @@ mark_get(SCR *sp, ARG_CHAR_T key, MARK *mp, mtype_t mtype)
 	 */
 	if ((lmp->lno != 1 || lmp->cno != 0) && !db_exist(sp, lmp->lno)) {
 		msgq(sp, mtype,
-		    "019|Mark %s: cursor position no longer exists",
+		    "Mark %s: cursor position no longer exists",
 		    KEY_NAME(sp, key));
 		return (1);
 	}
diff --git common/msg.c common/msg.c
index f10cc91..8e35393 100644
--- common/msg.c
+++ common/msg.c
@@ -115,7 +115,7 @@ retry:		FREE_SPACE(sp, bp, blen);
 	mp = bp;
 	mlen = 0;
 	if (mt == M_SYSERR) {
-		p = msg_cat(sp, "020|Error: ", &len);
+		p = msg_cat(sp, "Error: ", &len);
 		if (REM < len)
 			goto retry;
 		memcpy(mp, p, len);
@@ -233,17 +233,17 @@ void
 mod_rpt(SCR *sp)
 {
 	static char * const action[] = {
-		"293|added",
-		"294|changed",
-		"295|deleted",
-		"296|joined",
-		"297|moved",
-		"298|shifted",
-		"299|yanked",
+		"added",
+		"changed",
+		"deleted",
+		"joined",
+		"moved",
+		"shifted",
+		"yanked",
 	};
 	static char * const lines[] = {
-		"300|line",
-		"301|lines",
+		"line",
+		"lines",
 	};
 	recno_t total;
 	u_long rptval;
@@ -368,7 +368,7 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 		for (cnt = 0, ap = sp->argv; *ap != NULL; ++ap, ++cnt);
 		if (cnt > 1) {
 			(void)snprintf(p, ep - p,
-			    msg_cat(sp, "317|%d files to edit", NULL), cnt);
+			    msg_cat(sp, "%d files to edit", NULL), cnt);
 			p += strlen(p);
 			*p++ = ':';
 			*p++ = ' ';
@@ -386,13 +386,13 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 	needsep = 0;
 	if (F_ISSET(sp->frp, FR_NEWFILE)) {
 		F_CLR(sp->frp, FR_NEWFILE);
-		t = msg_cat(sp, "021|new file", &len);
+		t = msg_cat(sp, "new file", &len);
 		memcpy(p, t, len);
 		p += len;
 		needsep = 1;
 	} else {
 		if (F_ISSET(sp->frp, FR_NAMECHANGE)) {
-			t = msg_cat(sp, "022|name changed", &len);
+			t = msg_cat(sp, "name changed", &len);
 			memcpy(p, t, len);
 			p += len;
 			needsep = 1;
@@ -402,9 +402,9 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 			*p++ = ' ';
 		}
 		if (F_ISSET(sp->ep, F_MODIFIED))
-			t = msg_cat(sp, "023|modified", &len);
+			t = msg_cat(sp, "modified", &len);
 		else
-			t = msg_cat(sp, "024|unmodified", &len);
+			t = msg_cat(sp, "unmodified", &len);
 		memcpy(p, t, len);
 		p += len;
 		needsep = 1;
@@ -414,7 +414,7 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 			*p++ = ',';
 			*p++ = ' ';
 		}
-		t = msg_cat(sp, "025|UNLOCKED", &len);
+		t = msg_cat(sp, "UNLOCKED", &len);
 		memcpy(p, t, len);
 		p += len;
 		needsep = 1;
@@ -424,7 +424,7 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 			*p++ = ',';
 			*p++ = ' ';
 		}
-		t = msg_cat(sp, "026|readonly", &len);
+		t = msg_cat(sp, "readonly", &len);
 		memcpy(p, t, len);
 		p += len;
 		needsep = 1;
@@ -437,17 +437,17 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 		if (db_last(sp, &last))
 			return;
 		if (last == 0) {
-			t = msg_cat(sp, "028|empty file", &len);
+			t = msg_cat(sp, "empty file", &len);
 			memcpy(p, t, len);
 			p += len;
 		} else {
-			t = msg_cat(sp, "027|line %lu of %lu [%ld%%]", &len);
+			t = msg_cat(sp, "line %lu of %lu [%ld%%]", &len);
 			(void)snprintf(p, ep - p, t, lno, last,
 			    (lno * 100) / last);
 			p += strlen(p);
 		}
 	} else {
-		t = msg_cat(sp, "029|line %lu", &len);
+		t = msg_cat(sp, "line %lu", &len);
 		(void)snprintf(p, ep - p, t, lno);
 		p += strlen(p);
 	}
@@ -507,20 +507,20 @@ msg_cmsg(SCR *sp, cmsg_t which, size_t *lenp)
 {
 	switch (which) {
 	case CMSG_CONF:
-		return (msg_cat(sp, "268|confirm? [ynq]", lenp));
+		return (msg_cat(sp, "confirm? [ynq]", lenp));
 	case CMSG_CONT:
-		return (msg_cat(sp, "269|Press any key to continue: ", lenp));
+		return (msg_cat(sp, "Press any key to continue: ", lenp));
 	case CMSG_CONT_EX:
 		return (msg_cat(sp,
-	    "270|Press any key to continue [: to enter more ex commands]: ",
+	    "Press any key to continue [: to enter more ex commands]: ",
 		    lenp));
 	case CMSG_CONT_R:
-		return (msg_cat(sp, "161|Press Enter to continue: ", lenp));
+		return (msg_cat(sp, "Press Enter to continue: ", lenp));
 	case CMSG_CONT_S:
-		return (msg_cat(sp, "275| cont?", lenp));
+		return (msg_cat(sp, " cont?", lenp));
 	case CMSG_CONT_Q:
 		return (msg_cat(sp,
-		    "271|Press any key to continue [q to quit]: ", lenp));
+		    "Press any key to continue [q to quit]: ", lenp));
 	default:
 		abort();
 	}
diff --git common/options.c common/options.c
index 9a03b31..945bce7 100644
--- common/options.c
+++ common/options.c
@@ -431,7 +431,7 @@ opts_init(SCR *sp, int *oargs)
 #undef OI
 
 err:	msgq(sp, M_ERR,
-	    "031|Unable to set default %s option", optlist[optindx].name);
+	    "Unable to set default %s option", optlist[optindx].name);
 	return (1);
 }
 
@@ -470,7 +470,7 @@ opts_set(SCR *sp, ARGS *argv[], char *usage)
 				if (p == name) {
 					if (usage != NULL)
 						msgq(sp, M_ERR,
-						    "032|Usage: %s", usage);
+						    "Usage: %s", usage);
 					return (1);
 				}
 				sep = p;
@@ -521,7 +521,7 @@ opts_set(SCR *sp, ARGS *argv[], char *usage)
 			/* Some options may not be reset. */
 			if (F_ISSET(op, OPT_NOUNSET) && turnoff) {
 				msgq_str(sp, M_ERR, name,
-			    "291|set: the %s option may not be turned off");
+			    "set: the %s option may not be turned off");
 				rval = 1;
 				break;
 			}
@@ -529,14 +529,14 @@ opts_set(SCR *sp, ARGS *argv[], char *usage)
 			/* Some options may not be set. */
 			if (F_ISSET(op, OPT_NOSET) && !turnoff) {
 				msgq_str(sp, M_ERR, name,
-			    "313|set: the %s option may never be turned on");
+			    "set: the %s option may never be turned on");
 				rval = 1;
 				break;
 			}
 
 			if (equals) {
 				msgq_str(sp, M_ERR, name,
-			    "034|set: [no]%s option doesn't take a value");
+			    "set: [no]%s option doesn't take a value");
 				rval = 1;
 				break;
 			}
@@ -590,7 +590,7 @@ opts_set(SCR *sp, ARGS *argv[], char *usage)
 		case OPT_NUM:
 			if (turnoff) {
 				msgq_str(sp, M_ERR, name,
-				    "035|set: %s option isn't a boolean");
+				    "set: %s option isn't a boolean");
 				rval = 1;
 				break;
 			}
@@ -610,11 +610,11 @@ opts_set(SCR *sp, ARGS *argv[], char *usage)
 				switch (nret) {
 				case NUM_ERR:
 					msgq(sp, M_SYSERR,
-					    "036|set: %s option: %s", p, t);
+					    "set: %s option: %s", p, t);
 					break;
 				case NUM_OVER:
 					msgq(sp, M_ERR,
-			    "037|set: %s option: %s: value overflow", p, t);
+			    "set: %s option: %s: value overflow", p, t);
 					break;
 				case NUM_OK:
 				case NUM_UNDER:
@@ -631,7 +631,7 @@ opts_set(SCR *sp, ARGS *argv[], char *usage)
 badnum:				p = msg_print(sp, name, &nf);
 				t = msg_print(sp, sep, &nf2);
 				msgq(sp, M_ERR,
-		    "038|set: %s option: %s is an illegal number", p, t);
+		    "set: %s option: %s is an illegal number", p, t);
 				if (nf)
 					FREE_SPACE(sp, p, 0);
 				if (nf2)
@@ -643,7 +643,7 @@ badnum:				p = msg_print(sp, name, &nf);
 			/* Some options may never be set to zero. */
 			if (F_ISSET(op, OPT_NOZERO) && value == 0) {
 				msgq_str(sp, M_ERR, name,
-			    "314|set: the %s option may never be set to 0");
+			    "set: the %s option may never be set to 0");
 				rval = 1;
 				break;
 			}
@@ -683,7 +683,7 @@ badnum:				p = msg_print(sp, name, &nf);
 		case OPT_STR:
 			if (turnoff) {
 				msgq_str(sp, M_ERR, name,
-				    "039|set: %s option isn't a boolean");
+				    "set: %s option isn't a boolean");
 				rval = 1;
 				break;
 			}
@@ -789,7 +789,7 @@ opts_empty(SCR *sp, int off, int silent)
 	if ((p = O_STR(sp, off)) == NULL || p[0] == '\0') {
 		if (!silent)
 			msgq_str(sp, M_ERR, optlist[off].name,
-			    "305|No %s edit option specified");
+			    "No %s edit option specified");
 		return (1);
 	}
 	return (0);
@@ -1067,7 +1067,7 @@ void
 opts_nomatch(SCR *sp, char *name)
 {
 	msgq_str(sp, M_ERR, name,
-	    "033|set: no %s option: 'set all' gives all option values");
+	    "set: no %s option: 'set all' gives all option values");
 }
 
 static int
diff --git common/options_f.c common/options_f.c
index a5b7276..4a59abb 100644
--- common/options_f.c
+++ common/options_f.c
@@ -45,7 +45,7 @@ f_columns(SCR *sp, OPTION *op, char *str, u_long *valp)
 {
 	/* Validate the number. */
 	if (*valp < MINIMUM_SCREEN_COLS) {
-		msgq(sp, M_ERR, "040|Screen columns too small, less than %d",
+		msgq(sp, M_ERR, "Screen columns too small, less than %d",
 		    MINIMUM_SCREEN_COLS);
 		return (1);
 	}
@@ -60,7 +60,7 @@ f_columns(SCR *sp, OPTION *op, char *str, u_long *valp)
 	 */
 #define	MAXIMUM_SCREEN_COLS	768
 	if (*valp > MAXIMUM_SCREEN_COLS) {
-		msgq(sp, M_ERR, "041|Screen columns too large, greater than %d",
+		msgq(sp, M_ERR, "Screen columns too large, greater than %d",
 		    MAXIMUM_SCREEN_COLS);
 		return (1);
 	}
@@ -75,7 +75,7 @@ f_lines(SCR *sp, OPTION *op, char *str, u_long *valp)
 {
 	/* Validate the number. */
 	if (*valp < MINIMUM_SCREEN_ROWS) {
-		msgq(sp, M_ERR, "042|Screen lines too small, less than %d",
+		msgq(sp, M_ERR, "Screen lines too small, less than %d",
 		    MINIMUM_SCREEN_ROWS);
 		return (1);
 	}
@@ -90,7 +90,7 @@ f_lines(SCR *sp, OPTION *op, char *str, u_long *valp)
 	 */
 #define	MAXIMUM_SCREEN_ROWS	500
 	if (*valp > MAXIMUM_SCREEN_ROWS) {
-		msgq(sp, M_ERR, "043|Screen lines too large, greater than %d",
+		msgq(sp, M_ERR, "Screen lines too large, greater than %d",
 		    MAXIMUM_SCREEN_ROWS);
 		return (1);
 	}
@@ -126,7 +126,7 @@ f_lines(SCR *sp, OPTION *op, char *str, u_long *valp)
 int
 f_lisp(SCR *sp, OPTION *op, char *str, u_long *valp)
 {
-	msgq(sp, M_ERR, "044|The lisp option is not implemented");
+	msgq(sp, M_ERR, "The lisp option is not implemented");
 	return (0);
 }
 
@@ -138,7 +138,7 @@ f_paragraph(SCR *sp, OPTION *op, char *str, u_long *valp)
 {
 	if (strlen(str) & 1) {
 		msgq(sp, M_ERR,
-		    "048|The paragraph option must be in two character groups");
+		    "The paragraph option must be in two character groups");
 		return (1);
 	}
 	return (0);
@@ -210,7 +210,7 @@ f_section(SCR *sp, OPTION *op, char *str, u_long *valp)
 {
 	if (strlen(str) & 1) {
 		msgq(sp, M_ERR,
-		    "049|The section option must be in two character groups");
+		    "The section option must be in two character groups");
 		return (1);
 	}
 	return (0);
diff --git common/put.c common/put.c
index 48e760c..f5b8590 100644
--- common/put.c
+++ common/put.c
@@ -44,14 +44,14 @@ put(SCR *sp, CB *cbp, CHAR_T *namep, MARK *cp, MARK *rp, int append)
 			cbp = sp->gp->dcbp;
 			if (cbp == NULL) {
 				msgq(sp, M_ERR,
-				    "053|The default buffer is empty");
+				    "The default buffer is empty");
 				return (1);
 			}
 		} else {
 			name = *namep;
 			CBNAME(sp, cbp, name);
 			if (cbp == NULL) {
-				msgq(sp, M_ERR, "054|Buffer %s is empty",
+				msgq(sp, M_ERR, "Buffer %s is empty",
 				    KEY_NAME(sp, name));
 				return (1);
 			}
diff --git common/recover.c common/recover.c
index 3e13d89..545f86e 100644
--- common/recover.c
+++ common/recover.c
@@ -151,7 +151,7 @@ rcv_tmp(SCR *sp, EXF *ep, char *name)
 	for (p = name; *p; ++p)
 		if (*p == '\n') {
 			msgq(sp, M_ERR,
-		    "055|Files with newlines in the name are unrecoverable");
+		    "Files with newlines in the name are unrecoverable");
 			goto err;
 		}
 
@@ -164,7 +164,7 @@ rcv_tmp(SCR *sp, EXF *ep, char *name)
 		msgq(sp, M_SYSERR, NULL);
 		(void)unlink(path);
 err:		msgq(sp, M_ERR,
-		    "056|Modifications not recoverable if the session fails");
+		    "Modifications not recoverable if the session fails");
 		return (1);
 	}
 
@@ -209,10 +209,10 @@ rcv_init(SCR *sp)
 
 		/* Turn on a busy message, and sync it to backing store. */
 		sp->gp->scr_busy(sp,
-		    "057|Copying file for recovery...", BUSY_ON);
+		    "Copying file for recovery...", BUSY_ON);
 		if (ep->db->sync(ep->db, R_RECNOSYNC)) {
 			msgq_str(sp, M_SYSERR, ep->rcv_path,
-			    "058|Preservation failed: %s");
+			    "Preservation failed: %s");
 			sp->gp->scr_busy(sp, NULL, BUSY_OFF);
 			goto err;
 		}
@@ -227,7 +227,7 @@ rcv_init(SCR *sp)
 	return (0);
 
 err:	msgq(sp, M_ERR,
-	    "059|Modifications not recoverable if the session fails");
+	    "Modifications not recoverable if the session fails");
 	return (1);
 }
 
@@ -258,7 +258,7 @@ rcv_sync(SCR *sp, u_int flags)
 		if (ep->db->sync(ep->db, R_RECNOSYNC)) {
 			F_CLR(ep, F_RCV_ON | F_RCV_NORM);
 			msgq_str(sp, M_SYSERR,
-			    ep->rcv_path, "060|File backup failed: %s");
+			    ep->rcv_path, "File backup failed: %s");
 			return (1);
 		}
 
@@ -290,7 +290,7 @@ rcv_sync(SCR *sp, u_int flags)
 		if ((fd = rcv_mktemp(sp, buf, dp, S_IRUSR | S_IWUSR)) == -1)
 			goto err;
 		sp->gp->scr_busy(sp,
-		    "061|Copying file for recovery...", BUSY_ON);
+		    "Copying file for recovery...", BUSY_ON);
 		if (rcv_copy(sp, fd, ep->rcv_path) ||
 		    close(fd) || rcv_mailfile(sp, 1, buf)) {
 			(void)unlink(buf);
@@ -331,7 +331,7 @@ rcv_mailfile(SCR *sp, int issync, char *cp_path)
 	gp = sp->gp;
 	if ((pw = getpwuid(uid = getuid())) == NULL) {
 		msgq(sp, M_ERR,
-		    "062|Information on user id %u not found", uid);
+		    "Information on user id %u not found", uid);
 		return (1);
 	}
 
@@ -351,7 +351,7 @@ rcv_mailfile(SCR *sp, int issync, char *cp_path)
 	 */
 	ep = sp->ep;
 	if (file_lock(sp, NULL, NULL, fd, 1) != LOCK_SUCCESS)
-		msgq(sp, M_SYSERR, "063|Unable to lock recovery file");
+		msgq(sp, M_SYSERR, "Unable to lock recovery file");
 	if (!issync) {
 		/* Save the recover file descriptor, and mail path. */
 		ep->rcv_fd = fd;
@@ -400,7 +400,7 @@ rcv_mailfile(SCR *sp, int issync, char *cp_path)
 	    "to this file using the -r option to ", gp->progname, ":\n\n\t",
 	    gp->progname, " -r ", t);
 	if (len > sizeof(buf) - 1) {
-lerr:		msgq(sp, M_ERR, "064|Recovery file buffer overrun");
+lerr:		msgq(sp, M_ERR, "Recovery file buffer overrun");
 		goto err;
 	}
 
@@ -441,7 +441,7 @@ wout:		*t2++ = '\n';
 	if (issync) {
 		rcv_email(sp, mpath);
 		if (close(fd)) {
-werr:			msgq(sp, M_SYSERR, "065|Recovery file");
+werr:			msgq(sp, M_SYSERR, "Recovery file");
 			goto err;
 		}
 	}
@@ -525,7 +525,7 @@ rcv_list(SCR *sp)
 		    strncmp(path, VI_PHEADER, sizeof(VI_PHEADER) - 1) ||
 		    (t = strchr(path, '\n')) == NULL) {
 			msgq_str(sp, M_ERR, dp->d_name,
-			    "066|%s: malformed recovery file");
+			    "%s: malformed recovery file");
 			goto next;
 		}
 		*p = *t = '\0';
@@ -639,7 +639,7 @@ rcv_read(SCR *sp, FREF *frp)
 		    strncmp(path, VI_PHEADER, sizeof(VI_PHEADER) - 1) ||
 		    (t = strchr(path, '\n')) == NULL) {
 			msgq_str(sp, M_ERR, recpath,
-			    "067|%s: malformed recovery file");
+			    "%s: malformed recovery file");
 			goto next;
 		}
 		*p = *t = '\0';
@@ -701,16 +701,16 @@ next:			(void)close(fd);
 
 	if (recp == NULL) {
 		msgq_str(sp, M_INFO, name,
-		    "068|No files named %s, readable by you, to recover");
+		    "No files named %s, readable by you, to recover");
 		return (1);
 	}
 	if (found) {
 		if (requested > 1)
 			msgq(sp, M_INFO,
-	    "069|There are older versions of this file for you to recover");
+	    "There are older versions of this file for you to recover");
 		if (found > requested)
 			msgq(sp, M_INFO,
-			    "070|There are other files for you to recover");
+			    "There are other files for you to recover");
 	}
 
 	/*
@@ -825,7 +825,7 @@ rcv_email(SCR *sp, char *fname)
 
 	if (_PATH_SENDMAIL[0] != '/' || stat(_PATH_SENDMAIL, &sb))
 		msgq_str(sp, M_SYSERR,
-		    _PATH_SENDMAIL, "071|not sending email: %s");
+		    _PATH_SENDMAIL, "not sending email: %s");
 	else {
 		/*
 		 * !!!
diff --git common/search.c common/search.c
index 033d3ef..a1162c8 100644
--- common/search.c
+++ common/search.c
@@ -435,24 +435,24 @@ search_msg(SCR *sp, smsg_t msg)
 {
 	switch (msg) {
 	case S_EMPTY:
-		msgq(sp, M_ERR, "072|File empty; nothing to search");
+		msgq(sp, M_ERR, "File empty; nothing to search");
 		break;
 	case S_EOF:
 		msgq(sp, M_ERR,
-		    "073|Reached end-of-file without finding the pattern");
+		    "Reached end-of-file without finding the pattern");
 		break;
 	case S_NOPREV:
-		msgq(sp, M_ERR, "074|No previous search pattern");
+		msgq(sp, M_ERR, "No previous search pattern");
 		break;
 	case S_NOTFOUND:
-		msgq(sp, M_ERR, "075|Pattern not found");
+		msgq(sp, M_ERR, "Pattern not found");
 		break;
 	case S_SOF:
 		msgq(sp, M_ERR,
-		    "076|Reached top-of-file without finding the pattern");
+		    "Reached top-of-file without finding the pattern");
 		break;
 	case S_WRAP:
-		msgq(sp, M_ERR, "077|Search wrapped");
+		msgq(sp, M_ERR, "Search wrapped");
 		break;
 	default:
 		abort();
@@ -468,5 +468,5 @@ search_msg(SCR *sp, smsg_t msg)
 void
 search_busy(SCR *sp, busy_t btype)
 {
-	sp->gp->scr_busy(sp, "078|Searching...", btype);
+	sp->gp->scr_busy(sp, "Searching...", btype);
 }
diff --git ex/ex.c ex/ex.c
index 392fec4..efe25c8 100644
--- ex/ex.c
+++ ex/ex.c
@@ -130,7 +130,7 @@ ex(SCR **spp)
 
 		if (INTERRUPTED(sp)) {
 			CLR_INTERRUPT(sp);
-			msgq(sp, M_ERR, "170|Interrupted");
+			msgq(sp, M_ERR, "Interrupted");
 		}
 
 		/*
@@ -385,7 +385,7 @@ loop:	ecp = LIST_FIRST(&gp->ecq);
 				if (!isalpha(*ecp->cp))
 					break;
 			if ((namelen = ecp->cp - p) == 0) {
-				msgq(sp, M_ERR, "080|Unknown command name");
+				msgq(sp, M_ERR, "Unknown command name");
 				goto err;
 			}
 		}
@@ -569,7 +569,7 @@ skip_srch:	if (ecp->cmd == &cmds[C_VISUAL_EX] && F_ISSET(sp, SC_VI))
 	/* Check for ex mode legality. */
 	if (F_ISSET(sp, SC_EX) && (F_ISSET(ecp->cmd, E_VIONLY) || newscreen)) {
 		msgq(sp, M_ERR,
-		    "082|%s: command not available in ex mode", ecp->cmd->name);
+		    "%s: command not available in ex mode", ecp->cmd->name);
 		goto err;
 	}
 
@@ -1058,7 +1058,7 @@ end_case23:		break;
 				goto err;
 			}
 			if (ltmp == 0 && *p != '0') {
-				msgq(sp, M_ERR, "083|Count may not be zero");
+				msgq(sp, M_ERR, "Count may not be zero");
 				goto err;
 			}
 			ecp->clen -= (t - ecp->cp);
@@ -1101,7 +1101,7 @@ end_case23:		break;
 			/* Line specifications are always required. */
 			if (!isaddr) {
 				msgq_str(sp, M_ERR, ecp->cp,
-				     "084|%s: bad line specification");
+				     "%s: bad line specification");
 				goto err;
 			}
 			/*
@@ -1194,7 +1194,7 @@ arg_cnt_chk:		if (*++p != 'N') {		/* N */
 			goto addr_verify;
 		default:
 			msgq(sp, M_ERR,
-			    "085|Internal syntax table error (%s: %s)",
+			    "Internal syntax table error (%s: %s)",
 			    ecp->cmd->name, KEY_NAME(sp, *p));
 		}
 	}
@@ -1211,7 +1211,7 @@ arg_cnt_chk:		if (*++p != 'N') {		/* N */
 	 * i.e neither 'l' or 'r' in the syntax string.
 	 */
 	if (ecp->clen != 0 || strpbrk(p, "lr")) {
-usage:		msgq(sp, M_ERR, "086|Usage: %s", ecp->cmd->usage);
+usage:		msgq(sp, M_ERR, "Usage: %s", ecp->cmd->usage);
 		goto err;
 	}
 
@@ -1374,7 +1374,7 @@ addr_verify:
 	/* Make sure no function left global temporary space locked. */
 	if (F_ISSET(gp, G_TMP_INUSE)) {
 		F_CLR(gp, G_TMP_INUSE);
-		msgq(sp, M_ERR, "087|%s: temporary buffer not released",
+		msgq(sp, M_ERR, "%s: temporary buffer not released",
 		    ecp->cmd->name);
 	}
 #endif
@@ -1407,7 +1407,7 @@ addr_verify:
 		if (ecp->flagoff < 0) {
 			if (sp->lno <= -ecp->flagoff) {
 				msgq(sp, M_ERR,
-				    "088|Flag offset to before line 1");
+				    "Flag offset to before line 1");
 				goto err;
 			}
 		} else {
@@ -1417,7 +1417,7 @@ addr_verify:
 			}
 			if (!db_exist(sp, sp->lno + ecp->flagoff)) {
 				msgq(sp, M_ERR,
-				    "089|Flag offset past end-of-file");
+				    "Flag offset past end-of-file");
 				goto err;
 			}
 		}
@@ -1531,7 +1531,7 @@ addr_verify:
 				if (!at_found) {
 					at_found = 1;
 					msgq(sp, M_ERR,
-		"090|@ with range running when the file/screen changed");
+		"@ with range running when the file/screen changed");
 				}
 				break;
 			case AGV_GLOBAL:
@@ -1539,7 +1539,7 @@ addr_verify:
 				if (!gv_found) {
 					gv_found = 1;
 					msgq(sp, M_ERR,
-		"091|Global/v command running when the file/screen changed");
+		"Global/v command running when the file/screen changed");
 				}
 				break;
 			default:
@@ -1576,12 +1576,12 @@ err:	/*
 		}
 	if (ecp->save_cmdlen != 0 || LIST_FIRST(&gp->ecq) != &gp->excmd) {
 discard:	msgq(sp, M_BERR,
-		    "092|Ex command failed: pending commands discarded");
+		    "Ex command failed: pending commands discarded");
 		ex_discard(sp);
 	}
 	if (v_event_flush(sp, CH_MAPPED))
 		msgq(sp, M_BERR,
-		    "093|Ex command failed: mapped keys discarded");
+		    "Ex command failed: mapped keys discarded");
 
 rfail:	tmp = 1;
 	if (0)
@@ -1775,7 +1775,7 @@ ret:	if (F_ISSET(ecp, E_VISEARCH))
 
 	if (ecp->addrcnt == 2 && ecp->addr2.lno < ecp->addr1.lno) {
 		msgq(sp, M_ERR,
-		    "094|The second address is smaller than the first");
+		    "The second address is smaller than the first");
 		*errp = 1;
 	}
 	return (0);
@@ -1852,7 +1852,7 @@ ex_line(SCR *sp, EXCMD *ecp, MARK *mp, int *isaddrp, int *errp)
 		F_SET(ecp, E_ABSMARK);
 
 		if (ecp->clen == 1) {
-			msgq(sp, M_ERR, "095|No mark name supplied");
+			msgq(sp, M_ERR, "No mark name supplied");
 			*errp = 1;
 			return (0);
 		}
@@ -1872,7 +1872,7 @@ ex_line(SCR *sp, EXCMD *ecp, MARK *mp, int *isaddrp, int *errp)
 		 */
 		if (ecp->clen < 2 ||
 		    (ecp->cp[1] != '/' && ecp->cp[1] != '?')) {
-			msgq(sp, M_ERR, "096|\\ not followed by / or ?");
+			msgq(sp, M_ERR, "\\ not followed by / or ?");
 			*errp = 1;
 			return (0);
 		}
@@ -2018,7 +2018,7 @@ search:		mp->lno = sp->lno;
 		if (total < 0) {
 			if (-total > mp->lno) {
 				msgq(sp, M_ERR,
-			    "097|Reference to a line number less than 0");
+			    "Reference to a line number less than 0");
 				*errp = 1;
 				return (0);
 			}
@@ -2172,7 +2172,7 @@ ex_unknown(SCR *sp, char *cmd, size_t len)
 	GET_SPACE_GOTO(sp, bp, blen, len + 1);
 	bp[len] = '\0';
 	memcpy(bp, cmd, len);
-	msgq_str(sp, M_ERR, bp, "098|The %s command is unknown");
+	msgq_str(sp, M_ERR, bp, "The %s command is unknown");
 	FREE_SPACE(sp, bp, blen);
 
 alloc_err:
@@ -2259,10 +2259,10 @@ ex_badaddr(SCR *sp, EXCMDLIST const *cp, enum badaddr ba, enum nresult nret)
 		msgq(sp, M_SYSERR, NULL);
 		return;
 	case NUM_OVER:
-		msgq(sp, M_ERR, "099|Address value overflow");
+		msgq(sp, M_ERR, "Address value overflow");
 		return;
 	case NUM_UNDER:
-		msgq(sp, M_ERR, "100|Address value underflow");
+		msgq(sp, M_ERR, "Address value underflow");
 		return;
 	}
 
@@ -2277,27 +2277,27 @@ ex_badaddr(SCR *sp, EXCMDLIST const *cp, enum badaddr ba, enum nresult nret)
 
 	switch (ba) {
 	case A_COMBO:
-		msgq(sp, M_ERR, "101|Illegal address combination");
+		msgq(sp, M_ERR, "Illegal address combination");
 		break;
 	case A_EOF:
 		if (db_last(sp, &lno))
 			return;
 		if (lno != 0) {
 			msgq(sp, M_ERR,
-			    "102|Illegal address: only %lu lines in the file",
+			    "Illegal address: only %lu lines in the file",
 			    lno);
 			break;
 		}
 		/* FALLTHROUGH */
 	case A_EMPTY:
-		msgq(sp, M_ERR, "103|Illegal address: the file is empty");
+		msgq(sp, M_ERR, "Illegal address: the file is empty");
 		break;
 	case A_NOTSET:
 		abort();
 		/* NOTREACHED */
 	case A_ZERO:
 		msgq(sp, M_ERR,
-		    "104|The %s command doesn't permit an address of 0",
+		    "The %s command doesn't permit an address of 0",
 		    cp->name);
 		break;
 	}
diff --git ex/ex_abbrev.c ex/ex_abbrev.c
index 05ee68e..deb01c8 100644
--- ex/ex_abbrev.c
+++ ex/ex_abbrev.c
@@ -40,7 +40,7 @@ ex_abbr(SCR *sp, EXCMD *cmdp)
 	switch (cmdp->argc) {
 	case 0:
 		if (seq_dump(sp, SEQ_ABBREV, 0) == 0)
-			msgq(sp, M_INFO, "105|No abbreviations to display");
+			msgq(sp, M_INFO, "No abbreviations to display");
 		return (0);
 	case 2:
 		break;
@@ -63,13 +63,13 @@ ex_abbr(SCR *sp, EXCMD *cmdp)
 	 */
 	if (!inword(cmdp->argv[0]->bp[cmdp->argv[0]->len - 1])) {
 		msgq(sp, M_ERR,
-		    "106|Abbreviations must end with a \"word\" character");
+		    "Abbreviations must end with a \"word\" character");
 			return (1);
 	}
 	for (p = cmdp->argv[0]->bp; *p != '\0'; ++p)
 		if (isblank(p[0])) {
 			msgq(sp, M_ERR,
-			    "107|Abbreviations may not contain tabs or spaces");
+			    "Abbreviations may not contain tabs or spaces");
 			return (1);
 		}
 	if (cmdp->argv[0]->len > 2)
@@ -77,7 +77,7 @@ ex_abbr(SCR *sp, EXCMD *cmdp)
 		    len = cmdp->argv[0]->len - 2; len; --len, ++p)
 			if (inword(p[0]) != inword(p[1])) {
 				msgq(sp, M_ERR,
-"108|Abbreviations may not mix word/non-word characters, except at the end");
+"Abbreviations may not mix word/non-word characters, except at the end");
 				return (1);
 			}
 
@@ -104,7 +104,7 @@ ex_unabbr(SCR *sp, EXCMD *cmdp)
 	if (!F_ISSET(sp->gp, G_ABBREV) ||
 	    seq_delete(sp, ap->bp, ap->len, SEQ_ABBREV)) {
 		msgq_str(sp, M_ERR, ap->bp,
-		    "109|\"%s\" is not an abbreviation");
+		    "\"%s\" is not an abbreviation");
 		return (1);
 	}
 	return (0);
diff --git ex/ex_append.c ex/ex_append.c
index 95ebec7..55e1c9f 100644
--- ex/ex_append.c
+++ ex/ex_append.c
@@ -219,7 +219,7 @@ ex_aci(SCR *sp, EXCMD *cmdp, enum which cmd)
 		 * it.  Give them an informational message.
 		 */
 		(void)ex_puts(sp,
-		    msg_cat(sp, "273|Entering ex input mode.", NULL));
+		    msg_cat(sp, "Entering ex input mode.", NULL));
 		(void)ex_puts(sp, "\n");
 		(void)ex_fflush(sp);
 	}
diff --git ex/ex_args.c ex/ex_args.c
index 03d7d5d..498e4e2 100644
--- ex/ex_args.c
+++ ex/ex_args.c
@@ -49,7 +49,7 @@ ex_next(SCR *sp, EXCMD *cmdp)
 
 	/* Check for file to move to. */
 	if (cmdp->argc == 0 && (sp->cargv == NULL || sp->cargv[1] == NULL)) {
-		msgq(sp, M_ERR, "111|No more files to edit");
+		msgq(sp, M_ERR, "No more files to edit");
 		return (1);
 	}
 
@@ -168,7 +168,7 @@ ex_prev(SCR *sp, EXCMD *cmdp)
 	FREF *frp;
 
 	if (sp->cargv == sp->argv) {
-		msgq(sp, M_ERR, "112|No previous files to edit");
+		msgq(sp, M_ERR, "No previous files to edit");
 		return (1);
 	}
 
@@ -217,7 +217,7 @@ ex_rew(SCR *sp, EXCMD *cmdp)
 	 * Historic practice -- you can rewind to the current file.
 	 */
 	if (sp->argv == NULL) {
-		msgq(sp, M_ERR, "113|No previous files to rewind");
+		msgq(sp, M_ERR, "No previous files to rewind");
 		return (1);
 	}
 
@@ -252,7 +252,7 @@ ex_args(SCR *sp, EXCMD *cmdp)
 	char **ap;
 
 	if (sp->argv == NULL) {
-		(void)msgq(sp, M_ERR, "114|No file list to display");
+		(void)msgq(sp, M_ERR, "No file list to display");
 		return (0);
 	}
 
diff --git ex/ex_argv.c ex/ex_argv.c
index a882d33..26dde9c 100644
--- ex/ex_argv.c
+++ ex/ex_argv.c
@@ -309,7 +309,7 @@ argv_fexp(SCR *sp, EXCMD *excp, char *cmd, size_t cmdlen, char *p,
 			exp = EXP(sp);
 			if (exp->lastbcomm == NULL) {
 				msgq(sp, M_ERR,
-				    "115|No previous command to replace \"!\"");
+				    "No previous command to replace \"!\"");
 				return (1);
 			}
 			len += tlen = strlen(exp->lastbcomm);
@@ -323,7 +323,7 @@ argv_fexp(SCR *sp, EXCMD *excp, char *cmd, size_t cmdlen, char *p,
 		case '%':
 			if ((t = sp->frp->name) == NULL) {
 				msgq(sp, M_ERR,
-				    "116|No filename to substitute for %%");
+				    "No filename to substitute for %%");
 				return (1);
 			}
 			tlen = strlen(t);
@@ -338,7 +338,7 @@ argv_fexp(SCR *sp, EXCMD *excp, char *cmd, size_t cmdlen, char *p,
 		case '#':
 			if ((t = sp->alt_name) == NULL) {
 				msgq(sp, M_ERR,
-				    "117|No filename to substitute for #");
+				    "No filename to substitute for #");
 				return (1);
 			}
 			len += tlen = strlen(t);
@@ -548,7 +548,7 @@ argv_lexp(SCR *sp, EXCMD *excp, char *path)
 		 * failed.  We can't know for certain that's the error, but
 		 * it's a good guess, and it matches historic practice. 
 		 */
-		msgq(sp, M_ERR, "304|Shell expansion failed");
+		msgq(sp, M_ERR, "Shell expansion failed");
 		return (1);
 	}
 	qsort(exp->args + off, exp->argsoff - off, sizeof(ARGS *), argv_comp);
@@ -583,7 +583,7 @@ argv_sexp(SCR *sp, char **bpp, size_t *blenp, size_t *lenp)
 	/* Secure means no shell access. */
 	if (O_ISSET(sp, O_SECURE)) {
 		msgq(sp, M_ERR,
-"289|Shell expansions not supported when the secure edit option is set");
+"Shell expansions not supported when the secure edit option is set");
 		return (1);
 	}
 
@@ -647,7 +647,7 @@ err:		if (ifp != NULL)
 		 * Assume that all shells have -c.
 		 */
 		execl(sh_path, sh, "-c", bp, (char *)NULL);
-		msgq_str(sp, M_SYSERR, sh_path, "118|Error: execl: %s");
+		msgq_str(sp, M_SYSERR, sh_path, "Error: execl: %s");
 		_exit(127);
 	default:			/* Parent. */
 		/* Close the pipe ends the parent won't use. */
@@ -683,7 +683,7 @@ err:		if (ifp != NULL)
 	if (ferror(ifp))
 		goto ioerr;
 	if (fclose(ifp)) {
-ioerr:		msgq_str(sp, M_ERR, sh, "119|I/O error: %s");
+ioerr:		msgq_str(sp, M_ERR, sh, "I/O error: %s");
 alloc_err:	rval = SEXP_ERR;
 	} else
 		rval = SEXP_OK;
@@ -707,7 +707,7 @@ alloc_err:	rval = SEXP_ERR;
 		rval = SEXP_EXPANSION_ERR;
 
 	if (rval == SEXP_EXPANSION_ERR)
-		msgq(sp, M_ERR, "304|Shell expansion failed");
+		msgq(sp, M_ERR, "Shell expansion failed");
 
 	return (rval == SEXP_OK ? 0 : 1);
 }
diff --git ex/ex_bang.c ex/ex_bang.c
index fa73d7c..7075a6d 100644
--- ex/ex_bang.c
+++ ex/ex_bang.c
@@ -104,7 +104,7 @@ ex_bang(SCR *sp, EXCMD *cmdp)
 			} else if (O_ISSET(sp, O_WARN) &&
 			    !F_ISSET(sp, SC_EX_SILENT))
 				msg = msg_cat(sp,
-				    "303|File modified since last write.",
+				    "File modified since last write.",
 				    NULL);
 		}
 
diff --git ex/ex_cd.c ex/ex_cd.c
index b753263..75fecc0 100644
--- ex/ex_cd.c
+++ ex/ex_cd.c
@@ -48,7 +48,7 @@ ex_cd(SCR *sp, EXCMD *cmdp)
 	if (F_ISSET(sp->ep, F_MODIFIED) &&
 	    !FL_ISSET(cmdp->iflags, E_C_FORCE) && sp->frp->name[0] != '/') {
 		msgq(sp, M_ERR,
-    "120|File modified since last complete write; write or use ! to override");
+    "File modified since last complete write; write or use ! to override");
 		return (1);
 	}
 
@@ -59,7 +59,7 @@ ex_cd(SCR *sp, EXCMD *cmdp)
 			if ((pw = getpwuid(getuid())) == NULL ||
 			    pw->pw_dir == NULL || pw->pw_dir[0] == '\0') {
 				msgq(sp, M_ERR,
-			   "121|Unable to find home directory location");
+			   "Unable to find home directory location");
 				return (1);
 			}
 			dir = pw->pw_dir;
@@ -110,7 +110,7 @@ ex_cd(SCR *sp, EXCMD *cmdp)
 				*p = savech;
 				if (!chdir(buf)) {
 					if (getcwd(buf, sizeof(buf)) != NULL)
-		msgq_str(sp, M_INFO, buf, "122|New current directory: %s");
+		msgq_str(sp, M_INFO, buf, "New current directory: %s");
 					return (0);
 				}
 			}
diff --git ex/ex_display.c ex/ex_display.c
index 5782f9d..92bf75d 100644
--- ex/ex_display.c
+++ ex/ex_display.c
@@ -74,7 +74,7 @@ bdisplay(SCR *sp)
 	CB *cbp;
 
 	if (LIST_FIRST(&sp->gp->cutq) == NULL && sp->gp->dcbp == NULL) {
-		msgq(sp, M_INFO, "123|No cut buffers to display");
+		msgq(sp, M_INFO, "No cut buffers to display");
 		return (0);
 	}
 
diff --git ex/ex_filter.c ex/ex_filter.c
index 0beac24..af391c4 100644
--- ex/ex_filter.c
+++ ex/ex_filter.c
@@ -86,7 +86,7 @@ ex_filter(SCR *sp, EXCMD *cmdp, MARK *fm, MARK *tm, MARK *rp, char *cmd,
 		fd = mkstemp(tname);
 		if (fd == -1) {
 			msgq(sp, M_SYSERR,
-			    "237|Unable to create temporary file");
+			    "Unable to create temporary file");
 			if (fd != -1) {
 				(void)close(fd);
 				(void)unlink(tname);
diff --git ex/ex_global.c ex/ex_global.c
index 2c9b407..1181668 100644
--- ex/ex_global.c
+++ ex/ex_global.c
@@ -77,7 +77,7 @@ ex_g_setup(SCR *sp, EXCMD *cmdp, enum which cmd)
 
 	if (F_ISSET(sp, SC_EX_GLOBAL)) {
 		msgq(sp, M_ERR,
-	"124|The %s command can't be used as part of a global or v command",
+	"The %s command can't be used as part of a global or v command",
 		    cmdp->cmd->name);
 		return (1);
 	}
diff --git ex/ex_init.c ex/ex_init.c
index 2ea64da..ee5fe92 100644
--- ex/ex_init.c
+++ ex/ex_init.c
@@ -383,16 +383,16 @@ denied:	a = msg_print(sp, path, &nf1);
 		switch (etype) {
 		case ROOTOWN:
 			msgq(sp, M_ERR,
-			    "125|%s/%s: not sourced: not owned by you or root",
+			    "%s/%s: not sourced: not owned by you or root",
 			    b, a);
 			break;
 		case OWN:
 			msgq(sp, M_ERR,
-			    "126|%s/%s: not sourced: not owned by you", b, a);
+			    "%s/%s: not sourced: not owned by you", b, a);
 			break;
 		case WRITER:
 			msgq(sp, M_ERR,
-    "127|%s/%s: not sourced: writable by a user other than the owner", b, a);
+    "%s/%s: not sourced: writable by a user other than the owner", b, a);
 			break;
 		}
 		if (nf2)
@@ -401,15 +401,15 @@ denied:	a = msg_print(sp, path, &nf1);
 		switch (etype) {
 		case ROOTOWN:
 			msgq(sp, M_ERR,
-			    "128|%s: not sourced: not owned by you or root", a);
+			    "%s: not sourced: not owned by you or root", a);
 			break;
 		case OWN:
 			msgq(sp, M_ERR,
-			    "129|%s: not sourced: not owned by you", a);
+			    "%s: not sourced: not owned by you", a);
 			break;
 		case WRITER:
 			msgq(sp, M_ERR,
-	    "130|%s: not sourced: writable by a user other than the owner", a);
+	    "%s: not sourced: writable by a user other than the owner", a);
 			break;
 		}
 
diff --git ex/ex_join.c ex/ex_join.c
index 279bf5b..e233bcc 100644
--- ex/ex_join.c
+++ ex/ex_join.c
@@ -44,7 +44,7 @@ ex_join(SCR *sp, EXCMD *cmdp)
 
 	/* Check for no lines to join. */
 	if (!db_exist(sp, from + 1)) {
-		msgq(sp, M_ERR, "131|No following lines to join");
+		msgq(sp, M_ERR, "No following lines to join");
 		return (1);
 	}
 
diff --git ex/ex_map.c ex/ex_map.c
index c536823..c30d166 100644
--- ex/ex_map.c
+++ ex/ex_map.c
@@ -51,8 +51,8 @@ ex_map(SCR *sp, EXCMD *cmdp)
 	case 0:
 		if (seq_dump(sp, stype, 1) == 0)
 			msgq(sp, M_INFO, stype == SEQ_INPUT ?
-			    "132|No input map entries" :
-			    "133|No command map entries");
+			    "No input map entries" :
+			    "No command map entries");
 		return (0);
 	case 2:
 		input = cmdp->argv[0]->bp;
@@ -88,7 +88,7 @@ nofunc:	if (stype == SEQ_COMMAND && input[1] == '\0')
 		case K_ESCAPE:
 		case K_NL:
 			msgq(sp, M_ERR,
-			    "134|The %s character may not be remapped",
+			    "The %s character may not be remapped",
 			    KEY_NAME(sp, input[0]));
 			return (1);
 		}
@@ -108,7 +108,7 @@ ex_unmap(SCR *sp, EXCMD *cmdp)
 	if (seq_delete(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len,
 	    FL_ISSET(cmdp->iflags, E_C_FORCE) ? SEQ_INPUT : SEQ_COMMAND)) {
 		msgq_str(sp, M_INFO,
-		    cmdp->argv[0]->bp, "135|\"%s\" isn't currently mapped");
+		    cmdp->argv[0]->bp, "\"%s\" isn't currently mapped");
 		return (1);
 	}
 	return (0);
diff --git ex/ex_mark.c ex/ex_mark.c
index dd04703..60067e9 100644
--- ex/ex_mark.c
+++ ex/ex_mark.c
@@ -34,7 +34,7 @@ ex_mark(SCR *sp, EXCMD *cmdp)
 	NEEDFILE(sp, cmdp);
 
 	if (cmdp->argv[0]->len != 1) {
-		msgq(sp, M_ERR, "136|Mark names must be a single character");
+		msgq(sp, M_ERR, "Mark names must be a single character");
 		return (1);
 	}
 	return (mark_set(sp, cmdp->argv[0]->bp[0], &cmdp->addr1, 1));
diff --git ex/ex_mkexrc.c ex/ex_mkexrc.c
index ce6a6d6..18d022f 100644
--- ex/ex_mkexrc.c
+++ ex/ex_mkexrc.c
@@ -56,7 +56,7 @@ ex_mkexrc(SCR *sp, EXCMD *cmdp)
 
 	if (!FL_ISSET(cmdp->iflags, E_C_FORCE) && !stat(fname, &sb)) {
 		msgq_str(sp, M_ERR, fname,
-		    "137|%s exists, not written; use ! to override");
+		    "%s exists, not written; use ! to override");
 		return (1);
 	}
 
@@ -86,7 +86,7 @@ ex_mkexrc(SCR *sp, EXCMD *cmdp)
 		goto e2;
 	}
 
-	msgq_str(sp, M_INFO, fname, "138|New exrc file: %s");
+	msgq_str(sp, M_INFO, fname, "New exrc file: %s");
 	return (0);
 
 e1:	sverrno = errno;
diff --git ex/ex_move.c ex/ex_move.c
index 28ab7ae..f1ee715 100644
--- ex/ex_move.c
+++ ex/ex_move.c
@@ -100,7 +100,7 @@ ex_move(SCR *sp, EXCMD *cmdp)
 	fm1 = cmdp->addr1;
 	fm2 = cmdp->addr2;
 	if (cmdp->lineno >= fm1.lno && cmdp->lineno <= fm2.lno) {
-		msgq(sp, M_ERR, "139|Destination line is inside move range");
+		msgq(sp, M_ERR, "Destination line is inside move range");
 		return (1);
 	}
 
diff --git ex/ex_open.c ex/ex_open.c
index bf8734d..c4167e6 100644
--- ex/ex_open.c
+++ ex/ex_open.c
@@ -33,10 +33,10 @@ ex_open(SCR *sp, EXCMD *cmdp)
 	/* If open option off, disallow open command. */
 	if (!O_ISSET(sp, O_OPEN)) {
 		msgq(sp, M_ERR,
-	    "140|The open command requires that the open option be set");
+	    "The open command requires that the open option be set");
 		return (1);
 	}
 
-	msgq(sp, M_ERR, "141|The open command is not yet implemented");
+	msgq(sp, M_ERR, "The open command is not yet implemented");
 	return (1);
 }
diff --git ex/ex_preserve.c ex/ex_preserve.c
index a03f88a..48b99fb 100644
--- ex/ex_preserve.c
+++ ex/ex_preserve.c
@@ -36,7 +36,7 @@ ex_preserve(SCR *sp, EXCMD *cmdp)
 	NEEDFILE(sp, cmdp);
 
 	if (!F_ISSET(sp->ep, F_RCV_ON)) {
-		msgq(sp, M_ERR, "142|Preservation of this file not possible");
+		msgq(sp, M_ERR, "Preservation of this file not possible");
 		return (1);
 	}
 
@@ -52,7 +52,7 @@ ex_preserve(SCR *sp, EXCMD *cmdp)
 	if (rcv_sync(sp, RCV_SNAPSHOT))
 		return (1);
 
-	msgq(sp, M_INFO, "143|File preserved");
+	msgq(sp, M_INFO, "File preserved");
 	return (0);
 }
 
diff --git ex/ex_read.c ex/ex_read.c
index 3de3aa5..e6bb59c 100644
--- ex/ex_read.c
+++ ex/ex_read.c
@@ -257,13 +257,13 @@ ex_read(SCR *sp, EXCMD *cmdp)
 	if (!S_ISFIFO(sb.st_mode) && !S_ISREG(sb.st_mode)) {
 		(void)fclose(fp);
 		msgq(sp, M_ERR,
-		    "145|Only regular files and named pipes may be read");
+		    "Only regular files and named pipes may be read");
 		return (1);
 	}
 
 	/* Try and get a lock. */
 	if (file_lock(sp, NULL, NULL, fileno(fp), 0) == LOCK_UNAVAIL)
-		msgq(sp, M_ERR, "146|%s: read lock was unavailable", name);
+		msgq(sp, M_ERR, "%s: read lock was unavailable", name);
 
 	rval = ex_readfp(sp, name, fp, &cmdp->addr1, &nlines, 0);
 
@@ -312,7 +312,7 @@ ex_readfp(SCR *sp, char *name, FILE *fp, MARK *fm, recno_t *nlinesp,
 	 */
 	ccnt = 0;
 	lcnt = 0;
-	p = "147|Reading...";
+	p = "Reading...";
 	for (lno = fm->lno; !ex_getline(sp, fp, &len); ++lno, ++lcnt) {
 		if ((lcnt + 1) % INTERRUPT_CHECK == 0) {
 			if (INTERRUPTED(sp))
@@ -338,7 +338,7 @@ ex_readfp(SCR *sp, char *name, FILE *fp, MARK *fm, recno_t *nlinesp,
 	if (!silent) {
 		p = msg_print(sp, name, &nf);
 		msgq(sp, M_INFO,
-		    "148|%s: %lu lines, %lu characters", p, lcnt, ccnt);
+		    "%s: %lu lines, %lu characters", p, lcnt, ccnt);
 		if (nf)
 			FREE_SPACE(sp, p, 0);
 	}
diff --git ex/ex_screen.c ex/ex_screen.c
index 52908ce..8fce619 100644
--- ex/ex_screen.c
+++ ex/ex_screen.c
@@ -104,7 +104,7 @@ ex_sdisplay(SCR *sp)
 
 	gp = sp->gp;
 	if (TAILQ_EMPTY(&gp->hq)) {
-		msgq(sp, M_INFO, "149|No background screens to display");
+		msgq(sp, M_INFO, "No background screens to display");
 		return (0);
 	}
 
diff --git ex/ex_script.c ex/ex_script.c
index 67f0c54..42cebd9 100644
--- ex/ex_script.c
+++ ex/ex_script.c
@@ -59,7 +59,7 @@ ex_script(SCR *sp, EXCMD *cmdp)
 	/* Vi only command. */
 	if (!F_ISSET(sp, SC_VI)) {
 		msgq(sp, M_ERR,
-		    "150|The script command is only available in vi mode");
+		    "The script command is only available in vi mode");
 		return (1);
 	}
 
@@ -308,7 +308,7 @@ sscr_exec(SCR *sp, recno_t lno)
 	/* Delete any prompt. */
 	if (sscr_matchprompt(sp, p, len, &tlen)) {
 		if (tlen == len) {
-empty:			msgq(sp, M_BERR, "151|No command to execute");
+empty:			msgq(sp, M_BERR, "No command to execute");
 			goto err1;
 		}
 		p += (len - tlen);
diff --git ex/ex_shift.c ex/ex_shift.c
index e2fb82d..29fa835 100644
--- ex/ex_shift.c
+++ ex/ex_shift.c
@@ -62,7 +62,7 @@ shift(SCR *sp, EXCMD *cmdp, enum which rl)
 	NEEDFILE(sp, cmdp);
 
 	if (O_VAL(sp, O_SHIFTWIDTH) == 0) {
-		msgq(sp, M_INFO, "152|shiftwidth option set to 0");
+		msgq(sp, M_INFO, "shiftwidth option set to 0");
 		return (0);
 	}
 
diff --git ex/ex_subst.c ex/ex_subst.c
index cc53805..9d9f673 100644
--- ex/ex_subst.c
+++ ex/ex_subst.c
@@ -408,7 +408,7 @@ s(SCR *sp, EXCMD *cmdp, char *s, regex_t *re, u_int flags)
 				--s;
 			if (errno == ERANGE) {
 				if (ul >= UINT_MAX)
-					msgq(sp, M_ERR, "153|Count overflow");
+					msgq(sp, M_ERR, "Count overflow");
 				else
 					msgq(sp, M_SYSERR, NULL);
 				return (1);
@@ -448,7 +448,7 @@ s(SCR *sp, EXCMD *cmdp, char *s, regex_t *re, u_int flags)
 		case 'r':
 			if (LF_ISSET(SUB_FIRST)) {
 				msgq(sp, M_ERR,
-		    "155|Regular expression specified; r flag meaningless");
+		    "Regular expression specified; r flag meaningless");
 				return (1);
 			}
 			if (!F_ISSET(sp, SC_RE_SEARCH)) {
@@ -469,7 +469,7 @@ usage:		ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
 
 noargs:	if (F_ISSET(sp, SC_VI) && sp->c_suffix && (lflag || nflag || pflag)) {
 		msgq(sp, M_ERR,
-"156|The #, l and p flags may not be combined with the c flag in vi mode");
+"The #, l and p flags may not be combined with the c flag in vi mode");
 		return (1);
 	}
 
@@ -627,7 +627,7 @@ nextmatch:	match[0].rm_so = 0;
 					goto err;
 
 				vs_update(sp, msg_cat(sp,
-				    "169|Confirm change? [n]", NULL), NULL);
+				    "Confirm change? [n]", NULL), NULL);
 
 				if (v_event_get(sp, &ev, 0, 0))
 					goto err;
@@ -853,7 +853,7 @@ endmatch:	if (!linechanged)
 	rval = 0;
 	if (!matched) {
 		if (!F_ISSET(sp, SC_EX_GLOBAL)) {
-			msgq(sp, M_ERR, "157|No match found");
+			msgq(sp, M_ERR, "No match found");
 			goto err;
 		}
 	} else if (!lflag && !nflag && !pflag)
diff --git ex/ex_tag.c ex/ex_tag.c
index 69a62e1..d8db78d 100644
--- ex/ex_tag.c
+++ ex/ex_tag.c
@@ -117,7 +117,7 @@ ex_tag_push(SCR *sp, EXCMD *cmdp)
 		break;
 	case 0:
 		if (exp->tag_last == NULL) {
-			msgq(sp, M_ERR, "158|No previous tag entered");
+			msgq(sp, M_ERR, "No previous tag entered");
 			return (1);
 		}
 		break;
@@ -235,7 +235,7 @@ ex_tag_next(SCR *sp, EXCMD *cmdp)
 		return (1);
 	}
 	if ((tp = TAILQ_NEXT(tqp->current, q)) == NULL) {
-		msgq(sp, M_ERR, "282|Already at the last tag of this group");
+		msgq(sp, M_ERR, "Already at the last tag of this group");
 		return (1);
 	}
 	if (ex_tag_nswitch(sp, tp, FL_ISSET(cmdp->iflags, E_C_FORCE)))
@@ -266,7 +266,7 @@ ex_tag_prev(SCR *sp, EXCMD *cmdp)
 		return (0);
 	}
 	if ((tp = TAILQ_PREV(tqp->current, _tagqh, q)) == NULL) {
-		msgq(sp, M_ERR, "255|Already at the first tag of this group");
+		msgq(sp, M_ERR, "Already at the first tag of this group");
 		return (1);
 	}
 	if (ex_tag_nswitch(sp, tp, FL_ISSET(cmdp->iflags, E_C_FORCE)))
@@ -408,7 +408,7 @@ ex_tag_pop(SCR *sp, EXCMD *cmdp)
 		}
 		if (tqp == NULL) {
 			msgq(sp, M_ERR,
-	"159|Less than %s entries on the tags stack; use :display t[ags]",
+	"Less than %s entries on the tags stack; use :display t[ags]",
 			    arg);
 			return (1);
 		}
@@ -432,7 +432,7 @@ filearg:	arglen = strlen(arg);
 		}
 		if (tqp == NULL) {
 			msgq_str(sp, M_ERR, arg,
-	"160|No file %s on the tags stack to return to; use :display t[ags]");
+	"No file %s on the tags stack to return to; use :display t[ags]");
 			return (1);
 		}
 		if (tqp == TAILQ_FIRST(&exp->tq))
@@ -560,7 +560,7 @@ ex_tag_display(SCR *sp)
 #define	L_SPACE	 5		/* Spaces after name, before tag. */
 #define	L_TAG	20		/* Tag. */
 	if (sp->cols <= L_NAME + L_SLOP) {
-		msgq(sp, M_ERR, "292|Display too small.");
+		msgq(sp, M_ERR, "Display too small.");
 		return (0);
 	}
 
@@ -787,13 +787,13 @@ tag_msg(SCR *sp, tagmsg_t msg, char *tag)
 	switch (msg) {
 	case TAG_BADLNO:
 		msgq_str(sp, M_ERR, tag,
-	    "164|%s: the tag's line number is past the end of the file");
+	    "%s: the tag's line number is past the end of the file");
 		break;
 	case TAG_EMPTY:
-		msgq(sp, M_INFO, "165|The tags stack is empty");
+		msgq(sp, M_INFO, "The tags stack is empty");
 		break;
 	case TAG_SEARCH:
-		msgq_str(sp, M_ERR, tag, "166|%s: search pattern not found");
+		msgq_str(sp, M_ERR, tag, "%s: search pattern not found");
 		break;
 	default:
 		abort();
@@ -962,7 +962,7 @@ ctag_slist(SCR *sp, char *tag)
 
 	/* Check to see if we found anything. */
 	if (TAILQ_EMPTY(&tqp->tagq)) {
-		msgq_str(sp, M_ERR, tag, "162|%s: tag not found");
+		msgq_str(sp, M_ERR, tag, "%s: tag not found");
 		if (echk)
 			TAILQ_FOREACH(tfp, &exp->tagfq, q)
 				if (F_ISSET(tfp, TAGF_ERR) &&
@@ -1073,7 +1073,7 @@ ctag_sfile(SCR *sp, TAGF *tfp, TAGQ *tqp, char *tname)
 		if ((slen = strlen(p)) == 0) {
 corrupt:		p = msg_print(sp, tname, &nf1);
 			t = msg_print(sp, tfp->name, &nf2);
-			msgq(sp, M_ERR, "163|%s: corrupted tag in %s", p, t);
+			msgq(sp, M_ERR, "%s: corrupted tag in %s", p, t);
 			if (nf1)
 				FREE_SPACE(sp, p, 0);
 			if (nf2)
diff --git ex/ex_util.c ex/ex_util.c
index 4d0a936..da1937c 100644
--- ex/ex_util.c
+++ ex/ex_util.c
@@ -125,7 +125,7 @@ ex_ncheck(SCR *sp, int force)
 
 		for (ap = sp->cargv + 1; *ap != NULL; ++ap);
 		msgq(sp, M_ERR,
-		    "167|%d more files to edit", (ap - sp->cargv) - 1);
+		    "%d more files to edit", (ap - sp->cargv) - 1);
 
 		return (1);
 	}
@@ -168,48 +168,48 @@ ex_emsg(SCR *sp, char *p, exm_t which)
 {
 	switch (which) {
 	case EXM_EMPTYBUF:
-		msgq(sp, M_ERR, "168|Buffer %s is empty", p);
+		msgq(sp, M_ERR, "Buffer %s is empty", p);
 		break;
 	case EXM_FILECOUNT:
 		 msgq_str(sp, M_ERR, p, 
-		     "144|%s: expanded into too many file names");
+		     "%s: expanded into too many file names");
 		break;
 	case EXM_NOCANON:
 		msgq(sp, M_ERR,
-		    "283|The %s command requires the ex terminal interface", p);
+		    "The %s command requires the ex terminal interface", p);
 		break;
 	case EXM_NOCANON_F:
 		msgq(sp, M_ERR,
-		    "272|That form of %s requires the ex terminal interface",
+		    "That form of %s requires the ex terminal interface",
 		    p);
 		break;
 	case EXM_NOFILEYET:
 		if (p == NULL)
 			msgq(sp, M_ERR,
-			    "274|Command failed, no file read in yet.");
+			    "Command failed, no file read in yet.");
 		else
 			msgq(sp, M_ERR,
-	"173|The %s command requires that a file have already been read in", p);
+	"The %s command requires that a file have already been read in", p);
 		break;
 	case EXM_NOPREVBUF:
-		msgq(sp, M_ERR, "171|No previous buffer to execute");
+		msgq(sp, M_ERR, "No previous buffer to execute");
 		break;
 	case EXM_NOPREVRE:
-		msgq(sp, M_ERR, "172|No previous regular expression");
+		msgq(sp, M_ERR, "No previous regular expression");
 		break;
 	case EXM_NOSUSPEND:
-		msgq(sp, M_ERR, "230|This screen may not be suspended");
+		msgq(sp, M_ERR, "This screen may not be suspended");
 		break;
 	case EXM_SECURE:
 		msgq(sp, M_ERR,
-"290|The %s command is not supported when the secure edit option is set", p);
+"The %s command is not supported when the secure edit option is set", p);
 		break;
 	case EXM_SECURE_F:
 		msgq(sp, M_ERR,
-"284|That form of %s is not supported when the secure edit option is set", p);
+"That form of %s is not supported when the secure edit option is set", p);
 		break;
 	case EXM_USAGE:
-		msgq(sp, M_ERR, "174|Usage: %s", p);
+		msgq(sp, M_ERR, "Usage: %s", p);
 		break;
 	}
 }
diff --git ex/ex_visual.c ex/ex_visual.c
index 5b5a34e..e7e9e7c 100644
--- ex/ex_visual.c
+++ ex/ex_visual.c
@@ -42,7 +42,7 @@ ex_visual(SCR *sp, EXCMD *cmdp)
 	/* If open option off, disallow visual command. */
 	if (!O_ISSET(sp, O_OPEN)) {
 		msgq(sp, M_ERR,
-	    "175|The visual command requires that the open option be set");
+	    "The visual command requires that the open option be set");
 		return (1);
 	}
 
diff --git ex/ex_write.c ex/ex_write.c
index 1317849..9197ed4 100644
--- ex/ex_write.c
+++ ex/ex_write.c
@@ -301,7 +301,7 @@ ex_writefp(SCR *sp, char *name, FILE *fp, MARK *fm, MARK *tm, u_long *nlno,
 	 */
 	ccnt = 0;
 	lcnt = 0;
-	msg = "253|Writing...";
+	msg = "Writing...";
 	if (tline != 0)
 		for (; fline <= tline; ++fline, ++lcnt) {
 			/* Caller has to provide any interrupt message. */
diff --git vi/getc.c vi/getc.c
index 5e08c6b..47fb8c0 100644
--- vi/getc.c
+++ vi/getc.c
@@ -48,7 +48,7 @@ cs_init(SCR *sp, VCS *csp)
 	if (db_eget(sp, csp->cs_lno, (char **) &csp->cs_bp, &csp->cs_len,
 	    &isempty)) {
 		if (isempty)
-			msgq(sp, M_BERR, "177|Empty file");
+			msgq(sp, M_BERR, "Empty file");
 		return (1);
 	}
 	if (csp->cs_len == 0 || v_isempty(csp->cs_bp, csp->cs_len)) {
diff --git vi/v_ch.c vi/v_ch.c
index b823530..11487d9 100644
--- vi/v_ch.c
+++ vi/v_ch.c
@@ -268,11 +268,11 @@ empty:		notfound(sp, key);
 static void
 noprev(SCR *sp)
 {
-	msgq(sp, M_BERR, "178|No previous F, f, T or t search");
+	msgq(sp, M_BERR, "No previous F, f, T or t search");
 }
 
 static void
 notfound(SCR *sp, ARG_CHAR_T ch)
 {
-	msgq(sp, M_BERR, "179|%s not found", KEY_NAME(sp, ch));
+	msgq(sp, M_BERR, "%s not found", KEY_NAME(sp, ch));
 }
diff --git vi/v_ex.c vi/v_ex.c
index d572fea..ed6ea6c 100644
--- vi/v_ex.c
+++ vi/v_ex.c
@@ -65,7 +65,7 @@ v_exmode(SCR *sp, VICMD *vp)
 	/* Try and switch screens -- the screen may not permit it. */
 	if (gp->scr_screen(sp, SC_EX)) {
 		msgq(sp, M_ERR,
-		    "207|The Q command requires the ex terminal interface");
+		    "The Q command requires the ex terminal interface");
 		return (1);
 	}
 	(void)gp->scr_attr(sp, SA_ALTERNATE, 0);
@@ -183,7 +183,7 @@ v_switch(SCR *sp, VICMD *vp)
 	 * name.  Use the real name, not the user's current name.
 	 */
 	if (sp->alt_name == NULL) {
-		msgq(sp, M_ERR, "180|No previous file to edit");
+		msgq(sp, M_ERR, "No previous file to edit");
 		return (1);
 	}
 	if ((name = strdup(sp->alt_name)) == NULL) {
@@ -579,7 +579,7 @@ v_ecl_exec(SCR *sp)
 		return (1);
 	}
 	if (len == 0) {
-		msgq(sp, M_BERR, "307|No ex command to execute");
+		msgq(sp, M_BERR, "No ex command to execute");
 		return (1);
 	}
 	
diff --git vi/v_increment.c vi/v_increment.c
index f4e9461..b89ccf3 100644
--- vi/v_increment.c
+++ vi/v_increment.c
@@ -131,7 +131,7 @@ decimal:	base = 10;
 		end = beg;
 		ntype = fmt[DEC];
 		if (!isdigit(p[end])) {
-nonum:			msgq(sp, M_ERR, "181|Cursor not in a number");
+nonum:			msgq(sp, M_ERR, "Cursor not in a number");
 			return (1);
 		}
 	}
@@ -256,10 +256,10 @@ inc_err(SCR *sp, enum nresult nret)
 		abort();
 		/* NOREACHED */
 	case NUM_OVER:
-		msgq(sp, M_ERR, "182|Resulting number too large");
+		msgq(sp, M_ERR, "Resulting number too large");
 		break;
 	case NUM_UNDER:
-		msgq(sp, M_ERR, "183|Resulting number too small");
+		msgq(sp, M_ERR, "Resulting number too small");
 		break;
 	}
 }
diff --git vi/v_match.c vi/v_match.c
index da19ced..e573c9a 100644
--- vi/v_match.c
+++ vi/v_match.c
@@ -54,7 +54,7 @@ v_match(SCR *sp, VICMD *vp)
 	}
 	for (off = vp->m_start.cno;; ++off) {
 		if (off >= len) {
-nomatch:		msgq(sp, M_BERR, "184|No match character on this line");
+nomatch:		msgq(sp, M_BERR, "No match character on this line");
 			return (1);
 		}
 		switch (startc = p[off]) {
@@ -114,7 +114,7 @@ nomatch:		msgq(sp, M_BERR, "184|No match character on this line");
 			break;
 	}
 	if (cnt) {
-		msgq(sp, M_BERR, "185|Matching character not found");
+		msgq(sp, M_BERR, "Matching character not found");
 		return (1);
 	}
 
diff --git vi/v_replace.c vi/v_replace.c
index 6b78d36..65ce291 100644
--- vi/v_replace.c
+++ vi/v_replace.c
@@ -67,7 +67,7 @@ v_replace(SCR *sp, VICMD *vp)
 	if (db_get(sp, vp->m_start.lno, DBG_FATAL, &p, &len))
 		return (1);
 	if (len == 0) {
-		msgq(sp, M_BERR, "186|No characters to replace");
+		msgq(sp, M_BERR, "No characters to replace");
 		return (1);
 	}
 
diff --git vi/v_screen.c vi/v_screen.c
index d4fce68..691e58e 100644
--- vi/v_screen.c
+++ vi/v_screen.c
@@ -39,7 +39,7 @@ v_screen(SCR *sp, VICMD *vp)
 	 */
 	if (F_ISSET(sp, SC_COMEDIT)) {
 		msgq(sp, M_ERR,
-		    "308|Enter <CR> to execute a command, :q to exit");
+		    "Enter <CR> to execute a command, :q to exit");
 		return (1);
 	}
 		
@@ -50,7 +50,7 @@ v_screen(SCR *sp, VICMD *vp)
 	if (TAILQ_NEXT(sp, q))
 		sp->nextdisp = TAILQ_NEXT(sp, q);
 	else if (TAILQ_FIRST(&sp->gp->dq) == sp) {
-		msgq(sp, M_ERR, "187|No other screen to switch to");
+		msgq(sp, M_ERR, "No other screen to switch to");
 		return (1);
 	} else
 		sp->nextdisp = TAILQ_FIRST(&sp->gp->dq);
diff --git vi/v_search.c vi/v_search.c
index 727e556..50816d7 100644
--- vi/v_search.c
+++ vi/v_search.c
@@ -264,7 +264,7 @@ v_exaddr(SCR *sp, VICMD *vp, dir_t dir)
 	return (0);
 
 err1:	msgq(sp, M_ERR,
-	    "188|Characters after search string, line offset and/or z command");
+	    "Characters after search string, line offset and/or z command");
 err2:	vp->m_final.lno = s_lno;
 	vp->m_final.cno = s_cno;
 	return (1);
@@ -365,7 +365,7 @@ v_search(SCR *sp, VICMD *vp, char *ptrn, size_t plen, u_int flags, dir_t dir)
 			return (1);
 		break;
 	case NOTSET:
-		msgq(sp, M_ERR, "189|No previous search pattern");
+		msgq(sp, M_ERR, "No previous search pattern");
 		return (1);
 	default:
 		abort();
@@ -420,7 +420,7 @@ v_correct(SCR *sp, VICMD *vp, int isdelta)
 	 */
 	if (vp->m_start.lno == vp->m_stop.lno &&
 	    vp->m_start.cno == vp->m_stop.cno) {
-		msgq(sp, M_BERR, "190|Search wrapped to original position");
+		msgq(sp, M_BERR, "Search wrapped to original position");
 		return (1);
 	}
 
diff --git vi/v_txt.c vi/v_txt.c
index 6296c12..77015b8 100644
--- vi/v_txt.c
+++ vi/v_txt.c
@@ -586,7 +586,7 @@ next:	if (v_event_get(sp, evp, 0, ec_flags))
 		if (++abcnt > MAX_ABBREVIATION_EXPANSION) {
 			if (v_event_flush(sp, CH_ABBREVIATED))
 				msgq(sp, M_ERR,
-"191|Abbreviation exceeded expansion limit: characters discarded");
+"Abbreviation exceeded expansion limit: characters discarded");
 			abcnt = 0;
 			if (LF_ISSET(TXT_REPLAY))
 				goto done;
@@ -1264,7 +1264,7 @@ ins_ch:		/*
 		if (LF_ISSET(TXT_BEAUTIFY) && iscntrl(evp->e_c) &&
 		    evp->e_value != K_FORMFEED && evp->e_value != K_TAB) {
 			msgq(sp, M_BERR,
-			    "192|Illegal character; quote to enter");
+			    "Illegal character; quote to enter");
 			if (LF_ISSET(TXT_REPLAY))
 				goto done;
 			break;
@@ -1817,7 +1817,7 @@ txt_backup(SCR *sp, TEXTH *tiqh, TEXT *tp, u_int32_t *flagsp)
 	if ((ntp = TAILQ_PREV(tp, _texth, q)) == NULL) {
 		if (!FL_ISSET(*flagsp, TXT_REPLAY))
 			msgq(sp, M_BERR,
-			    "193|Already at the beginning of the insert");
+			    "Already at the beginning of the insert");
 		return (tp);
 	}
 
@@ -2881,5 +2881,5 @@ txt_Rresolve(SCR *sp, TEXTH *tiqh, TEXT *tp, const size_t orig_len)
 static void
 txt_nomorech(SCR *sp)
 {
-	msgq(sp, M_BERR, "194|No more characters to erase");
+	msgq(sp, M_BERR, "No more characters to erase");
 }
diff --git vi/v_util.c vi/v_util.c
index dd168ef..43079f7 100644
--- vi/v_util.c
+++ vi/v_util.c
@@ -45,7 +45,7 @@ v_eof(SCR *sp, MARK *mp)
 		if (mp->lno >= lno)
 			v_emsg(sp, NULL, VIM_EOF);
 		else
-			msgq(sp, M_BERR, "195|Movement past the end-of-file");
+			msgq(sp, M_BERR, "Movement past the end-of-file");
 	}
 }
 
@@ -68,7 +68,7 @@ v_eol(SCR *sp, MARK *mp)
 		if (mp->cno == len - 1)
 			v_emsg(sp, NULL, VIM_EOL);
 		else
-			msgq(sp, M_BERR, "196|Movement past the end-of-line");
+			msgq(sp, M_BERR, "Movement past the end-of-line");
 	}
 }
 
@@ -81,7 +81,7 @@ v_eol(SCR *sp, MARK *mp)
 void
 v_nomove(SCR *sp)
 {
-	msgq(sp, M_BERR, "197|No cursor movement made");
+	msgq(sp, M_BERR, "No cursor movement made");
 }
 
 /*
@@ -94,9 +94,9 @@ void
 v_sof(SCR *sp, MARK *mp)
 {
 	if (mp == NULL || mp->lno == 1)
-		msgq(sp, M_BERR, "198|Already at the beginning of the file");
+		msgq(sp, M_BERR, "Already at the beginning of the file");
 	else
-		msgq(sp, M_BERR, "199|Movement past the beginning of the file");
+		msgq(sp, M_BERR, "Movement past the beginning of the file");
 }
 
 /*
@@ -108,7 +108,7 @@ v_sof(SCR *sp, MARK *mp)
 void
 v_sol(SCR *sp)
 {
-	msgq(sp, M_BERR, "200|Already in the first column");
+	msgq(sp, M_BERR, "Already in the first column");
 }
 
 /*
@@ -138,28 +138,28 @@ v_emsg(SCR *sp, char *p, vim_t which)
 	switch (which) {
 	case VIM_COMBUF:
 		msgq(sp, M_ERR,
-		    "201|Buffers should be specified before the command");
+		    "Buffers should be specified before the command");
 		break;
 	case VIM_EMPTY:
-		msgq(sp, M_BERR, "209|The file is empty");
+		msgq(sp, M_BERR, "The file is empty");
 		break;
 	case VIM_EOF:
-		msgq(sp, M_BERR, "202|Already at end-of-file");
+		msgq(sp, M_BERR, "Already at end-of-file");
 		break;
 	case VIM_EOL:
-		msgq(sp, M_BERR, "203|Already at end-of-line");
+		msgq(sp, M_BERR, "Already at end-of-line");
 		break;
 	case VIM_NOCOM:
 	case VIM_NOCOM_B:
 		msgq(sp,
 		    which == VIM_NOCOM_B ? M_BERR : M_ERR,
-		    "204|%s isn't a vi command", p);
+		    "%s isn't a vi command", p);
 		break;
 	case VIM_WRESIZE:
 		msgq(sp, M_ERR, "Window resize interrupted text input mode");
 		break;
 	case VIM_USAGE:
-		msgq(sp, M_ERR, "205|Usage: %s", p);
+		msgq(sp, M_ERR, "Usage: %s", p);
 		break;
 	}
 }
diff --git vi/v_xchar.c vi/v_xchar.c
index f209802..68e22f8 100644
--- vi/v_xchar.c
+++ vi/v_xchar.c
@@ -40,7 +40,7 @@ v_xchar(SCR *sp, VICMD *vp)
 		return (1);
 	}
 	if (len == 0) {
-nodel:		msgq(sp, M_BERR, "206|No characters to delete");
+nodel:		msgq(sp, M_BERR, "No characters to delete");
 		return (1);
 	}
 
diff --git vi/vi.c vi/vi.c
index 5cc10e5..9684c96 100644
--- vi/vi.c
+++ vi/vi.c
@@ -237,7 +237,7 @@ gc_event:
 		if (F_ISSET(gp, G_TMP_INUSE)) {
 			F_CLR(gp, G_TMP_INUSE);
 			msgq(sp, M_ERR,
-			    "232|vi: temporary buffer not released");
+			    "vi: temporary buffer not released");
 		}
 #endif
 		/*
@@ -353,7 +353,7 @@ gc_event:
 		if (0) {
 err:			if (v_event_flush(sp, CH_MAPPED))
 				msgq(sp, M_BERR,
-			    "110|Vi command failed: mapped keys discarded");
+			    "Vi command failed: mapped keys discarded");
 		}
 
 		/*
@@ -364,9 +364,9 @@ gc_err_noflush:	if (INTERRUPTED(sp)) {
 intr:			CLR_INTERRUPT(sp);
 			if (v_event_flush(sp, CH_MAPPED))
 				msgq(sp, M_ERR,
-				    "231|Interrupted: mapped keys discarded");
+				    "Interrupted: mapped keys discarded");
 			else
-				msgq(sp, M_ERR, "236|Interrupted");
+				msgq(sp, M_ERR, "Interrupted");
 		}
 
 		/* If the last command switched screens, update. */
@@ -519,7 +519,7 @@ v_cmd(SCR *sp, VICMD *dp, VICMD *vp, VICMD *ismotion, int *comcountp,
 	if (key == '"') {
 		cpart = ISPARTIAL;
 		if (F_ISSET(vp, VC_BUFFER)) {
-			msgq(sp, M_ERR, "234|Only one buffer may be specified");
+			msgq(sp, M_ERR, "Only one buffer may be specified");
 			return (GC_ERR);
 		}
 		if (ismotion != NULL) {
@@ -593,7 +593,7 @@ v_cmd(SCR *sp, VICMD *dp, VICMD *vp, VICMD *ismotion, int *comcountp,
 
 		/* Otherwise, a repeatable command must have been executed. */
 		if (!F_ISSET(dp, VC_ISDOT)) {
-			msgq(sp, M_ERR, "208|No command to repeat");
+			msgq(sp, M_ERR, "No command to repeat");
 			return (GC_ERR);
 		}
 
@@ -676,7 +676,7 @@ usage:			if (ismotion == NULL)
 	 * imply the current line.
 	 */
 	if (ismotion != NULL && ismotion->key != key && !LF_ISSET(V_MOVE)) {
-		msgq(sp, M_ERR, "210|%s may not be used as a motion command",
+		msgq(sp, M_ERR, "%s may not be used as a motion command",
 		    KEY_NAME(sp, key));
 		return (GC_ERR);
 	}
@@ -693,7 +693,7 @@ usage:			if (ismotion == NULL)
 
 esc:	switch (cpart) {
 	case COMMANDMODE:
-		msgq(sp, M_BERR, "211|Already in command mode");
+		msgq(sp, M_BERR, "Already in command mode");
 		return (GC_ERR_NOFLUSH);
 	case ISPARTIAL:
 		break;
@@ -953,7 +953,7 @@ v_init(SCR *sp)
 		if (sp->t_rows > sp->rows - 1) {
 			sp->t_minrows = sp->t_rows = sp->rows - 1;
 			msgq(sp, M_INFO,
-			    "214|Windows option value is too large, max is %u",
+			    "Windows option value is too large, max is %u",
 			    sp->t_rows);
 		}
 		sp->t_maxrows = sp->rows - 1;
@@ -1058,7 +1058,7 @@ v_keyword(SCR *sp)
 	for (moved = 0,
 	    beg = sp->cno; beg < len && isspace(p[beg]); moved = 1, ++beg);
 	if (beg >= len) {
-		msgq(sp, M_BERR, "212|Cursor not in a word");
+		msgq(sp, M_BERR, "Cursor not in a word");
 		return (1);
 	}
 	if (moved) {
@@ -1137,7 +1137,7 @@ v_count(SCR *sp, ARG_CHAR_T fkey, u_long *countp)
 					return (1);
 			} while (isdigit(ev.e_c));
 			msgq(sp, M_ERR,
-			    "235|Number larger than %lu", ULONG_MAX);
+			    "Number larger than %lu", ULONG_MAX);
 			return (1);
 		}
 		count = tc;
diff --git vi/vs_refresh.c vi/vs_refresh.c
index 4855f1e..2210b8f 100644
--- vi/vs_refresh.c
+++ vi/vs_refresh.c
@@ -770,11 +770,11 @@ static void
 vs_modeline(SCR *sp)
 {
 	static char * const modes[] = {
-		"215|Append",			/* SM_APPEND */
-		"216|Change",			/* SM_CHANGE */
-		"217|Command",			/* SM_COMMAND */
-		"218|Insert",			/* SM_INSERT */
-		"219|Replace",			/* SM_REPLACE */
+		"Append",			/* SM_APPEND */
+		"Change",			/* SM_CHANGE */
+		"Command",			/* SM_COMMAND */
+		"Insert",			/* SM_INSERT */
+		"Replace",			/* SM_REPLACE */
 	};
 	GS *gp;
 	size_t cols, curcol, curlen, endpoint, len, midpoint;
diff --git vi/vs_smap.c vi/vs_smap.c
index 4abf7e6..8f3c24c 100644
--- vi/vs_smap.c
+++ vi/vs_smap.c
@@ -1123,7 +1123,7 @@ vs_sm_position(SCR *sp, MARK *rp, u_long cnt, pos_t pos)
 			goto sof;
 		smp = HMAP + cnt;
 		if (cnt && !db_exist(sp, smp->lno)) {
-sof:			msgq(sp, M_BERR, "220|Movement past the end-of-screen");
+sof:			msgq(sp, M_BERR, "Movement past the end-of-screen");
 			return (1);
 		}
 		break;
@@ -1159,7 +1159,7 @@ sof:			msgq(sp, M_BERR, "220|Movement past the end-of-screen");
 			for (; smp->lno > last && smp > HMAP; --smp);
 			if (cnt > smp - HMAP) {
 eof:				msgq(sp, M_BERR,
-			    "221|Movement past the beginning-of-screen");
+			    "Movement past the beginning-of-screen");
 				return (1);
 			}
 			smp -= cnt;
diff --git vi/vs_split.c vi/vs_split.c
index 12b8506..877d73c 100644
--- vi/vs_split.c
+++ vi/vs_split.c
@@ -47,7 +47,7 @@ vs_split(SCR *sp, SCR *new, int ccl)
 	/* XXX: The IS_ONELINE fix will change this, too. */
 	if (sp->rows < 4) {
 		msgq(sp, M_ERR,
-		    "222|Screen must be larger than %d lines to split", 4 - 1);
+		    "Screen must be larger than %d lines to split", 4 - 1);
 		return (1);
 	}
 
@@ -299,8 +299,8 @@ vs_fg(SCR *sp, SCR **nspp, CHAR_T *name, int newscreen)
 	if ((*nspp = nsp) == NULL) {
 		msgq_str(sp, M_ERR, name,
 		    name == NULL ?
-		    "223|There are no background screens" :
-		    "224|There's no background screen editing a file named %s");
+		    "There are no background screens" :
+		    "There's no background screen editing a file named %s");
 		return (1);
 	}
 
@@ -340,7 +340,7 @@ vs_bg(SCR *sp)
 		return (1);
 	if (nsp == NULL) {
 		msgq(sp, M_ERR,
-		    "225|You may not background your only displayed screen");
+		    "You may not background your only displayed screen");
 		return (1);
 	}
 
@@ -507,13 +507,13 @@ vs_resize(SCR *sp, long count, adj_t adj)
 		if (s == NULL) {
 			if ((s = TAILQ_PREV(sp, _dqh, q)) == NULL) {
 toobig:				msgq(sp, M_BERR, adj == A_DECREASE ?
-				    "227|The screen cannot shrink" :
-				    "228|The screen cannot grow");
+				    "The screen cannot shrink" :
+				    "The screen cannot grow");
 				return (1);
 			}
 			if (s->t_maxrows < MINIMUM_SCREEN_ROWS + count) {
 toosmall:			msgq(sp, M_BERR,
-				    "226|The screen can only shrink to %d rows",
+				    "The screen can only shrink to %d rows",
 				    MINIMUM_SCREEN_ROWS);
 				return (1);
 			}
diff --git common/exf.c common/exf.c
index 514c9d0..4969684 100644
--- common/exf.c
+++ common/exf.c
@@ -914,16 +914,15 @@ file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)
 	p = msg_print(sp, name, &nf);
 	switch (mtype) {
 	case NEWFILE:
-		msgstr = msg_cat(sp,
-		    "%s: new file: %lu lines, %lu characters", NULL);
-		len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch);
+		len = snprintf(buf, sizeof(buf),
+		    "%s: new file: %lu lines, %lu characters", p, nlno, nch);
 		if (len >= sizeof(buf))
 			len = sizeof(buf) - 1;
 		break;
 	case OLDFILE:
-		msgstr = msg_cat(sp, LF_ISSET(FS_APPEND) ?
+		msgstr = LF_ISSET(FS_APPEND) ?
 		    "%s: appended: %lu lines, %lu characters" :
-		    "%s: %lu lines, %lu characters", NULL);
+		    "%s: %lu lines, %lu characters", NULL;
 		len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch);
 		if (len >= sizeof(buf))
 			len = sizeof(buf) - 1;
diff --git common/msg.c common/msg.c
index 8e35393..8d74f40 100644
--- common/msg.c
+++ common/msg.c
@@ -115,7 +115,8 @@ retry:		FREE_SPACE(sp, bp, blen);
 	mp = bp;
 	mlen = 0;
 	if (mt == M_SYSERR) {
-		p = msg_cat(sp, "Error: ", &len);
+		p = "Error: ";
+		len = strlen(p);
 		if (REM < len)
 			goto retry;
 		memcpy(mp, p, len);
@@ -146,7 +147,6 @@ retry:		FREE_SPACE(sp, bp, blen);
 		len = 0;
 		goto nofmt;
 	}
-	fmt = msg_cat(sp, fmt, NULL);
 
 	/* Format the arguments into the string. */
         va_start(ap, fmt);
@@ -303,15 +303,14 @@ mod_rpt(SCR *sp)
 			len = snprintf(p, MAXNUM, "%u ", sp->rptlines[cnt]);
 			p += len;
 			tlen += len;
-			t = msg_cat(sp,
-			    lines[sp->rptlines[cnt] == 1 ? 0 : 1], &len);
+			t = lines[sp->rptlines[cnt] == 1 ? 0 : 1];
+			len = strlen(t);
 			memcpy(p, t, len);
 			p += len;
 			tlen += len;
 			*p++ = ' ';
 			++tlen;
-			t = msg_cat(sp, *ap, &len);
-			memcpy(p, t, len);
+			memcpy(p, *ap, strlen(*ap));
 			p += len;
 			tlen += len;
 			sp->rptlines[cnt] = 0;
@@ -367,8 +366,7 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 	if (F_ISSET(sp, SC_STATUS_CNT) && sp->argv != NULL) {
 		for (cnt = 0, ap = sp->argv; *ap != NULL; ++ap, ++cnt);
 		if (cnt > 1) {
-			(void)snprintf(p, ep - p,
-			    msg_cat(sp, "%d files to edit", NULL), cnt);
+			(void)snprintf(p, ep - p, "%d files to edit", cnt);
 			p += strlen(p);
 			*p++ = ':';
 			*p++ = ' ';
@@ -386,14 +384,12 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 	needsep = 0;
 	if (F_ISSET(sp->frp, FR_NEWFILE)) {
 		F_CLR(sp->frp, FR_NEWFILE);
-		t = msg_cat(sp, "new file", &len);
-		memcpy(p, t, len);
+		memcpy(p, "new file", strlen("new file"));
 		p += len;
 		needsep = 1;
 	} else {
 		if (F_ISSET(sp->frp, FR_NAMECHANGE)) {
-			t = msg_cat(sp, "name changed", &len);
-			memcpy(p, t, len);
+			memcpy(p, "name changed", strlen("name changed"));
 			p += len;
 			needsep = 1;
 		}
@@ -401,10 +397,8 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 			*p++ = ',';
 			*p++ = ' ';
 		}
-		if (F_ISSET(sp->ep, F_MODIFIED))
-			t = msg_cat(sp, "modified", &len);
-		else
-			t = msg_cat(sp, "unmodified", &len);
+		t = (F_ISSET(sp->ep, F_MODIFIED)) ? "modified" : "unmodified";
+		len = strlen(t);
 		memcpy(p, t, len);
 		p += len;
 		needsep = 1;
@@ -414,8 +408,7 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 			*p++ = ',';
 			*p++ = ' ';
 		}
-		t = msg_cat(sp, "UNLOCKED", &len);
-		memcpy(p, t, len);
+		memcpy(p, "UNLOCKED", strlen("UNLOCKED"));
 		p += len;
 		needsep = 1;
 	}
@@ -424,8 +417,7 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 			*p++ = ',';
 			*p++ = ' ';
 		}
-		t = msg_cat(sp, "readonly", &len);
-		memcpy(p, t, len);
+		memcpy(p, "readonly", strlen("readonly"));
 		p += len;
 		needsep = 1;
 	}
@@ -437,18 +429,15 @@ msgq_status(SCR *sp, recno_t lno, u_int flags)
 		if (db_last(sp, &last))
 			return;
 		if (last == 0) {
-			t = msg_cat(sp, "empty file", &len);
-			memcpy(p, t, len);
+			memcpy(p, "empty file", strlen("empty file"));
 			p += len;
 		} else {
-			t = msg_cat(sp, "line %lu of %lu [%ld%%]", &len);
-			(void)snprintf(p, ep - p, t, lno, last,
-			    (lno * 100) / last);
+			(void)snprintf(p, ep - p, "line %lu of %lu [%ld%%]",
+			    lno, last, (lno * 100) / last);
 			p += strlen(p);
 		}
 	} else {
-		t = msg_cat(sp, "line %lu", &len);
-		(void)snprintf(p, ep - p, t, lno);
+		(void)snprintf(p, ep - p, "line %lu", lno);
 		p += strlen(p);
 	}
 #ifdef DEBUG
@@ -505,51 +494,31 @@ alloc_err:
 const char *
 msg_cmsg(SCR *sp, cmsg_t which, size_t *lenp)
 {
+	const char *s;
 	switch (which) {
 	case CMSG_CONF:
-		return (msg_cat(sp, "confirm? [ynq]", lenp));
+		s = "confirm? [ynq]";
+		break;
 	case CMSG_CONT:
-		return (msg_cat(sp, "Press any key to continue: ", lenp));
+		s = "Press any key to continue: ";
+		break;
 	case CMSG_CONT_EX:
-		return (msg_cat(sp,
-	    "Press any key to continue [: to enter more ex commands]: ",
-		    lenp));
+		s = "Press any key to continue [: to enter more ex commands]: ";
+		break;
 	case CMSG_CONT_R:
-		return (msg_cat(sp, "Press Enter to continue: ", lenp));
+		s = "Press Enter to continue: ";
+		break;
 	case CMSG_CONT_S:
-		return (msg_cat(sp, " cont?", lenp));
+		s = " cont?";
+		break;
 	case CMSG_CONT_Q:
-		return (msg_cat(sp,
-		    "Press any key to continue [q to quit]: ", lenp));
+		s = "Press any key to continue [q to quit]: ";
+		break;
 	default:
 		abort();
 	}
-	/* NOTREACHED */
-}
-
-/*
- * msg_cat --
- *	Return a single message from the catalog, plus its length.
- *
- * PUBLIC: const char *msg_cat(SCR *, const char *, size_t *);
- */
-const char *
-msg_cat(SCR *sp, const char *str, size_t *lenp)
-{
-	GS *gp;
-	DBT data, key;
-	recno_t msgno;
-
-	/*
-	 * If it's not a catalog message, i.e. has doesn't have a leading
-	 * number and '|' symbol, we're done.
-	 */
-	if (isdigit(str[0]) &&
-	    isdigit(str[1]) && isdigit(str[2]) && str[3] == '|')
-		str = &str[4];
-	if (lenp != NULL)
-		*lenp = strlen(str);
-	return (str);
+	*lenp = strlen(s);
+	return s;
 }
 
 /*
diff --git ex/ex_append.c ex/ex_append.c
index 55e1c9f..4e672d4 100644
--- ex/ex_append.c
+++ ex/ex_append.c
@@ -218,8 +218,7 @@ ex_aci(SCR *sp, EXCMD *cmdp, enum which cmd)
 		 * when they enter append mode, and can't seem to get out of
 		 * it.  Give them an informational message.
 		 */
-		(void)ex_puts(sp,
-		    msg_cat(sp, "Entering ex input mode.", NULL));
+		(void)ex_puts(sp, "Entering ex input mode.");
 		(void)ex_puts(sp, "\n");
 		(void)ex_fflush(sp);
 	}
diff --git ex/ex_bang.c ex/ex_bang.c
index 7075a6d..aa0555f 100644
--- ex/ex_bang.c
+++ ex/ex_bang.c
@@ -103,9 +103,7 @@ ex_bang(SCR *sp, EXCMD *cmdp)
 					return (0);
 			} else if (O_ISSET(sp, O_WARN) &&
 			    !F_ISSET(sp, SC_EX_SILENT))
-				msg = msg_cat(sp,
-				    "File modified since last write.",
-				    NULL);
+				msg = "File modified since last write.";
 		}
 
 		/* If we're still in a vi screen, move out explicitly. */
diff --git ex/ex_print.c ex/ex_print.c
index c984107..21615b2 100644
--- ex/ex_print.c
+++ ex/ex_print.c
@@ -181,7 +181,7 @@ ex_scprint(SCR *sp, MARK *fp, MARK *tp)
 		return (1);
 	if (INTERRUPTED(sp))
 		return (1);
-	p = "[ynq]";		/* XXX: should be msg_cat. */
+	p = "[ynq]";
 	if (ex_prchars(sp, p, &col, 5, 0, 0))
 		return (1);
 	(void)ex_fflush(sp);
diff --git ex/ex_subst.c ex/ex_subst.c
index 9d9f673..bcc4190 100644
--- ex/ex_subst.c
+++ ex/ex_subst.c
@@ -626,8 +626,7 @@ nextmatch:	match[0].rm_so = 0;
 				if (vs_refresh(sp, 1))
 					goto err;
 
-				vs_update(sp, msg_cat(sp,
-				    "Confirm change? [n]", NULL), NULL);
+				vs_update(sp, "Confirm change? [n]", NULL);
 
 				if (v_event_get(sp, &ev, 0, 0))
 					goto err;
diff --git include/com_extern.h include/com_extern.h
index d65c664..6088119 100644
--- include/com_extern.h
+++ include/com_extern.h
@@ -55,7 +55,6 @@ void msgq_str(SCR *, mtype_t, char *, char *);
 void mod_rpt(SCR *);
 void msgq_status(SCR *, recno_t, u_int);
 const char *msg_cmsg(SCR *, cmsg_t, size_t *);
-const char *msg_cat(SCR *, const char *, size_t *);
 char *msg_print(SCR *, const char *, int *);
 int opts_init(SCR *, int *);
 int opts_set(SCR *, ARGS *[], char *);
diff --git vi/vs_msg.c vi/vs_msg.c
index 23ccf5e..0d154a3 100644
--- vi/vs_msg.c
+++ vi/vs_msg.c
@@ -62,7 +62,6 @@ vs_busy(SCR *sp, const char *msg, busy_t btype)
 	static const char flagc[] = "|/-\\";
 	struct timespec ts, ts_diff;
 	size_t len, notused;
-	const char *p;
 
 	/* Ex doesn't display busy messages. */
 	if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE))
@@ -91,9 +90,8 @@ vs_busy(SCR *sp, const char *msg, busy_t btype)
 		(void)gp->scr_cursor(sp, &vip->busy_oldy, &vip->busy_oldx);
 
 		/* Display the busy message. */
-		p = msg_cat(sp, msg, &len);
 		(void)gp->scr_move(sp, LASTLINE(sp), 0);
-		(void)gp->scr_addstr(sp, p, len);
+		(void)gp->scr_addstr(sp, msg, strlen(msg));
 		(void)gp->scr_cursor(sp, &notused, &vip->busy_fx);
 		(void)gp->scr_clrtoeol(sp);
 		(void)gp->scr_move(sp, LASTLINE(sp), vip->busy_fx);
diff --git vi/vs_refresh.c vi/vs_refresh.c
index 2210b8f..4a151c7 100644
--- vi/vs_refresh.c
+++ vi/vs_refresh.c
@@ -880,8 +880,8 @@ vs_modeline(SCR *sp)
 	if (O_ISSET(sp, O_SHOWMODE)) {
 		if (F_ISSET(sp->ep, F_MODIFIED))
 			--endpoint;
-		t = msg_cat(sp, modes[sp->showmode], &len);
-		endpoint -= len;
+		t = modes[sp->showmode];
+		endpoint -= (len = strlen(t));
 	}
 
 	if (endpoint > curlen + 2) {
diff --git build/Makefile build/Makefile
index 68e7b54..3b738fb 100644
--- build/Makefile
+++ build/Makefile
@@ -45,9 +45,5 @@ MLINKS+=	vi.1 view.1
 .include "../../Makefile.inc"
 .include <bsd.prog.mk>
 
-CATALOGS=	dutch english french german polish ru_RU.KOI8-R spanish \
-		swedish uk_UA.KOI8-U
 afterinstall:
-	${INSTALL} -d ${DESTDIR}${SHAREDIR}/vi/catalog
-	(cd ${.CURDIR}/../catalog && ${INSTALL} -m ${NONBINMODE} -c ${CATALOGS} ${DESTDIR}/usr/share/vi/catalog )
 	${INSTALL} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} -c ${.CURDIR}/recover ${DESTDIR}/usr/libexec/vi.recover
diff --git build/pathnames.h build/pathnames.h
index 83515da..b1451a0 100644
--- build/pathnames.h
+++ build/pathnames.h
@@ -2,7 +2,6 @@
 /* @(#)pathnames.h.in	8.4 (Berkeley) 6/26/96 */
 
 #define	_PATH_EXRC	".exrc"
-#define	_PATH_MSGCAT	"/usr/share/vi/catalog/"
 #define	_PATH_NEXRC	".nexrc"
 #define	_PATH_PRESERVE	"/var/tmp/vi.recover"
 #define	_PATH_SYSEXRC	"/etc/vi.exrc"

Reply via email to