summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/vi/cl/cl_screen.c4
-rw-r--r--usr.bin/vi/cl/cl_term.c8
-rw-r--r--usr.bin/vi/common/delete.c4
-rw-r--r--usr.bin/vi/common/exf.c60
-rw-r--r--usr.bin/vi/common/key.c22
-rw-r--r--usr.bin/vi/common/line.c14
-rw-r--r--usr.bin/vi/common/log.c18
-rw-r--r--usr.bin/vi/common/mark.c8
-rw-r--r--usr.bin/vi/common/msg.c54
-rw-r--r--usr.bin/vi/common/options.c28
-rw-r--r--usr.bin/vi/common/options_f.c16
-rw-r--r--usr.bin/vi/common/put.c6
-rw-r--r--usr.bin/vi/common/recover.c36
-rw-r--r--usr.bin/vi/common/search.c16
-rw-r--r--usr.bin/vi/ex/ex.c52
-rw-r--r--usr.bin/vi/ex/ex_abbrev.c12
-rw-r--r--usr.bin/vi/ex/ex_append.c4
-rw-r--r--usr.bin/vi/ex/ex_args.c10
-rw-r--r--usr.bin/vi/ex/ex_argv.c18
-rw-r--r--usr.bin/vi/ex/ex_bang.c4
-rw-r--r--usr.bin/vi/ex/ex_cd.c8
-rw-r--r--usr.bin/vi/ex/ex_display.c4
-rw-r--r--usr.bin/vi/ex/ex_filter.c4
-rw-r--r--usr.bin/vi/ex/ex_global.c4
-rw-r--r--usr.bin/vi/ex/ex_init.c14
-rw-r--r--usr.bin/vi/ex/ex_join.c4
-rw-r--r--usr.bin/vi/ex/ex_map.c10
-rw-r--r--usr.bin/vi/ex/ex_mark.c4
-rw-r--r--usr.bin/vi/ex/ex_mkexrc.c6
-rw-r--r--usr.bin/vi/ex/ex_move.c4
-rw-r--r--usr.bin/vi/ex/ex_open.c6
-rw-r--r--usr.bin/vi/ex/ex_preserve.c6
-rw-r--r--usr.bin/vi/ex/ex_read.c10
-rw-r--r--usr.bin/vi/ex/ex_screen.c4
-rw-r--r--usr.bin/vi/ex/ex_script.c6
-rw-r--r--usr.bin/vi/ex/ex_shift.c4
-rw-r--r--usr.bin/vi/ex/ex_subst.c12
-rw-r--r--usr.bin/vi/ex/ex_tag.c24
-rw-r--r--usr.bin/vi/ex/ex_util.c28
-rw-r--r--usr.bin/vi/ex/ex_visual.c4
-rw-r--r--usr.bin/vi/ex/ex_write.c4
-rw-r--r--usr.bin/vi/vi/getc.c4
-rw-r--r--usr.bin/vi/vi/v_ch.c6
-rw-r--r--usr.bin/vi/vi/v_ex.c8
-rw-r--r--usr.bin/vi/vi/v_increment.c8
-rw-r--r--usr.bin/vi/vi/v_match.c6
-rw-r--r--usr.bin/vi/vi/v_replace.c4
-rw-r--r--usr.bin/vi/vi/v_screen.c6
-rw-r--r--usr.bin/vi/vi/v_search.c8
-rw-r--r--usr.bin/vi/vi/v_txt.c10
-rw-r--r--usr.bin/vi/vi/v_util.c26
-rw-r--r--usr.bin/vi/vi/v_xchar.c4
-rw-r--r--usr.bin/vi/vi/vi.c24
-rw-r--r--usr.bin/vi/vi/vs_refresh.c12
-rw-r--r--usr.bin/vi/vi/vs_smap.c6
-rw-r--r--usr.bin/vi/vi/vs_split.c16
56 files changed, 356 insertions, 356 deletions
diff --git a/usr.bin/vi/cl/cl_screen.c b/usr.bin/vi/cl/cl_screen.c
index 04f301f9cd4..0e78455d303 100644
--- a/usr.bin/vi/cl/cl_screen.c
+++ b/usr.bin/vi/cl/cl_screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl_screen.c,v 1.24 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: cl_screen.c,v 1.25 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/cl/cl_term.c b/usr.bin/vi/cl/cl_term.c
index ea5a8bd7d82..0f6eefe81c6 100644
--- a/usr.bin/vi/cl/cl_term.c
+++ b/usr.bin/vi/cl/cl_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl_term.c,v 1.20 2015/04/10 18:05:51 brynet Exp $ */
+/* $OpenBSD: cl_term.c,v 1.21 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/common/delete.c b/usr.bin/vi/common/delete.c
index 33cf7969cbd..300dc088a7a 100644
--- a/usr.bin/vi/common/delete.c
+++ b/usr.bin/vi/common/delete.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: delete.c,v 1.10 2015/02/06 22:29:31 millert Exp $ */
+/* $OpenBSD: delete.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/common/exf.c b/usr.bin/vi/common/exf.c
index 55beae26f9f..8071ffb301b 100644
--- a/usr.bin/vi/common/exf.c
+++ b/usr.bin/vi/common/exf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exf.c,v 1.39 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: exf.c,v 1.40 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/common/key.c b/usr.bin/vi/common/key.c
index 63421dd75d1..8f314261d58 100644
--- a/usr.bin/vi/common/key.c
+++ b/usr.bin/vi/common/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.14 2015/01/16 06:40:14 deraadt Exp $ */
+/* $OpenBSD: key.c,v 1.15 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -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 a/usr.bin/vi/common/line.c b/usr.bin/vi/common/line.c
index 549f79bd17d..d66682231d3 100644
--- a/usr.bin/vi/common/line.c
+++ b/usr.bin/vi/common/line.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: line.c,v 1.14 2015/03/27 04:11:25 brynet Exp $ */
+/* $OpenBSD: line.c,v 1.15 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/common/log.c b/usr.bin/vi/common/log.c
index a830f2946c7..a423c55276d 100644
--- a/usr.bin/vi/common/log.c
+++ b/usr.bin/vi/common/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: log.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/common/mark.c b/usr.bin/vi/common/mark.c
index a7e9754043f..75f7896aefc 100644
--- a/usr.bin/vi/common/mark.c
+++ b/usr.bin/vi/common/mark.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mark.c,v 1.10 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: mark.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/common/msg.c b/usr.bin/vi/common/msg.c
index fa7bdb38329..4339a913d32 100644
--- a/usr.bin/vi/common/msg.c
+++ b/usr.bin/vi/common/msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msg.c,v 1.24 2016/01/06 22:27:39 millert Exp $ */
+/* $OpenBSD: msg.c,v 1.25 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -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 a/usr.bin/vi/common/options.c b/usr.bin/vi/common/options.c
index ea2d291176e..6ecd64bcd35 100644
--- a/usr.bin/vi/common/options.c
+++ b/usr.bin/vi/common/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.20 2016/01/06 22:27:39 millert Exp $ */
+/* $OpenBSD: options.c,v 1.21 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -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 a/usr.bin/vi/common/options_f.c b/usr.bin/vi/common/options_f.c
index 0c8bcb002b6..ae6713a0563 100644
--- a/usr.bin/vi/common/options_f.c
+++ b/usr.bin/vi/common/options_f.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options_f.c,v 1.10 2016/01/06 22:27:39 millert Exp $ */
+/* $OpenBSD: options_f.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/common/put.c b/usr.bin/vi/common/put.c
index 48e760c17cf..e5d4480b67c 100644
--- a/usr.bin/vi/common/put.c
+++ b/usr.bin/vi/common/put.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: put.c,v 1.13 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: put.c,v 1.14 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/common/recover.c b/usr.bin/vi/common/recover.c
index 3e13d89df39..6d6f1e15f23 100644
--- a/usr.bin/vi/common/recover.c
+++ b/usr.bin/vi/common/recover.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: recover.c,v 1.22 2015/04/24 21:48:31 brynet Exp $ */
+/* $OpenBSD: recover.c,v 1.23 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/common/search.c b/usr.bin/vi/common/search.c
index 033d3eff9cf..b3019cf6580 100644
--- a/usr.bin/vi/common/search.c
+++ b/usr.bin/vi/common/search.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: search.c,v 1.12 2015/11/19 07:53:31 bentley Exp $ */
+/* $OpenBSD: search.c,v 1.13 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex.c b/usr.bin/vi/ex/ex.c
index 392fec40aa7..79cd6ba63af 100644
--- a/usr.bin/vi/ex/ex.c
+++ b/usr.bin/vi/ex/ex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex.c,v 1.19 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex.c,v 1.20 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_abbrev.c b/usr.bin/vi/ex/ex_abbrev.c
index 05ee68e09ca..93433c46ff6 100644
--- a/usr.bin/vi/ex/ex_abbrev.c
+++ b/usr.bin/vi/ex/ex_abbrev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_abbrev.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_abbrev.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_append.c b/usr.bin/vi/ex/ex_append.c
index 95ebec780b7..8f4465541cc 100644
--- a/usr.bin/vi/ex/ex_append.c
+++ b/usr.bin/vi/ex/ex_append.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_append.c,v 1.10 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_append.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_args.c b/usr.bin/vi/ex/ex_args.c
index 5293d067f6c..9a1952f4b92 100644
--- a/usr.bin/vi/ex/ex_args.c
+++ b/usr.bin/vi/ex/ex_args.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_args.c,v 1.11 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: ex_args.c,v 1.12 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_argv.c b/usr.bin/vi/ex/ex_argv.c
index 051de1e2be3..d620bf43013 100644
--- a/usr.bin/vi/ex/ex_argv.c
+++ b/usr.bin/vi/ex/ex_argv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_argv.c,v 1.17 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: ex_argv.c,v 1.18 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_bang.c b/usr.bin/vi/ex/ex_bang.c
index fa73d7cd76d..be0a64cc6a4 100644
--- a/usr.bin/vi/ex/ex_bang.c
+++ b/usr.bin/vi/ex/ex_bang.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_bang.c,v 1.8 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_bang.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_cd.c b/usr.bin/vi/ex/ex_cd.c
index b7532630bbb..aeb778b065e 100644
--- a/usr.bin/vi/ex/ex_cd.c
+++ b/usr.bin/vi/ex/ex_cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_cd.c,v 1.11 2015/01/16 06:40:14 deraadt Exp $ */
+/* $OpenBSD: ex_cd.c,v 1.12 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_display.c b/usr.bin/vi/ex/ex_display.c
index 5782f9d8cbf..d832a306e59 100644
--- a/usr.bin/vi/ex/ex_display.c
+++ b/usr.bin/vi/ex/ex_display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_display.c,v 1.10 2015/11/19 07:53:31 bentley Exp $ */
+/* $OpenBSD: ex_display.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_filter.c b/usr.bin/vi/ex/ex_filter.c
index 0beac24b385..e112db64372 100644
--- a/usr.bin/vi/ex/ex_filter.c
+++ b/usr.bin/vi/ex/ex_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_filter.c,v 1.13 2015/01/16 06:40:14 deraadt Exp $ */
+/* $OpenBSD: ex_filter.c,v 1.14 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_global.c b/usr.bin/vi/ex/ex_global.c
index 8c5def6b3a1..92966ed1d7b 100644
--- a/usr.bin/vi/ex/ex_global.c
+++ b/usr.bin/vi/ex/ex_global.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_global.c,v 1.14 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: ex_global.c,v 1.15 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_init.c b/usr.bin/vi/ex/ex_init.c
index f816d6f58b7..cfa2cccf599 100644
--- a/usr.bin/vi/ex/ex_init.c
+++ b/usr.bin/vi/ex/ex_init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_init.c,v 1.16 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: ex_init.c,v 1.17 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_join.c b/usr.bin/vi/ex/ex_join.c
index 279bf5b2998..84be160b1ac 100644
--- a/usr.bin/vi/ex/ex_join.c
+++ b/usr.bin/vi/ex/ex_join.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_join.c,v 1.7 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_join.c,v 1.8 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_map.c b/usr.bin/vi/ex/ex_map.c
index c5368235dfe..0030d6fc7d0 100644
--- a/usr.bin/vi/ex/ex_map.c
+++ b/usr.bin/vi/ex/ex_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_map.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_map.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_mark.c b/usr.bin/vi/ex/ex_mark.c
index dd0470329d6..d9c607dbabe 100644
--- a/usr.bin/vi/ex/ex_mark.c
+++ b/usr.bin/vi/ex/ex_mark.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_mark.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_mark.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_mkexrc.c b/usr.bin/vi/ex/ex_mkexrc.c
index ce6a6d6dd7f..96a73b234b8 100644
--- a/usr.bin/vi/ex/ex_mkexrc.c
+++ b/usr.bin/vi/ex/ex_mkexrc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_mkexrc.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_mkexrc.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_move.c b/usr.bin/vi/ex/ex_move.c
index 28ab7ae320d..9155ef30a04 100644
--- a/usr.bin/vi/ex/ex_move.c
+++ b/usr.bin/vi/ex/ex_move.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_move.c,v 1.10 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_move.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_open.c b/usr.bin/vi/ex/ex_open.c
index bf8734de76c..7b37a13c26a 100644
--- a/usr.bin/vi/ex/ex_open.c
+++ b/usr.bin/vi/ex/ex_open.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_open.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_open.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_preserve.c b/usr.bin/vi/ex/ex_preserve.c
index a03f88ac0da..81104e30464 100644
--- a/usr.bin/vi/ex/ex_preserve.c
+++ b/usr.bin/vi/ex/ex_preserve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_preserve.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_preserve.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_read.c b/usr.bin/vi/ex/ex_read.c
index 3de3aa5e1f0..b61a56b300d 100644
--- a/usr.bin/vi/ex/ex_read.c
+++ b/usr.bin/vi/ex/ex_read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_read.c,v 1.10 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_read.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_screen.c b/usr.bin/vi/ex/ex_screen.c
index 52908cea5be..9a391398f00 100644
--- a/usr.bin/vi/ex/ex_screen.c
+++ b/usr.bin/vi/ex/ex_screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_screen.c,v 1.9 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_screen.c,v 1.10 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_script.c b/usr.bin/vi/ex/ex_script.c
index d2c0ad603e2..cc33df04bc6 100644
--- a/usr.bin/vi/ex/ex_script.c
+++ b/usr.bin/vi/ex/ex_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_script.c,v 1.22 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: ex_script.c,v 1.23 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_shift.c b/usr.bin/vi/ex/ex_shift.c
index e2fb82d1b12..e202c48e2fb 100644
--- a/usr.bin/vi/ex/ex_shift.c
+++ b/usr.bin/vi/ex/ex_shift.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_shift.c,v 1.7 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_shift.c,v 1.8 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_subst.c b/usr.bin/vi/ex/ex_subst.c
index f05a61210d0..624e28adfd1 100644
--- a/usr.bin/vi/ex/ex_subst.c
+++ b/usr.bin/vi/ex/ex_subst.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_subst.c,v 1.24 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: ex_subst.c,v 1.25 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_tag.c b/usr.bin/vi/ex/ex_tag.c
index 26e1cb02782..354ff76834c 100644
--- a/usr.bin/vi/ex/ex_tag.c
+++ b/usr.bin/vi/ex/ex_tag.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_tag.c,v 1.23 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: ex_tag.c,v 1.24 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_util.c b/usr.bin/vi/ex/ex_util.c
index 4d0a936b838..19ada33f67d 100644
--- a/usr.bin/vi/ex/ex_util.c
+++ b/usr.bin/vi/ex/ex_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_util.c,v 1.8 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_util.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_visual.c b/usr.bin/vi/ex/ex_visual.c
index 5b5a34eb8ff..dc00d53c090 100644
--- a/usr.bin/vi/ex/ex_visual.c
+++ b/usr.bin/vi/ex/ex_visual.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_visual.c,v 1.9 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_visual.c,v 1.10 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/ex/ex_write.c b/usr.bin/vi/ex/ex_write.c
index 1317849a12e..23f1f7f5a25 100644
--- a/usr.bin/vi/ex/ex_write.c
+++ b/usr.bin/vi/ex/ex_write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_write.c,v 1.12 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: ex_write.c,v 1.13 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/getc.c b/usr.bin/vi/vi/getc.c
index 5e08c6b06c2..9a235a11b70 100644
--- a/usr.bin/vi/vi/getc.c
+++ b/usr.bin/vi/vi/getc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getc.c,v 1.9 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: getc.c,v 1.10 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_ch.c b/usr.bin/vi/vi/v_ch.c
index b823530ea78..844371e23ce 100644
--- a/usr.bin/vi/vi/v_ch.c
+++ b/usr.bin/vi/vi/v_ch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_ch.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_ch.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_ex.c b/usr.bin/vi/vi/v_ex.c
index d572fea83a0..2245cebd881 100644
--- a/usr.bin/vi/vi/v_ex.c
+++ b/usr.bin/vi/vi/v_ex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_ex.c,v 1.12 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_ex.c,v 1.13 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_increment.c b/usr.bin/vi/vi/v_increment.c
index f4e946164bd..618aad99fbf 100644
--- a/usr.bin/vi/vi/v_increment.c
+++ b/usr.bin/vi/vi/v_increment.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_increment.c,v 1.8 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_increment.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_match.c b/usr.bin/vi/vi/v_match.c
index da19cedacdd..a0f30bfbd23 100644
--- a/usr.bin/vi/vi/v_match.c
+++ b/usr.bin/vi/vi/v_match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_match.c,v 1.8 2015/03/28 12:54:37 bcallah Exp $ */
+/* $OpenBSD: v_match.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_replace.c b/usr.bin/vi/vi/v_replace.c
index 6b78d369efa..c4f1bb2b94b 100644
--- a/usr.bin/vi/vi/v_replace.c
+++ b/usr.bin/vi/vi/v_replace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_replace.c,v 1.8 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_replace.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_screen.c b/usr.bin/vi/vi/v_screen.c
index d4fce68d1b5..8480fefa89e 100644
--- a/usr.bin/vi/vi/v_screen.c
+++ b/usr.bin/vi/vi/v_screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_screen.c,v 1.8 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_screen.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_search.c b/usr.bin/vi/vi/v_search.c
index 727e556deec..a5f4384b3f4 100644
--- a/usr.bin/vi/vi/v_search.c
+++ b/usr.bin/vi/vi/v_search.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_search.c,v 1.13 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_search.c,v 1.14 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_txt.c b/usr.bin/vi/vi/v_txt.c
index 756915d2c42..7f7d670af6d 100644
--- a/usr.bin/vi/vi/v_txt.c
+++ b/usr.bin/vi/vi/v_txt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_txt.c,v 1.29 2015/12/03 08:13:15 bentley Exp $ */
+/* $OpenBSD: v_txt.c,v 1.30 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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;
@@ -1230,7 +1230,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;
@@ -1781,7 +1781,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);
}
@@ -2845,5 +2845,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 a/usr.bin/vi/vi/v_util.c b/usr.bin/vi/vi/v_util.c
index dd168ef9f97..9d7058ddca3 100644
--- a/usr.bin/vi/vi/v_util.c
+++ b/usr.bin/vi/vi/v_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_util.c,v 1.7 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_util.c,v 1.8 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/v_xchar.c b/usr.bin/vi/vi/v_xchar.c
index f209802da0c..57e9f902d15 100644
--- a/usr.bin/vi/vi/v_xchar.c
+++ b/usr.bin/vi/vi/v_xchar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v_xchar.c,v 1.7 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: v_xchar.c,v 1.8 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/vi.c b/usr.bin/vi/vi/vi.c
index 8d7f81ec750..b53c50cec1f 100644
--- a/usr.bin/vi/vi/vi.c
+++ b/usr.bin/vi/vi/vi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vi.c,v 1.16 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: vi.c,v 1.17 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/vs_refresh.c b/usr.bin/vi/vi/vs_refresh.c
index 4855f1e7b07..781614015ff 100644
--- a/usr.bin/vi/vi/vs_refresh.c
+++ b/usr.bin/vi/vi/vs_refresh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs_refresh.c,v 1.19 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: vs_refresh.c,v 1.20 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -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 a/usr.bin/vi/vi/vs_smap.c b/usr.bin/vi/vi/vs_smap.c
index 4abf7e69b69..c6339ae2911 100644
--- a/usr.bin/vi/vi/vs_smap.c
+++ b/usr.bin/vi/vi/vs_smap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs_smap.c,v 1.8 2014/11/12 04:28:41 bentley Exp $ */
+/* $OpenBSD: vs_smap.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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 a/usr.bin/vi/vi/vs_split.c b/usr.bin/vi/vi/vs_split.c
index 4f4660a232f..3d5f74ad20e 100644
--- a/usr.bin/vi/vi/vs_split.c
+++ b/usr.bin/vi/vi/vs_split.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs_split.c,v 1.13 2015/12/07 20:39:19 mmcc Exp $ */
+/* $OpenBSD: vs_split.c,v 1.14 2016/01/06 22:28:52 millert Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -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);
}