*** ./include/libbcc.h	2012-10-15 00:58:23.601845400 -0400
--- ./include/libbcc.h.orig	2007-03-08 16:21:40.000000000 -0500
*************** void __gr_set_BGI_mode_whc(int *gd, int
*** 494,499 ****
--- 494,503 ----
  int  __gr_get_BGI_mode_pages(void);
  void __gr_set_BGI_mode_pages(int p);
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  /* ----------------------------------------------------------------- */
  /* ---           API functions with macro equivalents            --- */
  /* ---                      (for inlining)                       --- */
*************** int getactivepage(void);
*** 547,556 ****
  void setvisualpage(int p);
  int getvisualpage(void);
  
- #ifdef __cplusplus
- }
- #endif
- 
  /* ----------------------------------------------------------------- */
  #define restorecrtmode() __gr_restorecrtmode()
  #define getgraphmode() (__gr_INIT ? __gr_Mode : (__gr_Result=grNoInitGraph))
--- 551,556 ----
*** ./makedefs.grx	2012-10-23 03:49:04.023734600 -0400
--- ./makedefs.grx.orig	2012-10-15 00:59:05.000000000 -0400
*************** WIN32_GCC_i386_STATIC = $(SYSTEM_TAG_PRE
*** 70,76 ****
  ANY_GCC_SDL_STATIC    = $(SYSTEM_TAG_PREFIX).008
  
  ifdef   DEBUG
! CCOPT = -fno-strict-aliasing -Wall -g -DDEBUG=$(DEBUG)
  LDOPT = -g
  else
  CCOPT = -O2 -fno-strict-aliasing -Wall
--- 70,76 ----
  ANY_GCC_SDL_STATIC    = $(SYSTEM_TAG_PREFIX).008
  
  ifdef   DEBUG
! CCOPT = -O2 -fno-strict-aliasing -Wall -g -DDEBUG=$(DEBUG)
  LDOPT = -g
  else
  CCOPT = -O2 -fno-strict-aliasing -Wall
*** ./src/mouse/w32inp.c	2012-10-24 01:00:35.225341800 -0400
--- ./src/mouse/w32inp.c.orig	2012-10-24 01:06:32.458774400 -0400
*************** static GrKeyType StdKeyTranslate(int win
*** 225,231 ****
  
  static int DequeueW32Event(GrMouseEvent * ev)
  {
-     static int kbd_lastkey = 0;
      W32Event evaux;
      int key;
      int buttons;
--- 225,230 ----
*************** static int DequeueW32Event(GrMouseEvent
*** 248,263 ****
      switch (evaux.uMsg) {
  
      case WM_CHAR:
-         key = kbd_lastkey;
-         kbd_lastkey = 0;
-         if (evaux.wParam == GrKey_Tab && key == GrKey_BackTab)
-             return -1;
          fill_keybd_ev((*ev), evaux.wParam, evaux.kbstat);
          kbd_lastmod = evaux.kbstat;
          return 1;
  
      case WM_SYSCHAR:
! 	kbd_lastkey = key = 0;
  	if (evaux.wParam >= 'a' && evaux.wParam <= 'z')
  	    key = altletters[evaux.wParam - 'a'];
  	if (evaux.wParam >= 'A' && evaux.wParam <= 'Z')
--- 247,258 ----
      switch (evaux.uMsg) {
  
      case WM_CHAR:
          fill_keybd_ev((*ev), evaux.wParam, evaux.kbstat);
          kbd_lastmod = evaux.kbstat;
          return 1;
  
      case WM_SYSCHAR:
! 	key = 0;
  	if (evaux.wParam >= 'a' && evaux.wParam <= 'z')
  	    key = altletters[evaux.wParam - 'a'];
  	if (evaux.wParam >= 'A' && evaux.wParam <= 'Z')
*************** static int DequeueW32Event(GrMouseEvent
*** 272,278 ****
  
      case WM_KEYDOWN:
      case WM_SYSKEYDOWN:
! 	kbd_lastkey = key = StdKeyTranslate(evaux.wParam, evaux.kbstat);
  	if (key == 0)
  	    return -1;
  	fill_keybd_ev((*ev), key, evaux.kbstat);
--- 267,273 ----
  
      case WM_KEYDOWN:
      case WM_SYSKEYDOWN:
! 	key = StdKeyTranslate(evaux.wParam, evaux.kbstat);
  	if (key == 0)
  	    return -1;
  	fill_keybd_ev((*ev), key, evaux.kbstat);
*** ./src/mouse/w32input.h	2012-10-23 03:13:24.267347600 -0400
--- ./src/mouse/w32input.h.orig	2002-02-04 18:38:30.000000000 -0500
*************** typedef struct {
*** 24,30 ****
      GrKeyType grkey;
  } keytrans;
  
! #define NSTDKEYS 23
  
  static keytrans stdkeys[NSTDKEYS] = {
      {VK_PRIOR, GrKey_PageUp},
--- 24,30 ----
      GrKeyType grkey;
  } keytrans;
  
! #define NSTDKEYS 22
  
  static keytrans stdkeys[NSTDKEYS] = {
      {VK_PRIOR, GrKey_PageUp},
*************** static keytrans stdkeys[NSTDKEYS] = {
*** 37,43 ****
      {VK_DOWN, GrKey_Down},
      {VK_INSERT, GrKey_Insert},
      {VK_DELETE, GrKey_Delete},
-     {VK_TAB, 0},
      {VK_F1, GrKey_F1},
      {VK_F2, GrKey_F2},
      {VK_F3, GrKey_F3},
--- 37,42 ----
*************** static keytrans altstdkeys[NSTDKEYS] = {
*** 63,69 ****
      {VK_DOWN, GrKey_Alt_Down},
      {VK_INSERT, GrKey_Alt_Insert},
      {VK_DELETE, GrKey_Alt_Delete},
-     {VK_TAB, 0},
      {VK_F1, GrKey_Alt_F1},
      {VK_F2, GrKey_Alt_F2},
      {VK_F3, GrKey_Alt_F3},
--- 62,67 ----
*************** static keytrans controlstdkeys[NSTDKEYS]
*** 89,95 ****
      {VK_DOWN, GrKey_Control_Down},
      {VK_INSERT, GrKey_Control_Insert},
      {VK_DELETE, GrKey_Control_Delete},
-     {VK_TAB, 0},
      {VK_F1, GrKey_Control_F1},
      {VK_F2, GrKey_Control_F2},
      {VK_F3, GrKey_Control_F3},
--- 87,92 ----
*************** static keytrans shiftstdkeys[NSTDKEYS] =
*** 115,121 ****
      {VK_DOWN, GrKey_Shift_Down},
      {VK_INSERT, GrKey_Shift_Insert},
      {VK_DELETE, 0},
-     {VK_TAB, GrKey_BackTab},
      {VK_F1, GrKey_Shift_F1},
      {VK_F2, GrKey_Shift_F2},
      {VK_F3, GrKey_Shift_F3},
--- 112,117 ----
*** ./src/vdrivers/vd_win32.c	2012-10-23 04:34:32.254780500 -0400
--- ./src/vdrivers/vd_win32.c.orig	2012-07-07 10:29:18.000000000 -0400
*************** static int setmode(GrVideoMode * mp, int
*** 220,226 ****
  	SetWindowPos(hGRXWnd, NULL,
  		     Rect.left, Rect.top,
  		     maxWindowWidth, maxWindowHeight,
! 		     SWP_DEFERERASE | SWP_DRAWFRAME | SWP_NOZORDER | SWP_SHOWWINDOW);
  
          if (hBmpDIB != NULL) {
              DeleteObject(hBmpDIB);
--- 220,226 ----
  	SetWindowPos(hGRXWnd, NULL,
  		     Rect.left, Rect.top,
  		     maxWindowWidth, maxWindowHeight,
! 		     SWP_DRAWFRAME | SWP_NOZORDER | SWP_SHOWWINDOW);
  
          if (hBmpDIB != NULL) {
              DeleteObject(hBmpDIB);
*** ./test/speedtst.c	2012-10-15 01:00:55.624112400 -0400
--- ./test/speedtst.c.orig	2012-07-07 10:21:56.000000000 -0400
***************
*** 29,35 ****
  /*#include <wcdefs.h>*/
  #include <conio.h>
  #else
! #include <limits.h>
  #endif
  #include <math.h>
  #include "rand.h"
--- 29,35 ----
  /*#include <wcdefs.h>*/
  #include <conio.h>
  #else
! #include <values.h>
  #endif
  #include <math.h>
  #include "rand.h"
