changeset 1653:a7a24a3b8899

Fixes for the latest MinGW (gcc 4.6.2). Only ANSI mode is currently supported. Was unable to get Unicode mode to work... added missing ANSI _tstol define.... Lots of other unicode related #defines also seem to be missing... MIM_MENUDATA is now defined in the latest headers so remove old fix for it.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 09 Apr 2012 07:15:05 +0000
parents 202b1affc706
children 3d4066aab4e0
files win/dw.c
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Sat Apr 07 20:51:40 2012 +0000
+++ b/win/dw.c	Mon Apr 09 07:15:05 2012 +0000
@@ -220,8 +220,8 @@
  * so #define them here...
  */
 
-#if !defined( MIM_MENUDATA )
-# define MIM_MENUDATA 0x00000008
+#if !defined( _tstol )
+# define _tstol atol
 #endif
 #if !defined(PBS_MARQUEE)
 # define PBS_MARQUEE 0x08
@@ -1768,7 +1768,6 @@
 LRESULT CALLBACK _wndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2)
 {
    int result = -1, taskbar = FALSE;
-   static int command_active = 0;
    SignalHandler *tmp = Root;
    void (*windowfunc)(PVOID);
    ULONG origmsg = msg;
@@ -1790,9 +1789,6 @@
 
    if (result == -1)
    {
-      /* Avoid infinite recursion */
-      command_active = 1;
-
       /* Find any callbacks for this function */
       while (tmp)
       {
@@ -2031,7 +2027,7 @@
                               if(tmp->window == tem->hdr.hwndFrom)
                               {
                                  int (*containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction;
-                                 HTREEITEM hti, last;
+                                 HTREEITEM hti;
                                  TVITEM tvi;
                                  TVHITTESTINFO thi;
                                  void **ptrs = NULL;
@@ -2044,7 +2040,6 @@
 
                                  MapWindowPoints(HWND_DESKTOP, tmp->window, &thi.pt, 1);
 
-                                 last = TreeView_GetSelection(tmp->window);
                                  hti = TreeView_HitTest(tmp->window, &thi);
 
                                  if(hti)
@@ -2220,7 +2215,6 @@
          if(tmp)
             tmp = tmp->next;
       }
-      command_active = 0;
    }
 
    /* Now that any handlers are done... do normal processing */