X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_getch.c;h=64566ccc762943f87e7257898890a229bf70c346;hp=e66602c28ce1c60fc8df896a626eaa82b65a7c66;hb=e6c7286022d8a7a7ea7f15a6ffa7f9addb00e42d;hpb=b6d7123594f6959ad0a6602b3952d9e6abe261a0 diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index e66602c2..64566ccc 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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,12 +41,20 @@ #include -MODULE_ID("$Id: lib_getch.c,v 1.77 2007/02/25 00:43:54 tom Exp $") +MODULE_ID("$Id: lib_getch.c,v 1.80 2007/09/29 20:39:34 tom Exp $") #include +#if USE_REENTRANT +NCURSES_EXPORT(int) +NCURSES_PUBLIC_VAR(ESCDELAY) (void) +{ + return SP ? SP->_ESCDELAY : 1000; +} +#else NCURSES_EXPORT_VAR(int) ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */ +#endif #ifdef NCURSES_WGETCH_EVENTS #define TWAIT_MASK 7 @@ -104,8 +112,10 @@ fifo_pull(void) h_inc(); #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) + if (USE_TRACEF(TRACE_IEVENT)) { _nc_fifo_dump(); + _nc_unlock_global(tracef); + } #endif return ch; } @@ -200,8 +210,10 @@ fifo_push(EVENTLIST_0th(_nc_eventlist * evl)) t_inc(); TR(TRACE_IEVENT, ("pushed %s at %d", _tracechar(ch), tail)); #ifdef TRACE - if (_nc_tracing & TRACE_IEVENT) + if (USE_TRACEF(TRACE_IEVENT)) { _nc_fifo_dump(); + _nc_unlock_global(tracef); + } #endif return ch; } @@ -383,7 +395,7 @@ _nc_wgetch(WINDOW *win, if (ch == ERR) { #if USE_SIZECHANGE - if (SP->_sig_winch) { + if (_nc_handle_sigwinch(FALSE)) { _nc_update_screensize(); /* resizeterm can push KEY_RESIZE */ if (cooked_key_in_fifo()) {