X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_getstr.c;h=8ce18b34f1faef3a0f57458751b1f48f9123c4c5;hp=274e878873715ab4c483255a9a530b1633179cfd;hb=01cec7497c02ab7ca6f0791cc2c7dfbdb2ba9272;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/ncurses/base/lib_getstr.c b/ncurses/base/lib_getstr.c index 274e8788..8ce18b34 100644 --- a/ncurses/base/lib_getstr.c +++ b/ncurses/base/lib_getstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2008 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 * @@ -41,7 +41,7 @@ #include #include -MODULE_ID("$Id: lib_getstr.c,v 1.25 2006/01/12 00:33:52 tom Exp $") +MODULE_ID("$Id: lib_getstr.c,v 1.26 2008/05/31 22:05:15 tom Exp $") /* * This wipes out the last character, no matter whether it was a tab, control @@ -75,6 +75,7 @@ wgetnstr_events(WINDOW *win, int maxlen, EVENTLIST_1st(_nc_eventlist * evl)) { + SCREEN *sp = _nc_screen_of(win); TTY buf; bool oldnl, oldecho, oldraw, oldcbreak; char erasec; @@ -90,10 +91,10 @@ wgetnstr_events(WINDOW *win, _nc_get_tty_mode(&buf); - oldnl = SP->_nl; - oldecho = SP->_echo; - oldraw = SP->_raw; - oldcbreak = SP->_cbreak; + oldnl = sp->_nl; + oldecho = sp->_echo; + oldraw = sp->_raw; + oldcbreak = sp->_cbreak; nl(); noecho(); noraw(); @@ -187,10 +188,10 @@ wgetnstr_events(WINDOW *win, /* Restore with a single I/O call, to fix minor asymmetry between * raw/noraw, etc. */ - SP->_nl = oldnl; - SP->_echo = oldecho; - SP->_raw = oldraw; - SP->_cbreak = oldcbreak; + sp->_nl = oldnl; + sp->_echo = oldecho; + sp->_raw = oldraw; + sp->_cbreak = oldcbreak; _nc_set_tty_mode(&buf);