/****************************************************************************
- * Copyright (c) 2008-2012,2013 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-2013,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
# endif
#endif
-MODULE_ID("$Id: tinfo_driver.c,v 1.29 2013/01/12 22:01:43 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.37 2014/04/13 00:17:08 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
return TINFO_DOUPDATE(TCB->csp);
}
+static const char *
+drv_Name(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ (void) TCB;
+ return "tinfo";
+}
+
static bool
drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
{
TERMINAL *termp;
SCREEN *sp;
+ T((T_CALLED("tinfo::drv_CanHandle(%p)"), TCB));
+
assert(TCB != 0 && tname != 0);
termp = (TERMINAL *) TCB;
sp = TCB->csp;
TCB->magic = TCBMAGIC;
-#if (USE_DATABASE || USE_TERMCAP)
+#if (NCURSES_USE_DATABASE || NCURSES_USE_TERMCAP)
status = _nc_setup_tinfo(tname, &termp->type);
#else
status = TGETENT_NO;
ret_error1(TGETENT_YES, "I can't handle hardcopy terminals.\n", tname);
}
- return result;
+ returnBool(result);
}
static int
if (sp) {
if (sp->_keypad_on)
_nc_keypad(sp, TRUE);
- NC_BUFFERED(sp, TRUE);
}
code = OK;
}
if (sp) {
_nc_keypad(sp, FALSE);
NCURSES_SP_NAME(_nc_flush) (sp);
- NC_BUFFERED(sp, FALSE);
}
code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
}
* baudrate.
*/
if (isatty(trm->Filedes)) {
- TCB->drv->mode(TCB, TRUE, TRUE);
+ TCB->drv->td_mode(TCB, TRUE, TRUE);
}
}
} else
#endif
{
- rc = TCBOf(sp)->drv->twait(TCBOf(sp),
- TWAIT_MASK,
- delay,
- (int *) 0
- EVENTLIST_2nd(evl));
+ rc = TCBOf(sp)->drv->td_twait(TCBOf(sp),
+ TWAIT_MASK,
+ delay,
+ (int *) 0
+ EVENTLIST_2nd(evl));
#if USE_SYSMOUSE
if ((sp->_mouse_type == M_SYSMOUSE)
&& (sp->_sysmouse_head < sp->_sysmouse_tail)
if (sp && sp->_coloron)
attrs |= A_COLOR;
+#if USE_ITALIC
+ if (enter_italics_mode)
+ attrs |= A_ITALIC;
+#endif
+
return (attrs);
}
size_t i;
for (i = 1; i < ACS_LEN; ++i) {
if (real_map[i] == 0) {
- real_map[i] = i;
+ real_map[i] = (chtype) i;
if (real_map != fake_map) {
if (sp != 0)
sp->_screen_acs_map[i] = TRUE;
if (magic_cookie_glitch > 0) { /* tvi, wyse */
- sp->_xmc_triggers = sp->_ok_attributes & (
- A_STANDOUT |
- A_UNDERLINE |
- A_REVERSE |
- A_BLINK |
- A_DIM |
- A_BOLD |
- A_INVIS |
- A_PROTECT
- );
+ sp->_xmc_triggers = sp->_ok_attributes & XMC_CONFLICT;
#if 0
/*
* We "should" treat colors as an attribute. The wyse350 (and its
NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_TINFO_DRIVER = {
TRUE,
+ drv_Name, /* Name */
drv_CanHandle, /* CanHandle */
drv_init, /* init */
drv_release, /* release */