Curses , Graphic Characters
Andy Behrens
andyb at coat.com
Fri Mar 2 06:13:36 AEST 1990
In article <41104 at jplgodo.UUCP> deutsch at jplgodo.UUCP (Michael Deutsch) writes:
>
> I am trying to use standard graphic characters available
> on many terminals including WYSE 50, 60, etc.
>
> These characters on a typical UNIX System V, Rel 3.2 are
> located in /usr/include/curses.h and are referred by names of:
>
> ACS_VLINE - Vertical (border) graphic character
> ACS_HLINE - Horizontal (border) graphic character
>
> These are not available, as far as I can tell, in XENIX include
> files.
Neither of the two methods that you listed for describing graphics
(line-drawing) characters is standard. The GXXX labels would be a
reasonable way of doing it, but standard termcap entries have two-
character labels.
The solution I'd suggest is to use the acsc (:ac) attribute. This is
defined in terminfo on Sun's machines, and I believe I've seen it on
some SysV machines also. Sun mentions it in their termcap(5) man page,
even though they haven't put any :ac entries in /etc/termcap.
Here's an edited description from Sun's terminfo(5) man page.
+---
| Attribute name Terminfo Termcap
| --------------------------------------------------------------------
| enter_alt_charset_mode smacs as Start alternate character set
| exit_alt_charset_mode rmacs ae End alternate character set
| acs_chars acsc ac Graphic charset pairs aAbBcC
|
| If the terminal has a line drawing alternate character set,
| the mapping of glyph to character would be given in acsc.
| The definition of this string is based on the alternate
| character set used in the DEC VT100 terminal, extended
| slightly with some characters from the AT&T 4410v1 terminal.
|
| glyph name VT100+
| character
|
| arrow pointing right +
| arrow pointing left ,
| arrow pointing down .
| solid square block 0
| lantern symbol I
| arrow pointing up -
| diamond `
| checker board (stipple) a
| degree symbol f
| plus/minus g
| board of squares h
| lower right corner j
| upper right corner k
| upper left corner l
| lower left corner m
| plus n
| scan line 1 o
| horizontal line q
| scan line 9 s
| left tee t
| right tee u
| bottom tee v
| top tee w
| vertical line x
| bullet ~
|
| The best way to describe a new terminal's line graphics set
| is to add a third column to the above table with the charac-
| ters for the new terminal that produce the appropriate glyph
| when the terminal is in the alternate character set mode.
| For example,
|
| glyph name VT100+ new tty
| char char
|
| upper left corner l R
| lower left corner m F
| upper right corner k T
| lower right corner j G
| horizontal line q ,
| vertical line x .
|
| Now write down the characters left to right, as in
|
| acsc=lRmFkTjGq\,x.
|
| [This would be :ac=lRmFkTjGq\,x.: in a termcap entry].
+---
Here are some sample entries to get you started. Attributes "as" and
"ae" are used to shift into and out of graphics mode. The "other"
entry is for a terminal without line-drawing characters. It uses -, |,
and + instead.
vt100|vt320
:as=\E(0:ae=\E(B:ac=jjkkllmmnnqqttuuvvwwxx:
altos2|Altos II
:as=\E(0:ae=\E(B:ac=jYk?lZm at nEqDtCu4vAwBx3:
altos3|Altos III
:as=\E(0:ae=\E(B:ac=jKkLlMmNnOqJtUuVvWwXxY:
wyse925|Wyse-50 emulating tvi925
:as=\EH^B:ae=\EH^C:ac=j5k3l2m1n8q\072t4u9v=w0x6:
esprit925|Esprit-6310 emulating tvi925
:as=\E$:ae=\E%:ac=jHkGlFmEnIqKtMuLvOwNxJ:
other
:as=:ae=:ac=j+k+l+m+n+q-t+u+v+w+x|:
--
"Live justly, love gently, walk humbly." Andy Behrens
andyb at coat.com
or: andyb%coat.com at dartmouth.edu
or: {uunet,rutgers}!dartvax!coat.com!andyb
Burlington Coat, HCI 61 Box 1B, Lebanon, N.H. 03766 (603) 448-5000
More information about the Comp.unix.wizards
mailing list