X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_options.c;h=b736d5fcab40c065840705d1705bec03863e9da3;hp=e1cda4ebb61a10f28cc9fc3ed27a6c271eb2c5a8;hb=5eb177874dea59107a1a2ea44f5d8f5bb99550b2;hpb=cc387b11f421650091d84640e05825ea5161ac66;ds=sidebyside diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index e1cda4eb..b736d5fc 100644 --- a/ncurses/tinfo/lib_options.c +++ b/ncurses/tinfo/lib_options.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. * + * Copyright (c) 1998-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 * @@ -46,7 +46,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_options.c,v 1.76 2013/12/14 22:23:58 tom Exp $") +MODULE_ID("$Id: lib_options.c,v 1.78 2014/09/27 21:55:24 tom Exp $") NCURSES_EXPORT(int) idlok(WINDOW *win, bool flag) @@ -196,11 +196,13 @@ NCURSES_SP_NAME(curs_set) (NCURSES_SP_DCLx int vis) if (SP_PARM != 0 && vis >= 0 && vis <= 2) { int cursor = SP_PARM->_cursor; - bool bBuiltIn = !IsTermInfo(SP_PARM); if (vis == cursor) { code = cursor; } else { - if (!bBuiltIn) { +#ifdef USE_TERM_DRIVER + code = CallDriver_1(SP_PARM, td_cursorSet, vis); +#else + if (IsTermInfo(SP_PARM)) { switch (vis) { case 2: code = NCURSES_PUTP2_FLUSH("cursor_visible", @@ -215,8 +217,10 @@ NCURSES_SP_NAME(curs_set) (NCURSES_SP_DCLx int vis) cursor_invisible); break; } - } else + } else { code = ERR; + } +#endif if (code != ERR) code = (cursor == -1 ? 1 : cursor); SP_PARM->_cursor = vis; @@ -350,7 +354,7 @@ _nc_keypad(SCREEN *sp, int flag) #endif { #ifdef USE_TERM_DRIVER - rc = CallDriver_1(sp, kpad, flag); + rc = CallDriver_1(sp, td_kpad, flag); if (rc == OK) sp->_keypad_on = flag; #else