X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Fbase%2Flib_getch.c;h=130c502431b3d2d74044f114ff465df2cbbf8df5;hb=44a4147009bf2978d342175fb52b7f0999e11b5f;hp=773ed15763800434decaece70e8414d6bea59049;hpb=41677b308e138027b7e435f741ee7fe5651237b0;p=ncurses.git diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index 773ed157..130c5024 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -42,7 +42,7 @@ #include -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 @@ -265,10 +265,12 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl)) #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 @@ -381,7 +383,7 @@ recur_wgetnstr(WINDOW *win, char *buf) NCURSES_EXPORT(int) _nc_wgetch(WINDOW *win, - unsigned long *result, + int *result, int use_meta EVENTLIST_2nd(_nc_eventlist * evl)) { @@ -579,7 +581,7 @@ _nc_wgetch(WINDOW *win, * 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); } @@ -610,7 +612,7 @@ NCURSES_EXPORT(int) 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, @@ -627,7 +629,7 @@ NCURSES_EXPORT(int) wgetch(WINDOW *win) { int code; - unsigned long value; + int value; T((T_CALLED("wgetch(%p)"), (void *) win)); code = _nc_wgetch(win,