/* PDCurses */12#include <curspriv.h>34/*man-start**************************************************************56inch7----89### Synopsis1011chtype inch(void);12chtype winch(WINDOW *win);13chtype mvinch(int y, int x);14chtype mvwinch(WINDOW *win, int y, int x);1516int in_wch(cchar_t *wcval);17int win_wch(WINDOW *win, cchar_t *wcval);18int mvin_wch(int y, int x, cchar_t *wcval);19int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval);2021### Description2223The inch() functions retrieve the character and attribute from the24current or specified window position, in the form of a chtype. If a25NULL window is specified, (chtype)ERR is returned.2627The in_wch() functions are the wide-character versions; instead of28returning a chtype, they store a cchar_t at the address specified by29wcval, and return OK or ERR. (No value is stored when ERR is30returned.) Note that in PDCurses, chtype and cchar_t are the same.3132### Portability33X/Open ncurses NetBSD34inch Y Y Y35winch Y Y Y36mvinch Y Y Y37mvwinch Y Y Y38in_wch Y Y Y39win_wch Y Y Y40mvin_wch Y Y Y41mvwin_wch Y Y Y4243**man-end****************************************************************/4445chtype winch(WINDOW *win)46{47PDC_LOG(("winch() - called\n"));4849if (!win)50return (chtype)ERR;5152return win->_y[win->_cury][win->_curx];53}5455chtype inch(void)56{57PDC_LOG(("inch() - called\n"));5859return winch(stdscr);60}6162chtype mvinch(int y, int x)63{64PDC_LOG(("mvinch() - called\n"));6566if (move(y, x) == ERR)67return (chtype)ERR;6869return stdscr->_y[stdscr->_cury][stdscr->_curx];70}7172chtype mvwinch(WINDOW *win, int y, int x)73{74PDC_LOG(("mvwinch() - called\n"));7576if (wmove(win, y, x) == ERR)77return (chtype)ERR;7879return win->_y[win->_cury][win->_curx];80}8182#ifdef PDC_WIDE83int win_wch(WINDOW *win, cchar_t *wcval)84{85PDC_LOG(("win_wch() - called\n"));8687if (!win || !wcval)88return ERR;8990*wcval = win->_y[win->_cury][win->_curx];9192return OK;93}9495int in_wch(cchar_t *wcval)96{97PDC_LOG(("in_wch() - called\n"));9899return win_wch(stdscr, wcval);100}101102int mvin_wch(int y, int x, cchar_t *wcval)103{104PDC_LOG(("mvin_wch() - called\n"));105106if (!wcval || (move(y, x) == ERR))107return ERR;108109*wcval = stdscr->_y[stdscr->_cury][stdscr->_curx];110111return OK;112}113114int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval)115{116PDC_LOG(("mvwin_wch() - called\n"));117118if (!wcval || (wmove(win, y, x) == ERR))119return ERR;120121*wcval = win->_y[win->_cury][win->_curx];122123return OK;124}125#endif126127128