Hello tech@,

This should be the final patch to remove BACKWARDS from our ed.

If ed were compiled without the BACKWARDS flag it would have a pager
option when running with the list command. This would trigger if a
line is long enough to wrap enough times to fill all the rows of the
output device.

Since ed was originally intended for printers (which it doesn't check
for) and most output devices have a scroll-option, or we can fall back
to tmux, I reckon this is a useless feature which isn't enabled anyway.

OK?

martijn@

Index: io.c
===================================================================
RCS file: /cvs/src/bin/ed/io.c,v
retrieving revision 1.21
diff -u -p -r1.21 io.c
--- io.c        26 Apr 2018 12:18:54 -0000      1.21
+++ io.c        4 Jun 2018 06:52:47 -0000
@@ -306,9 +306,6 @@ int
 put_tty_line(char *s, int l, int n, int gflag)
 {
        int col = 0;
-#ifndef BACKWARDS
-       int lc = 0;
-#endif
        char *cp;
 
        if (gflag & GNP) {
@@ -319,15 +316,6 @@ put_tty_line(char *s, int l, int n, int 
                if ((gflag & GLS) && ++col > cols) {
                        fputs("\\\n", stdout);
                        col = 1;
-#ifndef BACKWARDS
-                       if (!scripted && !isglobal && ++lc > rows) {
-                               lc = 0;
-                               fputs("Press <RETURN> to continue... ", stdout);
-                               fflush(stdout);
-                               if (get_tty_line() < 0)
-                                       return ERR;
-                       }
-#endif
                }
                if (gflag & GLS) {
                        if (31 < *s && *s < 127 && *s != '\\' && *s != '$')

Reply via email to