Added AL, DL, SF, SR support.
authorElan Amir <elan@ucbvax.Berkeley.EDU>
Tue, 22 Sep 1992 06:25:10 +0000 (22:25 -0800)
committerElan Amir <elan@ucbvax.Berkeley.EDU>
Tue, 22 Sep 1992 06:25:10 +0000 (22:25 -0800)
SCCS-vsn: lib/libcurses/setterm.c 5.11
SCCS-vsn: lib/libcurses/curses.c 5.9

usr/src/lib/libcurses/curses.c
usr/src/lib/libcurses/setterm.c

index ed0e405..f343d80 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)curses.c   5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)curses.c   5.9 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <curses.h>
 #endif /* not lint */
 
 #include <curses.h>
@@ -16,6 +16,11 @@ int  __echoit = 1;                   /* If stty indicates ECHO. */
 int    __endwin = 0;                   /* If endwin has been called. */
 int    __pfast;
 int    __rawmode = 0;                  /* If stty indicates RAW mode. */
 int    __endwin = 0;                   /* If endwin has been called. */
 int    __pfast;
 int    __rawmode = 0;                  /* If stty indicates RAW mode. */
+int    __noqch = 0;                    /* 
+                                        * If terminal doesn't have 
+                                        * insert/delete line capabilities 
+                                        * for quick change on refresh.
+                                        */
 
 /*
  * Public.
 
 /*
  * Public.
@@ -41,6 +46,6 @@ char  *AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL,
        *K7, *K8, *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL,
        *KR, *KS, *KU, *LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF,
        *SO, *SR, *TA, *TE, *TI, *UC, *UE, *UP, *US, *VB, *VS,
        *K7, *K8, *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL,
        *KR, *KS, *KU, *LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF,
        *SO, *SR, *TA, *TE, *TI, *UC, *UE, *UP, *US, *VB, *VS,
-       *VE,
+       *VE, *al, *dl, *sf, *sr,
        *AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM, *LEFT_PARM,
        *RIGHT_PARM;
        *AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM, *LEFT_PARM,
        *RIGHT_PARM;
index 6fd5495..fc34226 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)setterm.c  5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)setterm.c  5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/ioctl.h>
 #endif /* not lint */
 
 #include <sys/ioctl.h>
@@ -31,8 +31,9 @@ static char   *_PC,
                        &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU,
                        &LL, &MA, &ND, &NL, &_PC, &RC, &SC, &SE, &SF,
                        &SO, &SR, &TA, &TE, &TI, &UC, &UE, &UP, &US,
                        &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU,
                        &LL, &MA, &ND, &NL, &_PC, &RC, &SC, &SE, &SF,
                        &SO, &SR, &TA, &TE, &TI, &UC, &UE, &UP, &US,
-                       &VB, &VS, &VE, &AL_PARM, &DL_PARM, &UP_PARM,
-                       &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM,
+                       &VB, &VS, &VE, &al, &dl, &sf, &sr, &AL_PARM, 
+                       &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, 
+                       &RIGHT_PARM,
                };
 
 static char    *aoftspace;             /* Address of _tspace for relocation */
                };
 
 static char    *aoftspace;             /* Address of _tspace for relocation */
@@ -122,6 +123,9 @@ setterm(type)
        aoftspace = tspace;
        ttytype = longname(genbuf, __ttytype);
 
        aoftspace = tspace;
        ttytype = longname(genbuf, __ttytype);
 
+       if ((!AL && !al) || (!DL && !dl))
+               __noqch = 1;
+
        return (unknown ? ERR : OK);
 }
 
        return (unknown ? ERR : OK);
 }
 
@@ -152,7 +156,7 @@ zap()
                namp += 2;
                
        } while (*namp);
                namp += 2;
                
        } while (*namp);
-       namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullmandnlpcrcscsesfsosrtatetiucueupusvbvsveALDLUPDOLERI";
+       namp = "ALbcbtcdceclcmcrcsdcDLdmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullmandnlpcrcscseSFsoSRtatetiucueupusvbvsvealdlsfsrALDLUPDOLERI";
        sp = sstrs;
        do {
                *tmp = *namp;
        sp = sstrs;
        do {
                *tmp = *namp;