diff --git a/curses.h b/curses.h index 76de3787..e3c6de38 100644 --- a/curses.h +++ b/curses.h @@ -18,7 +18,7 @@ *************************************************************************** */ /* -$Id: curses.h,v 1.105 2006/01/28 01:23:36 wmcbrine Exp $ +$Id: curses.h,v 1.106 2006/01/28 12:52:36 wmcbrine Exp $ */ /* *---------------------------------------------------------------------- @@ -313,7 +313,7 @@ PDCurses portable platform definitions list: */ #ifdef __CYGWIN32__ /* You may have to define in makefile */ # ifndef HAVE_PROTO -# define HAVE_PROTO 1 /* Cygnuc GCC supports ANSI C prototypes*/ +# define HAVE_PROTO 1 /* Cygnus GCC supports ANSI C prototypes*/ # endif # if !defined(WIN32) && !defined(XCURSES) # define WIN32 diff --git a/dos/pdcclip.c b/dos/pdcclip.c index 04d57ced..c0027ee4 100644 --- a/dos/pdcclip.c +++ b/dos/pdcclip.c @@ -18,7 +18,7 @@ *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -27,7 +27,7 @@ #include #ifdef PDCDEBUG -char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.9 2006/01/12 06:45:43 wmcbrine Exp $"; +char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.10 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /* global clipboard contents, should be NULL if none set */ @@ -59,6 +59,7 @@ static char *pdc_DOS_clipboard = NULL; PDCurses int PDC_getclipboard(char **contents, long *length); **man-end**********************************************************************/ + int PDC_CDECL PDC_getclipboard(char **contents, long *length) { int len; diff --git a/dos/pdcdisp.c b/dos/pdcdisp.c index d572420c..4265accc 100644 --- a/dos/pdcdisp.c +++ b/dos/pdcdisp.c @@ -30,7 +30,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.12 2006/01/22 19:57:10 wmcbrine Exp $"; +char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.13 2006/01/28 12:52:36 wmcbrine Exp $"; #endif extern unsigned char atrtab[MAX_ATRTAB]; @@ -604,10 +604,10 @@ int lineno; ch = temp_line; -/* replace the attribute part of the chtype with the actual colour value */ -/* replacing the number that points to the actual colour value. */ + /* replace the attribute part of the chtype with the actual + colour value for each chtype in the line */ - for (j = 0; j < len; j++) /* for each chtype in the line */ + for (j = 0; j < len; j++) { chr = srcp[j] & A_CHARTEXT; temp_line[j] = chtype_attr(srcp[j]) | chr; diff --git a/dos/pdcgetsc.c b/dos/pdcgetsc.c index 661594c8..e6ff23e1 100644 --- a/dos/pdcgetsc.c +++ b/dos/pdcgetsc.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -25,7 +25,7 @@ #include #ifdef PDCDEBUG -char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.9 2006/01/15 18:36:58 wmcbrine Exp $"; +char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.10 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* @@ -112,7 +112,7 @@ int PDC_get_cur_col() regs.h.bh = SP->video_page; int86(0x10, ®s, ®s); - return (int) regs.h.dl; + return (int)regs.h.dl; } /*man-start********************************************************************* @@ -155,7 +155,7 @@ int PDC_get_cur_row() regs.h.bh = SP->video_page; int86(0x10, ®s, ®s); - return (int) regs.h.dh; + return (int)regs.h.dh; } /*man-start********************************************************************* @@ -553,12 +553,10 @@ int PDC_query_adapter_type() } else { - /* - * No VGA BIOS, check for an EGA BIOS by selecting an - * Alternate Function Service... - * - * bx == 0x0010 --> return EGA information - */ + /* No VGA BIOS, check for an EGA BIOS by selecting an + Alternate Function Service... + + bx == 0x0010 --> return EGA information */ regs.h.ah = 0x12; # ifdef WATCOMC @@ -641,8 +639,8 @@ int PDC_query_adapter_type() else SP->mono = FALSE; - /* Check for DESQview shadow buffer */ - /* thanks to paganini@ax.apc.org for the GO32 fix */ + /* Check for DESQview shadow buffer + thanks to paganini@ax.apc.org for the GO32 fix */ #if defined(__DJGPP__) && defined(NOW_WORKS) dpmi_regs.h.ah = 0xfe; diff --git a/dos/pdcgo32.c b/dos/pdcgo32.c index 4089c5df..28ffcf14 100644 --- a/dos/pdcgo32.c +++ b/dos/pdcgo32.c @@ -17,14 +17,14 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCgo32 = "$Id: pdcgo32.c,v 1.3 2006/01/07 02:53:25 wmcbrine Exp $"; +char *rcsid_PDCgo32 = "$Id: pdcgo32.c,v 1.4 2006/01/28 12:52:36 wmcbrine Exp $"; #endif #include diff --git a/dos/pdckbd.c b/dos/pdckbd.c index 9a42a56f..39b41da3 100644 --- a/dos/pdckbd.c +++ b/dos/pdckbd.c @@ -24,14 +24,14 @@ # include #endif -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.11 2006/01/07 02:53:25 wmcbrine Exp $"; +char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.12 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /****************************************************************************** diff --git a/dos/pdcprint.c b/dos/pdcprint.c index e815404a..e2d9c1bd 100644 --- a/dos/pdcprint.c +++ b/dos/pdcprint.c @@ -17,14 +17,14 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCprint = "$Id: pdcprint.c,v 1.4 2006/01/07 02:53:25 wmcbrine Exp $"; +char *rcsid_PDCprint = "$Id: pdcprint.c,v 1.5 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/dos/pdcscrn.c b/dos/pdcscrn.c index 3f3c8f27..99bc70ae 100644 --- a/dos/pdcscrn.c +++ b/dos/pdcscrn.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -33,7 +33,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_PDCscrn = "$Id: pdcscrn.c,v 1.11 2006/01/12 06:45:43 wmcbrine Exp $"; +char *rcsid_PDCscrn = "$Id: pdcscrn.c,v 1.12 2006/01/28 12:52:36 wmcbrine Exp $"; #endif static unsigned short *saved_screen = NULL; diff --git a/dos/pdcsetsc.c b/dos/pdcsetsc.c index e9c3b905..af29b5bd 100644 --- a/dos/pdcsetsc.c +++ b/dos/pdcsetsc.c @@ -17,14 +17,14 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.6 2006/01/07 02:53:25 wmcbrine Exp $"; +char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.7 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/os2/pdcclip.c b/os2/pdcclip.c index 85cd0e81..d499d7d6 100644 --- a/os2/pdcclip.c +++ b/os2/pdcclip.c @@ -18,7 +18,7 @@ *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -31,7 +31,7 @@ #include #ifdef PDCDEBUG -char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.8 2006/01/12 06:45:43 wmcbrine Exp $"; +char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.9 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/os2/pdcdisp.c b/os2/pdcdisp.c index 2daa6132..b9d4b364 100644 --- a/os2/pdcdisp.c +++ b/os2/pdcdisp.c @@ -30,7 +30,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.8 2006/01/22 19:57:12 wmcbrine Exp $"; +char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.9 2006/01/28 12:52:36 wmcbrine Exp $"; #endif extern unsigned char atrtab[MAX_ATRTAB]; @@ -465,10 +465,8 @@ bool PDC_transform_line(int lineno) ch = temp_line; - /* replace the attribute part of the chtype with the actual colour value */ - /* replacing the number that points to the actual colour value. */ - - /* for each chtype in the line... */ + /* replace the attribute part of the chtype with the actual + colour value for each chtype in the line */ for (j = 0; j < len; j++) { diff --git a/os2/pdcgetsc.c b/os2/pdcgetsc.c index 4b1f0766..85313a59 100644 --- a/os2/pdcgetsc.c +++ b/os2/pdcgetsc.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -25,7 +25,7 @@ #include #ifdef PDCDEBUG -char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.10 2006/01/15 18:36:58 wmcbrine Exp $"; +char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.11 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/os2/pdckbd.c b/os2/pdckbd.c index f891df1e..60db4fa1 100644 --- a/os2/pdckbd.c +++ b/os2/pdckbd.c @@ -33,7 +33,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.10 2006/01/08 11:53:42 wmcbrine Exp $"; +char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.11 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /****************************************************************************** @@ -206,8 +206,6 @@ int PDC_set_keyboard_binary(void) int PDC_set_keyboard_default(void) /***********************************************************************/ { - PDC_LOG(("PDC_set_keyboard_default() - called\n")); - PDC_LOG(("PDC_set_keyboard_default(). cb: %x, fsMask: %x, chTurnAround: %x, fsInterim: %x, fsState: %x\n", SP->kbdinfo.cb, SP->kbdinfo.fsMask, SP->kbdinfo.chTurnAround, SP->kbdinfo.fsInterim, diff --git a/os2/pdcscrn.c b/os2/pdcscrn.c index e8ee4c5c..5cdfe625 100644 --- a/os2/pdcscrn.c +++ b/os2/pdcscrn.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -26,7 +26,7 @@ #include #ifdef PDCDEBUG -char *rcsid_PDCscrn = "$Id: pdcscrn.c,v 1.8 2006/01/12 06:45:43 wmcbrine Exp $"; +char *rcsid_PDCscrn = "$Id: pdcscrn.c,v 1.9 2006/01/28 12:52:36 wmcbrine Exp $"; #endif #ifdef EMXVIDEO diff --git a/os2/pdcsetsc.c b/os2/pdcsetsc.c index 47b307f5..6d70c934 100644 --- a/os2/pdcsetsc.c +++ b/os2/pdcsetsc.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -25,7 +25,7 @@ #include #ifdef PDCDEBUG -char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.8 2006/01/12 06:56:25 wmcbrine Exp $"; +char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.9 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/initscr.c b/pdcurses/initscr.c index f0fd5a93..27d03099 100644 --- a/pdcurses/initscr.c +++ b/pdcurses/initscr.c @@ -48,7 +48,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_initscr = "$Id: initscr.c,v 1.22 2006/01/27 16:18:00 wmcbrine Exp $"; +char *rcsid_initscr = "$Id: initscr.c,v 1.23 2006/01/28 12:52:36 wmcbrine Exp $"; #else char *_curses_notice = "PDCurses 2.7b - Public Domain 2006"; #endif @@ -296,10 +296,9 @@ char *argv[]; LINES -= SP->slklines; } -/* - * We have to sort out ripped off lines here and reduce the height - * of stdscr by the number of lines ripped off - */ + /* We have to sort out ripped off lines here, and reduce the + height of stdscr by the number of lines ripped off */ + for (i = 0; i < linesrippedoff; i++) { if (linesripped[i].line < 0) @@ -312,6 +311,7 @@ char *argv[]; SP->linesrippedoff++; LINES--; } + linesrippedoff = 0; if ((stdscr = newwin(LINES, COLS, SP->linesrippedoffontop, 0)) @@ -323,9 +323,8 @@ char *argv[]; wclrtobot(stdscr); - /* - * If preserving the existing screen, don't allow a screen clear... - */ + /* If preserving the existing screen, don't allow a screen clear */ + if (SP->_preserve) { untouchwin(curscr); @@ -395,13 +394,14 @@ int PDC_CDECL endwin() PDC_set_font(SP->orig_font); resize_term(PDC_get_rows(), PDC_get_columns()); } + SP->visible_cursor = FALSE; /* Force the visible cursor */ SP->cursor = SP->orig_cursor; #endif -# if defined(DOS) || defined(OS2) +#if defined(DOS) || defined(OS2) reset_shell_mode(); -# endif +#endif curs_set(1); diff --git a/pdcurses/insch.c b/pdcurses/insch.c index da9df840..b35738c0 100644 --- a/pdcurses/insch.c +++ b/pdcurses/insch.c @@ -38,7 +38,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_insch = "$Id: insch.c,v 1.5 2006/01/14 06:42:03 wmcbrine Exp $"; +char *rcsid_insch = "$Id: insch.c,v 1.6 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* @@ -190,7 +190,7 @@ chtype ch; PDC_LOG(("mvwinsch() - called\n")); if (wmove(win, y, x) == ERR) - return(ERR); + return ERR; return PDC_chins(win, ch, (bool)(!(SP->raw_out))); } diff --git a/win32/pdcclip.c b/win32/pdcclip.c index c2fb98e5..ad7f0870 100644 --- a/win32/pdcclip.c +++ b/win32/pdcclip.c @@ -18,11 +18,11 @@ *************************************************************************** */ #define INCLUDE_WINDOWS_H -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #include #ifdef PDCDEBUG -char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.6 2006/01/08 11:53:43 wmcbrine Exp $"; +char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.7 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* @@ -63,6 +63,7 @@ int PDC_CDECL PDC_getclipboard(char **contents, long *length) return PDC_CLIP_ACCESS_ERROR; handle = GetClipboardData(CF_TEXT); + if (handle == NULL) { CloseClipboard(); diff --git a/win32/pdcdisp.c b/win32/pdcdisp.c index f35aa3ba..ad14809a 100644 --- a/win32/pdcdisp.c +++ b/win32/pdcdisp.c @@ -30,7 +30,7 @@ extern HANDLE hConOut; extern unsigned char atrtab[MAX_ATRTAB]; #ifdef PDCDEBUG -char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.7 2006/01/22 19:57:12 wmcbrine Exp $"; +char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.8 2006/01/28 12:52:36 wmcbrine Exp $"; #endif static CHAR_INFO ci[512]; @@ -447,9 +447,8 @@ bool PDC_transform_line(int lineno) curscr->_firstch[lineno] = _NO_CHANGE; curscr->_lastch[lineno] = _NO_CHANGE; - if (SP->refrbrk && (SP->cbreak || SP->raw_inp) - && PDC_breakout()) - return(TRUE); + if (SP->refrbrk && (SP->cbreak || SP->raw_inp) && PDC_breakout()) + return TRUE; return FALSE; } diff --git a/win32/pdcgetsc.c b/win32/pdcgetsc.c index 60a08415..21644fbd 100644 --- a/win32/pdcgetsc.c +++ b/win32/pdcgetsc.c @@ -17,12 +17,12 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #define INCLUDE_WINDOWS_H #include #ifdef PDCDEBUG -char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.7 2006/01/15 18:36:58 wmcbrine Exp $"; +char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.8 2006/01/28 12:52:36 wmcbrine Exp $"; #endif extern HANDLE hConOut, hConIn; diff --git a/win32/pdckbd.c b/win32/pdckbd.c index 087fa0ac..628c0eeb 100644 --- a/win32/pdckbd.c +++ b/win32/pdckbd.c @@ -18,12 +18,12 @@ *************************************************************************** */ -#define CURSES_LIBRARY 1 -#define INCLUDE_WINDOWS_H +#define CURSES_LIBRARY 1 +#define INCLUDE_WINDOWS_H #include #ifdef PDCDEBUG -char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.26 2006/01/15 18:03:32 wmcbrine Exp $"; +char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.27 2006/01/28 12:52:36 wmcbrine Exp $"; #endif #define KEY_STATE TRUE @@ -397,12 +397,12 @@ bool PDC_check_bios_key(void) return win32_kbhit(0); } - /* processKeyEvent returns -1 if the key in save_ip should be ignored - for some reasons. Otherwise the keycode is returned which should be - returned by PDC_get_bios_code. save_ip MUST BE A KEY_EVENT! +/* processKeyEvent returns -1 if the key in save_ip should be ignored + for some reasons. Otherwise the keycode is returned which should be + returned by PDC_get_bios_code. save_ip MUST BE A KEY_EVENT! - The Unicode support has been disabled. See below for the reason. - CTRL-ALT support has been disabled, when is it emitted plainly? */ + The Unicode support has been disabled. See below for the reason. + CTRL-ALT support has been disabled, when is it emitted plainly? */ int processKeyEvent(void) { @@ -431,9 +431,9 @@ int processKeyEvent(void) #endif pdc_key_modifiers = 0L; - /* Must calculate the key modifiers so that Alt keys work! Save the key - modifiers if required. Do this first to allow to detect e.g. a - pressed CTRL key after a hit of NUMLOCK. */ + /* Must calculate the key modifiers so that Alt keys work! Save + the key modifiers if required. Do this first to allow to + detect e.g. a pressed CTRL key after a hit of NUMLOCK. */ if (state & LEFT_ALT_PRESSED || state & RIGHT_ALT_PRESSED) local_key_modifiers |= PDC_KEY_MODIFIER_ALT; @@ -475,31 +475,32 @@ int processKeyEvent(void) KEY_ALT_L : KEY_ALT_R; } - /* The system may emit Ascii or Unicode characters depending on whether - ReadConsoleInputA or ReadConsoleInputW is used. We use - ReadConsoleInputA in all cases currently, so we just check Ascii. - Unicode characters are very hard to implement, because our "special - keys" like KEY_F(1) is one of the unicode range. + /* The system may emit Ascii or Unicode characters depending on + whether ReadConsoleInputA or ReadConsoleInputW is used. We + use ReadConsoleInputA in all cases currently, so we just + check Ascii. Unicode characters are very hard to implement, + because our "special keys" like KEY_F(1) is one of the + unicode range. - Now the ridiculous part of the processing. Normally, if ascii != 0 - then the system did the translation successfully. But this is not - true for LEFT_ALT (different to RIGHT_ALT) in case of LEFT_ALT we - get we get ascii != 0. So check for this first. */ + Now the ridiculous part of the processing. Normally, if ascii + != 0 then the system did the translation successfully. But + this is not true for LEFT_ALT (different to RIGHT_ALT). In + case of LEFT_ALT we get we get ascii != 0. So check for this + first. */ if ((ascii != 0) && (((state & LEFT_ALT_PRESSED) == 0) || (state & RIGHT_ALT_PRESSED))) { - - /* This code should catch all keys returning a printable - character. Characters above 0x7F should be returned as - positive codes. But if'ndef NUMKEYPAD we have to return - extended keycodes for keypad codes. Test for it and don't - return an ascii code in case. */ + /* This code should catch all keys returning a printable + character. Characters above 0x7F should be returned + as positive codes. But if'ndef NUMKEYPAD we have to + return extended keycodes for keypad codes. Test for + it and don't return an ascii code in case. */ #ifndef NUMKEYPAD - if (kptab[vk].extended == 0) + if (kptab[vk].extended == 0) #endif - return (unsigned char) ascii; + return (unsigned char) ascii; } /* This case happens if a functional key has been entered. */ @@ -1033,44 +1034,46 @@ int PDC_validchar(int c) return c; } +/* GetInterestingEvent returns 0 if *ip doesn't contain an event which + should be passed back to the user. This function filters "useless" + events. + + The function returns the number of events waiting. This may be > 1 + if the repeation of real keys pressed so far are > 1. + + Keyboard: Returns 0 on NUMLOCK, CAPSLOCK, SCROLLLOCK. + + Returns 1 for SHIFT, ALT, CTRL only if no other key has been + pressed in between; these are returned on keyup in opposite + to normal keys. The overall flags for processing of SHIFT, ALT, + CTRL (SP->return_key_modifiers) must have been set. + + FGC: CHANGED BEHAVIOUR: In previous version SHIFT etc had a + chance to be returned on the first keydown, too. This was a + bug, because return_key_modifiers were 0. + + Normal keys are returned on keydown only. The number of + repetitions are returned. Dead keys (diacritics) are + omitted. See below for a description. + + The keypad entering of special keys is not supported. This + feature can be built in by replacing "#ifdef NUMPAD_CHARS" + with an intelligent code. + + Mouse: Returns > 0 only if SP->_trap_mbe is set. MOUSE_MOVE without + a pressed mouse key are ignored. + + Window: Everything is ignored, including resize requests. In case + of resize requests the global flag SP->resized is set. + + THIS FUNCTION IS NOT THREAD-SAFE. NEVER USE MORE THREADS THAN TO + USE THIS FUNCTION. STATIC VARIABLES ARE USED HERE. +*/ + /***********************************************************************/ static int GetInterestingEvent(INPUT_RECORD *ip) /***********************************************************************/ { - /* GetInterestingEvent returns 0 if *ip doesn't contain an event which - should be passed back to the user. This function filters "useless" - events. - - The function returns the number of events waiting. This may be > 1 - if the repeation of real keys pressed so far are > 1. - - Keyboard: Returns 0 on NUMLOCK, CAPSLOCK, SCROLLLOCK. - - Returns 1 for SHIFT, ALT, CTRL only if no other key has been - pressed in between; these are returned on keyup in opposite to - normal keys. The overall flags for processing of SHIFT, ALT, - CTRL (SP->return_key_modifiers) must have been set. - FGC: CHANGED BEHAVIOUR: In previous version SHIFT etc had a - chance to be returned on the first keydown, too. This - was a bug, because return_key_modifiers were 0. - - Normal keys are returned on keydown only. The number of - repeations are returned. Dead keys (diacritics) are omitted. - See below for a description. - - The keypad entering of special keys is not supported. This - feature can be built in by replacing "#ifdef NUMPAD_CHARS" - with an intelligent code. - - Mouse: Returns > 0 only if SP->_trap_mbe is set. MOUSE_MOVE without - a pressed mouse key are ignored. - - Window: Everything is ignored, including resize requests. In case - of resize requests the global flag SP->resized is set. - - THIS FUNCTION IS NOT THREAD-SAFE. NEVER USE MORE THREADS THAN TO - USE THIS FUNCTION. STATIC VARIABLES ARE USED HERE. - */ int numKeys = 0, vk; static int save_press; static unsigned numpadChar = 0; diff --git a/win32/pdcprint.c b/win32/pdcprint.c index bfdc27de..2d474d30 100644 --- a/win32/pdcprint.c +++ b/win32/pdcprint.c @@ -17,11 +17,11 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #include #ifdef PDCDEBUG -char *rcsid_PDCprint = "$Id: pdcprint.c,v 1.3 2006/01/08 11:53:43 wmcbrine Exp $"; +char *rcsid_PDCprint = "$Id: pdcprint.c,v 1.4 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/win32/pdcsetsc.c b/win32/pdcsetsc.c index db3298a2..25aacedb 100644 --- a/win32/pdcsetsc.c +++ b/win32/pdcsetsc.c @@ -17,12 +17,12 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #define INCLUDE_WINDOWS_H #include #ifdef PDCDEBUG -char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.7 2006/01/12 00:20:14 wmcbrine Exp $"; +char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.8 2006/01/28 12:52:36 wmcbrine Exp $"; #endif extern HANDLE hConOut; @@ -202,7 +202,7 @@ int PDC_curs_set(int visibility) return ERR; SP->visibility = visibility; - return(ret_vis); + return ret_vis; } /*man-start********************************************************************* diff --git a/x11/ScrollBox.c b/x11/ScrollBox.c index 919cf62d..bec3df81 100644 --- a/x11/ScrollBox.c +++ b/x11/ScrollBox.c @@ -306,7 +306,7 @@ XtWidgetGeometry *request, *reply_return; result = XtGeometryYes; } - return(result); + return result; } /* diff --git a/x11/pdcclip.c b/x11/pdcclip.c index e06e4b5a..2c49e76f 100644 --- a/x11/pdcclip.c +++ b/x11/pdcclip.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -25,7 +25,7 @@ #include #ifdef PDCDEBUG -char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.6 2006/01/12 06:45:43 wmcbrine Exp $"; +char *rcsid_PDCclip = "$Id: pdcclip.c,v 1.7 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/x11/pdcdisp.c b/x11/pdcdisp.c index 33154103..dda9b7cd 100644 --- a/x11/pdcdisp.c +++ b/x11/pdcdisp.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -30,7 +30,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.6 2006/01/11 06:46:24 wmcbrine Exp $"; +char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.7 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/x11/pdcgetsc.c b/x11/pdcgetsc.c index 7d6c237a..13224509 100644 --- a/x11/pdcgetsc.c +++ b/x11/pdcgetsc.c @@ -17,14 +17,14 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.5 2006/01/15 18:36:58 wmcbrine Exp $"; +char *rcsid_PDCgetsc = "$Id: pdcgetsc.c,v 1.6 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/x11/pdckbd.c b/x11/pdckbd.c index 590eb29c..0a9b6ecd 100644 --- a/x11/pdckbd.c +++ b/x11/pdckbd.c @@ -18,14 +18,14 @@ *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.10 2006/01/11 06:46:24 wmcbrine Exp $"; +char *rcsid_PDCkbd = "$Id: pdckbd.c,v 1.11 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/x11/pdcprint.c b/x11/pdcprint.c index 598ddc2f..103399b8 100644 --- a/x11/pdcprint.c +++ b/x11/pdcprint.c @@ -17,14 +17,14 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCprint = "$Id: pdcprint.c,v 1.3 2006/01/11 06:46:24 wmcbrine Exp $"; +char *rcsid_PDCprint = "$Id: pdcprint.c,v 1.4 2006/01/28 12:52:36 wmcbrine Exp $"; #endif diff --git a/x11/pdcscrn.c b/x11/pdcscrn.c index 6cef03f6..68a42325 100644 --- a/x11/pdcscrn.c +++ b/x11/pdcscrn.c @@ -17,14 +17,14 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCscrn = "$Id: pdcscrn.c,v 1.7 2006/01/11 06:46:24 wmcbrine Exp $"; +char *rcsid_PDCscrn = "$Id: pdcscrn.c,v 1.8 2006/01/28 12:52:36 wmcbrine Exp $"; #endif bool GLOBAL_sb_on = FALSE; diff --git a/x11/pdcsetsc.c b/x11/pdcsetsc.c index e9814608..2fb00e0b 100644 --- a/x11/pdcsetsc.c +++ b/x11/pdcsetsc.c @@ -17,14 +17,14 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif #include #ifdef PDCDEBUG -char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.5 2006/01/11 06:46:24 wmcbrine Exp $"; +char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.6 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/x11/sb.c b/x11/sb.c index 078b47ca..2911d614 100644 --- a/x11/sb.c +++ b/x11/sb.c @@ -17,7 +17,7 @@ * See the file maintain.er for details of the current maintainer. *************************************************************************** */ -#define CURSES_LIBRARY 1 +#define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H # include #endif @@ -36,7 +36,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_sb = "$Id: sb.c,v 1.4 2006/01/11 06:46:24 wmcbrine Exp $"; +char *rcsid_sb = "$Id: sb.c,v 1.5 2006/01/28 12:52:36 wmcbrine Exp $"; #endif /*man-start*********************************************************************