summaryrefslogtreecommitdiff
path: root/usr.bin/mg/line.c
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2014-03-20 07:47:30 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2014-03-20 07:47:30 +0000
commit6a0a6cdf1572523b52f30ca110ab358f5e088f18 (patch)
tree891437e7fbf1d01d5ed42b26a4eb03b841647009 /usr.bin/mg/line.c
parent45063cff1b518142d40e1fc7d5212dc56ca6d266 (diff)
Add some missing dobeeps.
ok florian@
Diffstat (limited to 'usr.bin/mg/line.c')
-rw-r--r--usr.bin/mg/line.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/mg/line.c b/usr.bin/mg/line.c
index e67a2e55be1..51d17657d98 100644
--- a/usr.bin/mg/line.c
+++ b/usr.bin/mg/line.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: line.c,v 1.52 2013/12/23 21:47:32 florian Exp $ */
+/* $OpenBSD: line.c,v 1.53 2014/03/20 07:47:29 lum Exp $ */
/* This file is in the public domain. */
@@ -147,6 +147,7 @@ linsert_str(const char *s, int n)
return (k);
if (curbp->b_flag & BFREADONLY) {
+ dobeep();
ewprintf("Buffer is read only");
return (FALSE);
}
@@ -244,6 +245,7 @@ linsert(int n, int c)
return (s);
if (curbp->b_flag & BFREADONLY) {
+ dobeep();
ewprintf("Buffer is read only");
return (FALSE);
}
@@ -259,6 +261,7 @@ linsert(int n, int c)
/* now should only happen in empty buffer */
if (curwp->w_doto != 0) {
+ dobeep();
ewprintf("bug: linsert");
return (FALSE);
}
@@ -405,6 +408,7 @@ lnewline(void)
if ((s = checkdirty(curbp)) != TRUE)
return (s);
if (curbp->b_flag & BFREADONLY) {
+ dobeep();
ewprintf("Buffer is read only");
return (FALSE);
}
@@ -436,6 +440,7 @@ ldelete(RSIZE n, int kflag)
if ((s = checkdirty(curbp)) != TRUE)
return (s);
if (curbp->b_flag & BFREADONLY) {
+ dobeep();
ewprintf("Buffer is read only");
goto out;
}
@@ -524,6 +529,7 @@ ldelnewline(void)
if ((s = checkdirty(curbp)) != TRUE)
return (s);
if (curbp->b_flag & BFREADONLY) {
+ dobeep();
ewprintf("Buffer is read only");
return (FALSE);
}
@@ -601,6 +607,7 @@ lreplace(RSIZE plen, char *st)
if ((s = checkdirty(curbp)) != TRUE)
return (s);
if (curbp->b_flag & BFREADONLY) {
+ dobeep();
ewprintf("Buffer is read only");
return (FALSE);
}