[ooc-compiler] Interface of NCURSES_ACS?
Brought to you by:
mva
|
From: Frank H. <hr...@te...> - 2009-10-19 01:12:09
|
I am struggling against C header files again. Now it is ncurses.h which
exceeds my C preprocessor knowledge. I deduced ('guessed' would be
closer to reality) that
-----------------------------------------------------
CONST
ACS_ULCORNER* = LONG(ORD("l"));
TYPE
chtype* = LONGINT;
PROCEDURE mvaddch* (y,x:C.int; ch:chtype): C.int;
-----------------------------------------------------
should be the correspondence of
-----------------------------------------------------
#if 0 && defined(_LP64)
typedef unsigned chtype;
typedef unsigned mmask_t;
#else
typedef unsigned long chtype;
typedef unsigned long mmask_t;
#endif
#ifdef __cplusplus
extern "C" {
#define NCURSES_CAST(type,value) static_cast<type>(value)
#else
#define NCURSES_CAST(type,value) (type)(value)
#endif
#if 0 || 0
NCURSES_WRAPPED_VAR(chtype*, acs_map);
#define acs_map (_nc_acs_map())
#else
extern NCURSES_EXPORT_VAR(chtype) acs_map[];
#endif
#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,c)])
#define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */
extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype);
---------------------------------------------------------------
This is from /usr/include/ncurses.h on Ubuntu 8.04 running on a 32 bit
processor (AMD Athlon), but I think the corresponding Oberon
implementation should be the same for each Ubuntu or Debian version.
What I know for shure is that my attempt is wrong, because
res:= nc.mvaddch (y, x, nc.ACS_ULCORNER);
prints out an 'l' instead of an upper left corner.
Can anybody please give me a hint?
--
Frank Hrebabetzky +55 / 48 / 3235 1106
Florianopolis, Brazil
|