summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorOmar Polo <op@cvs.openbsd.org>2022-10-15 17:01:15 +0000
committerOmar Polo <op@cvs.openbsd.org>2022-10-15 17:01:15 +0000
commit84086d38f2c1c763513ffbb403e9ed3e30a6d590 (patch)
tree0d25a013719fd378bbf5a663b5ecdf9dd43e2746 /usr.bin/mg
parent8ca7de367a1fe0e76ea4ca94177d53d48d216488 (diff)
replace ewprintf("") calls with eerase(): no functional difference.
ok florian@
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/dired.c4
-rw-r--r--usr.bin/mg/echo.c22
2 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c
index 810ea3ae334..4537826009c 100644
--- a/usr.bin/mg/dired.c
+++ b/usr.bin/mg/dired.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dired.c,v 1.100 2021/05/02 14:13:17 lum Exp $ */
+/* $OpenBSD: dired.c,v 1.101 2022/10/15 17:01:14 op Exp $ */
/* This file is in the public domain. */
@@ -1185,7 +1185,7 @@ gotofile(char *fpth)
ewprintf("File not found %s", fname);
return (FALSE);
} else {
- ewprintf("");
+ eerase();
return (TRUE);
}
}
diff --git a/usr.bin/mg/echo.c b/usr.bin/mg/echo.c
index ced1a2dc4a9..9b90aaa5ef7 100644
--- a/usr.bin/mg/echo.c
+++ b/usr.bin/mg/echo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: echo.c,v 1.68 2021/03/02 15:03:35 lum Exp $ */
+/* $OpenBSD: echo.c,v 1.69 2022/10/15 17:01:14 op Exp $ */
/* This file is in the public domain. */
@@ -67,15 +67,15 @@ eyorn(const char *sp)
for (;;) {
s = getkey(FALSE);
if (s == 'y' || s == 'Y' || s == ' ') {
- ewprintf("");
+ eerase();
return (TRUE);
}
if (s == 'n' || s == 'N' || s == CCHR('M')) {
- ewprintf("");
+ eerase();
return (FALSE);
}
if (s == CCHR('G')) {
- ewprintf("");
+ eerase();
return (ctrlg(FFRAND, 1));
}
ewprintf("Please answer y or n. %s? (y or n) ", sp);
@@ -101,19 +101,19 @@ eynorr(const char *sp)
for (;;) {
s = getkey(FALSE);
if (s == 'y' || s == 'Y' || s == ' ') {
- ewprintf("");
+ eerase();
return (TRUE);
}
if (s == 'n' || s == 'N' || s == CCHR('M')) {
- ewprintf("");
+ eerase();
return (FALSE);
}
if (s == 'r' || s == 'R') {
- ewprintf("");
+ eerase();
return (REVERT);
}
if (s == CCHR('G')) {
- ewprintf("");
+ eerase();
return (ctrlg(FFRAND, 1));
}
ewprintf("Please answer y, n or r.");
@@ -137,7 +137,7 @@ eyesno(const char *sp)
EFNUL | EFNEW | EFCR, sp);
for (;;) {
if (rep == NULL) {
- ewprintf("");
+ eerase();
return (ABORT);
}
if (rep[0] != '\0') {
@@ -149,11 +149,11 @@ eyesno(const char *sp)
free(lp);
}
if (strcasecmp(rep, "yes") == 0) {
- ewprintf("");
+ eerase();
return (TRUE);
}
if (strcasecmp(rep, "no") == 0) {
- ewprintf("");
+ eerase();
return (FALSE);
}
}