a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#ifndef CURSES_H
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define CURSES_H
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#include <stdint.h>
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#include <stdarg.h>
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** @file
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync *
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * MuCurses header file
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync *
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncFILE_LICENCE ( GPL2_OR_LATER );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#undef ERR
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ERR (-1)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#undef FALSE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define FALSE (0)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#undef OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define OK (0)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#undef TRUE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define TRUE (1)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsynctypedef int bool;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsynctypedef uint32_t chtype;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsynctypedef uint32_t attr_t;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Curses SCREEN object */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsynctypedef struct _curses_screen {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Current cursor position */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync unsigned int curs_x, curs_y;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Current attribute */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync attr_t attrs;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync void ( *init ) ( struct _curses_screen *scr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync void ( *exit ) ( struct _curses_screen *scr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /**
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Move cursor to position specified by x,y coords
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync *
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v scr screen on which to operate
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v y Y position
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v x X position
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync void ( * movetoyx ) ( struct _curses_screen *scr,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync unsigned int y, unsigned int x );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /**
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Write character to current cursor position
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync *
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v scr screen on which to operate
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v c character to be written
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync void ( * putc ) ( struct _curses_screen *scr, chtype c );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /**
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Pop a character from the keyboard input stream
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync *
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v scr screen on which to operate
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @ret c popped character
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync int ( * getc ) ( struct _curses_screen *scr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /**
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Checks to see whether a character is waiting in the input stream
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync *
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v scr screen on which to operate
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @ret TRUE character waiting in stream
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @ret FALSE no character waiting in stream
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync bool ( *peek ) ( struct _curses_screen *scr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync} SCREEN;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Curses Window struct */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsynctypedef struct _curses_window {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** screen with which window associates */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync SCREEN *scr;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** window attributes */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync attr_t attrs;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** window origin coordinates */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync unsigned int ori_x, ori_y;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** window cursor position */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync unsigned int curs_x, curs_y;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** window dimensions */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync unsigned int width, height;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** parent window */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync struct _curses_window *parent;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** windows that share the same parent as this one */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync //struct list_head siblings;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** windows der'd or sub'd from this one */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync //struct list_head children;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync} WINDOW;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern WINDOW _stdscr;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern unsigned short _COLS;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern unsigned short _LINES;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define stdscr ( &_stdscr )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLS _COLS
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define LINES _LINES
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define MUCURSES_BITS( mask, shift ) (( mask ) << (shift))
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define CPAIR_SHIFT 8
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ATTRS_SHIFT 16
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_DEFAULT ( 0x0000 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_ALTCHARSET ( 0x0001 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_BLINK ( 0x0002 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_BOLD ( 0x0004 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_DIM ( 0x0008 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_INVIS ( 0x0010 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_PROTECT ( 0x0020 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_REVERSE ( 0x0040 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_STANDOUT ( 0x0080 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_UNDERLINE ( 0x0100 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_HORIZONTAL ( 0x0200 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_VERTICAL ( 0x0400 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_LEFT ( 0x0800 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_RIGHT ( 0x1000 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_LOW ( 0x2000 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define WA_TOP ( 0x4000 << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_DEFAULT WA_DEFAULT
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_ALTCHARSET WA_ALTCHARSET
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_BLINK WA_BLINK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_BOLD WA_BOLD
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_DIM WA_DIM
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_INVIS WA_INVIS
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_PROTECT WA_PROTECT
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_REVERSE WA_REVERSE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_STANDOUT WA_STANDOUT
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_UNDERLINE WA_UNDERLINE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_ATTRIBUTES ( 0xffff << ATTRS_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_CHARTEXT ( 0xff )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_COLOUR ( 0xff << CPAIR_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define A_COLOR A_COLOUR
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_PAIR(n) ( (n) << CPAIR_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_PAIR(n) COLOUR_PAIR(n)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define PAIR_NUMBER(attrs) ( ( (attrs) & A_COLOUR ) >> CPAIR_SHIFT )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_PAIRS 8 /* Arbitrary limit */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_PAIRS COLOUR_PAIRS
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_ULCORNER '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_LLCORNER '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_URCORNER '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_LRCORNER '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_RTEE '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_LTEE '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_BTEE '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_TTEE '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_HLINE '-'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_VLINE '|'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_PLUS '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_S1 '-'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_S9 '_'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_DIAMOND '+'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_CKBOARD ':'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_DEGREE '\''
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_PLMINUS '#'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_BULLET 'o'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_LARROW '<'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_RARROW '>'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_DARROW 'v'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_UARROW '^'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_BOARD '#'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_LANTERN '#'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define ACS_BLOCK '#'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_BLACK 0
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_RED 1
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_GREEN 2
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_YELLOW 3
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_BLUE 4
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_MAGENTA 5
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_CYAN 6
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_WHITE 7
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOURS 7
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_FG 30
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOUR_BG 40
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_FG COLOUR_FG
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_BG COLOUR_BG
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_BLACK COLOUR_BLACK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_BLUE COLOUR_BLUE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_GREEN COLOUR_GREEN
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_CYAN COLOUR_CYAN
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_RED COLOUR_RED
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_MAGENTA COLOUR_MAGENTA
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_YELLOW COLOUR_YELLOW
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLOR_WHITE COLOUR_WHITE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define COLORS COLOURS
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/*
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * KEY code constants are define in ipxe/keys.h
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#include <ipxe/keys.h>
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int addch ( const chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int addchnstr ( const chtype *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int addchstr ( const chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int addnstr ( const char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int addstr ( const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int attroff ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int attron ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int attrset ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int attr_get ( attr_t *, short *, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int attr_off ( attr_t, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int attr_on ( attr_t, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int attr_set ( attr_t, short, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int baudrate ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int beep ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern void bkgdset ( chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/*extern int border ( chtype, chtype, chtype, chtype, chtype, chtype, chtype,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync chtype );*/
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int box ( WINDOW *, chtype, chtype ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern bool can_change_colour ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define can_change_color() can_change_colour()
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int cbreak ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int clrtobot ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int clrtoeol ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int colour_content ( short, short *, short *, short * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define color_content( c, r, g, b ) colour_content( (c), (r), (g), (b) )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int colour_set ( short, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define color_set( cpno, opts ) colour_set( (cpno), (opts) )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int copywin ( const WINDOW *, WINDOW *, int, int, int,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync int, int, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int curs_set ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int def_prog_mode ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int def_shell_mode ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int delay_output ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int delch ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int deleteln ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void delscreen ( SCREEN * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int delwin ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern WINDOW *derwin ( WINDOW *, int, int, int, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int doupdate ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern WINDOW *dupwin ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int echo ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int echochar ( const chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int endwin ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char erasechar ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int erase ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void filter ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int flash ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int flushinp ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern __pure chtype getbkgd ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int getch ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int getnstr ( char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int getstr ( char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int halfdelay ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern bool has_colors ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern bool has_ic ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern bool has_il ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int hline ( chtype, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void idcok ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int idlok ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern void immedok ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern chtype inch ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int inchnstr ( chtype *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int inchstr ( chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern WINDOW *initscr ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int init_colour ( short, short, short, short );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define init_color ( c, r, g, b ) init_colour ( (c), (r), (g), (b) )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int init_pair ( short, short, short );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int innstr ( char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int insch ( chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int insnstr ( const char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int insstr ( const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int instr ( char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int intrflush ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern bool isendwin ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern bool is_linetouched ( WINDOW *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern bool is_wintouched ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char *keyname ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int keypad ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char killchar ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int leaveok ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char *longname ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int meta ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int move ( int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvaddch ( int, int, const chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvaddchnstr ( int, int, const chtype *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvaddchstr ( int, int, const chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvaddnstr ( int, int, const char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvaddstr ( int, int, const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int mvcur ( int, int, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvdelch ( int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int mvderwin ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvgetch ( int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvgetnstr ( int, int, char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvgetstr ( int, int, char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvhline ( int, int, chtype, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern chtype mvinch ( int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvinchnstr ( int, int, chtype *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvinchstr ( int, int, chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvinnstr ( int, int, char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvinsch ( int, int, chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvinsnstr ( int, int, const char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvinsstr ( int, int, const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvinstr ( int, int, char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvprintw ( int, int, char *, ... );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvscanw ( int, int, char *, ... );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvvline ( int, int, chtype, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwaddch ( WINDOW *, int, int, const chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwaddchnstr ( WINDOW *, int, int, const chtype *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwaddchstr ( WINDOW *, int, int, const chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwaddnstr ( WINDOW *, int, int, const char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwaddstr ( WINDOW *, int, int, const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwdelch ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwgetch ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwgetnstr ( WINDOW *, int, int, char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwgetstr ( WINDOW *, int, int, char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwhline ( WINDOW *, int, int, chtype, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int mvwin ( WINDOW *, int, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern chtype mvwinch ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwinchnstr ( WINDOW *, int, int, chtype *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwinchstr ( WINDOW *, int, int, chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwinnstr ( WINDOW *, int, int, char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwinsch ( WINDOW *, int, int, chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwinsnstr ( WINDOW *, int, int, const char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwinsstr ( WINDOW *, int, int, const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwinstr ( WINDOW *, int, int, char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwprintw ( WINDOW *, int, int, char *, ... );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwscanw ( WINDOW *, int, int, char *, ... );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int mvwvline ( WINDOW *, int, int, chtype, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int napms ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern WINDOW *newpad ( int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern WINDOW *newwin ( int, int, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int nl ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int nocbreak ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int nodelay ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int noecho ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int nonl ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void noqiflush ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int noraw ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int notimeout ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int overlay ( const WINDOW *, WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int overwrite ( const WINDOW *, WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int pair_content ( short, short *, short * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int pechochar ( WINDOW *, chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int pnoutrefresh ( WINDOW *, int, int, int, int, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int prefresh ( WINDOW *, int, int, int, int, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int printw ( char *, ... );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int putp ( const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void qiflush ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int raw ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int redrawwin ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int refresh ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int reset_prog_mode ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int reset_shell_mode ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int resetty ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int ripoffline ( int, int (*) ( WINDOW *, int) );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int savetty ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int scanw ( char *, ... );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int scrl ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int scroll ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int scrollok ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int setscrreg ( int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern SCREEN *set_term ( SCREEN * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int setupterm ( char *, int, int * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_attr_off ( const attr_t, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_attroff ( const chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_attr_on ( const attr_t, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_attron ( const chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_attr_set ( const attr_t, short, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_attrset ( const chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_clear ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_colour ( short );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define slk_color( c ) slk_colour( (c) )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_init ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char *slk_label ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_noutrefresh ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int slk_refresh ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_restore ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_set ( int, const char *, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int slk_touch ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int standend ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int standout ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int start_colour ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define start_color() start_colour()
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern WINDOW *subpad ( WINDOW *, int, int, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern WINDOW *subwin ( WINDOW *, int, int, int, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int syncok ( WINDOW *, bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern chtype termattrs ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern attr_t term_attrs ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char *termname ( void );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int tigetflag ( char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int tigetnum ( char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char *tigetstr ( char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void timeout ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int touchline ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int touchwin ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern char *tparm ( char *, long, long, long, long, long, long, long, long,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync long );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int typeahead ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int ungetch ( int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int untouchwin ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void use_env ( bool );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int vid_attr ( attr_t, short, void * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int vidattr ( chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int vid_puts ( attr_t, short, void *, int ( *) ( int) );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int vidputs ( chtype, int ( *) ( int) );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int vline ( chtype, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int vwprintw ( WINDOW *, const char *, va_list );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int vw_printw ( WINDOW *, const char *, va_list ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int vwscanw ( WINDOW *, char *, va_list );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int vw_scanw ( WINDOW *, char *, va_list );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int waddch ( WINDOW *, const chtype ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int waddchnstr ( WINDOW *, const chtype *, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int waddchstr ( WINDOW *, const chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int waddnstr ( WINDOW *, const char *, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int waddstr ( WINDOW *, const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wattroff ( WINDOW *, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wattron ( WINDOW *, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wattrset ( WINDOW *, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wattr_get ( WINDOW *, attr_t *, short *, void * )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync __attribute__ (( nonnull (1, 2, 3)));
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wattr_off ( WINDOW *, attr_t, void * )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync __attribute__ (( nonnull (1)));
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wattr_on ( WINDOW *, attr_t, void * )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync __attribute__ (( nonnull (1)));
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wattr_set ( WINDOW *, attr_t, short, void * )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync __attribute__ (( nonnull (1)));
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern void wbkgdset ( WINDOW *, chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wborder ( WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync chtype, chtype ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wclrtobot ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wclrtoeol ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void wcursyncup ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wcolour_set ( WINDOW *, short, void * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define wcolor_set(w,s,v) wcolour_set((w),(s),(v))
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wdelch ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wdeleteln ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wechochar ( WINDOW *, const chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int werase ( WINDOW * ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wgetch ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wgetnstr ( WINDOW *, char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wgetstr ( WINDOW *, char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int whline ( WINDOW *, chtype, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern chtype winch ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int winchnstr ( WINDOW *, chtype *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int winchstr ( WINDOW *, chtype * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int winnstr ( WINDOW *, char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int winsch ( WINDOW *, chtype );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int winsnstr ( WINDOW *, const char *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int winsstr ( WINDOW *, const char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int winstr ( WINDOW *, char * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wmove ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wnoutrefresh ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wprintw ( WINDOW *, const char *, ... ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wredrawln ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wrefresh ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wscanw ( WINDOW *, char *, ... );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wscrl ( WINDOW *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wsetscrreg ( WINDOW *, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wstandend ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wstandout ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void wsyncup ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void wsyncdown ( WINDOW * );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern void wtimeout ( WINDOW *, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync//extern int wtouchln ( WINDOW *, int, int, int );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncextern int wvline ( WINDOW *, chtype, int ) __nonnull;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/*
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * There is frankly a ridiculous amount of redundancy within the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * curses API - ncurses decided to get around this by using #define
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * macros, but I've decided to be type-safe and implement them all as
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * static inlines instead...
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int addch ( const chtype ch ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return waddch( stdscr, ch );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int addchnstr ( const chtype *chstr, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return waddchnstr ( stdscr, chstr, n );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int addchstr ( const chtype *chstr ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return waddchnstr ( stdscr, chstr, -1 );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int addnstr ( const char *str, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return waddnstr ( stdscr, str, n );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int addstr ( const char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return waddnstr ( stdscr, str, -1 );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int attroff ( int attrs ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattroff ( stdscr, attrs );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int attron ( int attrs ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattron ( stdscr, attrs );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int attrset ( int attrs ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattrset ( stdscr, attrs );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int attr_get ( attr_t *attrs, short *pair, void *opts ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattr_get ( stdscr, attrs, pair, opts );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int attr_off ( attr_t attrs, void *opts ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattr_off ( stdscr, attrs, opts );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int attr_on ( attr_t attrs, void *opts ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattr_on ( stdscr, attrs, opts );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int attr_set ( attr_t attrs, short cpair, void *opts ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattr_set ( stdscr, attrs, cpair, opts );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline void bkgdset ( chtype ch ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync wattrset ( stdscr, ch );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int border ( chtype ls, chtype rs, chtype ts, chtype bs,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync chtype tl, chtype tr, chtype bl, chtype br ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wborder ( stdscr, ls, rs, ts, bs, tl, tr, bl, br );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline bool can_change_colour ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return FALSE;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int clrtobot ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wclrtobot( stdscr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int clrtoeol ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wclrtoeol( stdscr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int colour_set ( short colour_pair_number, void *opts ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wcolour_set ( stdscr, colour_pair_number, opts );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int delch ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wdelch ( stdscr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int deleteln ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wdeleteln( stdscr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int erase ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return werase ( stdscr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int getch ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wgetch ( stdscr );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int getnstr ( char *str, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wgetnstr ( stdscr, str, n );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int getstr ( char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wgetnstr ( stdscr, str, -1 );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline bool has_colors ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return TRUE;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int has_key ( int kc __unused ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return TRUE;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int hline ( chtype ch, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return whline ( stdscr, ch, n );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int move ( int y, int x ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wmove ( stdscr, y, x );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvaddch ( int y, int x, const chtype ch ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddch( stdscr, ch ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvaddchnstr ( int y, int x, const chtype *chstr, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddchnstr ( stdscr, chstr, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvaddchstr ( int y, int x, const chtype *chstr ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddchnstr ( stdscr, chstr, -1 ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvaddnstr ( int y, int x, const char *str, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddnstr ( stdscr, str, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvaddstr ( int y, int x, const char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddnstr ( stdscr, str, -1 ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvdelch ( int y, int x ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wdelch ( stdscr ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvgetch ( int y, int x ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wgetch ( stdscr ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvgetnstr ( int y, int x, char *str, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wgetnstr ( stdscr, str, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvgetstr ( int y, int x, char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wgetnstr ( stdscr, str, -1 ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvhline ( int y, int x, chtype ch, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? whline ( stdscr, ch, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync// OK, so maybe a few I did with macros...
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define mvprintw( y, x, fmt, ... ) \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ( wmove(stdscr,(y),(x)) == OK \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wprintw( stdscr,(fmt), ## __VA_ARGS__ ) : ERR )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvvline ( int y, int x, chtype ch, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( stdscr, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wvline ( stdscr, ch, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwaddch ( WINDOW *win, int y, int x, const chtype ch ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddch ( win, ch ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwaddchnstr ( WINDOW *win, int y, int x, const chtype *chstr, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddchnstr ( win, chstr, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwaddchstr ( WINDOW *win, int y, int x, const chtype *chstr ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddchnstr ( win, chstr, -1 ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwaddnstr ( WINDOW *win, int y, int x, const char *str, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddnstr ( win, str, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwaddstr ( WINDOW *win, int y, int x, const char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? waddnstr ( win, str, -1 ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwdelch ( WINDOW *win, int y, int x ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wdelch ( win ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwgetch ( WINDOW *win, int y, int x ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wgetch ( win ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwgetnstr ( WINDOW *win, int y, int x, char *str, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wgetnstr ( win, str, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwgetstr ( WINDOW *win, int y, int x, char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wgetnstr ( win, str, -1 ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwhline ( WINDOW *win, int y, int x, chtype ch, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? whline ( win, ch, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define mvwprintw( win, y, x, fmt, ... ) \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ( wmove((win),(y),(x)) == OK \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wprintw((win),(fmt), ## __VA_ARGS__) : ERR )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int mvwvline ( WINDOW *win, int y, int x, chtype ch, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ( wmove ( win, y, x ) == OK
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync ? wvline ( win, ch, n ) : ERR );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define printw( fmt, ... ) wprintw(stdscr,(fmt), ## __VA_ARGS__ )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int slk_refresh ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync if ( slk_clear() == OK )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return slk_restore();
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync else
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return ERR;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define standend() wstandend( stdscr )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define standout() wstandout( stdscr )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int start_colour ( void ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return OK;
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int vline ( chtype ch, int n ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wvline ( stdscr, ch, n );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync// marked for removal
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int vwprintw ( WINDOW *win, const char *fmt, va_list varglist ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return vw_printw ( win, fmt, varglist );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int waddchstr ( WINDOW *win, const chtype *chstr ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return waddchnstr ( win, chstr, -1 );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int waddstr ( WINDOW *win, const char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return waddnstr ( win, str, -1 );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int wbkgdset ( WINDOW *win, chtype ch ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattrset( win, ch );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int wgetstr ( WINDOW *win, char *str ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wgetnstr ( win, str, -1 );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int wstandend ( WINDOW *win ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattrset ( win, A_DEFAULT );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline int wstandout ( WINDOW *win ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync return wattrset ( win, A_STANDOUT );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync}
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#endif /* CURSES_H */