fixed it to work on terminals with over 48 lines, and fixed bug
authorMark Horton <mark@ucbvax.Berkeley.EDU>
Fri, 31 Oct 1980 12:41:08 +0000 (04:41 -0800)
committerMark Horton <mark@ucbvax.Berkeley.EDU>
Fri, 31 Oct 1980 12:41:08 +0000 (04:41 -0800)
which allowed setting a huge window

SCCS-vsn: usr.bin/ex/ex_tune.h 6.2
SCCS-vsn: usr.bin/ex/ex_set.c 6.2
SCCS-vsn: usr.bin/ex/ex_tty.c 6.2

usr/src/usr.bin/ex/ex_set.c
usr/src/usr.bin/ex/ex_tty.c
usr/src/usr.bin/ex/ex_tune.h

index 2b39eff..5dfdfb1 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 1980 Regents of the University of California */
 /* Copyright (c) 1980 Regents of the University of California */
-static char *sccsid = "@(#)ex_set.c    6.1 %G%";
+static char *sccsid = "@(#)ex_set.c    6.2 %G%";
 #include "ex.h"
 #include "ex_temp.h"
 
 #include "ex.h"
 #include "ex_temp.h"
 
@@ -93,8 +93,11 @@ printone:
                        op->ovalue = getnum();
                        if (value(TABSTOP) <= 0)
                                value(TABSTOP) = TABS;
                        op->ovalue = getnum();
                        if (value(TABSTOP) <= 0)
                                value(TABSTOP) = TABS;
-                       if (op == &options[WINDOW])
+                       if (op == &options[WINDOW]) {
+                               if (value(WINDOW) >= LINES)
+                                       value(WINDOW) = LINES-1;
                                vsetsiz(value(WINDOW));
                                vsetsiz(value(WINDOW));
+                       }
                        break;
 
                case STRING:
                        break;
 
                case STRING:
index 1bdf091..d84bbc0 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 1980 Regents of the University of California */
 /* Copyright (c) 1980 Regents of the University of California */
-static char *sccsid = "@(#)ex_tty.c    6.1 %G%";
+static char *sccsid = "@(#)ex_tty.c    6.2 %G%";
 #include "ex.h"
 #include "ex_tty.h"
 
 #include "ex.h"
 #include "ex_tty.h"
 
@@ -69,13 +69,15 @@ setterm(type)
        i = LINES = tgetnum("li");
        if (LINES <= 5)
                LINES = 24;
        i = LINES = tgetnum("li");
        if (LINES <= 5)
                LINES = 24;
-       if (LINES > 48)
-               LINES = 48;
+       if (LINES > TUBELINES)
+               LINES = TUBELINES;
        l = LINES;
        if (ospeed < B1200)
                l = 9;  /* including the message line at the bottom */
        else if (ospeed < B2400)
                l = 17;
        l = LINES;
        if (ospeed < B1200)
                l = 9;  /* including the message line at the bottom */
        else if (ospeed < B2400)
                l = 17;
+       if (l > LINES)
+               l = LINES;
        aoftspace = tspace;
        zap();
        /*
        aoftspace = tspace;
        zap();
        /*
index c4949ab..7263f22 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 1980 Regents of the University of California */
 /* Copyright (c) 1980 Regents of the University of California */
-/* sccs id:    @(#)ex_tune.h   6.1 %G%  */
+/* sccs id:    @(#)ex_tune.h   6.2 %G%  */
 /*
  * Definitions of editor parameters and limits
  */
 /*
  * Definitions of editor parameters and limits
  */
@@ -89,9 +89,9 @@
  * hardcopy mode when a line gets longer than 80 characters.
  */
 #ifndef VMUNIX
  * hardcopy mode when a line gets longer than 80 characters.
  */
 #ifndef VMUNIX
-#define        TUBELINES       40      /* Number of screen lines for visual */
+#define        TUBELINES       60      /* Number of screen lines for visual */
 #define        TUBECOLS        160     /* Number of screen columns for visual */
 #define        TUBECOLS        160     /* Number of screen columns for visual */
-#define        TUBESIZE        3400    /* Maximum screen size for visual */
+#define        TUBESIZE        5000    /* Maximum screen size for visual */
 #else
 #define        TUBELINES       66
 #define        TUBECOLS        160
 #else
 #define        TUBELINES       66
 #define        TUBECOLS        160