as per subject; the effect is almost the same, they both clear the
echo area, but ewprintf("") sets `epresf' to require an additional
eerase() on the next-next input cycle.  avoid extra work! :)

ok?

diff /home/op/w/mg.master
commit - 4912f94d4a7e2b653e74201ac73923335fd298aa
path + /home/op/w/mg.master
blob - 810ea3ae3346112842126acfe47e1a934bd9acc0
file + dired.c
--- dired.c
+++ dired.c
@@ -1185,7 +1185,7 @@ gotofile(char *fpth)
                ewprintf("File not found %s", fname);
                return (FALSE);
        } else {
-               ewprintf("");
+               eerase();
                return (TRUE);
        }
 }
blob - ced1a2dc4a9541a34a99f9ae96acf9f4e1237f33
file + echo.c
--- echo.c
+++ echo.c
@@ -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);
                        }
                }

Reply via email to