Karsten Hopp 9197e4
To: vim_dev@googlegroups.com
Karsten Hopp 9197e4
Subject: Patch 7.3.870
Karsten Hopp 9197e4
Fcc: outbox
Karsten Hopp 9197e4
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 9197e4
Mime-Version: 1.0
Karsten Hopp 9197e4
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 9197e4
Content-Transfer-Encoding: 8bit
Karsten Hopp 9197e4
------------
Karsten Hopp 9197e4
Karsten Hopp 9197e4
Patch 7.3.870
Karsten Hopp 9197e4
Problem:    Compiler warnings when using MingW 4.5.3.
Karsten Hopp 9197e4
Solution:   Do not use MAKEINTRESOURCE. Adjust #if. (Ken Takata)
Karsten Hopp 9197e4
Files:	    src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, src/os_win32.c,
Karsten Hopp 9197e4
	    src/os_win32.h
Karsten Hopp 9197e4
Karsten Hopp 9197e4
Karsten Hopp 9197e4
*** ../vim-7.3.869/src/gui_w32.c	2012-11-20 16:53:34.000000000 +0100
Karsten Hopp 9197e4
--- src/gui_w32.c	2013-03-19 14:45:24.000000000 +0100
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 1614,1620 ****
Karsten Hopp 9197e4
  #endif
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
  #ifdef FEAT_EVAL
Karsten Hopp 9197e4
! # if _MSC_VER < 1400
Karsten Hopp 9197e4
  /* HandleToLong() only exists in compilers that can do 64 bit builds */
Karsten Hopp 9197e4
  #  define HandleToLong(h) ((long)(h))
Karsten Hopp 9197e4
  # endif
Karsten Hopp 9197e4
--- 1614,1620 ----
Karsten Hopp 9197e4
  #endif
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
  #ifdef FEAT_EVAL
Karsten Hopp 9197e4
! # ifndef HandleToLong
Karsten Hopp 9197e4
  /* HandleToLong() only exists in compilers that can do 64 bit builds */
Karsten Hopp 9197e4
  #  define HandleToLong(h) ((long)(h))
Karsten Hopp 9197e4
  # endif
Karsten Hopp 9197e4
*** ../vim-7.3.869/src/gui_w48.c	2013-01-25 19:28:34.000000000 +0100
Karsten Hopp 9197e4
--- src/gui_w48.c	2013-03-19 14:46:35.000000000 +0100
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 3265,3291 ****
Karsten Hopp 9197e4
   * misc2.c! */
Karsten Hopp 9197e4
  static LPCSTR mshape_idcs[] =
Karsten Hopp 9197e4
  {
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW),		/* arrow */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(0),			/* blank */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_IBEAM),		/* beam */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_SIZENS),	/* updown */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_SIZENS),	/* udsizing */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_SIZEWE),	/* leftright */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_SIZEWE),	/* lrsizing */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_WAIT),		/* busy */
Karsten Hopp 9197e4
  #ifdef WIN3264
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_NO),		/* no */
Karsten Hopp 9197e4
  #else
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ICON),		/* no */
Karsten Hopp 9197e4
  #endif
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW),		/* crosshair */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW),		/* hand1 */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW),		/* hand2 */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW),		/* pencil */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW),		/* question */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW),		/* right-arrow */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_UPARROW),	/* up-arrow */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(IDC_ARROW)		/* last one */
Karsten Hopp 9197e4
  };
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
      void
Karsten Hopp 9197e4
--- 3265,3291 ----
Karsten Hopp 9197e4
   * misc2.c! */
Karsten Hopp 9197e4
  static LPCSTR mshape_idcs[] =
Karsten Hopp 9197e4
  {
Karsten Hopp 9197e4
!     IDC_ARROW,			/* arrow */
Karsten Hopp 9197e4
!     MAKEINTRESOURCE(0),		/* blank */
Karsten Hopp 9197e4
!     IDC_IBEAM,			/* beam */
Karsten Hopp 9197e4
!     IDC_SIZENS,			/* updown */
Karsten Hopp 9197e4
!     IDC_SIZENS,			/* udsizing */
Karsten Hopp 9197e4
!     IDC_SIZEWE,			/* leftright */
Karsten Hopp 9197e4
!     IDC_SIZEWE,			/* lrsizing */
Karsten Hopp 9197e4
!     IDC_WAIT,			/* busy */
Karsten Hopp 9197e4
  #ifdef WIN3264
Karsten Hopp 9197e4
!     IDC_NO,			/* no */
Karsten Hopp 9197e4
  #else
Karsten Hopp 9197e4
!     IDC_ICON,			/* no */
Karsten Hopp 9197e4
  #endif
Karsten Hopp 9197e4
!     IDC_ARROW,			/* crosshair */
Karsten Hopp 9197e4
!     IDC_ARROW,			/* hand1 */
Karsten Hopp 9197e4
!     IDC_ARROW,			/* hand2 */
Karsten Hopp 9197e4
!     IDC_ARROW,			/* pencil */
Karsten Hopp 9197e4
!     IDC_ARROW,			/* question */
Karsten Hopp 9197e4
!     IDC_ARROW,			/* right-arrow */
Karsten Hopp 9197e4
!     IDC_UPARROW,		/* up-arrow */
Karsten Hopp 9197e4
!     IDC_ARROW			/* last one */
Karsten Hopp 9197e4
  };
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
      void
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 3298,3304 ****
Karsten Hopp 9197e4
      else
Karsten Hopp 9197e4
      {
Karsten Hopp 9197e4
  	if (shape >= MSHAPE_NUMBERED)
Karsten Hopp 9197e4
! 	    idc = MAKEINTRESOURCE(IDC_ARROW);
Karsten Hopp 9197e4
  	else
Karsten Hopp 9197e4
  	    idc = mshape_idcs[shape];
Karsten Hopp 9197e4
  #ifdef SetClassLongPtr
Karsten Hopp 9197e4
--- 3298,3304 ----
Karsten Hopp 9197e4
      else
Karsten Hopp 9197e4
      {
Karsten Hopp 9197e4
  	if (shape >= MSHAPE_NUMBERED)
Karsten Hopp 9197e4
! 	    idc = IDC_ARROW;
Karsten Hopp 9197e4
  	else
Karsten Hopp 9197e4
  	    idc = mshape_idcs[shape];
Karsten Hopp 9197e4
  #ifdef SetClassLongPtr
Karsten Hopp 9197e4
*** ../vim-7.3.869/src/os_mswin.c	2013-02-26 14:56:24.000000000 +0100
Karsten Hopp 9197e4
--- src/os_mswin.c	2013-03-19 14:45:24.000000000 +0100
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 184,195 ****
Karsten Hopp 9197e4
--- 184,197 ----
Karsten Hopp 9197e4
  }
Karsten Hopp 9197e4
  # endif
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
+ # if !defined(__MINGW32__) || (__GNUC__ < 4)
Karsten Hopp 9197e4
  int _chdrive(int drive)
Karsten Hopp 9197e4
  {
Karsten Hopp 9197e4
      char temp [3] = "-:";
Karsten Hopp 9197e4
      temp[0] = drive + 'A' - 1;
Karsten Hopp 9197e4
      return !SetCurrentDirectory(temp);
Karsten Hopp 9197e4
  }
Karsten Hopp 9197e4
+ # endif
Karsten Hopp 9197e4
  #else
Karsten Hopp 9197e4
  # ifdef __BORLANDC__
Karsten Hopp 9197e4
  /* being a more ANSI compliant compiler, BorlandC doesn't define _stricoll:
Karsten Hopp 9197e4
*** ../vim-7.3.869/src/os_win32.c	2013-02-26 14:56:24.000000000 +0100
Karsten Hopp 9197e4
--- src/os_win32.c	2013-03-19 14:45:24.000000000 +0100
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 163,169 ****
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
  /* Enable common dialogs input unicode from IME if posible. */
Karsten Hopp 9197e4
  #ifdef FEAT_MBYTE
Karsten Hopp 9197e4
! LRESULT (WINAPI *pDispatchMessage)(LPMSG) = DispatchMessage;
Karsten Hopp 9197e4
  BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage;
Karsten Hopp 9197e4
  BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage;
Karsten Hopp 9197e4
  BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage;
Karsten Hopp 9197e4
--- 163,169 ----
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
  /* Enable common dialogs input unicode from IME if posible. */
Karsten Hopp 9197e4
  #ifdef FEAT_MBYTE
Karsten Hopp 9197e4
! LRESULT (WINAPI *pDispatchMessage)(CONST MSG *) = DispatchMessage;
Karsten Hopp 9197e4
  BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage;
Karsten Hopp 9197e4
  BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage;
Karsten Hopp 9197e4
  BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage;
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 3464,3470 ****
Karsten Hopp 9197e4
  		    && (lnum != curbuf->b_ml.ml_line_count
Karsten Hopp 9197e4
  			|| curbuf->b_p_eol)))
Karsten Hopp 9197e4
  	    {
Karsten Hopp 9197e4
! 		WriteFile(g_hChildStd_IN_Wr, "\n", 1, &ignored, NULL);
Karsten Hopp 9197e4
  	    }
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
  	    ++lnum;
Karsten Hopp 9197e4
--- 3464,3470 ----
Karsten Hopp 9197e4
  		    && (lnum != curbuf->b_ml.ml_line_count
Karsten Hopp 9197e4
  			|| curbuf->b_p_eol)))
Karsten Hopp 9197e4
  	    {
Karsten Hopp 9197e4
! 		WriteFile(g_hChildStd_IN_Wr, "\n", 1, (LPDWORD)&ignored, NULL);
Karsten Hopp 9197e4
  	    }
Karsten Hopp 9197e4
  
Karsten Hopp 9197e4
  	    ++lnum;
Karsten Hopp 9197e4
*** ../vim-7.3.869/src/os_win32.h	2012-11-20 16:53:34.000000000 +0100
Karsten Hopp 9197e4
--- src/os_win32.h	2013-03-19 14:45:24.000000000 +0100
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 204,210 ****
Karsten Hopp 9197e4
  /* Enable common dialogs input unicode from IME if posible. */
Karsten Hopp 9197e4
  #ifdef FEAT_MBYTE
Karsten Hopp 9197e4
      /* The variables are defined in os_win32.c. */
Karsten Hopp 9197e4
! extern LRESULT (WINAPI *pDispatchMessage)(LPMSG);
Karsten Hopp 9197e4
  extern BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT);
Karsten Hopp 9197e4
  extern BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG);
Karsten Hopp 9197e4
  extern BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT);
Karsten Hopp 9197e4
--- 204,210 ----
Karsten Hopp 9197e4
  /* Enable common dialogs input unicode from IME if posible. */
Karsten Hopp 9197e4
  #ifdef FEAT_MBYTE
Karsten Hopp 9197e4
      /* The variables are defined in os_win32.c. */
Karsten Hopp 9197e4
! extern LRESULT (WINAPI *pDispatchMessage)(CONST MSG *);
Karsten Hopp 9197e4
  extern BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT);
Karsten Hopp 9197e4
  extern BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG);
Karsten Hopp 9197e4
  extern BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT);
Karsten Hopp 9197e4
*** ../vim-7.3.869/src/version.c	2013-03-19 14:25:50.000000000 +0100
Karsten Hopp 9197e4
--- src/version.c	2013-03-19 14:45:42.000000000 +0100
Karsten Hopp 9197e4
***************
Karsten Hopp 9197e4
*** 730,731 ****
Karsten Hopp 9197e4
--- 730,733 ----
Karsten Hopp 9197e4
  {   /* Add new patch number below this line */
Karsten Hopp 9197e4
+ /**/
Karsten Hopp 9197e4
+     870,
Karsten Hopp 9197e4
  /**/
Karsten Hopp 9197e4
Karsten Hopp 9197e4
-- 
Karsten Hopp 9197e4
Q: How many legs does a giraffe have?
Karsten Hopp 9197e4
A: Eight: two in front, two behind, two on the left and two on the right
Karsten Hopp 9197e4
Karsten Hopp 9197e4
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 9197e4
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 9197e4
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 9197e4
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///