Porting code with System V Release 4 Curses to AIX Curses
I am porting an application from System V Release 4 that contains
calls to the System V Release 4 curses. I have been unable to find
many of these routines in AIX. The routines I need are:
slk routines (slklabel, slkrefresh, slkclear, ...)
I cannot find these in /usr/include/term.h, /usr/include/cur.h,
/usr/include/curses.h, or /usr/include/cur\#\#.h (where \#\# is
00 - 05).
The Curses package in AIX is SVID Issue 2 compliant and does
not contain many of the routines and functions that are present
in the System 5 Release 4 Curses package. This includes the
Extended Terminal Interface (ETI) package.
The slk routines, which are part of the ETI, are not included
in AIX. Also missing are the curs_color routines, as well as
the curs_set routine and the other routines that you mentioned.
It is possible to provide workarounds or replacements for some
of the missing routines.
For getmaxxy, use the following macro:
\#define getmaxxy (win, y, x) y=(win)->_maxy, x=(win)->_maxx
For getbegxy, use:
\#define getbegxy (win, y, x) y=(win)->_begy, x=(win)->_begx
The only print functions provided with Curses under AIX are:
printw, wprintw, mvprintw, and mvwprintw. AIX does not include
vwprintw which is like wprintw, but accepts a variable argument
list to printf (like vprintf). You would have to code your own
workaround for vwprintw or change the calls to vwprintw to be
wprintw calls (if possible).
To change cursor shape, like is done with the curs_set routine,
you can send the appropriate escape sequence to the terminal.
These are defined in Curses to be VS (bold), VE (normal), and
VI (invisible). You can use puts() to put these escape sequences
to the screen. VS corresponds to the vs terminfo capability; VE
corresponds to ve; and VI corresponds to vi.
Colors are set in AIX Curses by using the wcolorout routine. See
InfoExplorer or the cur01.h file for a list of the display
The line drawing characters that are present in System 5 Release 4
Curses are not defined in AIX Curses. This includes all of the
ACS_ characters. The line drawing characters for AIX Curses are
defined in cur01.h as BX and BY. BX corresponds to the box1
capability in terminfo; BY corresponds to box2. Please note that
BX and BY are not documented and could change in future releases.
Support Line: Porting code with System V Release 4 Curses to AIX Curses ITEM: D8741L
Dated: September 1993 Category: N/A
This HTML file was generated 99/06/24~13:30:55
Comments or suggestions?