* Copyright (c) 1989 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)ttzapple.c 3.4 (Berkeley) %G%";
zz|zapple|unorthodox apple:\
:am:pt:co#80:li#24:le=^H:nd=^F:up=^K:do=^J:\
:ho=^[0:ll=^[1:cm=^]%+ %+ =:ch=^\%+ <:cv=^\%+ >:\
:cl=^[4:ce=^[2:cd=^[3:rp=^]%.%+ @:\
:dc=^[c:DC=^\%+ C:ic=^[i:IC=^\%+ I:\
:al=^[a:AL=^\%+ A:dl=^[d:DL=^\%+ D:\
:sf=^[f:SF=^\%+ F:sr=^[r:SR=^\%+ R:cs=^]%+ %+ ?:
#define esc() pc(ctrl('['))
#define esc1() pc(ctrl('\\'))
#define esc2() pc(ctrl(']'))
extern short gen_frame
[];
if ((tt
.tt_modes
& WWM_REV
) == 0) {
if (tt
.tt_modes
& WWM_REV
) {
if (tt
.tt_nmodes
!= tt
.tt_modes
)
zz_setmodes(tt
.tt_nmodes
);
tt
.tt_col
= 0, tt
.tt_row
++;
if (tt
.tt_nmodes
!= tt
.tt_modes
)
zz_setmodes(tt
.tt_nmodes
);
tt
.tt_col
= 0, tt
.tt_row
++;
if ((x
= col
- tt
.tt_col
) == 0)
if (col
& 7 == 0 && x
> 0 && x
<= 16) {
switch (row
- tt
.tt_row
) {
if (row
== tt
.tt_row
+ 1) {
zz_setscroll(0, NROW
- 1);
tt
.tt_col
= tt
.tt_row
= 0;
} else if (tt
.tt_row
== NROW
- 1)
if (tt
.tt_nmodes
!= tt
.tt_modes
)
zz_setmodes(tt
.tt_nmodes
);
(void) sprintf(buf
, "%02x=", t
);
tt
.tt_col
= 0, tt
.tt_row
++;
if (tt
.tt_nmodes
!= tt
.tt_modes
)
zz_setmodes(tt
.tt_nmodes
);
(void) sprintf(buf
, "%02x>", t
);
tt
.tt_col
= 0, tt
.tt_row
++;
tt
.tt_inschar
= zz_inschar
;
tt
.tt_delchar
= zz_delchar
;
tt
.tt_insline
= zz_insline
;
tt
.tt_delline
= zz_delline
;
tt
.tt_clreol
= zz_clreol
;
tt
.tt_clreos
= zz_clreos
;
tt
.tt_scroll_down
= zz_scroll_down
;
tt
.tt_scroll_up
= zz_scroll_up
;
tt
.tt_setscroll
= zz_setscroll
;
tt
.tt_availmodes
= WWM_REV
;
tt
.tt_setmodes
= zz_setmodes
;
tt
.tt_set_token
= zz_set_token
;
tt
.tt_put_token
= zz_put_token
;
tt
.tt_token_max
= TOKEN_MAX
;
tt
.tt_set_token_cost
= 2;
tt
.tt_put_token_cost
= 1;