#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.118 2010/05/15 21:31:12 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.121 2010/12/25 23:24:04 tom Exp $")
#include <fifo_defs.h>
#else
unsigned char c2 = 0;
# if USE_PTHREADS_EINTR
+# if USE_WEAK_SYMBOLS
if ((pthread_self) && (pthread_kill) && (pthread_equal))
+# endif
_nc_globals.read_thread = pthread_self();
# endif
- n = read(sp->_ifd, &c2, 1);
+ n = (int) read(sp->_ifd, &c2, 1);
#if USE_PTHREADS_EINTR
_nc_globals.read_thread = 0;
#endif
NCURSES_EXPORT(int)
_nc_wgetch(WINDOW *win,
- unsigned long *result,
+ int *result,
int use_meta
EVENTLIST_2nd(_nc_eventlist * evl))
{
* cursor to the left.
*/
if (sp->_echo && !(win->_flags & _ISPAD)) {
- chtype backup = (ch == KEY_BACKSPACE) ? '\b' : ch;
+ chtype backup = (chtype) ((ch == KEY_BACKSPACE) ? '\b' : ch);
if (backup < KEY_MIN)
wechochar(win, backup);
}
wgetch_events(WINDOW *win, _nc_eventlist * evl)
{
int code;
- unsigned long value;
+ int value;
T((T_CALLED("wgetch_events(%p,%p)"), win, evl));
code = _nc_wgetch(win,
wgetch(WINDOW *win)
{
int code;
- unsigned long value;
+ int value;
T((T_CALLED("wgetch(%p)"), (void *) win));
code = _nc_wgetch(win,