tt cleanup
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 16 Aug 1983 09:15:31 +0000 (01:15 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 16 Aug 1983 09:15:31 +0000 (01:15 -0800)
SCCS-vsn: usr.bin/window/wwend.c 3.2
SCCS-vsn: usr.bin/window/wwinit.c 3.3
SCCS-vsn: usr.bin/window/ww.h 3.3
SCCS-vsn: usr.bin/window/wwsuspend.c 3.2
SCCS-vsn: usr.bin/window/wwframe.c 3.3
SCCS-vsn: usr.bin/window/ttinit.c 3.4
SCCS-vsn: usr.bin/window/wwredraw.c 3.3
SCCS-vsn: usr.bin/window/tt.h 3.3
SCCS-vsn: usr.bin/window/tth19.c 3.4
SCCS-vsn: usr.bin/window/wwclreol.c 3.4
SCCS-vsn: usr.bin/window/wwdata.c 3.3
SCCS-vsn: usr.bin/window/wwdump.c 3.3
SCCS-vsn: usr.bin/window/wwflush.c 3.3
SCCS-vsn: usr.bin/window/wwinschar.c 3.3
SCCS-vsn: usr.bin/window/wwupdate.c 3.3
SCCS-vsn: usr.bin/window/wwdelchar.c 3.3
SCCS-vsn: usr.bin/window/wwscroll.c 3.2

17 files changed:
usr/src/usr.bin/window/tt.h
usr/src/usr.bin/window/tth19.c
usr/src/usr.bin/window/ttinit.c
usr/src/usr.bin/window/ww.h
usr/src/usr.bin/window/wwclreol.c
usr/src/usr.bin/window/wwdata.c
usr/src/usr.bin/window/wwdelchar.c
usr/src/usr.bin/window/wwdump.c
usr/src/usr.bin/window/wwend.c
usr/src/usr.bin/window/wwflush.c
usr/src/usr.bin/window/wwframe.c
usr/src/usr.bin/window/wwinit.c
usr/src/usr.bin/window/wwinschar.c
usr/src/usr.bin/window/wwredraw.c
usr/src/usr.bin/window/wwscroll.c
usr/src/usr.bin/window/wwsuspend.c
usr/src/usr.bin/window/wwupdate.c

index b718b52..cfc9aa3 100644 (file)
@@ -1,14 +1,13 @@
 /*
 /*
- *     @(#)tt.h        3.2 83/08/11
+ *     @(#)tt.h        3.3 83/08/15
  */
 
 struct tt {
        int (*tt_init)();
  */
 
 struct tt {
        int (*tt_init)();
-       int (*tt_reset)();
-       int (*tt_cleanup)();
-       int (*tt_move)();
+       int (*tt_end)();
        int (*tt_setinsert)();
        int (*tt_setmodes)();
        int (*tt_setinsert)();
        int (*tt_setmodes)();
+       int (*tt_move)();
        int (*tt_insline)();
        int (*tt_delline)();
        int (*tt_delchar)();
        int (*tt_insline)();
        int (*tt_delline)();
        int (*tt_delchar)();
@@ -18,8 +17,6 @@ struct tt {
        int (*tt_clreol)();
        int (*tt_clreos)();
        int (*tt_clear)();
        int (*tt_clreol)();
        int (*tt_clreos)();
        int (*tt_clear)();
-       int (*tt_window)();
-       int (*tt_flash)();
        int tt_nrow;
        int tt_ncol;
        char *tt_frame;
        int tt_nrow;
        int tt_ncol;
        char *tt_frame;
index 1bf8cb0..60c28f1 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)tth19.c     3.3 83/08/12";
+static char *sccsid = "@(#)tth19.c     3.4 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 /*
 kb|h19|heath|h19-b|h19b|heathkit|heath-19|z19|zenith:
 
 /*
 kb|h19|heath|h19-b|h19b|heathkit|heath-19|z19|zenith:
@@ -183,22 +184,6 @@ out:
 }
 
 h19_init()
 }
 
 h19_init()
-{
-       float cpms = (float) wwbaud / 10000;    /* char per ms */
-
-       h19_msp10c = 10 / cpms;                 /* ms per 10 char */
-#ifdef notdef
-       tt.tt_ILmf = cpms;                      /* 1 ms */
-       tt.tt_ILov = 2;
-       tt.tt_ICmf = cpms * 1.5 ;               /* 1.5 ms */
-       tt.tt_ICov = 2;
-       tt.tt_DCmf = 0;
-       tt.tt_DCov = 2;
-#endif
-       return 0;
-}
-
-h19_reset()
 {
        esc();
        pc(x);
 {
        esc();
        pc(x);
@@ -213,7 +198,7 @@ h19_reset()
        h19_modes = 0;
 }
 
        h19_modes = 0;
 }
 
-h19_cleanup()
+h19_end()
 {
        SETMODES(0);
        SETINSERT(0);
 {
        SETMODES(0);
        SETINSERT(0);
@@ -251,6 +236,9 @@ h19_delchar()
 
 tt_h19()
 {
 
 tt_h19()
 {
+       float cpms = (float) wwbaud / 10000;    /* char per ms */
+
+       h19_msp10c = 10 / cpms;                 /* ms per 10 char */
        tt.tt_setinsert = h19_setinsert;
        tt.tt_setmodes = h19_setmodes;
        tt.tt_insline = h19_insline;
        tt.tt_setinsert = h19_setinsert;
        tt.tt_setmodes = h19_setmodes;
        tt.tt_insline = h19_insline;
@@ -258,12 +246,11 @@ tt_h19()
        tt.tt_delchar = h19_delchar;
        tt.tt_blank = h19_blank;
        tt.tt_init = h19_init;
        tt.tt_delchar = h19_delchar;
        tt.tt_blank = h19_blank;
        tt.tt_init = h19_init;
-       tt.tt_cleanup = h19_cleanup;
+       tt.tt_end = h19_end;
        tt.tt_clreol = h19_clreol;
        tt.tt_clreos = h19_clreos;
        tt.tt_clear = h19_clear;
        tt.tt_move = h19_move;
        tt.tt_clreol = h19_clreol;
        tt.tt_clreos = h19_clreos;
        tt.tt_clear = h19_clear;
        tt.tt_move = h19_move;
-       tt.tt_reset = h19_reset;
        tt.tt_write = h19_write;
        tt.tt_putc = h19_putc;
        tt.tt_ncol = 80;
        tt.tt_write = h19_write;
        tt.tt_putc = h19_putc;
        tt.tt_ncol = 80;
index a279a67..56fa4e6 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)ttinit.c    3.3 83/08/15";
+static char *sccsid = "@(#)ttinit.c    3.4 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 ttinit()
 {
 
 ttinit()
 {
@@ -31,7 +32,5 @@ ttinit()
                        break;
        if (tp->tt_name == 0)
                return -1;
                        break;
        if (tp->tt_name == 0)
                return -1;
-       if ((*tp->tt_func)() < 0)
-               return -1;
-       return (*tt.tt_init)();
+       return (*tp->tt_func)();
 }
 }
index 5926694..fa7a628 100644 (file)
@@ -1,10 +1,9 @@
 /*
 /*
- *     @(#)ww.h        3.2 83/08/12    
+ *     @(#)ww.h        3.3 83/08/15    
  */
 
 #include <stdio.h>
 #include <sgtty.h>
  */
 
 #include <stdio.h>
 #include <sgtty.h>
-#include "tt.h"
 
 #define NWW    30
 
 
 #define NWW    30
 
index c34fd74..33a6346 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwclreol.c  3.3 83/08/15";
+static char *sccsid = "@(#)wwclreol.c  3.4 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwclreol(w, line, col)
 struct ww *w;
 
 wwclreol(w, line, col)
 struct ww *w;
index bff0583..e75f108 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwdata.c    3.2 83/08/11";
+static char *sccsid = "@(#)wwdata.c    3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 struct ww wwhead = {
        &wwhead, &wwhead
 
 struct ww wwhead = {
        &wwhead, &wwhead
index d1646e5..e59ec46 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwdelchar.c 3.2 83/08/11";
+static char *sccsid = "@(#)wwdelchar.c 3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwdelchar(w, line, col)
 register struct ww *w;
 
 wwdelchar(w, line, col)
 register struct ww *w;
index e3249ba..9d034c8 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwdump.c    3.2 83/08/11";
+static char *sccsid = "@(#)wwdump.c    3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 static char cmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
 
 static char cmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
index 3b04d03..f866fe0 100644 (file)
@@ -1,13 +1,14 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwend.c     3.1 83/08/11";
+static char *sccsid = "@(#)wwend.c     3.2 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwend()
 {
        (*tt.tt_move)(tt.tt_nrow - 1, 0);
 
 wwend()
 {
        (*tt.tt_move)(tt.tt_nrow - 1, 0);
-       (*tt.tt_cleanup)();
+       (*tt.tt_end)();
        fflush(stdout);
        (void) wwsettty(0, &wwoldtty);
 }
        fflush(stdout);
        (void) wwsettty(0, &wwoldtty);
 }
index 4c7e896..f37dd6f 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwflush.c   3.2 83/08/11";
+static char *sccsid = "@(#)wwflush.c   3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwflush()
 {
 
 wwflush()
 {
index 662a13c..76f72b2 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwframe.c   3.2 83/08/12";
+static char *sccsid = "@(#)wwframe.c   3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwframe(w, wframe)
 register struct ww *w;
 
 wwframe(w, wframe)
 register struct ww *w;
index b245ad7..10af560 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwinit.c    3.2 83/08/12";
+static char *sccsid = "@(#)wwinit.c    3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 static char *kp = wwkeys;
 extern char _sobuf[];
 
 static char *kp = wwkeys;
 extern char _sobuf[];
@@ -40,8 +41,7 @@ wwinit()
                goto bad;
        wwnrow = tt.tt_nrow;
        wwncol = tt.tt_ncol;
                goto bad;
        wwnrow = tt.tt_nrow;
        wwncol = tt.tt_ncol;
-       (*tt.tt_reset)();
-       (*tt.tt_clreos)();
+       (*tt.tt_init)();
 
        if ((wwsmap = wwalloc(wwnrow, wwncol, sizeof (char))) == 0)
                goto bad;
 
        if ((wwsmap = wwalloc(wwnrow, wwncol, sizeof (char))) == 0)
                goto bad;
index daafb14..c76b59a 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwinschar.c 3.2 83/08/11";
+static char *sccsid = "@(#)wwinschar.c 3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwinschar(w, line, col, c)
 register struct ww *w;
 
 wwinschar(w, line, col, c)
 register struct ww *w;
index d08c087..6fb8680 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwredraw.c  3.2 83/08/11";
+static char *sccsid = "@(#)wwredraw.c  3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwredraw()
 {
 
 wwredraw()
 {
index 617999f..d4b12c8 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwscroll.c  3.1 83/08/12";
+static char *sccsid = "@(#)wwscroll.c  3.2 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 /*
  * Scroll down one line, starting at 'line'.
 
 /*
  * Scroll down one line, starting at 'line'.
index f4625a3..055f345 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwsuspend.c 3.1 83/08/11";
+static char *sccsid = "@(#)wwsuspend.c 3.2 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 #include <signal.h>
 
 #define mask(s)        (1 << (s) - 1)
 #include <signal.h>
 
 #define mask(s)        (1 << (s) - 1)
@@ -17,7 +18,7 @@ wwsuspend()
        (void) kill(0, SIGTSTP);
        (void) sigblock(mask(SIGTSTP));
        (void) wwsettty(0, &wwnewtty);
        (void) kill(0, SIGTSTP);
        (void) sigblock(mask(SIGTSTP));
        (void) wwsettty(0, &wwnewtty);
-       (*tt.tt_reset)();
+       (*tt.tt_init)();
        wwredraw();
        (void) sigsetmask(oldmask);
 }
        wwredraw();
        (void) sigsetmask(oldmask);
 }
index 781f3d6..3fc067d 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwupdate.c  3.2 83/08/11";
+static char *sccsid = "@(#)wwupdate.c  3.3 83/08/15";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
+#include "tt.h"
 
 wwupdate()
 {
 
 wwupdate()
 {