Thursday, February 07, 2008

Unicode Characters for an Updated Nethack

Terrain

U+2668 HOT SPRINGS
U+2312 ARC looks like a hill
U+2248 ALMOST EQUAL TO rough water

Structures
U+2500 -- U+257F BOX DRAWING drawing walls and buildings
U+2302 HOUSE
U+265C BLACK CHESS ROOK could be a tower
U+271D CROSS or U+2671 EAST SYRIAC CROSS could represent a church or be a cross

Other cool things

U+2680 -- U+2685 DIE FACE roll them dice
U+231A WATCH
U+231B HOURGLASS
U+2744 SNOWFLAKE
U+2614 UMBRELLA WITH RAIN DROPS
U+2615 HOT BEVERAGE
U+263C WHITE SUN WITH RAYS
U+2388 HELM SYMBOL avast ye land lubbers
U+2639 WHITE FROWNING FACE
U+263A WHITE SMILING FACE have a nice day
U+2690 WHITE FLAG
U+2691 BLACK FLAG
U+2692 HAMMER AND PICK
U+2693 ANCHOR harbor (on maps)
U+2694 CROSSED SWORDS battleground (on maps)
U+2695 STAFF OF AESCULAPIUS medicine
U+2696 SCALES jurisprudence
U+2697 ALEMBIC chemistry
U+2698 FLOWER
U+2699 GEAR technology, tools
U+269A STAFF OF HERMES commerce

Friday, January 04, 2008

Cygwin NCurses Quirks

Whilst trying to push GuCu, my Guile/NCurses library, into something more like a first beta, I tried getting it to run on both my boxen: one Slackware, one Windows with Cygwin. It has been a challenge.

First, NCurses 5.6 won't build as a DLL on Cygwin out of the box. The proscriptive first step, upgrading the automake/autoconf toolchain is a no-go, since NCurses uses a private fork of autoconf and neglects automake altogether. I thought for a second to figure it out myself, but, it looked difficult to debug.

So, retreating to the distributed Cygwin/NCurses 5.5, I find that it doesn't have the wide curses functions installed, so I commence the annoying job of separating GuCu into a wide and narrow version, which begins the automake/autoconf difficulty.

Then, I find that, on Cygwin, the wide character C types, wchar_t and wint_t, are not identical, but, actually are 16 bit and 32 bit respectively. I know that the standard says that they can differ, but, I never though someone would actually do that. Some of the NCurses functions are wchar_t and others are wint_t, so I had to go back to my hacked FFI, which treated them as identical.

On top of that, the distributed Ncurses 5.5 has a bug w.r.t to the handling of the acs_map array. (I'd noticed the bug before, when trying to build libRUIN, but, I mistakenly thought that it was RUIN's fault.) The work-around is pretty simple. Just throw this into any file using the ACS_ constants.


#ifdef CYGWIN_CURSES_BUG_FIX
/* work around bug in Cygwin's ancient NCurses */
extern NCURSES_EXPORT_VAR(chtype*) _nc_acs_map(void);
#define acs_map (_nc_acs_map())
#endif


And with that, make check is good to go. Distcheck fails hard, though, because of some mysterious texinfo.tex parsing problem that doesn't occur on GNU/Linux.

And here I thought I was just going to copy it over and "./configure && make".

Sigh.