William McBrine
Wed, 04 Jun 2003 05:58:22 -0700
In curses.h, there's a section marked off with #if 0 that provides better definitions for some of the ACS characters. Until now, I'd been uncommenting this manually each time I got a new version, but I hadn't gone to the trouble to devise a proper fix. This is it -- patch attached.
PDC_chadd() only attempts to interpret characters (or rather, chtypes) as control codes if they're in the range 0-31, or 127, and _don't_ have the A_ALTCHARSET attribute. If they do, they're passed straight through. So, the ACS_BOARD and ACS_BLOCK definitions don't actually need any changes; for the rest, all I had to do was add A_ALTCHARSET to the definition, and they'll work regardless of whether raw mode is used. -- William McBrine <[EMAIL PROTECTED]>
*** curses.h.old Wed Nov 27 06:22:46 2002
--- curses.h Tue Jun 3 14:49:07 2003
***************
*** 1148,1178 ****
# define ACS_PLUS (chtype)0xc5 /* SysV */
# define ACS_S1 (chtype)0x2d /* SysV */
# define ACS_S9 (chtype)0x5f /* SysV */
- # define ACS_DIAMOND (chtype)0xc5 /* SysV */
# define ACS_CKBOARD (chtype)0xb2 /* SysV */
# define ACS_DEGREE (chtype)0xf8 /* SysV */
# define ACS_PLMINUS (chtype)0xf1 /* SysV */
# define ACS_BULLET (chtype)0xf9 /* SysV */
- # define ACS_LARROW (chtype)0x3c /* SysV */
- # define ACS_RARROW (chtype)0x3e /* SysV */
- # define ACS_DARROW (chtype)0x76 /* SysV */
- # define ACS_UARROW (chtype)0x5e /* SysV */
- # define ACS_BOARD (chtype)0x23 /* SysV */
- # define ACS_LANTERN (chtype)0x23 /* SysV */
- # define ACS_BLOCK (chtype)0x23 /* SysV */
/* the following definitions can be used if you have set raw_output()
or are using the PDCurses *raw*() functions */
! # if 0
! # define ACS_DIAMOND (chtype)0x04 /* SysV */
! # define ACS_LARROW (chtype)0x1b /* SysV */
! # define ACS_RARROW (chtype)0x1a /* SysV */
! # define ACS_DARROW (chtype)0x19 /* SysV */
! # define ACS_UARROW (chtype)0x18 /* SysV */
! # define ACS_BOARD (chtype)0xb0 /* SysV */
! # define ACS_LANTERN (chtype)0x0f /* SysV */
! # define ACS_BLOCK (chtype)0xdb /* SysV */
! # endif
#endif
/* colour attributes */
--- 1148,1168 ----
# define ACS_PLUS (chtype)0xc5 /* SysV */
# define ACS_S1 (chtype)0x2d /* SysV */
# define ACS_S9 (chtype)0x5f /* SysV */
# define ACS_CKBOARD (chtype)0xb2 /* SysV */
# define ACS_DEGREE (chtype)0xf8 /* SysV */
# define ACS_PLMINUS (chtype)0xf1 /* SysV */
# define ACS_BULLET (chtype)0xf9 /* SysV */
/* the following definitions can be used if you have set raw_output()
or are using the PDCurses *raw*() functions */
! # define ACS_DIAMOND ((chtype)0x04 | A_ALTCHARSET) /* SysV */
! # define ACS_LARROW ((chtype)0x1b | A_ALTCHARSET) /* SysV */
! # define ACS_RARROW ((chtype)0x1a | A_ALTCHARSET) /* SysV */
! # define ACS_DARROW ((chtype)0x19 | A_ALTCHARSET) /* SysV */
! # define ACS_UARROW ((chtype)0x18 | A_ALTCHARSET) /* SysV */
! # define ACS_BOARD (chtype)0xb0 /* SysV */
! # define ACS_LANTERN ((chtype)0x0f | A_ALTCHARSET) /* SysV */
! # define ACS_BLOCK (chtype)0xdb /* SysV */
#endif
/* colour attributes */