From 750a99bf2ca10dbc4b9b2c352a8348c9d120cd56 Mon Sep 17 00:00:00 2001 From: op Date: Sat, 15 Oct 2022 17:01:14 +0000 Subject: [PATCH] replace ewprintf("") calls with eerase(): no functional difference. ok florian@ --- usr.bin/mg/dired.c | 4 ++-- usr.bin/mg/echo.c | 22 +++++++++++----------- 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); } } -- 2.20.1