41e3e84
To: vim-dev@vim.org
41e3e84
Subject: Patch 7.2.320
41e3e84
Fcc: outbox
41e3e84
From: Bram Moolenaar <Bram@moolenaar.net>
41e3e84
Mime-Version: 1.0
41e3e84
Content-Type: text/plain; charset=UTF-8
41e3e84
Content-Transfer-Encoding: 8bit
41e3e84
------------
41e3e84
41e3e84
Patch 7.2.320
41e3e84
Problem:    Unused function in Mzscheme interface.
41e3e84
Solution:   Remove the function and what depends on it. (Dominique Pelle)
41e3e84
Files:	    src/if_mzsch.c, src/proto/if_mzsch.pro
41e3e84
41e3e84
41e3e84
*** ../vim-7.2.319/src/if_mzsch.c	2009-09-11 12:20:47.000000000 +0200
41e3e84
--- src/if_mzsch.c	2009-12-16 19:01:04.000000000 +0100
41e3e84
***************
41e3e84
*** 70,83 ****
41e3e84
      Scheme_Object   *port;
41e3e84
  } Port_Info;
41e3e84
  
41e3e84
- /* info for do_apply */
41e3e84
- typedef struct
41e3e84
- {
41e3e84
-     Scheme_Object   *proc;
41e3e84
-     int		    argc;
41e3e84
-     Scheme_Object   **argv;
41e3e84
- } Apply_Info;
41e3e84
- 
41e3e84
  /*
41e3e84
   *========================================================================
41e3e84
   *  Vim-Control Commands
41e3e84
--- 70,75 ----
41e3e84
***************
41e3e84
*** 160,166 ****
41e3e84
  static Scheme_Object *extract_exn_message(Scheme_Object *v);
41e3e84
  static Scheme_Object *do_eval(void *, int noargc, Scheme_Object **noargv);
41e3e84
  static Scheme_Object *do_load(void *, int noargc, Scheme_Object **noargv);
41e3e84
- static Scheme_Object *do_apply(void *, int noargc, Scheme_Object **noargv);
41e3e84
  static void register_vim_exn(void);
41e3e84
  static vim_mz_buffer *get_buffer_arg(const char *fname, int argnum,
41e3e84
  	int argc, Scheme_Object **argv);
41e3e84
--- 152,157 ----
41e3e84
***************
41e3e84
*** 1056,1062 ****
41e3e84
  	MZ_GC_REG();
41e3e84
  	config = scheme_config;
41e3e84
  	MZ_GC_CHECK();
41e3e84
! 	/* recreate ports each call effectivelly clearing these ones */
41e3e84
  	curout = scheme_make_string_output_port();
41e3e84
  	MZ_GC_CHECK();
41e3e84
  	curerr = scheme_make_string_output_port();
41e3e84
--- 1047,1053 ----
41e3e84
  	MZ_GC_REG();
41e3e84
  	config = scheme_config;
41e3e84
  	MZ_GC_CHECK();
41e3e84
! 	/* recreate ports each call effectively clearing these ones */
41e3e84
  	curout = scheme_make_string_output_port();
41e3e84
  	MZ_GC_CHECK();
41e3e84
  	curerr = scheme_make_string_output_port();
41e3e84
***************
41e3e84
*** 1196,1231 ****
41e3e84
      }
41e3e84
  }
41e3e84
  
41e3e84
- /*
41e3e84
-  * apply MzScheme procedure with arguments,
41e3e84
-  * handling errors
41e3e84
-  */
41e3e84
-     Scheme_Object *
41e3e84
- mzvim_apply(Scheme_Object *proc, int argc, Scheme_Object **argv)
41e3e84
- {
41e3e84
-     if (mzscheme_init())
41e3e84
- 	return FAIL;
41e3e84
-     else
41e3e84
-     {
41e3e84
- 	Apply_Info	data = {NULL, 0, NULL};
41e3e84
- 	Scheme_Object	*ret = NULL;
41e3e84
- 
41e3e84
- 	MZ_GC_DECL_REG(5);
41e3e84
- 	MZ_GC_VAR_IN_REG(0, ret);
41e3e84
- 	MZ_GC_VAR_IN_REG(1, data.proc);
41e3e84
- 	MZ_GC_ARRAY_VAR_IN_REG(2, data.argv, argc);
41e3e84
- 	MZ_GC_REG();
41e3e84
- 
41e3e84
- 	data.proc = proc;
41e3e84
- 	data.argc = argc;
41e3e84
- 	data.argv = argv;
41e3e84
- 
41e3e84
- 	eval_with_exn_handling(&data, do_apply, &ret;;
41e3e84
- 	MZ_GC_UNREG();
41e3e84
- 	return ret;
41e3e84
-     }
41e3e84
- }
41e3e84
- 
41e3e84
      static Scheme_Object *
41e3e84
  do_load(void *data, int noargc, Scheme_Object **noargv)
41e3e84
  {
41e3e84
--- 1187,1192 ----
41e3e84
***************
41e3e84
*** 1257,1263 ****
41e3e84
  	MZ_GC_CHECK();
41e3e84
      }
41e3e84
  
41e3e84
!     /* errors will be caught in do_mzscheme_comamnd and ex_mzfile */
41e3e84
      scheme_close_input_port(pinfo->port);
41e3e84
      MZ_GC_CHECK();
41e3e84
      pinfo->port = NULL;
41e3e84
--- 1218,1224 ----
41e3e84
  	MZ_GC_CHECK();
41e3e84
      }
41e3e84
  
41e3e84
!     /* errors will be caught in do_mzscheme_command and ex_mzfile */
41e3e84
      scheme_close_input_port(pinfo->port);
41e3e84
      MZ_GC_CHECK();
41e3e84
      pinfo->port = NULL;
41e3e84
***************
41e3e84
*** 1348,1360 ****
41e3e84
      return scheme_eval_string_all((char *)s, environment, TRUE);
41e3e84
  }
41e3e84
  
41e3e84
-     static Scheme_Object *
41e3e84
- do_apply(void *a, int noargc, Scheme_Object **noargv)
41e3e84
- {
41e3e84
-     Apply_Info	*info = (Apply_Info *)a;
41e3e84
-     return scheme_apply(info->proc, info->argc, info->argv);
41e3e84
- }
41e3e84
- 
41e3e84
  /*
41e3e84
   *========================================================================
41e3e84
   *  3.  MzScheme I/O Handlers
41e3e84
--- 1309,1314 ----
41e3e84
***************
41e3e84
*** 2128,2134 ****
41e3e84
      static Scheme_Object *
41e3e84
  set_buffer_line(void *data, int argc, Scheme_Object **argv)
41e3e84
  {
41e3e84
!     /* First of all, we check the the of the supplied MzScheme object.
41e3e84
       * There are three cases:
41e3e84
       *	  1. #f - this is a deletion.
41e3e84
       *	  2. A string	   - this is a replacement.
41e3e84
--- 2082,2088 ----
41e3e84
      static Scheme_Object *
41e3e84
  set_buffer_line(void *data, int argc, Scheme_Object **argv)
41e3e84
  {
41e3e84
!     /* First of all, we check the value of the supplied MzScheme object.
41e3e84
       * There are three cases:
41e3e84
       *	  1. #f - this is a deletion.
41e3e84
       *	  2. A string	   - this is a replacement.
41e3e84
***************
41e3e84
*** 2428,2434 ****
41e3e84
  /*
41e3e84
   * (insert-buff-line-list {linenr} {string/string-list} [buffer])
41e3e84
   *
41e3e84
!  * Insert a number of lines into the specified buffer after the specifed line.
41e3e84
   * The line number is in Vim format (1-based). The lines to be inserted are
41e3e84
   * given as an MzScheme list of string objects or as a single string. The lines
41e3e84
   * to be added are checked for validity and correct format. Errors are
41e3e84
--- 2382,2388 ----
41e3e84
  /*
41e3e84
   * (insert-buff-line-list {linenr} {string/string-list} [buffer])
41e3e84
   *
41e3e84
!  * Insert a number of lines into the specified buffer after the specified line.
41e3e84
   * The line number is in Vim format (1-based). The lines to be inserted are
41e3e84
   * given as an MzScheme list of string objects or as a single string. The lines
41e3e84
   * to be added are checked for validity and correct format. Errors are
41e3e84
*** ../vim-7.2.319/src/proto/if_mzsch.pro	2009-05-26 22:58:43.000000000 +0200
41e3e84
--- src/proto/if_mzsch.pro	2009-12-16 19:01:01.000000000 +0100
41e3e84
***************
41e3e84
*** 13,20 ****
41e3e84
  void mzvim_check_threads __ARGS((void));
41e3e84
  void mzvim_reset_timer __ARGS((void));
41e3e84
  void *mzvim_eval_string __ARGS((char_u *str));
41e3e84
- struct Scheme_Object *mzvim_apply __ARGS((struct Scheme_Object *, int argc,
41e3e84
-     struct Scheme_Object **));
41e3e84
  int mzthreads_allowed __ARGS((void));
41e3e84
  void mzscheme_main __ARGS((void));
41e3e84
  /* vim: set ft=c : */
41e3e84
--- 13,18 ----
41e3e84
*** ../vim-7.2.319/src/version.c	2009-12-16 18:49:09.000000000 +0100
41e3e84
--- src/version.c	2009-12-16 18:53:48.000000000 +0100
41e3e84
***************
41e3e84
*** 683,684 ****
41e3e84
--- 683,686 ----
41e3e84
  {   /* Add new patch number below this line */
41e3e84
+ /**/
41e3e84
+     320,
41e3e84
  /**/
41e3e84
41e3e84
-- 
41e3e84
hundred-and-one symptoms of being an internet addict:
41e3e84
38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
41e3e84
    on the way back to bed.
41e3e84
41e3e84
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
41e3e84
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
41e3e84
\\\        download, build and distribute -- http://www.A-A-P.org        ///
41e3e84
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///