1994-10-07 09:58:58 +01:00
|
|
|
|
|
|
|
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
|
|
|
|
* details. If they are missing then this copy is in violation of *
|
|
|
|
* the copyright conditions. */
|
|
|
|
|
|
|
|
|
|
|
|
#include "curses.priv.h"
|
1994-12-02 07:40:24 +01:00
|
|
|
#include "terminfo.h"
|
1994-10-07 09:58:58 +01:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/* line graphics */
|
|
|
|
|
|
|
|
|
|
|
|
chtype acs_map[128];
|
|
|
|
|
|
|
|
void init_acs()
|
|
|
|
{
|
|
|
|
|
|
|
|
/*
|
|
|
|
ACS_ULCORNER (acs_map['l'])
|
|
|
|
ACS_LLCORNER (acs_map['m'])
|
|
|
|
ACS_URCORNER (acs_map['k'])
|
|
|
|
ACS_LRCORNER (acs_map['j'])
|
|
|
|
ACS_RTEE (acs_map['u'])
|
|
|
|
ACS_LTEE (acs_map['t'])
|
|
|
|
ACS_BTEE (acs_map['v'])
|
|
|
|
ACS_TTEE (acs_map['w'])
|
|
|
|
ACS_HLINE (acs_map['q'])
|
|
|
|
ACS_VLINE (acs_map['x'])
|
|
|
|
ACS_PLUS (acs_map['n'])
|
|
|
|
ACS_S1 (acs_map['o']) scan line 1
|
|
|
|
ACS_S9 (acs_map['s']) scan line 9
|
1995-05-30 07:51:47 +02:00
|
|
|
ACS_DIAMOND (acs_map['`']) diamond
|
|
|
|
ACS_CKBOARD (acs_map['a']) checker board (stipple)
|
|
|
|
ACS_DEGREE (acs_map['f']) degree symbol
|
1994-10-07 09:58:58 +01:00
|
|
|
ACS_PLMINUS (acs_map['g']) plus/minus
|
|
|
|
ACS_BULLET (acs_map['~']) bullet
|
|
|
|
ACS_LARROW (acs_map[',']) arrow pointing left
|
|
|
|
ACS_RARROW (acs_map['+']) arrow pointing right
|
|
|
|
ACS_DARROW (acs_map['.']) arrow pointing down
|
1995-05-30 07:51:47 +02:00
|
|
|
ACS_UARROW (acs_map['-']) arrow pointing up
|
|
|
|
ACS_BOARD (acs_map['h']) board of squares
|
|
|
|
ACS_LANTERN (acs_map['I']) lantern symbol
|
1994-10-07 09:58:58 +01:00
|
|
|
ACS_BLOCK (acs_map['0']) solid square block
|
|
|
|
*/
|
|
|
|
|
|
|
|
T(("initializing ACS map"));
|
|
|
|
|
1995-05-30 07:51:47 +02:00
|
|
|
acs_map['l'] = acs_map['m'] = acs_map['k'] = acs_map['j'] =
|
1994-10-07 09:58:58 +01:00
|
|
|
acs_map['u'] = acs_map['t'] = acs_map['v'] = acs_map['w'] = (chtype)'+' & A_CHARTEXT;
|
|
|
|
acs_map['q'] = (chtype)'-' & A_CHARTEXT;
|
|
|
|
acs_map['x'] = (chtype)'|' & A_CHARTEXT;
|
|
|
|
acs_map['n'] = (chtype)'+' & A_CHARTEXT;
|
|
|
|
acs_map['o'] = (chtype)'~' & A_CHARTEXT;
|
|
|
|
acs_map['s'] = (chtype)'_' & A_CHARTEXT;
|
|
|
|
acs_map['`'] = (chtype)'+' & A_CHARTEXT;
|
|
|
|
acs_map['a'] = (chtype)':' & A_CHARTEXT;
|
|
|
|
acs_map['f'] = (chtype)'\'' & A_CHARTEXT;
|
|
|
|
acs_map['g'] = (chtype)'#' & A_CHARTEXT;
|
|
|
|
acs_map['~'] = (chtype)'o' & A_CHARTEXT;
|
|
|
|
acs_map[','] = (chtype)'<' & A_CHARTEXT;
|
|
|
|
acs_map['+'] = (chtype)'>' & A_CHARTEXT;
|
|
|
|
acs_map['.'] = (chtype)'v' & A_CHARTEXT;
|
|
|
|
acs_map['-'] = (chtype)'^' & A_CHARTEXT;
|
|
|
|
acs_map['h'] = (chtype)'#' & A_CHARTEXT;
|
|
|
|
acs_map['I'] = (chtype)'#' & A_CHARTEXT;
|
|
|
|
acs_map['0'] = (chtype)'#' & A_CHARTEXT;
|
|
|
|
|
|
|
|
if (ena_acs != NULL)
|
1994-12-02 07:40:24 +01:00
|
|
|
putp(ena_acs);
|
1994-10-07 09:58:58 +01:00
|
|
|
|
|
|
|
if (acs_chars != NULL) {
|
|
|
|
int i = 0;
|
|
|
|
int length = strlen(acs_chars);
|
1995-05-30 07:51:47 +02:00
|
|
|
|
|
|
|
while (i < length)
|
1994-10-07 09:58:58 +01:00
|
|
|
switch (acs_chars[i]) {
|
|
|
|
case 'l':case 'm':case 'k':case 'j':
|
|
|
|
case 'u':case 't':case 'v':case 'w':
|
|
|
|
case 'q':case 'x':case 'n':case 'o':
|
|
|
|
case 's':case '`':case 'a':case 'f':
|
|
|
|
case 'g':case '~':case ',':case '+':
|
|
|
|
case '.':case '-':case 'h':case 'I':
|
1995-05-30 07:51:47 +02:00
|
|
|
case '0':
|
|
|
|
acs_map[(unsigned int)(unsigned char)acs_chars[i]] =
|
1994-10-07 09:58:58 +01:00
|
|
|
(acs_chars[++i] & A_CHARTEXT) | A_ALTCHARSET;
|
|
|
|
default:
|
|
|
|
i++;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#ifdef TRACE
|
|
|
|
else {
|
1994-12-02 07:40:24 +01:00
|
|
|
T(("acsc not defined, using default mapping"));
|
1994-10-07 09:58:58 +01:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|