# endif
#endif
-MODULE_ID("$Id: tinfo_driver.c,v 1.37 2014/04/13 00:17:08 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.39 2014/09/27 21:58:57 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
/* try asking the OS */
{
TERMINAL *termp = (TERMINAL *) TCB;
- if (isatty(termp->Filedes)) {
+ if (NC_ISATTY(termp->Filedes)) {
STRUCT_WINSIZE size;
errno = 0;
* _nc_setupscreen(). Do it now anyway, so we can initialize the
* baudrate.
*/
- if (isatty(trm->Filedes)) {
+ if (NC_ISATTY(trm->Filedes)) {
TCB->drv->td_mode(TCB, TRUE, TRUE);
}
}
return (code);
}
+static int
+drv_cursorSet(TERMINAL_CONTROL_BLOCK * TCB, int vis)
+{
+ SCREEN *sp;
+ int code = ERR;
+
+ AssertTCB();
+ SetSP();
+
+ T((T_CALLED("tinfo:drv_cursorSet(%p,%d)"), (void *) SP_PARM, vis));
+
+ if (SP_PARM != 0 && IsTermInfo(SP_PARM)) {
+ switch (vis) {
+ case 2:
+ code = NCURSES_PUTP2_FLUSH("cursor_visible", cursor_visible);
+ break;
+ case 1:
+ code = NCURSES_PUTP2_FLUSH("cursor_normal", cursor_normal);
+ break;
+ case 0:
+ code = NCURSES_PUTP2_FLUSH("cursor_invisible", cursor_invisible);
+ break;
+ }
+ } else {
+ code = ERR;
+ }
+ returnCode(code);
+}
+
static bool
drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int key)
{
drv_nap, /* nap */
drv_kpad, /* kpad */
drv_keyok, /* kyOk */
- drv_kyExist /* kyExist */
+ drv_kyExist, /* kyExist */
+ drv_cursorSet /* cursorSet */
};