bullet chars in the Rand editor
Johan Wide'n
johanw at ttds.UUCP
Wed Jun 20 15:13:17 AEST 1984
I recently got my hands on version 17 of the rand editor
and discovered that bullet characters were not supported
for terminals defined by termcap. Here is a fix that produces
a hair cross for termcap terminals. This fix also works for e14
and e15.
I have defined a new string in termcap "bu". If this string is
defined it will be used for drawing a bullet, otherwise '#' is
used.
Here are some examples of bullet definitions:
ambassador genie etc. :bu=\177:
vt100 :bu=^Na^O:ti=\E)0\E[?7l:te=\E[?7h:
perkin elmer 1100 :bu=\E\177:
The definition for vt100 is a bit tricky. The initializing sequence "ti"
selects a convenient alternative character set. The bullet string prints
the 'graphic' version of the letter 'a' (which should be a small square).
(The escape sequence \E[?7l is unrelated: it turns of line wrap around,
because our vt100-look alikes can't handle wrap around at high speed).
I have also redefined <CTRL-B> to mean backtab as "-WORD" was
not implemented.
index: e/term/tcap.c, e/term/standard.c
*** ,tcap.c Tue Jun 19 20:56:13 1984
--- tcap.c Tue Jun 19 20:54:48 1984
***************
*** 10,15
#undef UP
#undef HO
char *BC;
char *ND;
char *DO;
--- 10,16 -----
#undef UP
#undef HO
+ char *BU;
char *BC;
char *ND;
char *DO;
***************
*** 31,36
pch(ch) { putchar(ch); }
lt_tcap () { tputs(BC, 1, pch); }
rt_tcap () { tputs(ND, 1, pch); }
dn_tcap () { tputs(DO, 1, pch); }
--- 32,38 -----
pch(ch) { putchar(ch); }
+ bu_tcap () { tputs(BU, 1, pch); }
lt_tcap () { tputs(BC, 1, pch); }
rt_tcap () { tputs(ND, 1, pch); }
dn_tcap () { tputs(DO, 1, pch); }
***************
*** 112,118
/* tt_cwr */ 1,
/* tt_pwr */ 1,
/* tt_axis */ 0,
! /* tt_bullets */ NO,
/* tt_prtok */ YES,
/* tt_width */ 80,
/* tt_height */ 24,
--- 114,120 -----
/* tt_cwr */ 1,
/* tt_pwr */ 1,
/* tt_axis */ 0,
! /* tt_bullets */ YES,
/* tt_prtok */ YES,
/* tt_width */ 80,
/* tt_height */ 24,
***************
*** 142,147
)
return NG;
if ((HO = tgetstr("ho", &cp)) == NULL)
t_tcap.tt_home = punt_tcap;
--- 144,152 -----
)
return NG;
+ BU = tgetstr("bu", &cp);
+ if (BU == NULL)
+ BU = "#";
if ((HO = tgetstr("ho", &cp)) == NULL)
t_tcap.tt_home = punt_tcap;
*** ,standard.c Tue Jun 19 21:52:14 1984
--- standard.c Tue Jun 19 21:54:40 1984
***************
*** 12,18
char lexstd[32] = {
CCCMD , /* <BREAK > */
CCCMD , /* <cntr A> */
! CCLWORD , /* <cntr B> */
CCBACKSPACE , /* <cntr C> */
CCMILINE , /* <cntr D> */
CCMIPAGE , /* <cntr E> */
--- 12,18 -----
char lexstd[32] = {
CCCMD , /* <BREAK > */
CCCMD , /* <cntr A> */
! CCBACKTAB , /* <cntr B> was CCLWORD */
CCBACKSPACE , /* <cntr C> */
CCMILINE , /* <cntr D> */
CCMIPAGE , /* <cntr E> */
***************
*** 101,108
#ifndef UNSCHAR
chr &= 0377;
#endif
! if (chr == ESCCHAR)
! P ('^');
else
P (stdxlate[chr - FIRSTSPCL]);
}
--- 101,108 -----
#ifndef UNSCHAR
chr &= 0377;
#endif
! if (chr == ESCCHAR || chr == BULCHAR)
! bu_tcap();
else
P (stdxlate[chr - FIRSTSPCL]);
}
{philabs,decvax}!mcvax!enea!ttds!johanw Johan Widen
More information about the Comp.sources.unix
mailing list