Karsten Hopp a35cc3
To: vim_dev@googlegroups.com
Karsten Hopp a35cc3
Subject: Patch 7.3.732
Karsten Hopp a35cc3
Fcc: outbox
Karsten Hopp a35cc3
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a35cc3
Mime-Version: 1.0
Karsten Hopp a35cc3
Content-Type: text/plain; charset=UTF-8
Karsten Hopp a35cc3
Content-Transfer-Encoding: 8bit
Karsten Hopp a35cc3
------------
Karsten Hopp a35cc3
Karsten Hopp a35cc3
Patch 7.3.732
Karsten Hopp a35cc3
Problem:    Compiler warnings for function arguments.
Karsten Hopp a35cc3
Solution:   Use inteptr_t instead of long.
Karsten Hopp a35cc3
Files:	    src/if_mzsch.c
Karsten Hopp a35cc3
Karsten Hopp a35cc3
Karsten Hopp a35cc3
*** ../vim-7.3.731/src/if_mzsch.c	2012-10-14 03:41:54.000000000 +0200
Karsten Hopp a35cc3
--- src/if_mzsch.c	2012-11-24 14:00:31.000000000 +0100
Karsten Hopp a35cc3
***************
Karsten Hopp a35cc3
*** 142,148 ****
Karsten Hopp a35cc3
  static int do_mzscheme_command(exarg_T *, void *, Scheme_Closed_Prim *what);
Karsten Hopp a35cc3
  static void startup_mzscheme(void);
Karsten Hopp a35cc3
  static char *string_to_line(Scheme_Object *obj);
Karsten Hopp a35cc3
! static void do_output(char *mesg, long len);
Karsten Hopp a35cc3
  static void do_printf(char *format, ...);
Karsten Hopp a35cc3
  static void do_flush(void);
Karsten Hopp a35cc3
  static Scheme_Object *_apply_thunk_catch_exceptions(
Karsten Hopp a35cc3
--- 142,148 ----
Karsten Hopp a35cc3
  static int do_mzscheme_command(exarg_T *, void *, Scheme_Closed_Prim *what);
Karsten Hopp a35cc3
  static void startup_mzscheme(void);
Karsten Hopp a35cc3
  static char *string_to_line(Scheme_Object *obj);
Karsten Hopp a35cc3
! static void do_output(char *mesg, intptr_t len);
Karsten Hopp a35cc3
  static void do_printf(char *format, ...);
Karsten Hopp a35cc3
  static void do_flush(void);
Karsten Hopp a35cc3
  static Scheme_Object *_apply_thunk_catch_exceptions(
Karsten Hopp a35cc3
***************
Karsten Hopp a35cc3
*** 1349,1356 ****
Karsten Hopp a35cc3
  }
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      static void
Karsten Hopp a35cc3
! do_output(char *mesg, long len UNUSED)
Karsten Hopp a35cc3
  {
Karsten Hopp a35cc3
      do_intrnl_output(mesg, 0);
Karsten Hopp a35cc3
  }
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
--- 1349,1357 ----
Karsten Hopp a35cc3
  }
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      static void
Karsten Hopp a35cc3
! do_output(char *mesg, intptr_t len UNUSED)
Karsten Hopp a35cc3
  {
Karsten Hopp a35cc3
+     /* TODO: use len, the string may not be NUL terminated */
Karsten Hopp a35cc3
      do_intrnl_output(mesg, 0);
Karsten Hopp a35cc3
  }
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
***************
Karsten Hopp a35cc3
*** 1370,1376 ****
Karsten Hopp a35cc3
  do_flush(void)
Karsten Hopp a35cc3
  {
Karsten Hopp a35cc3
      char *buff;
Karsten Hopp a35cc3
!     long length;
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      buff = scheme_get_sized_string_output(curerr, &length);
Karsten Hopp a35cc3
      MZ_GC_CHECK();
Karsten Hopp a35cc3
--- 1371,1377 ----
Karsten Hopp a35cc3
  do_flush(void)
Karsten Hopp a35cc3
  {
Karsten Hopp a35cc3
      char *buff;
Karsten Hopp a35cc3
!     intptr_t length;
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      buff = scheme_get_sized_string_output(curerr, &length);
Karsten Hopp a35cc3
      MZ_GC_CHECK();
Karsten Hopp a35cc3
***************
Karsten Hopp a35cc3
*** 2588,2594 ****
Karsten Hopp a35cc3
  {
Karsten Hopp a35cc3
      char	*scheme_str = NULL;
Karsten Hopp a35cc3
      char	*vim_str = NULL;
Karsten Hopp a35cc3
!     long	len;
Karsten Hopp a35cc3
      int		i;
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      scheme_str = scheme_display_to_string(obj, &len;;
Karsten Hopp a35cc3
--- 2589,2595 ----
Karsten Hopp a35cc3
  {
Karsten Hopp a35cc3
      char	*scheme_str = NULL;
Karsten Hopp a35cc3
      char	*vim_str = NULL;
Karsten Hopp a35cc3
!     intptr_t	len;
Karsten Hopp a35cc3
      int		i;
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      scheme_str = scheme_display_to_string(obj, &len;;
Karsten Hopp a35cc3
***************
Karsten Hopp a35cc3
*** 2597,2606 ****
Karsten Hopp a35cc3
       * are replacing a single line, and we must replace it with
Karsten Hopp a35cc3
       * a single line.
Karsten Hopp a35cc3
       */
Karsten Hopp a35cc3
!     if (memchr(scheme_str, '\n', len))
Karsten Hopp a35cc3
  	scheme_signal_error(_("string cannot contain newlines"));
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
!     vim_str = (char *)alloc(len + 1);
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      /* Create a copy of the string, with internal nulls replaced by
Karsten Hopp a35cc3
       * newline characters, as is the vim convention.
Karsten Hopp a35cc3
--- 2598,2607 ----
Karsten Hopp a35cc3
       * are replacing a single line, and we must replace it with
Karsten Hopp a35cc3
       * a single line.
Karsten Hopp a35cc3
       */
Karsten Hopp a35cc3
!     if (memchr(scheme_str, '\n', (size_t)len))
Karsten Hopp a35cc3
  	scheme_signal_error(_("string cannot contain newlines"));
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
!     vim_str = (char *)alloc((int)(len + 1));
Karsten Hopp a35cc3
  
Karsten Hopp a35cc3
      /* Create a copy of the string, with internal nulls replaced by
Karsten Hopp a35cc3
       * newline characters, as is the vim convention.
Karsten Hopp a35cc3
*** ../vim-7.3.731/src/version.c	2012-11-28 15:33:10.000000000 +0100
Karsten Hopp a35cc3
--- src/version.c	2012-11-28 15:34:30.000000000 +0100
Karsten Hopp a35cc3
***************
Karsten Hopp a35cc3
*** 727,728 ****
Karsten Hopp a35cc3
--- 727,730 ----
Karsten Hopp a35cc3
  {   /* Add new patch number below this line */
Karsten Hopp a35cc3
+ /**/
Karsten Hopp a35cc3
+     732,
Karsten Hopp a35cc3
  /**/
Karsten Hopp a35cc3
Karsten Hopp a35cc3
-- 
Karsten Hopp a35cc3
hundred-and-one symptoms of being an internet addict:
Karsten Hopp a35cc3
91. It's Saturday afternoon in the middle of May and you
Karsten Hopp a35cc3
    are on computer.
Karsten Hopp a35cc3
Karsten Hopp a35cc3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a35cc3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a35cc3
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp a35cc3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///