Karsten Hopp 5baacf
To: vim-dev@vim.org
Karsten Hopp 5baacf
Subject: Patch 7.1.153
Karsten Hopp 5baacf
Fcc: outbox
Karsten Hopp 5baacf
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 5baacf
Mime-Version: 1.0
Karsten Hopp 5baacf
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 5baacf
Content-Transfer-Encoding: 8bit
Karsten Hopp 5baacf
------------
Karsten Hopp 5baacf
Karsten Hopp 5baacf
Patch 7.1.153
Karsten Hopp 5baacf
Problem:    Compiler warnings on SGI.  Undefined XpmAllocColor (Charles
Karsten Hopp 5baacf
	    Campbell)
Karsten Hopp 5baacf
Solution:   Add type casts.  Init st_dev and st_ino separately.  Don't use
Karsten Hopp 5baacf
	    type casts for vim_snprintf() when HAVE_STDARG_H is defined.
Karsten Hopp 5baacf
	    Define XpmAllocColor when needed.
Karsten Hopp 5baacf
Files:	    src/eval.c, src/ex_cmds.c, src/fileio.c, src/misc2.c,
Karsten Hopp 5baacf
	    src/gui_xmebw.c
Karsten Hopp 5baacf
Karsten Hopp 5baacf
Karsten Hopp 5baacf
*** ../vim-7.1.152/src/eval.c	Tue Oct  2 22:07:58 2007
Karsten Hopp 5baacf
--- src/eval.c	Mon Oct  1 20:56:09 2007
Karsten Hopp 5baacf
***************
Karsten Hopp 5baacf
*** 8729,8735 ****
Karsten Hopp 5baacf
      static int		fnum = 0;
Karsten Hopp 5baacf
      static int		change_start = 0;
Karsten Hopp 5baacf
      static int		change_end = 0;
Karsten Hopp 5baacf
!     static hlf_T	hlID = 0;
Karsten Hopp 5baacf
      int			filler_lines;
Karsten Hopp 5baacf
      int			col;
Karsten Hopp 5baacf
  
Karsten Hopp 5baacf
--- 8729,8735 ----
Karsten Hopp 5baacf
      static int		fnum = 0;
Karsten Hopp 5baacf
      static int		change_start = 0;
Karsten Hopp 5baacf
      static int		change_end = 0;
Karsten Hopp 5baacf
!     static hlf_T	hlID = (hlf_T)0;
Karsten Hopp 5baacf
      int			filler_lines;
Karsten Hopp 5baacf
      int			col;
Karsten Hopp 5baacf
  
Karsten Hopp 5baacf
*** ../vim-7.1.152/src/ex_cmds.c	Thu Sep 13 18:25:08 2007
Karsten Hopp 5baacf
--- src/ex_cmds.c	Thu Sep 13 16:19:40 2007
Karsten Hopp 5baacf
***************
Karsten Hopp 5baacf
*** 1774,1780 ****
Karsten Hopp 5baacf
  	 * overwrite a user's viminfo file after a "su root", with a
Karsten Hopp 5baacf
  	 * viminfo file that the user can't read.
Karsten Hopp 5baacf
  	 */
Karsten Hopp 5baacf
! 	st_old.st_dev = st_old.st_ino = 0;
Karsten Hopp 5baacf
  	st_old.st_mode = 0600;
Karsten Hopp 5baacf
  	if (mch_stat((char *)fname, &st_old) == 0
Karsten Hopp 5baacf
  		&& getuid() != ROOT_UID
Karsten Hopp 5baacf
--- 1774,1781 ----
Karsten Hopp 5baacf
  	 * overwrite a user's viminfo file after a "su root", with a
Karsten Hopp 5baacf
  	 * viminfo file that the user can't read.
Karsten Hopp 5baacf
  	 */
Karsten Hopp 5baacf
! 	st_old.st_dev = 0;
Karsten Hopp 5baacf
! 	st_old.st_ino = 0;
Karsten Hopp 5baacf
  	st_old.st_mode = 0600;
Karsten Hopp 5baacf
  	if (mch_stat((char *)fname, &st_old) == 0
Karsten Hopp 5baacf
  		&& getuid() != ROOT_UID
Karsten Hopp 5baacf
*** ../vim-7.1.152/src/fileio.c	Mon Oct 29 22:37:57 2007
Karsten Hopp 5baacf
--- src/fileio.c	Mon Oct 22 21:10:00 2007
Karsten Hopp 5baacf
***************
Karsten Hopp 5baacf
*** 3209,3215 ****
Karsten Hopp 5baacf
       * Get information about original file (if there is one).
Karsten Hopp 5baacf
       */
Karsten Hopp 5baacf
  #if defined(UNIX) && !defined(ARCHIE)
Karsten Hopp 5baacf
!     st_old.st_dev = st_old.st_ino = 0;
Karsten Hopp 5baacf
      perm = -1;
Karsten Hopp 5baacf
      if (mch_stat((char *)fname, &st_old) < 0)
Karsten Hopp 5baacf
  	newfile = TRUE;
Karsten Hopp 5baacf
--- 3209,3216 ----
Karsten Hopp 5baacf
       * Get information about original file (if there is one).
Karsten Hopp 5baacf
       */
Karsten Hopp 5baacf
  #if defined(UNIX) && !defined(ARCHIE)
Karsten Hopp 5baacf
!     st_old.st_dev = 0;
Karsten Hopp 5baacf
!     st_old.st_ino = 0;
Karsten Hopp 5baacf
      perm = -1;
Karsten Hopp 5baacf
      if (mch_stat((char *)fname, &st_old) < 0)
Karsten Hopp 5baacf
  	newfile = TRUE;
Karsten Hopp 5baacf
*** ../vim-7.1.152/src/misc2.c	Sun Oct  7 15:44:28 2007
Karsten Hopp 5baacf
--- src/misc2.c	Sun Sep 30 18:00:09 2007
Karsten Hopp 5baacf
***************
Karsten Hopp 5baacf
*** 5924,5930 ****
Karsten Hopp 5baacf
--- 5925,5935 ----
Karsten Hopp 5baacf
  {
Karsten Hopp 5baacf
      if (emsg_not_now())
Karsten Hopp 5baacf
  	return TRUE;		/* no error messages at the moment */
Karsten Hopp 5baacf
+ #ifdef HAVE_STDARG_H
Karsten Hopp 5baacf
+     vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
Karsten Hopp 5baacf
+ #else
Karsten Hopp 5baacf
      vim_snprintf((char *)IObuff, IOSIZE, (char *)s, (long_u)a1, (long_u)a2);
Karsten Hopp 5baacf
+ #endif
Karsten Hopp 5baacf
      return emsg(IObuff);
Karsten Hopp 5baacf
  }
Karsten Hopp 5baacf
  
Karsten Hopp 5baacf
*** ../vim-7.1.152/src/gui_xmebw.c	Thu May 10 19:46:55 2007
Karsten Hopp 5baacf
--- src/gui_xmebw.c	Thu Sep  6 12:57:51 2007
Karsten Hopp 5baacf
***************
Karsten Hopp 5baacf
*** 395,405 ****
Karsten Hopp 5baacf
  
Karsten Hopp 5baacf
      /* Create the "highlight" pixmap. */
Karsten Hopp 5baacf
      color[4].pixel = eb->primitive.bottom_shadow_color;
Karsten Hopp 5baacf
      attr.valuemask = XpmColorSymbols | XpmCloseness | XpmAllocColor;
Karsten Hopp 5baacf
      attr.closeness = 65535;	/* accuracy isn't crucial */
Karsten Hopp 5baacf
      attr.colorsymbols = color;
Karsten Hopp 5baacf
      attr.numsymbols = XtNumber(color);
Karsten Hopp 5baacf
-     attr.alloc_color = alloc_color;
Karsten Hopp 5baacf
  
Karsten Hopp 5baacf
      status = XpmCreatePixmapFromData(dpy, root, data, &pix, NULL, &attr);
Karsten Hopp 5baacf
      XpmFreeAttributes(&attr);
Karsten Hopp 5baacf
--- 395,409 ----
Karsten Hopp 5baacf
  
Karsten Hopp 5baacf
      /* Create the "highlight" pixmap. */
Karsten Hopp 5baacf
      color[4].pixel = eb->primitive.bottom_shadow_color;
Karsten Hopp 5baacf
+ #ifdef XpmAllocColor /* SGI doesn't have it */
Karsten Hopp 5baacf
      attr.valuemask = XpmColorSymbols | XpmCloseness | XpmAllocColor;
Karsten Hopp 5baacf
+     attr.alloc_color = alloc_color;
Karsten Hopp 5baacf
+ #else
Karsten Hopp 5baacf
+     attr.valuemask = XpmColorSymbols | XpmCloseness;
Karsten Hopp 5baacf
+ #endif
Karsten Hopp 5baacf
      attr.closeness = 65535;	/* accuracy isn't crucial */
Karsten Hopp 5baacf
      attr.colorsymbols = color;
Karsten Hopp 5baacf
      attr.numsymbols = XtNumber(color);
Karsten Hopp 5baacf
  
Karsten Hopp 5baacf
      status = XpmCreatePixmapFromData(dpy, root, data, &pix, NULL, &attr);
Karsten Hopp 5baacf
      XpmFreeAttributes(&attr);
Karsten Hopp 5baacf
*** ../vim-7.1.152/src/version.c	Thu Nov  8 14:50:58 2007
Karsten Hopp 5baacf
--- src/version.c	Thu Nov  8 20:45:56 2007
Karsten Hopp 5baacf
***************
Karsten Hopp 5baacf
*** 668,669 ****
Karsten Hopp 5baacf
--- 668,671 ----
Karsten Hopp 5baacf
  {   /* Add new patch number below this line */
Karsten Hopp 5baacf
+ /**/
Karsten Hopp 5baacf
+     153,
Karsten Hopp 5baacf
  /**/
Karsten Hopp 5baacf
Karsten Hopp 5baacf
-- 
Karsten Hopp 5baacf
From "know your smileys":
Karsten Hopp 5baacf
 @:-()	Elvis Presley
Karsten Hopp 5baacf
Karsten Hopp 5baacf
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 5baacf
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 5baacf
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 5baacf
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///