Xref: utzoo comp.unix.xenix:10365 comp.unix.questions:20295 comp.unix.wizards:20830 Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!snorkelwacker!mit-eddie!bu.edu!dartvax!coat.com From: andyb@coat.com (Andy Behrens) Newsgroups: comp.unix.xenix,comp.unix.questions,comp.unix.wizards Subject: Re: Curses , Graphic Characters Message-ID: <19818@dartvax.Dartmouth.EDU> Date: 1 Mar 90 19:13:36 GMT References: <41104@jplgodo.UUCP> Sender: news@dartvax.Dartmouth.EDU Reply-To: andyb@coat.com Followup-To: comp.unix.xenix Distribution: na Organization: Burlington Coat Factory Warehouse Lines: 121 In article <41104@jplgodo.UUCP> deutsch@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@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@coat.com or: andyb%coat.com@dartmouth.edu or: {uunet,rutgers}!dartvax!coat.com!andyb Burlington Coat, HCI 61 Box 1B, Lebanon, N.H. 03766 (603) 448-5000