* Copyright (c) 1989 Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Edward Wang at The University of California, Berkeley.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)ttzapple.c 3.11 (Berkeley) %G%";
zz|zapple|perfect apple:\
:am:pt:co#80:li#24:le=^H:nd=^F:up=^K:do=^J:\
:ho=\E0:ll=\E1:cm=\E=%+ %+ :ch=\E<%+ :cv=\E>%+ :\
:cl=\E4:ce=\E2:cd=\E3:rp=\E@%.%+ :\
:dc=\Ec:DC=\EC%+ :ic=\Ei:IC=\EI%+ :\
:al=\Ea:AL=\EA%+ :dl=\Ed:DL=\ED%+ :\
:sf=\Ef:SF=\EF%+ :sr=\Er:SR=\ER%+ :cs=\E?%+ %+ :\
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) {
* Do newline first to match the sequence
* for scroll down and return
/* favor local motion for better compression */
if (row
== tt
.tt_row
+ 1) {
if (row
== tt
.tt_row
- 1) {
zz_setscroll(0, NROW
- 1);
tt
.tt_col
= tt
.tt_row
= 0;
if (tt
.tt_row
== NROW
- 1)
if (tt
.tt_nmodes
!= tt
.tt_modes
)
zz_setmodes(tt
.tt_nmodes
);
(void) sprintf(buf
, "%02x=", t
);
if (tt
.tt_nmodes
!= tt
.tt_modes
)
zz_setmodes(tt
.tt_nmodes
);
(void) sprintf(buf
, "%02x>", t
);
tt
.tt_insspace
= zz_insspace
;
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_padc
= TT_PADC_NONE
;
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;