astepano / rpms / vim

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