Karsten Hopp c591fa
To: vim-dev@vim.org
Karsten Hopp c591fa
Subject: Patch 7.0.070
Karsten Hopp c591fa
Fcc: outbox
Karsten Hopp c591fa
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp c591fa
Mime-Version: 1.0
Karsten Hopp c591fa
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp c591fa
Content-Transfer-Encoding: 8bit
Karsten Hopp c591fa
------------
Karsten Hopp c591fa
Karsten Hopp c591fa
Patch 7.0.070
Karsten Hopp c591fa
Problem:    Compiler warnings for shadowed variables and uninitialized
Karsten Hopp c591fa
	    variables.
Karsten Hopp c591fa
Solution:   Rename variables such as "index", "msg" and "dup".  Initialize
Karsten Hopp c591fa
	    variables.
Karsten Hopp c591fa
Files:	    src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c,
Karsten Hopp c591fa
	    src/ex_docmd.c, src/gui_beval.c, src/gui_gtk.c, src/gui_gtk_x11.c,
Karsten Hopp c591fa
	    src/hardcopy.c, src/if_cscope.c, src/main.c, src/mbyte.c,
Karsten Hopp c591fa
	    src/memline.c, src/netbeans.c, src/normal.c, src/option.c,
Karsten Hopp c591fa
	    src/os_unix.c, src/quickfix.c, src/regexp.c, src/screen.c,
Karsten Hopp c591fa
	    src/search.c, src/spell.c, src/ui.c, src/undo.c, src/window.c,
Karsten Hopp c591fa
	    src/version.c
Karsten Hopp c591fa
Karsten Hopp c591fa
Karsten Hopp c591fa
*** ../vim-7.0.069/src/edit.c	Tue Aug 29 16:33:23 2006
Karsten Hopp c591fa
--- src/edit.c	Tue Aug 29 14:57:46 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 129,135 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  static void ins_ctrl_x __ARGS((void));
Karsten Hopp c591fa
  static int  has_compl_option __ARGS((int dict_opt));
Karsten Hopp c591fa
! static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int dup));
Karsten Hopp c591fa
  static int  ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
Karsten Hopp c591fa
  static void ins_compl_longest_match __ARGS((compl_T *match));
Karsten Hopp c591fa
  static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
Karsten Hopp c591fa
--- 129,135 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  static void ins_ctrl_x __ARGS((void));
Karsten Hopp c591fa
  static int  has_compl_option __ARGS((int dict_opt));
Karsten Hopp c591fa
! static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup));
Karsten Hopp c591fa
  static int  ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
Karsten Hopp c591fa
  static void ins_compl_longest_match __ARGS((compl_T *match));
Karsten Hopp c591fa
  static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2118,2124 ****
Karsten Hopp c591fa
   * maybe because alloc() returns NULL, then FAIL is returned.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup)
Karsten Hopp c591fa
      char_u	*str;
Karsten Hopp c591fa
      int		len;
Karsten Hopp c591fa
      int		icase;
Karsten Hopp c591fa
--- 2118,2124 ----
Karsten Hopp c591fa
   * maybe because alloc() returns NULL, then FAIL is returned.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
! ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup)
Karsten Hopp c591fa
      char_u	*str;
Karsten Hopp c591fa
      int		len;
Karsten Hopp c591fa
      int		icase;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2126,2132 ****
Karsten Hopp c591fa
      char_u	**cptext;   /* extra text for popup menu or NULL */
Karsten Hopp c591fa
      int		cdir;
Karsten Hopp c591fa
      int		flags;
Karsten Hopp c591fa
!     int		dup;	    /* accept duplicate match */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      compl_T	*match;
Karsten Hopp c591fa
      int		dir = (cdir == 0 ? compl_direction : cdir);
Karsten Hopp c591fa
--- 2126,2132 ----
Karsten Hopp c591fa
      char_u	**cptext;   /* extra text for popup menu or NULL */
Karsten Hopp c591fa
      int		cdir;
Karsten Hopp c591fa
      int		flags;
Karsten Hopp c591fa
!     int		adup;	    /* accept duplicate match */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      compl_T	*match;
Karsten Hopp c591fa
      int		dir = (cdir == 0 ? compl_direction : cdir);
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2140,2146 ****
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * If the same match is already present, don't add it.
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
!     if (compl_first_match != NULL && !dup)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	match = compl_first_match;
Karsten Hopp c591fa
  	do
Karsten Hopp c591fa
--- 2140,2146 ----
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * If the same match is already present, don't add it.
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
!     if (compl_first_match != NULL && !adup)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	match = compl_first_match;
Karsten Hopp c591fa
  	do
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3608,3614 ****
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	*word;
Karsten Hopp c591fa
      int		icase = FALSE;
Karsten Hopp c591fa
!     int		dup = FALSE;
Karsten Hopp c591fa
      char_u	*(cptext[CPT_COUNT]);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
Karsten Hopp c591fa
--- 3608,3614 ----
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	*word;
Karsten Hopp c591fa
      int		icase = FALSE;
Karsten Hopp c591fa
!     int		adup = FALSE;
Karsten Hopp c591fa
      char_u	*(cptext[CPT_COUNT]);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3625,3631 ****
Karsten Hopp c591fa
  	if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
Karsten Hopp c591fa
  	    icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
Karsten Hopp c591fa
  	if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
Karsten Hopp c591fa
! 	    dup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
--- 3625,3631 ----
Karsten Hopp c591fa
  	if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
Karsten Hopp c591fa
  	    icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
Karsten Hopp c591fa
  	if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
Karsten Hopp c591fa
! 	    adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3634,3640 ****
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      if (word == NULL || *word == NUL)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
!     return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 3634,3640 ----
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      if (word == NULL || *word == NUL)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
!     return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
*** ../vim-7.0.069/src/eval.c	Wed Aug 16 22:03:35 2006
Karsten Hopp c591fa
--- src/eval.c	Thu Aug 24 22:00:09 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 454,460 ****
Karsten Hopp c591fa
  static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
Karsten Hopp c591fa
  static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
Karsten Hopp c591fa
  static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
Karsten Hopp c591fa
! static void emsg_funcname __ARGS((char *msg, char_u *name));
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
Karsten Hopp c591fa
  static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
Karsten Hopp c591fa
--- 454,460 ----
Karsten Hopp c591fa
  static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
Karsten Hopp c591fa
  static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
Karsten Hopp c591fa
  static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
Karsten Hopp c591fa
! static void emsg_funcname __ARGS((char *ermsg, char_u *name));
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
Karsten Hopp c591fa
  static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2260,2266 ****
Karsten Hopp c591fa
  	    EMSG(_(e_letunexp));
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    char_u	*tofree = NULL;
Karsten Hopp c591fa
  	    char_u	*s;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    p = get_tv_string_chk(tv);
Karsten Hopp c591fa
--- 2260,2266 ----
Karsten Hopp c591fa
  	    EMSG(_(e_letunexp));
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    char_u	*ptofree = NULL;
Karsten Hopp c591fa
  	    char_u	*s;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    p = get_tv_string_chk(tv);
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2269,2275 ****
Karsten Hopp c591fa
  		s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
Karsten Hopp c591fa
  		if (s != NULL)
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
! 		    p = tofree = concat_str(s, p);
Karsten Hopp c591fa
  		    vim_free(s);
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
--- 2269,2275 ----
Karsten Hopp c591fa
  		s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
Karsten Hopp c591fa
  		if (s != NULL)
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
! 		    p = ptofree = concat_str(s, p);
Karsten Hopp c591fa
  		    vim_free(s);
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2278,2284 ****
Karsten Hopp c591fa
  		write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
Karsten Hopp c591fa
  		arg_end = arg + 1;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
! 	    vim_free(tofree);
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 2278,2284 ----
Karsten Hopp c591fa
  		write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
Karsten Hopp c591fa
  		arg_end = arg + 1;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
! 	    vim_free(ptofree);
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7595,7602 ****
Karsten Hopp c591fa
   * Give an error message with a function name.  Handle <SNR> things.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static void
Karsten Hopp c591fa
! emsg_funcname(msg, name)
Karsten Hopp c591fa
!     char	*msg;
Karsten Hopp c591fa
      char_u	*name;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	*p;
Karsten Hopp c591fa
--- 7595,7602 ----
Karsten Hopp c591fa
   * Give an error message with a function name.  Handle <SNR> things.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static void
Karsten Hopp c591fa
! emsg_funcname(ermsg, name)
Karsten Hopp c591fa
!     char	*ermsg;
Karsten Hopp c591fa
      char_u	*name;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	*p;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7605,7611 ****
Karsten Hopp c591fa
  	p = concat_str((char_u *)"<SNR>", name + 3);
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
  	p = name;
Karsten Hopp c591fa
!     EMSG2(_(msg), p);
Karsten Hopp c591fa
      if (p != name)
Karsten Hopp c591fa
  	vim_free(p);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 7605,7611 ----
Karsten Hopp c591fa
  	p = concat_str((char_u *)"<SNR>", name + 3);
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
  	p = name;
Karsten Hopp c591fa
!     EMSG2(_(ermsg), p);
Karsten Hopp c591fa
      if (p != name)
Karsten Hopp c591fa
  	vim_free(p);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 9179,9203 ****
Karsten Hopp c591fa
      typval_T	save_key;
Karsten Hopp c591fa
      int		rem;
Karsten Hopp c591fa
      int		todo;
Karsten Hopp c591fa
!     char_u	*msg = map ? (char_u *)"map()" : (char_u *)"filter()";
Karsten Hopp c591fa
      int		save_did_emsg;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      rettv->vval.v_number = 0;
Karsten Hopp c591fa
      if (argvars[0].v_type == VAR_LIST)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if ((l = argvars[0].vval.v_list) == NULL
Karsten Hopp c591fa
! 		|| (map && tv_check_lock(l->lv_lock, msg)))
Karsten Hopp c591fa
  	    return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else if (argvars[0].v_type == VAR_DICT)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if ((d = argvars[0].vval.v_dict) == NULL
Karsten Hopp c591fa
! 		|| (map && tv_check_lock(d->dv_lock, msg)))
Karsten Hopp c591fa
  	    return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	EMSG2(_(e_listdictarg), msg);
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 9179,9203 ----
Karsten Hopp c591fa
      typval_T	save_key;
Karsten Hopp c591fa
      int		rem;
Karsten Hopp c591fa
      int		todo;
Karsten Hopp c591fa
!     char_u	*ermsg = map ? (char_u *)"map()" : (char_u *)"filter()";
Karsten Hopp c591fa
      int		save_did_emsg;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      rettv->vval.v_number = 0;
Karsten Hopp c591fa
      if (argvars[0].v_type == VAR_LIST)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if ((l = argvars[0].vval.v_list) == NULL
Karsten Hopp c591fa
! 		|| (map && tv_check_lock(l->lv_lock, ermsg)))
Karsten Hopp c591fa
  	    return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else if (argvars[0].v_type == VAR_DICT)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if ((d = argvars[0].vval.v_dict) == NULL
Karsten Hopp c591fa
! 		|| (map && tv_check_lock(d->dv_lock, ermsg)))
Karsten Hopp c591fa
  	    return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	EMSG2(_(e_listdictarg), ermsg);
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 9229,9235 ****
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    --todo;
Karsten Hopp c591fa
  		    di = HI2DI(hi);
Karsten Hopp c591fa
! 		    if (tv_check_lock(di->di_tv.v_lock, msg))
Karsten Hopp c591fa
  			break;
Karsten Hopp c591fa
  		    vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
Karsten Hopp c591fa
  		    if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
Karsten Hopp c591fa
--- 9229,9235 ----
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    --todo;
Karsten Hopp c591fa
  		    di = HI2DI(hi);
Karsten Hopp c591fa
! 		    if (tv_check_lock(di->di_tv.v_lock, ermsg))
Karsten Hopp c591fa
  			break;
Karsten Hopp c591fa
  		    vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
Karsten Hopp c591fa
  		    if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 9248,9254 ****
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    for (li = l->lv_first; li != NULL; li = nli)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
! 		if (tv_check_lock(li->li_tv.v_lock, msg))
Karsten Hopp c591fa
  		    break;
Karsten Hopp c591fa
  		nli = li->li_next;
Karsten Hopp c591fa
  		if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
Karsten Hopp c591fa
--- 9248,9254 ----
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    for (li = l->lv_first; li != NULL; li = nli)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
! 		if (tv_check_lock(li->li_tv.v_lock, ermsg))
Karsten Hopp c591fa
  		    break;
Karsten Hopp c591fa
  		nli = li->li_next;
Karsten Hopp c591fa
  		if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 19789,19795 ****
Karsten Hopp c591fa
  	    if (p_verbose >= 14)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		char_u	buf[MSG_BUF_LEN];
Karsten Hopp c591fa
! 		char_u	numbuf[NUMBUFLEN];
Karsten Hopp c591fa
  		char_u	*tofree;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		msg_puts((char_u *)"(");
Karsten Hopp c591fa
--- 19789,19795 ----
Karsten Hopp c591fa
  	    if (p_verbose >= 14)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		char_u	buf[MSG_BUF_LEN];
Karsten Hopp c591fa
! 		char_u	numbuf2[NUMBUFLEN];
Karsten Hopp c591fa
  		char_u	*tofree;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		msg_puts((char_u *)"(");
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 19801,19808 ****
Karsten Hopp c591fa
  			msg_outnum((long)argvars[i].vval.v_number);
Karsten Hopp c591fa
  		    else
Karsten Hopp c591fa
  		    {
Karsten Hopp c591fa
! 			trunc_string(tv2string(&argvars[i], &tofree, numbuf, 0),
Karsten Hopp c591fa
! 							    buf, MSG_BUF_CLEN);
Karsten Hopp c591fa
  			msg_puts(buf);
Karsten Hopp c591fa
  			vim_free(tofree);
Karsten Hopp c591fa
  		    }
Karsten Hopp c591fa
--- 19801,19808 ----
Karsten Hopp c591fa
  			msg_outnum((long)argvars[i].vval.v_number);
Karsten Hopp c591fa
  		    else
Karsten Hopp c591fa
  		    {
Karsten Hopp c591fa
! 			trunc_string(tv2string(&argvars[i], &tofree,
Karsten Hopp c591fa
! 					      numbuf2, 0), buf, MSG_BUF_CLEN);
Karsten Hopp c591fa
  			msg_puts(buf);
Karsten Hopp c591fa
  			vim_free(tofree);
Karsten Hopp c591fa
  		    }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 19880,19892 ****
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    char_u	buf[MSG_BUF_LEN];
Karsten Hopp c591fa
! 	    char_u	numbuf[NUMBUFLEN];
Karsten Hopp c591fa
  	    char_u	*tofree;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    /* The value may be very long.  Skip the middle part, so that we
Karsten Hopp c591fa
  	     * have some idea how it starts and ends. smsg() would always
Karsten Hopp c591fa
  	     * truncate it at the end. */
Karsten Hopp c591fa
! 	    trunc_string(tv2string(fc.rettv, &tofree, numbuf, 0),
Karsten Hopp c591fa
  							   buf, MSG_BUF_CLEN);
Karsten Hopp c591fa
  	    smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
Karsten Hopp c591fa
  	    vim_free(tofree);
Karsten Hopp c591fa
--- 19880,19892 ----
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    char_u	buf[MSG_BUF_LEN];
Karsten Hopp c591fa
! 	    char_u	numbuf2[NUMBUFLEN];
Karsten Hopp c591fa
  	    char_u	*tofree;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    /* The value may be very long.  Skip the middle part, so that we
Karsten Hopp c591fa
  	     * have some idea how it starts and ends. smsg() would always
Karsten Hopp c591fa
  	     * truncate it at the end. */
Karsten Hopp c591fa
! 	    trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0),
Karsten Hopp c591fa
  							   buf, MSG_BUF_CLEN);
Karsten Hopp c591fa
  	    smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
Karsten Hopp c591fa
  	    vim_free(tofree);
Karsten Hopp c591fa
*** ../vim-7.0.069/src/ex_cmds.c	Sun Apr 23 00:33:23 2006
Karsten Hopp c591fa
--- src/ex_cmds.c	Mon Aug 28 21:42:29 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 185,190 ****
Karsten Hopp c591fa
--- 185,191 ----
Karsten Hopp c591fa
  	    new_indent = indent;
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
+ 	    has_tab = FALSE;	/* avoid uninit warnings */
Karsten Hopp c591fa
  	    len = linelen(eap->cmdidx == CMD_right ? &has_tab
Karsten Hopp c591fa
  						   : NULL) - get_indent();
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1772,1781 ****
Karsten Hopp c591fa
  				? (st_old.st_mode & 0020)
Karsten Hopp c591fa
  				: (st_old.st_mode & 0002))))
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    int	tt;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    /* avoid a wait_return for this message, it's annoying */
Karsten Hopp c591fa
- 	    tt = msg_didany;
Karsten Hopp c591fa
  	    EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
Karsten Hopp c591fa
  	    msg_didany = tt;
Karsten Hopp c591fa
  	    fclose(fp_in);
Karsten Hopp c591fa
--- 1773,1781 ----
Karsten Hopp c591fa
  				? (st_old.st_mode & 0020)
Karsten Hopp c591fa
  				: (st_old.st_mode & 0002))))
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    int	tt = msg_didany;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    /* avoid a wait_return for this message, it's annoying */
Karsten Hopp c591fa
  	    EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
Karsten Hopp c591fa
  	    msg_didany = tt;
Karsten Hopp c591fa
  	    fclose(fp_in);
Karsten Hopp c591fa
*** ../vim-7.0.069/src/ex_cmds2.c	Tue Apr 18 00:10:47 2006
Karsten Hopp c591fa
--- src/ex_cmds2.c	Thu Aug 24 22:01:44 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3648,3660 ****
Karsten Hopp c591fa
   * Return FALSE when not sourcing a file.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      int
Karsten Hopp c591fa
! source_finished(getline, cookie)
Karsten Hopp c591fa
!     char_u	*(*getline) __ARGS((int, void *, int));
Karsten Hopp c591fa
      void	*cookie;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     return (getline_equal(getline, cookie, getsourceline)
Karsten Hopp c591fa
  	    && ((struct source_cookie *)getline_cookie(
Karsten Hopp c591fa
! 						 getline, cookie))->finished);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 3648,3660 ----
Karsten Hopp c591fa
   * Return FALSE when not sourcing a file.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      int
Karsten Hopp c591fa
! source_finished(fgetline, cookie)
Karsten Hopp c591fa
!     char_u	*(*fgetline) __ARGS((int, void *, int));
Karsten Hopp c591fa
      void	*cookie;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     return (getline_equal(fgetline, cookie, getsourceline)
Karsten Hopp c591fa
  	    && ((struct source_cookie *)getline_cookie(
Karsten Hopp c591fa
! 						fgetline, cookie))->finished);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
*** ../vim-7.0.069/src/ex_docmd.c	Wed Aug 16 17:06:22 2006
Karsten Hopp c591fa
--- src/ex_docmd.c	Thu Aug 24 22:03:17 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 58,66 ****
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
! static char_u	*do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*getline)(int, void *, int), void *cookie));
Karsten Hopp c591fa
  #else
Karsten Hopp c591fa
! static char_u	*do_one_cmd __ARGS((char_u **, int, char_u *(*getline)(int, void *, int), void *cookie));
Karsten Hopp c591fa
  static int	if_level = 0;		/* depth in :if */
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  static char_u	*find_command __ARGS((exarg_T *eap, int *full));
Karsten Hopp c591fa
--- 58,66 ----
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
! static char_u	*do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie));
Karsten Hopp c591fa
  #else
Karsten Hopp c591fa
! static char_u	*do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie));
Karsten Hopp c591fa
  static int	if_level = 0;		/* depth in :if */
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  static char_u	*find_command __ARGS((exarg_T *eap, int *full));
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 831,840 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * If requested, store and reset the global values controlling the
Karsten Hopp c591fa
!      * exception handling (used when debugging).
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
      if (flags & DOCMD_EXCRESET)
Karsten Hopp c591fa
  	save_dbg_stuff(&debug_saved);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      initial_trylevel = trylevel;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 831,843 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * If requested, store and reset the global values controlling the
Karsten Hopp c591fa
!      * exception handling (used when debugging).  Otherwise clear it to avoid
Karsten Hopp c591fa
!      * a bogus compiler warning when the optimizer uses inline functions...
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
      if (flags & DOCMD_EXCRESET)
Karsten Hopp c591fa
  	save_dbg_stuff(&debug_saved);
Karsten Hopp c591fa
+     else
Karsten Hopp c591fa
+ 	memset(&debug_saved, 0, 1);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      initial_trylevel = trylevel;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1574,1597 ****
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  /*
Karsten Hopp c591fa
!  * If "getline" is get_loop_line(), return TRUE if the getline it uses equals
Karsten Hopp c591fa
!  * "func".  * Otherwise return TRUE when "getline" equals "func".
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
  /*ARGSUSED*/
Karsten Hopp c591fa
      int
Karsten Hopp c591fa
! getline_equal(getline, cookie, func)
Karsten Hopp c591fa
!     char_u	*(*getline) __ARGS((int, void *, int));
Karsten Hopp c591fa
!     void	*cookie;		/* argument for getline() */
Karsten Hopp c591fa
      char_u	*(*func) __ARGS((int, void *, int));
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
      char_u		*(*gp) __ARGS((int, void *, int));
Karsten Hopp c591fa
      struct loop_cookie *cp;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     /* When "getline" is "get_loop_line()" use the "cookie" to find the
Karsten Hopp c591fa
       * function that's orignally used to obtain the lines.  This may be nested
Karsten Hopp c591fa
       * several levels. */
Karsten Hopp c591fa
!     gp = getline;
Karsten Hopp c591fa
      cp = (struct loop_cookie *)cookie;
Karsten Hopp c591fa
      while (gp == get_loop_line)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
--- 1577,1600 ----
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  /*
Karsten Hopp c591fa
!  * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals
Karsten Hopp c591fa
!  * "func".  * Otherwise return TRUE when "fgetline" equals "func".
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
  /*ARGSUSED*/
Karsten Hopp c591fa
      int
Karsten Hopp c591fa
! getline_equal(fgetline, cookie, func)
Karsten Hopp c591fa
!     char_u	*(*fgetline) __ARGS((int, void *, int));
Karsten Hopp c591fa
!     void	*cookie;		/* argument for fgetline() */
Karsten Hopp c591fa
      char_u	*(*func) __ARGS((int, void *, int));
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
      char_u		*(*gp) __ARGS((int, void *, int));
Karsten Hopp c591fa
      struct loop_cookie *cp;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
Karsten Hopp c591fa
       * function that's orignally used to obtain the lines.  This may be nested
Karsten Hopp c591fa
       * several levels. */
Karsten Hopp c591fa
!     gp = fgetline;
Karsten Hopp c591fa
      cp = (struct loop_cookie *)cookie;
Karsten Hopp c591fa
      while (gp == get_loop_line)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1600,1628 ****
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      return gp == func;
Karsten Hopp c591fa
  #else
Karsten Hopp c591fa
!     return getline == func;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
Karsten Hopp c591fa
  /*
Karsten Hopp c591fa
!  * If "getline" is get_loop_line(), return the cookie used by the original
Karsten Hopp c591fa
   * getline function.  Otherwise return "cookie".
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
  /*ARGSUSED*/
Karsten Hopp c591fa
      void *
Karsten Hopp c591fa
! getline_cookie(getline, cookie)
Karsten Hopp c591fa
!     char_u	*(*getline) __ARGS((int, void *, int));
Karsten Hopp c591fa
!     void	*cookie;		/* argument for getline() */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
  # ifdef FEAT_EVAL
Karsten Hopp c591fa
      char_u		*(*gp) __ARGS((int, void *, int));
Karsten Hopp c591fa
      struct loop_cookie *cp;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     /* When "getline" is "get_loop_line()" use the "cookie" to find the
Karsten Hopp c591fa
       * cookie that's orignally used to obtain the lines.  This may be nested
Karsten Hopp c591fa
       * several levels. */
Karsten Hopp c591fa
!     gp = getline;
Karsten Hopp c591fa
      cp = (struct loop_cookie *)cookie;
Karsten Hopp c591fa
      while (gp == get_loop_line)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
--- 1603,1631 ----
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      return gp == func;
Karsten Hopp c591fa
  #else
Karsten Hopp c591fa
!     return fgetline == func;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
Karsten Hopp c591fa
  /*
Karsten Hopp c591fa
!  * If "fgetline" is get_loop_line(), return the cookie used by the original
Karsten Hopp c591fa
   * getline function.  Otherwise return "cookie".
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
  /*ARGSUSED*/
Karsten Hopp c591fa
      void *
Karsten Hopp c591fa
! getline_cookie(fgetline, cookie)
Karsten Hopp c591fa
!     char_u	*(*fgetline) __ARGS((int, void *, int));
Karsten Hopp c591fa
!     void	*cookie;		/* argument for fgetline() */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
  # ifdef FEAT_EVAL
Karsten Hopp c591fa
      char_u		*(*gp) __ARGS((int, void *, int));
Karsten Hopp c591fa
      struct loop_cookie *cp;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
Karsten Hopp c591fa
       * cookie that's orignally used to obtain the lines.  This may be nested
Karsten Hopp c591fa
       * several levels. */
Karsten Hopp c591fa
!     gp = fgetline;
Karsten Hopp c591fa
      cp = (struct loop_cookie *)cookie;
Karsten Hopp c591fa
      while (gp == get_loop_line)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1648,1654 ****
Karsten Hopp c591fa
   * 5. parse arguments
Karsten Hopp c591fa
   * 6. switch on command name
Karsten Hopp c591fa
   *
Karsten Hopp c591fa
!  * Note: "getline" can be NULL.
Karsten Hopp c591fa
   *
Karsten Hopp c591fa
   * This function may be called recursively!
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
--- 1651,1657 ----
Karsten Hopp c591fa
   * 5. parse arguments
Karsten Hopp c591fa
   * 6. switch on command name
Karsten Hopp c591fa
   *
Karsten Hopp c591fa
!  * Note: "fgetline" can be NULL.
Karsten Hopp c591fa
   *
Karsten Hopp c591fa
   * This function may be called recursively!
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1663,1676 ****
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
  			    cstack,
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
! 				    getline, cookie)
Karsten Hopp c591fa
      char_u		**cmdlinep;
Karsten Hopp c591fa
      int			sourcing;
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
      struct condstack	*cstack;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
!     char_u		*(*getline) __ARGS((int, void *, int));
Karsten Hopp c591fa
!     void		*cookie;		/* argument for getline() */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u		*p;
Karsten Hopp c591fa
      linenr_T		lnum;
Karsten Hopp c591fa
--- 1666,1679 ----
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
  			    cstack,
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
! 				    fgetline, cookie)
Karsten Hopp c591fa
      char_u		**cmdlinep;
Karsten Hopp c591fa
      int			sourcing;
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
      struct condstack	*cstack;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
!     char_u		*(*fgetline) __ARGS((int, void *, int));
Karsten Hopp c591fa
!     void		*cookie;		/* argument for fgetline() */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u		*p;
Karsten Hopp c591fa
      linenr_T		lnum;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1698,1704 ****
Karsten Hopp c591fa
      if (quitmore
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
  	    /* avoid that a function call in 'statusline' does this */
Karsten Hopp c591fa
! 	    && !getline_equal(getline, cookie, get_func_line)
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    )
Karsten Hopp c591fa
  	--quitmore;
Karsten Hopp c591fa
--- 1701,1707 ----
Karsten Hopp c591fa
      if (quitmore
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
  	    /* avoid that a function call in 'statusline' does this */
Karsten Hopp c591fa
! 	    && !getline_equal(fgetline, cookie, get_func_line)
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    )
Karsten Hopp c591fa
  	--quitmore;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1728,1735 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* in ex mode, an empty line works like :+ */
Karsten Hopp c591fa
  	if (*ea.cmd == NUL && exmode_active
Karsten Hopp c591fa
! 			&& (getline_equal(getline, cookie, getexmodeline)
Karsten Hopp c591fa
! 			    || getline_equal(getline, cookie, getexline))
Karsten Hopp c591fa
  			&& curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    ea.cmd = (char_u *)"+";
Karsten Hopp c591fa
--- 1731,1738 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* in ex mode, an empty line works like :+ */
Karsten Hopp c591fa
  	if (*ea.cmd == NUL && exmode_active
Karsten Hopp c591fa
! 			&& (getline_equal(fgetline, cookie, getexmodeline)
Karsten Hopp c591fa
! 			    || getline_equal(fgetline, cookie, getexline))
Karsten Hopp c591fa
  			&& curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    ea.cmd = (char_u *)"+";
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1918,1926 ****
Karsten Hopp c591fa
      /* Count this line for profiling if ea.skip is FALSE. */
Karsten Hopp c591fa
      if (do_profiling == PROF_YES && !ea.skip)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (getline_equal(getline, cookie, get_func_line))
Karsten Hopp c591fa
! 	    func_line_exec(getline_cookie(getline, cookie));
Karsten Hopp c591fa
! 	else if (getline_equal(getline, cookie, getsourceline))
Karsten Hopp c591fa
  	    script_line_exec();
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
--- 1921,1929 ----
Karsten Hopp c591fa
      /* Count this line for profiling if ea.skip is FALSE. */
Karsten Hopp c591fa
      if (do_profiling == PROF_YES && !ea.skip)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (getline_equal(fgetline, cookie, get_func_line))
Karsten Hopp c591fa
! 	    func_line_exec(getline_cookie(fgetline, cookie));
Karsten Hopp c591fa
! 	else if (getline_equal(fgetline, cookie, getsourceline))
Karsten Hopp c591fa
  	    script_line_exec();
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2589,2595 ****
Karsten Hopp c591fa
   * The "ea" structure holds the arguments that can be used.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      ea.cmdlinep = cmdlinep;
Karsten Hopp c591fa
!     ea.getline = getline;
Karsten Hopp c591fa
      ea.cookie = cookie;
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
      ea.cstack = cstack;
Karsten Hopp c591fa
--- 2592,2598 ----
Karsten Hopp c591fa
   * The "ea" structure holds the arguments that can be used.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      ea.cmdlinep = cmdlinep;
Karsten Hopp c591fa
!     ea.getline = fgetline;
Karsten Hopp c591fa
      ea.cookie = cookie;
Karsten Hopp c591fa
  #ifdef FEAT_EVAL
Karsten Hopp c591fa
      ea.cstack = cstack;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2627,2635 ****
Karsten Hopp c591fa
  	do_throw(cstack);
Karsten Hopp c591fa
      else if (check_cstack)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (source_finished(getline, cookie))
Karsten Hopp c591fa
  	    do_finish(&ea, TRUE);
Karsten Hopp c591fa
! 	else if (getline_equal(getline, cookie, get_func_line)
Karsten Hopp c591fa
  						   && current_func_returned())
Karsten Hopp c591fa
  	    do_return(&ea, TRUE, FALSE, NULL);
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
--- 2630,2638 ----
Karsten Hopp c591fa
  	do_throw(cstack);
Karsten Hopp c591fa
      else if (check_cstack)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (source_finished(fgetline, cookie))
Karsten Hopp c591fa
  	    do_finish(&ea, TRUE);
Karsten Hopp c591fa
! 	else if (getline_equal(fgetline, cookie, get_func_line)
Karsten Hopp c591fa
  						   && current_func_returned())
Karsten Hopp c591fa
  	    do_return(&ea, TRUE, FALSE, NULL);
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
*** ../vim-7.0.069/src/gui_beval.c	Thu May  4 23:57:11 2006
Karsten Hopp c591fa
--- src/gui_beval.c	Thu Aug 24 22:39:50 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 926,932 ****
Karsten Hopp c591fa
  #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
Karsten Hopp c591fa
  			      || (c) == DEL)
Karsten Hopp c591fa
      static void
Karsten Hopp c591fa
! set_printable_label_text(GtkLabel *label, char_u *msg)
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	    *convbuf = NULL;
Karsten Hopp c591fa
      char_u	    *buf;
Karsten Hopp c591fa
--- 926,932 ----
Karsten Hopp c591fa
  #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
Karsten Hopp c591fa
  			      || (c) == DEL)
Karsten Hopp c591fa
      static void
Karsten Hopp c591fa
! set_printable_label_text(GtkLabel *label, char_u *text)
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	    *convbuf = NULL;
Karsten Hopp c591fa
      char_u	    *buf;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 940,953 ****
Karsten Hopp c591fa
      /* Convert to UTF-8 if it isn't already */
Karsten Hopp c591fa
      if (output_conv.vc_type != CONV_NONE)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	convbuf = string_convert(&output_conv, msg, NULL);
Karsten Hopp c591fa
  	if (convbuf != NULL)
Karsten Hopp c591fa
! 	    msg = convbuf;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* First let's see how much we need to allocate */
Karsten Hopp c591fa
      len = 0;
Karsten Hopp c591fa
!     for (p = msg; *p != NUL; p += charlen)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if ((*p & 0x80) == 0)	/* be quick for ASCII */
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
--- 940,953 ----
Karsten Hopp c591fa
      /* Convert to UTF-8 if it isn't already */
Karsten Hopp c591fa
      if (output_conv.vc_type != CONV_NONE)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	convbuf = string_convert(&output_conv, text, NULL);
Karsten Hopp c591fa
  	if (convbuf != NULL)
Karsten Hopp c591fa
! 	    text = convbuf;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* First let's see how much we need to allocate */
Karsten Hopp c591fa
      len = 0;
Karsten Hopp c591fa
!     for (p = text; *p != NUL; p += charlen)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if ((*p & 0x80) == 0)	/* be quick for ASCII */
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 992,998 ****
Karsten Hopp c591fa
  				     (unsigned long)pixel, &color;;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	pdest = buf;
Karsten Hopp c591fa
! 	p = msg;
Karsten Hopp c591fa
  	while (*p != NUL)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    /* Be quick for ASCII */
Karsten Hopp c591fa
--- 992,998 ----
Karsten Hopp c591fa
  				     (unsigned long)pixel, &color;;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	pdest = buf;
Karsten Hopp c591fa
! 	p = text;
Karsten Hopp c591fa
  	while (*p != NUL)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    /* Be quick for ASCII */
Karsten Hopp c591fa
*** ../vim-7.0.069/src/gui_gtk.c	Fri May  5 23:13:49 2006
Karsten Hopp c591fa
--- src/gui_gtk.c	Thu Aug 24 22:34:30 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 957,971 ****
Karsten Hopp c591fa
  get_menu_position(vimmenu_T *menu)
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      vimmenu_T	*node;
Karsten Hopp c591fa
!     int		index = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      for (node = menu->parent->children; node != menu; node = node->next)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	g_return_val_if_fail(node != NULL, -1);
Karsten Hopp c591fa
! 	++index;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     return index;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 957,971 ----
Karsten Hopp c591fa
  get_menu_position(vimmenu_T *menu)
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      vimmenu_T	*node;
Karsten Hopp c591fa
!     int		idx = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      for (node = menu->parent->children; node != menu; node = node->next)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	g_return_val_if_fail(node != NULL, -1);
Karsten Hopp c591fa
! 	++idx;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     return idx;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2127,2133 ****
Karsten Hopp c591fa
      char    **ync;  /* "yes no cancel" */
Karsten Hopp c591fa
      char    **buttons;
Karsten Hopp c591fa
      int	    n_buttons = 0;
Karsten Hopp c591fa
!     int	    index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      button_string = vim_strsave(button_string); /* must be writable */
Karsten Hopp c591fa
      if (button_string == NULL)
Karsten Hopp c591fa
--- 2128,2134 ----
Karsten Hopp c591fa
      char    **ync;  /* "yes no cancel" */
Karsten Hopp c591fa
      char    **buttons;
Karsten Hopp c591fa
      int	    n_buttons = 0;
Karsten Hopp c591fa
!     int	    idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      button_string = vim_strsave(button_string); /* must be writable */
Karsten Hopp c591fa
      if (button_string == NULL)
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2161,2172 ****
Karsten Hopp c591fa
       * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
Karsten Hopp c591fa
       * other way around...
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
!     for (index = 1; index <= n_buttons; ++index)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	char	*label;
Karsten Hopp c591fa
  	char_u	*label8;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	label = buttons[index - 1];
Karsten Hopp c591fa
  	/*
Karsten Hopp c591fa
  	 * Perform some guesswork to find appropriate stock items for the
Karsten Hopp c591fa
  	 * buttons.  We have to compare with a sample of the translated
Karsten Hopp c591fa
--- 2162,2173 ----
Karsten Hopp c591fa
       * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
Karsten Hopp c591fa
       * other way around...
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
!     for (idx = 1; idx <= n_buttons; ++idx)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	char	*label;
Karsten Hopp c591fa
  	char_u	*label8;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	label = buttons[idx - 1];
Karsten Hopp c591fa
  	/*
Karsten Hopp c591fa
  	 * Perform some guesswork to find appropriate stock items for the
Karsten Hopp c591fa
  	 * buttons.  We have to compare with a sample of the translated
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2188,2194 ****
Karsten Hopp c591fa
  	    else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
  	label8 = CONVERT_TO_UTF8((char_u *)label);
Karsten Hopp c591fa
! 	gtk_dialog_add_button(dialog, (const gchar *)label8, index);
Karsten Hopp c591fa
  	CONVERT_TO_UTF8_FREE(label8);
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 2189,2195 ----
Karsten Hopp c591fa
  	    else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
  	label8 = CONVERT_TO_UTF8((char_u *)label);
Karsten Hopp c591fa
! 	gtk_dialog_add_button(dialog, (const gchar *)label8, idx);
Karsten Hopp c591fa
  	CONVERT_TO_UTF8_FREE(label8);
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
*** ../vim-7.0.069/src/gui_gtk_x11.c	Fri May  5 23:16:59 2006
Karsten Hopp c591fa
--- src/gui_gtk_x11.c	Thu Aug 24 22:35:59 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3233,3244 ****
Karsten Hopp c591fa
  on_select_tab(
Karsten Hopp c591fa
  	GtkNotebook	*notebook,
Karsten Hopp c591fa
  	GtkNotebookPage *page,
Karsten Hopp c591fa
! 	gint		index,
Karsten Hopp c591fa
  	gpointer	data)
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      if (!ignore_tabline_evt)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (send_tabline_event(index + 1) && gtk_main_level() > 0)
Karsten Hopp c591fa
  	    gtk_main_quit();
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 3233,3244 ----
Karsten Hopp c591fa
  on_select_tab(
Karsten Hopp c591fa
  	GtkNotebook	*notebook,
Karsten Hopp c591fa
  	GtkNotebookPage *page,
Karsten Hopp c591fa
! 	gint		idx,
Karsten Hopp c591fa
  	gpointer	data)
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      if (!ignore_tabline_evt)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (send_tabline_event(idx + 1) && gtk_main_level() > 0)
Karsten Hopp c591fa
  	    gtk_main_quit();
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 5303,5315 ****
Karsten Hopp c591fa
  # ifdef HAVE_GTK2
Karsten Hopp c591fa
      if (font != NOFONT)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	char	*name = pango_font_description_to_string(font);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	if (name != NULL)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    char_u	*s = vim_strsave((char_u *)name);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	    g_free(name);
Karsten Hopp c591fa
  	    return s;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
--- 5303,5315 ----
Karsten Hopp c591fa
  # ifdef HAVE_GTK2
Karsten Hopp c591fa
      if (font != NOFONT)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	char	*pangoname = pango_font_description_to_string(font);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	if (pangoname != NULL)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    char_u	*s = vim_strsave((char_u *)pangoname);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	    g_free(pangoname);
Karsten Hopp c591fa
  	    return s;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 6241,6264 ****
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      GdkGCValues values;
Karsten Hopp c591fa
      GdkGC *invert_gc;
Karsten Hopp c591fa
-     GdkColor foreground;
Karsten Hopp c591fa
-     GdkColor background;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (gui.drawarea->window == NULL)
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
Karsten Hopp c591fa
!     background.pixel = gui.norm_pixel ^ gui.back_pixel;
Karsten Hopp c591fa
! 
Karsten Hopp c591fa
!     values.foreground = foreground;
Karsten Hopp c591fa
!     values.background = background;
Karsten Hopp c591fa
      values.function = GDK_XOR;
Karsten Hopp c591fa
      invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
Karsten Hopp c591fa
  				       &values,
Karsten Hopp c591fa
  				       GDK_GC_FOREGROUND |
Karsten Hopp c591fa
  				       GDK_GC_BACKGROUND |
Karsten Hopp c591fa
  				       GDK_GC_FUNCTION);
Karsten Hopp c591fa
!     gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED);
Karsten Hopp c591fa
      gdk_draw_rectangle(gui.drawarea->window, invert_gc,
Karsten Hopp c591fa
  		       TRUE,
Karsten Hopp c591fa
  		       FILL_X(c), FILL_Y(r),
Karsten Hopp c591fa
--- 6241,6260 ----
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      GdkGCValues values;
Karsten Hopp c591fa
      GdkGC *invert_gc;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (gui.drawarea->window == NULL)
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
Karsten Hopp c591fa
!     values.background.pixel = gui.norm_pixel ^ gui.back_pixel;
Karsten Hopp c591fa
      values.function = GDK_XOR;
Karsten Hopp c591fa
      invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
Karsten Hopp c591fa
  				       &values,
Karsten Hopp c591fa
  				       GDK_GC_FOREGROUND |
Karsten Hopp c591fa
  				       GDK_GC_BACKGROUND |
Karsten Hopp c591fa
  				       GDK_GC_FUNCTION);
Karsten Hopp c591fa
!     gdk_gc_set_exposures(invert_gc, gui.visibility !=
Karsten Hopp c591fa
! 						   GDK_VISIBILITY_UNOBSCURED);
Karsten Hopp c591fa
      gdk_draw_rectangle(gui.drawarea->window, invert_gc,
Karsten Hopp c591fa
  		       TRUE,
Karsten Hopp c591fa
  		       FILL_X(c), FILL_Y(r),
Karsten Hopp c591fa
*** ../vim-7.0.069/src/hardcopy.c	Thu May  4 23:53:57 2006
Karsten Hopp c591fa
--- src/hardcopy.c	Thu Aug 24 22:04:32 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1794,1822 ****
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
  prt_resfile_next_line()
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int     index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Move to start of next line and then find end of line */
Karsten Hopp c591fa
!     index = prt_resfile.line_end + 1;
Karsten Hopp c591fa
!     while (index < prt_resfile.len)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (prt_resfile.buffer[index] != PSLF && prt_resfile.buffer[index]
Karsten Hopp c591fa
! 									!= PSCR)
Karsten Hopp c591fa
  	    break;
Karsten Hopp c591fa
! 	index++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
!     prt_resfile.line_start = index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     while (index < prt_resfile.len)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (prt_resfile.buffer[index] == PSLF || prt_resfile.buffer[index]
Karsten Hopp c591fa
! 									== PSCR)
Karsten Hopp c591fa
  	    break;
Karsten Hopp c591fa
! 	index++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
!     prt_resfile.line_end = index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     return (index < prt_resfile.len);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
--- 1794,1820 ----
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
  prt_resfile_next_line()
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int     idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Move to start of next line and then find end of line */
Karsten Hopp c591fa
!     idx = prt_resfile.line_end + 1;
Karsten Hopp c591fa
!     while (idx < prt_resfile.len)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (prt_resfile.buffer[idx] != PSLF && prt_resfile.buffer[idx] != PSCR)
Karsten Hopp c591fa
  	    break;
Karsten Hopp c591fa
! 	idx++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
!     prt_resfile.line_start = idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     while (idx < prt_resfile.len)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (prt_resfile.buffer[idx] == PSLF || prt_resfile.buffer[idx] == PSCR)
Karsten Hopp c591fa
  	    break;
Karsten Hopp c591fa
! 	idx++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
!     prt_resfile.line_end = idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     return (idx < prt_resfile.len);
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1837,1850 ****
Karsten Hopp c591fa
  prt_resfile_skip_nonws(offset)
Karsten Hopp c591fa
      int     offset;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int     index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     index = prt_resfile.line_start + offset;
Karsten Hopp c591fa
!     while (index < prt_resfile.line_end)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (isspace(prt_resfile.buffer[index]))
Karsten Hopp c591fa
! 	    return index - prt_resfile.line_start;
Karsten Hopp c591fa
! 	index++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      return -1;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 1835,1848 ----
Karsten Hopp c591fa
  prt_resfile_skip_nonws(offset)
Karsten Hopp c591fa
      int     offset;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int     idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     idx = prt_resfile.line_start + offset;
Karsten Hopp c591fa
!     while (idx < prt_resfile.line_end)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (isspace(prt_resfile.buffer[idx]))
Karsten Hopp c591fa
! 	    return idx - prt_resfile.line_start;
Karsten Hopp c591fa
! 	idx++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      return -1;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1853,1866 ****
Karsten Hopp c591fa
  prt_resfile_skip_ws(offset)
Karsten Hopp c591fa
      int     offset;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int     index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     index = prt_resfile.line_start + offset;
Karsten Hopp c591fa
!     while (index < prt_resfile.line_end)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (!isspace(prt_resfile.buffer[index]))
Karsten Hopp c591fa
! 	    return index - prt_resfile.line_start;
Karsten Hopp c591fa
! 	index++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      return -1;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 1851,1864 ----
Karsten Hopp c591fa
  prt_resfile_skip_ws(offset)
Karsten Hopp c591fa
      int     offset;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int     idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     idx = prt_resfile.line_start + offset;
Karsten Hopp c591fa
!     while (idx < prt_resfile.line_end)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (!isspace(prt_resfile.buffer[idx]))
Karsten Hopp c591fa
! 	    return idx - prt_resfile.line_start;
Karsten Hopp c591fa
! 	idx++;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      return -1;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2478,2484 ****
Karsten Hopp c591fa
      char_u	*p_encoding;
Karsten Hopp c591fa
      struct prt_ps_encoding_S *p_mbenc;
Karsten Hopp c591fa
      struct prt_ps_encoding_S *p_mbenc_first;
Karsten Hopp c591fa
!     struct prt_ps_charset_S  *p_mbchar;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  #if 0
Karsten Hopp c591fa
--- 2476,2482 ----
Karsten Hopp c591fa
      char_u	*p_encoding;
Karsten Hopp c591fa
      struct prt_ps_encoding_S *p_mbenc;
Karsten Hopp c591fa
      struct prt_ps_encoding_S *p_mbenc_first;
Karsten Hopp c591fa
!     struct prt_ps_charset_S  *p_mbchar = NULL;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  #if 0
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2516,2522 ****
Karsten Hopp c591fa
      if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	p_mbenc_first = NULL;
Karsten Hopp c591fa
- 	p_mbchar = NULL;
Karsten Hopp c591fa
  	for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
Karsten Hopp c591fa
  	    if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
Karsten Hopp c591fa
  								    &p_mbenc))
Karsten Hopp c591fa
--- 2514,2519 ----
Karsten Hopp c591fa
*** ../vim-7.0.069/src/if_cscope.c	Tue Apr 18 23:49:18 2006
Karsten Hopp c591fa
--- src/if_cscope.c	Sat Jul  8 22:34:46 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 989,996 ****
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      int i;
Karsten Hopp c591fa
      char *cmd;
Karsten Hopp c591fa
!     char **matches, **contexts;
Karsten Hopp c591fa
!     int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches, matched;
Karsten Hopp c591fa
  #ifdef FEAT_QUICKFIX
Karsten Hopp c591fa
      char cmdletter;
Karsten Hopp c591fa
      char *qfpos;
Karsten Hopp c591fa
--- 989,995 ----
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      int i;
Karsten Hopp c591fa
      char *cmd;
Karsten Hopp c591fa
!     int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches;
Karsten Hopp c591fa
  #ifdef FEAT_QUICKFIX
Karsten Hopp c591fa
      char cmdletter;
Karsten Hopp c591fa
      char *qfpos;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1141,1146 ****
Karsten Hopp c591fa
--- 1140,1148 ----
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
  #endif /* FEAT_QUICKFIX */
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
+ 	char **matches = NULL, **contexts = NULL;
Karsten Hopp c591fa
+ 	int matched = 0;
Karsten Hopp c591fa
+ 
Karsten Hopp c591fa
  	/* read output */
Karsten Hopp c591fa
  	cs_fill_results((char *)pat, totmatches, nummatches, &matches,
Karsten Hopp c591fa
  							 &contexts, &matched);
Karsten Hopp c591fa
*** ../vim-7.0.069/src/main.c	Tue Aug 15 21:42:17 2006
Karsten Hopp c591fa
--- src/main.c	Thu Aug 24 22:05:09 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2285,2291 ****
Karsten Hopp c591fa
      mparm_T	*parmp;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
  #ifdef FEAT_WINDOWS
Karsten Hopp c591fa
!     int		rewind;
Karsten Hopp c591fa
      int		done = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
--- 2285,2291 ----
Karsten Hopp c591fa
      mparm_T	*parmp;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
  #ifdef FEAT_WINDOWS
Karsten Hopp c591fa
!     int		dorewind;
Karsten Hopp c591fa
      int		done = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2342,2351 ****
Karsten Hopp c591fa
  	++autocmd_no_leave;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  #ifdef FEAT_WINDOWS
Karsten Hopp c591fa
! 	rewind = TRUE;
Karsten Hopp c591fa
  	while (done++ < 1000)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    if (rewind)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		if (parmp->window_layout == WIN_TABS)
Karsten Hopp c591fa
  		    goto_tabpage(1);
Karsten Hopp c591fa
--- 2342,2351 ----
Karsten Hopp c591fa
  	++autocmd_no_leave;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  #ifdef FEAT_WINDOWS
Karsten Hopp c591fa
! 	dorewind = TRUE;
Karsten Hopp c591fa
  	while (done++ < 1000)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
! 	    if (dorewind)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		if (parmp->window_layout == WIN_TABS)
Karsten Hopp c591fa
  		    goto_tabpage(1);
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2364,2370 ****
Karsten Hopp c591fa
  		    break;
Karsten Hopp c591fa
  		curwin = curwin->w_next;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
! 	    rewind = FALSE;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    curbuf = curwin->w_buffer;
Karsten Hopp c591fa
  	    if (curbuf->b_ml.ml_mfp == NULL)
Karsten Hopp c591fa
--- 2364,2370 ----
Karsten Hopp c591fa
  		    break;
Karsten Hopp c591fa
  		curwin = curwin->w_next;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
! 	    dorewind = FALSE;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    curbuf = curwin->w_buffer;
Karsten Hopp c591fa
  	    if (curbuf->b_ml.ml_mfp == NULL)
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2385,2391 ****
Karsten Hopp c591fa
  		check_swap_exists_action();
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  #ifdef FEAT_AUTOCMD
Karsten Hopp c591fa
! 		rewind = TRUE;		/* start again */
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  #ifdef FEAT_WINDOWS
Karsten Hopp c591fa
--- 2385,2391 ----
Karsten Hopp c591fa
  		check_swap_exists_action();
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  #ifdef FEAT_AUTOCMD
Karsten Hopp c591fa
! 		dorewind = TRUE;		/* start again */
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  #ifdef FEAT_WINDOWS
Karsten Hopp c591fa
*** ../vim-7.0.069/src/mbyte.c	Tue Aug 29 16:10:54 2006
Karsten Hopp c591fa
--- src/mbyte.c	Tue Aug 29 14:41:45 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3861,3873 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (preedit_string != NULL && attr_list != NULL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	int index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* Get the byte index as used by PangoAttrIterator */
Karsten Hopp c591fa
! 	for (index = 0; col > 0 && preedit_string[index] != '\0'; --col)
Karsten Hopp c591fa
! 	    index += utfc_ptr2len((char_u *)preedit_string + index);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	if (preedit_string[index] != '\0')
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    PangoAttrIterator	*iter;
Karsten Hopp c591fa
  	    int			start, end;
Karsten Hopp c591fa
--- 3861,3873 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (preedit_string != NULL && attr_list != NULL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	int idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* Get the byte index as used by PangoAttrIterator */
Karsten Hopp c591fa
! 	for (idx = 0; col > 0 && preedit_string[idx] != '\0'; --col)
Karsten Hopp c591fa
! 	    idx += utfc_ptr2len((char_u *)preedit_string + idx);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	if (preedit_string[idx] != '\0')
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    PangoAttrIterator	*iter;
Karsten Hopp c591fa
  	    int			start, end;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3880,3886 ****
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		pango_attr_iterator_range(iter, &start, &end;;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 		if (index >= start && index < end)
Karsten Hopp c591fa
  		    char_attr |= translate_pango_attributes(iter);
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  	    while (pango_attr_iterator_next(iter));
Karsten Hopp c591fa
--- 3880,3886 ----
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		pango_attr_iterator_range(iter, &start, &end;;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 		if (idx >= start && idx < end)
Karsten Hopp c591fa
  		    char_attr |= translate_pango_attributes(iter);
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  	    while (pango_attr_iterator_next(iter));
Karsten Hopp c591fa
*** ../vim-7.0.069/src/memline.c	Fri Apr 21 00:16:47 2006
Karsten Hopp c591fa
--- src/memline.c	Thu Aug 24 22:06:17 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 215,221 ****
Karsten Hopp c591fa
  #define ML_FLUSH	0x02	    /* flush locked block */
Karsten Hopp c591fa
  #define ML_SIMPLE(x)	(x & 0x10)  /* DEL, INS or FIND */
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! static void ml_upd_block0 __ARGS((buf_T *buf, int setfname));
Karsten Hopp c591fa
  static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf));
Karsten Hopp c591fa
  static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf));
Karsten Hopp c591fa
  #ifdef FEAT_MBYTE
Karsten Hopp c591fa
--- 215,221 ----
Karsten Hopp c591fa
  #define ML_FLUSH	0x02	    /* flush locked block */
Karsten Hopp c591fa
  #define ML_SIMPLE(x)	(x & 0x10)  /* DEL, INS or FIND */
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! static void ml_upd_block0 __ARGS((buf_T *buf, int set_fname));
Karsten Hopp c591fa
  static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf));
Karsten Hopp c591fa
  static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf));
Karsten Hopp c591fa
  #ifdef FEAT_MBYTE
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 679,687 ****
Karsten Hopp c591fa
   * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static void
Karsten Hopp c591fa
! ml_upd_block0(buf, setfname)
Karsten Hopp c591fa
      buf_T	*buf;
Karsten Hopp c591fa
!     int		setfname;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      memfile_T	*mfp;
Karsten Hopp c591fa
      bhdr_T	*hp;
Karsten Hopp c591fa
--- 679,687 ----
Karsten Hopp c591fa
   * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static void
Karsten Hopp c591fa
! ml_upd_block0(buf, set_fname)
Karsten Hopp c591fa
      buf_T	*buf;
Karsten Hopp c591fa
!     int		set_fname;
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      memfile_T	*mfp;
Karsten Hopp c591fa
      bhdr_T	*hp;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 695,701 ****
Karsten Hopp c591fa
  	EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (setfname)
Karsten Hopp c591fa
  	    set_b0_fname(b0p, buf);
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
  	    set_b0_dir_flag(b0p, buf);
Karsten Hopp c591fa
--- 695,701 ----
Karsten Hopp c591fa
  	EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (set_fname)
Karsten Hopp c591fa
  	    set_b0_fname(b0p, buf);
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
  	    set_b0_dir_flag(b0p, buf);
Karsten Hopp c591fa
*** ../vim-7.0.069/src/netbeans.c	Tue Aug  8 21:36:15 2006
Karsten Hopp c591fa
--- src/netbeans.c	Thu Aug 24 22:42:09 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 103,109 ****
Karsten Hopp c591fa
  static int  inputHandler = -1;		/* simply ret.value of WSAAsyncSelect() */
Karsten Hopp c591fa
  extern HWND s_hwnd;			/* Gvim's Window handle */
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
! static int cmdno;			/* current command number for reply */
Karsten Hopp c591fa
  static int haveConnection = FALSE;	/* socket is connected and
Karsten Hopp c591fa
  					   initialization is done */
Karsten Hopp c591fa
  #ifdef FEAT_GUI_MOTIF
Karsten Hopp c591fa
--- 103,109 ----
Karsten Hopp c591fa
  static int  inputHandler = -1;		/* simply ret.value of WSAAsyncSelect() */
Karsten Hopp c591fa
  extern HWND s_hwnd;			/* Gvim's Window handle */
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
! static int r_cmdno;			/* current command number for reply */
Karsten Hopp c591fa
  static int haveConnection = FALSE;	/* socket is connected and
Karsten Hopp c591fa
  					   initialization is done */
Karsten Hopp c591fa
  #ifdef FEAT_GUI_MOTIF
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 832,842 ****
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     cmdno = strtol(q, &q, 10);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      q = (char *)skipwhite((char_u *)q);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (nb_do_cmd(bufno, (char_u *)verb, isfunc, cmdno, (char_u *)q) == FAIL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  #ifdef NBDEBUG
Karsten Hopp c591fa
  	/*
Karsten Hopp c591fa
--- 832,842 ----
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     r_cmdno = strtol(q, &q, 10);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      q = (char *)skipwhite((char_u *)q);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (nb_do_cmd(bufno, (char_u *)verb, isfunc, r_cmdno, (char_u *)q) == FAIL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  #ifdef NBDEBUG
Karsten Hopp c591fa
  	/*
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1008,1018 ****
Karsten Hopp c591fa
  	if (netbeansForcedQuit)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    /* mark as unmodified so NetBeans won't put up dialog on "killed" */
Karsten Hopp c591fa
! 	    sprintf(buf, "%d:unmodified=%d\n", i, cmdno);
Karsten Hopp c591fa
  	    nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	    nb_send(buf, "netbeans_end");
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
! 	sprintf(buf, "%d:killed=%d\n", i, cmdno);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  /*	nb_send(buf, "netbeans_end");    avoid "write failed" messages */
Karsten Hopp c591fa
  	if (sd >= 0)
Karsten Hopp c591fa
--- 1008,1018 ----
Karsten Hopp c591fa
  	if (netbeansForcedQuit)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    /* mark as unmodified so NetBeans won't put up dialog on "killed" */
Karsten Hopp c591fa
! 	    sprintf(buf, "%d:unmodified=%d\n", i, r_cmdno);
Karsten Hopp c591fa
  	    nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	    nb_send(buf, "netbeans_end");
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
! 	sprintf(buf, "%d:killed=%d\n", i, r_cmdno);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  /*	nb_send(buf, "netbeans_end");    avoid "write failed" messages */
Karsten Hopp c591fa
  	if (sd >= 0)
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2563,2569 ****
Karsten Hopp c591fa
  	    if (p != NULL)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		vim_snprintf(buf, sizeof(buf),
Karsten Hopp c591fa
! 				       "0:balloonText=%d \"%s\"\n", cmdno, p);
Karsten Hopp c591fa
  		vim_free(p);
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  	    nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
--- 2563,2569 ----
Karsten Hopp c591fa
  	    if (p != NULL)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		vim_snprintf(buf, sizeof(buf),
Karsten Hopp c591fa
! 				       "0:balloonText=%d \"%s\"\n", r_cmdno, p);
Karsten Hopp c591fa
  		vim_free(p);
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  	    nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2617,2623 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (haveConnection)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	sprintf(buf, "0:disconnect=%d\n", cmdno);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send(buf, "netbeans_disconnect");
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
--- 2617,2623 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (haveConnection)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	sprintf(buf, "0:disconnect=%d\n", r_cmdno);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send(buf, "netbeans_disconnect");
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2636,2642 ****
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      sprintf(buf, "0:geometry=%d %d %d %d %d\n",
Karsten Hopp c591fa
! 		    cmdno, (int)Columns, (int)Rows, new_x, new_y);
Karsten Hopp c591fa
      /*nbdebug(("EVT: %s", buf)); happens too many times during a move */
Karsten Hopp c591fa
      nb_send(buf, "netbeans_frame_moved");
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 2636,2642 ----
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      sprintf(buf, "0:geometry=%d %d %d %d %d\n",
Karsten Hopp c591fa
! 		    r_cmdno, (int)Columns, (int)Rows, new_x, new_y);
Karsten Hopp c591fa
      /*nbdebug(("EVT: %s", buf)); happens too many times during a move */
Karsten Hopp c591fa
      nb_send(buf, "netbeans_frame_moved");
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2745,2751 ****
Karsten Hopp c591fa
      if (bufno <= 0)
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf(buffer, "%d:killed=%d\n", bufno, cmdno);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buffer));
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 2745,2751 ----
Karsten Hopp c591fa
      if (bufno <= 0)
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buffer));
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2819,2825 ****
Karsten Hopp c591fa
      if (p != NULL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	buf = alloc(128 + 2*newlen);
Karsten Hopp c591fa
! 	sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send((char *)buf, "netbeans_inserted");
Karsten Hopp c591fa
  	vim_free(p);
Karsten Hopp c591fa
--- 2819,2826 ----
Karsten Hopp c591fa
      if (p != NULL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	buf = alloc(128 + 2*newlen);
Karsten Hopp c591fa
! 	sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n",
Karsten Hopp c591fa
! 						      bufno, r_cmdno, off, p);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send((char *)buf, "netbeans_inserted");
Karsten Hopp c591fa
  	vim_free(p);
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2861,2867 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      off = pos2off(bufp, &pos;;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, cmdno, off, len);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send((char *)buf, "netbeans_removed");
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 2862,2868 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      off = pos2off(bufp, &pos;;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, r_cmdno, off, len);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send((char *)buf, "netbeans_removed");
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2886,2892 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      nbbuf->modified = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:unmodified=%d\n", bufno, cmdno);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send((char *)buf, "netbeans_unmodified");
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
--- 2887,2893 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      nbbuf->modified = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:unmodified=%d\n", bufno, r_cmdno);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send((char *)buf, "netbeans_unmodified");
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2910,2920 ****
Karsten Hopp c591fa
  	long off = pos2off(curbuf, &curwin->w_cursor);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* sync the cursor position */
Karsten Hopp c591fa
! 	sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send(buf, "netbeans_button_release[newDotAndMark]");
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, cmdno,
Karsten Hopp c591fa
  				    button, (long)curwin->w_cursor.lnum, col);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send(buf, "netbeans_button_release");
Karsten Hopp c591fa
--- 2911,2921 ----
Karsten Hopp c591fa
  	long off = pos2off(curbuf, &curwin->w_cursor);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* sync the cursor position */
Karsten Hopp c591fa
! 	sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send(buf, "netbeans_button_release[newDotAndMark]");
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, r_cmdno,
Karsten Hopp c591fa
  				    button, (long)curwin->w_cursor.lnum, col);
Karsten Hopp c591fa
  	nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
  	nb_send(buf, "netbeans_button_release");
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2975,2981 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* sync the cursor position */
Karsten Hopp c591fa
      off = pos2off(curbuf, &curwin->w_cursor);
Karsten Hopp c591fa
!     sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send(buf, "netbeans_keycommand");
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 2976,2982 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* sync the cursor position */
Karsten Hopp c591fa
      off = pos2off(curbuf, &curwin->w_cursor);
Karsten Hopp c591fa
!     sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send(buf, "netbeans_keycommand");
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2986,2998 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* now send keyCommand event */
Karsten Hopp c591fa
      vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n",
Karsten Hopp c591fa
! 						       bufno, cmdno, keyName);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send(buf, "netbeans_keycommand");
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* New: do both at once and include the lnum/col. */
Karsten Hopp c591fa
      vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n",
Karsten Hopp c591fa
! 	    bufno, cmdno, keyName,
Karsten Hopp c591fa
  		off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send(buf, "netbeans_keycommand");
Karsten Hopp c591fa
--- 2987,2999 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* now send keyCommand event */
Karsten Hopp c591fa
      vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n",
Karsten Hopp c591fa
! 						     bufno, r_cmdno, keyName);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send(buf, "netbeans_keycommand");
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* New: do both at once and include the lnum/col. */
Karsten Hopp c591fa
      vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n",
Karsten Hopp c591fa
! 	    bufno, r_cmdno, keyName,
Karsten Hopp c591fa
  		off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send(buf, "netbeans_keycommand");
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3015,3021 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      nbbuf->modified = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:save=%d\n", bufno, cmdno);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send((char *)buf, "netbeans_save_buffer");
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 3016,3022 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      nbbuf->modified = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:save=%d\n", bufno, r_cmdno);
Karsten Hopp c591fa
      nbdebug(("EVT: %s", buf));
Karsten Hopp c591fa
      nb_send((char *)buf, "netbeans_save_buffer");
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3039,3045 ****
Karsten Hopp c591fa
      if (nbbuf->insertDone)
Karsten Hopp c591fa
  	nbbuf->modified = 1;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, cmdno);
Karsten Hopp c591fa
      nbdebug(("EVT(suppressed): %s", buf));
Karsten Hopp c591fa
  /*     nb_send(buf, "netbeans_deleted_all_lines"); */
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 3040,3046 ----
Karsten Hopp c591fa
      if (nbbuf->insertDone)
Karsten Hopp c591fa
  	nbbuf->modified = 1;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, r_cmdno);
Karsten Hopp c591fa
      nbdebug(("EVT(suppressed): %s", buf));
Karsten Hopp c591fa
  /*     nb_send(buf, "netbeans_deleted_all_lines"); */
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
*** ../vim-7.0.069/src/normal.c	Wed Aug 16 21:42:34 2006
Karsten Hopp c591fa
--- src/normal.c	Thu Aug 24 22:17:37 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 4127,4133 ****
Karsten Hopp c591fa
      int		save_p_ws;
Karsten Hopp c591fa
      int		save_p_scs;
Karsten Hopp c591fa
      int		retval = OK;
Karsten Hopp c591fa
!     int		incl;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if ((pat = alloc(len + 7)) == NULL)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
--- 4127,4133 ----
Karsten Hopp c591fa
      int		save_p_ws;
Karsten Hopp c591fa
      int		save_p_scs;
Karsten Hopp c591fa
      int		retval = OK;
Karsten Hopp c591fa
!     int		incll;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if ((pat = alloc(len + 7)) == NULL)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 4147,4153 ****
Karsten Hopp c591fa
       * With "gd" Search back for the start of the current function, then go
Karsten Hopp c591fa
       * back until a blank line.  If this fails go to line 1.
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
!     if (!locally || !findpar(&incl, BACKWARD, 1L, '{', FALSE))
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	setpcmark();			/* Set in findpar() otherwise */
Karsten Hopp c591fa
  	curwin->w_cursor.lnum = 1;
Karsten Hopp c591fa
--- 4147,4153 ----
Karsten Hopp c591fa
       * With "gd" Search back for the start of the current function, then go
Karsten Hopp c591fa
       * back until a blank line.  If this fails go to line 1.
Karsten Hopp c591fa
       */
Karsten Hopp c591fa
!     if (!locally || !findpar(&incll, BACKWARD, 1L, '{', FALSE))
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	setpcmark();			/* Set in findpar() otherwise */
Karsten Hopp c591fa
  	curwin->w_cursor.lnum = 1;
Karsten Hopp c591fa
*** ../vim-7.0.069/src/option.c	Tue Aug  8 16:30:51 2006
Karsten Hopp c591fa
--- src/option.c	Wed Aug 16 21:54:45 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 5268,5312 ****
Karsten Hopp c591fa
      char_u	*s;
Karsten Hopp c591fa
      char_u	**varp;
Karsten Hopp c591fa
      int		both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (opt_idx == -1)		/* use name */
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	opt_idx = findoption(name);
Karsten Hopp c591fa
! 	if (opt_idx < 0)	/* not found (should not happen) */
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    EMSG2(_(e_intern2), "set_string_option_direct()");
Karsten Hopp c591fa
  	    return;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (options[opt_idx].var == NULL)	/* can't set hidden option */
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      s = vim_strsave(val);
Karsten Hopp c591fa
      if (s != NULL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	varp = (char_u **)get_varp_scope(&(options[opt_idx]),
Karsten Hopp c591fa
  					       both ? OPT_LOCAL : opt_flags);
Karsten Hopp c591fa
! 	if ((opt_flags & OPT_FREE) && (options[opt_idx].flags & P_ALLOCED))
Karsten Hopp c591fa
  	    free_string_option(*varp);
Karsten Hopp c591fa
  	*varp = s;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* For buffer/window local option may also set the global value. */
Karsten Hopp c591fa
  	if (both)
Karsten Hopp c591fa
! 	    set_string_option_global(opt_idx, varp);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	options[opt_idx].flags |= P_ALLOCED;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* When setting both values of a global option with a local value,
Karsten Hopp c591fa
  	 * make the local value empty, so that the global value is used. */
Karsten Hopp c591fa
! 	if (((int)options[opt_idx].indir & PV_BOTH) && both)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    free_string_option(*varp);
Karsten Hopp c591fa
  	    *varp = empty_option;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
  # ifdef FEAT_EVAL
Karsten Hopp c591fa
  	if (set_sid != SID_NONE)
Karsten Hopp c591fa
! 	    set_option_scriptID_idx(opt_idx, opt_flags,
Karsten Hopp c591fa
  					set_sid == 0 ? current_SID : set_sid);
Karsten Hopp c591fa
  # endif
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
--- 5268,5313 ----
Karsten Hopp c591fa
      char_u	*s;
Karsten Hopp c591fa
      char_u	**varp;
Karsten Hopp c591fa
      int		both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
Karsten Hopp c591fa
+     int		idx = opt_idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (idx == -1)		/* use name */
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	idx = findoption(name);
Karsten Hopp c591fa
! 	if (idx < 0)	/* not found (should not happen) */
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    EMSG2(_(e_intern2), "set_string_option_direct()");
Karsten Hopp c591fa
  	    return;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (options[idx].var == NULL)	/* can't set hidden option */
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      s = vim_strsave(val);
Karsten Hopp c591fa
      if (s != NULL)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	varp = (char_u **)get_varp_scope(&(options[idx]),
Karsten Hopp c591fa
  					       both ? OPT_LOCAL : opt_flags);
Karsten Hopp c591fa
! 	if ((opt_flags & OPT_FREE) && (options[idx].flags & P_ALLOCED))
Karsten Hopp c591fa
  	    free_string_option(*varp);
Karsten Hopp c591fa
  	*varp = s;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* For buffer/window local option may also set the global value. */
Karsten Hopp c591fa
  	if (both)
Karsten Hopp c591fa
! 	    set_string_option_global(idx, varp);
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	options[idx].flags |= P_ALLOCED;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	/* When setting both values of a global option with a local value,
Karsten Hopp c591fa
  	 * make the local value empty, so that the global value is used. */
Karsten Hopp c591fa
! 	if (((int)options[idx].indir & PV_BOTH) && both)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    free_string_option(*varp);
Karsten Hopp c591fa
  	    *varp = empty_option;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
  # ifdef FEAT_EVAL
Karsten Hopp c591fa
  	if (set_sid != SID_NONE)
Karsten Hopp c591fa
! 	    set_option_scriptID_idx(idx, opt_flags,
Karsten Hopp c591fa
  					set_sid == 0 ? current_SID : set_sid);
Karsten Hopp c591fa
  # endif
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
*** ../vim-7.0.069/src/os_unix.c	Thu Jun 22 19:47:11 2006
Karsten Hopp c591fa
--- src/os_unix.c	Thu Aug 24 22:21:56 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3934,3940 ****
Karsten Hopp c591fa
  		    {
Karsten Hopp c591fa
  			linenr_T    lnum = curbuf->b_op_start.lnum;
Karsten Hopp c591fa
  			int	    written = 0;
Karsten Hopp c591fa
! 			char_u	    *p = ml_get(lnum);
Karsten Hopp c591fa
  			char_u	    *s;
Karsten Hopp c591fa
  			size_t	    l;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 3934,3940 ----
Karsten Hopp c591fa
  		    {
Karsten Hopp c591fa
  			linenr_T    lnum = curbuf->b_op_start.lnum;
Karsten Hopp c591fa
  			int	    written = 0;
Karsten Hopp c591fa
! 			char_u	    *lp = ml_get(lnum);
Karsten Hopp c591fa
  			char_u	    *s;
Karsten Hopp c591fa
  			size_t	    l;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3942,3958 ****
Karsten Hopp c591fa
  			close(fromshell_fd);
Karsten Hopp c591fa
  			for (;;)
Karsten Hopp c591fa
  			{
Karsten Hopp c591fa
! 			    l = STRLEN(p + written);
Karsten Hopp c591fa
  			    if (l == 0)
Karsten Hopp c591fa
  				len = 0;
Karsten Hopp c591fa
! 			    else if (p[written] == NL)
Karsten Hopp c591fa
  				/* NL -> NUL translation */
Karsten Hopp c591fa
  				len = write(toshell_fd, "", (size_t)1);
Karsten Hopp c591fa
  			    else
Karsten Hopp c591fa
  			    {
Karsten Hopp c591fa
! 				s = vim_strchr(p + written, NL);
Karsten Hopp c591fa
! 				len = write(toshell_fd, (char *)p + written,
Karsten Hopp c591fa
! 					   s == NULL ? l : s - (p + written));
Karsten Hopp c591fa
  			    }
Karsten Hopp c591fa
  			    if (len == l)
Karsten Hopp c591fa
  			    {
Karsten Hopp c591fa
--- 3942,3958 ----
Karsten Hopp c591fa
  			close(fromshell_fd);
Karsten Hopp c591fa
  			for (;;)
Karsten Hopp c591fa
  			{
Karsten Hopp c591fa
! 			    l = STRLEN(lp + written);
Karsten Hopp c591fa
  			    if (l == 0)
Karsten Hopp c591fa
  				len = 0;
Karsten Hopp c591fa
! 			    else if (lp[written] == NL)
Karsten Hopp c591fa
  				/* NL -> NUL translation */
Karsten Hopp c591fa
  				len = write(toshell_fd, "", (size_t)1);
Karsten Hopp c591fa
  			    else
Karsten Hopp c591fa
  			    {
Karsten Hopp c591fa
! 				s = vim_strchr(lp + written, NL);
Karsten Hopp c591fa
! 				len = write(toshell_fd, (char *)lp + written,
Karsten Hopp c591fa
! 					   s == NULL ? l : s - (lp + written));
Karsten Hopp c591fa
  			    }
Karsten Hopp c591fa
  			    if (len == l)
Karsten Hopp c591fa
  			    {
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3973,3979 ****
Karsten Hopp c591fa
  				    toshell_fd = -1;
Karsten Hopp c591fa
  				    break;
Karsten Hopp c591fa
  				}
Karsten Hopp c591fa
! 				p = ml_get(lnum);
Karsten Hopp c591fa
  				written = 0;
Karsten Hopp c591fa
  			    }
Karsten Hopp c591fa
  			    else if (len > 0)
Karsten Hopp c591fa
--- 3973,3979 ----
Karsten Hopp c591fa
  				    toshell_fd = -1;
Karsten Hopp c591fa
  				    break;
Karsten Hopp c591fa
  				}
Karsten Hopp c591fa
! 				lp = ml_get(lnum);
Karsten Hopp c591fa
  				written = 0;
Karsten Hopp c591fa
  			    }
Karsten Hopp c591fa
  			    else if (len > 0)
Karsten Hopp c591fa
*** ../vim-7.0.069/src/quickfix.c	Wed Aug 16 19:34:59 2006
Karsten Hopp c591fa
--- src/quickfix.c	Thu Aug 24 22:23:31 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 500,507 ****
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    if (tv != NULL)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
- 		int len;
Karsten Hopp c591fa
- 
Karsten Hopp c591fa
  		if (tv->v_type == VAR_STRING)
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    /* Get the next line from the supplied string */
Karsten Hopp c591fa
--- 500,505 ----
Karsten Hopp c591fa
*** ../vim-7.0.069/src/regexp.c	Sun Apr 30 20:38:22 2006
Karsten Hopp c591fa
--- src/regexp.c	Thu Aug 24 22:25:15 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3912,3918 ****
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    colnr_T	    start, end;
Karsten Hopp c591fa
  		    colnr_T	    start2, end2;
Karsten Hopp c591fa
! 		    colnr_T	    col;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		    getvvcol(wp, &top, &start, NULL, &end;;
Karsten Hopp c591fa
  		    getvvcol(wp, &bot, &start2, NULL, &end2);
Karsten Hopp c591fa
--- 3919,3925 ----
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    colnr_T	    start, end;
Karsten Hopp c591fa
  		    colnr_T	    start2, end2;
Karsten Hopp c591fa
! 		    colnr_T	    cols;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		    getvvcol(wp, &top, &start, NULL, &end;;
Karsten Hopp c591fa
  		    getvvcol(wp, &bot, &start2, NULL, &end2);
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 3922,3930 ****
Karsten Hopp c591fa
  			end = end2;
Karsten Hopp c591fa
  		    if (top.col == MAXCOL || bot.col == MAXCOL)
Karsten Hopp c591fa
  			end = MAXCOL;
Karsten Hopp c591fa
! 		    col = win_linetabsize(wp,
Karsten Hopp c591fa
  				      regline, (colnr_T)(reginput - regline));
Karsten Hopp c591fa
! 		    if (col < start || col > end - (*p_sel == 'e'))
Karsten Hopp c591fa
  			status = RA_NOMATCH;
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
--- 3929,3937 ----
Karsten Hopp c591fa
  			end = end2;
Karsten Hopp c591fa
  		    if (top.col == MAXCOL || bot.col == MAXCOL)
Karsten Hopp c591fa
  			end = MAXCOL;
Karsten Hopp c591fa
! 		    cols = win_linetabsize(wp,
Karsten Hopp c591fa
  				      regline, (colnr_T)(reginput - regline));
Karsten Hopp c591fa
! 		    if (cols < start || cols > end - (*p_sel == 'e'))
Karsten Hopp c591fa
  			status = RA_NOMATCH;
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 4253,4259 ****
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		int	i, len;
Karsten Hopp c591fa
  		char_u	*opnd;
Karsten Hopp c591fa
! 		int	opndc, inpc;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		opnd = OPERAND(scan);
Karsten Hopp c591fa
  		/* Safety check (just in case 'encoding' was changed since
Karsten Hopp c591fa
--- 4260,4266 ----
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
  		int	i, len;
Karsten Hopp c591fa
  		char_u	*opnd;
Karsten Hopp c591fa
! 		int	opndc = 0, inpc;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		opnd = OPERAND(scan);
Karsten Hopp c591fa
  		/* Safety check (just in case 'encoding' was changed since
Karsten Hopp c591fa
*** ../vim-7.0.069/src/screen.c	Tue Jul 11 22:59:04 2006
Karsten Hopp c591fa
--- src/screen.c	Thu Aug 24 22:26:16 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7099,7105 ****
Karsten Hopp c591fa
      tabpage_T	    *tp;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
      static int	    entered = FALSE;		/* avoid recursiveness */
Karsten Hopp c591fa
!     static int	    did_outofmem_msg = FALSE;	/* did outofmem message */
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * Allocation of the screen buffers is done only when the size changes and
Karsten Hopp c591fa
--- 7099,7105 ----
Karsten Hopp c591fa
      tabpage_T	    *tp;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
      static int	    entered = FALSE;		/* avoid recursiveness */
Karsten Hopp c591fa
!     static int	    done_outofmem_msg = FALSE;	/* did outofmem message */
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * Allocation of the screen buffers is done only when the size changes and
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7207,7220 ****
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    || outofmem)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (ScreenLines != NULL || !did_outofmem_msg)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    /* guess the size */
Karsten Hopp c591fa
  	    do_outofmem_msg((long_u)((Rows + 1) * Columns));
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    /* Remember we did this to avoid getting outofmem messages over
Karsten Hopp c591fa
  	     * and over again. */
Karsten Hopp c591fa
! 	    did_outofmem_msg = TRUE;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
  	vim_free(new_ScreenLines);
Karsten Hopp c591fa
  	new_ScreenLines = NULL;
Karsten Hopp c591fa
--- 7207,7220 ----
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
  	    || outofmem)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	if (ScreenLines != NULL || !done_outofmem_msg)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    /* guess the size */
Karsten Hopp c591fa
  	    do_outofmem_msg((long_u)((Rows + 1) * Columns));
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	    /* Remember we did this to avoid getting outofmem messages over
Karsten Hopp c591fa
  	     * and over again. */
Karsten Hopp c591fa
! 	    done_outofmem_msg = TRUE;
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
  	vim_free(new_ScreenLines);
Karsten Hopp c591fa
  	new_ScreenLines = NULL;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7242,7248 ****
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	did_outofmem_msg = FALSE;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	for (new_row = 0; new_row < Rows; ++new_row)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
--- 7242,7248 ----
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
! 	done_outofmem_msg = FALSE;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  	for (new_row = 0; new_row < Rows; ++new_row)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
*** ../vim-7.0.069/src/search.c	Tue Aug 29 16:33:23 2006
Karsten Hopp c591fa
--- src/search.c	Tue Aug 29 14:56:15 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 4826,4840 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		if ((compl_cont_status & CONT_ADDING) && i == compl_length)
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
- 		    /* get the next line */
Karsten Hopp c591fa
  		    /* IOSIZE > compl_length, so the STRNCPY works */
Karsten Hopp c591fa
  		    STRNCPY(IObuff, aux, i);
Karsten Hopp c591fa
! 		    if (!(     depth < 0
Karsten Hopp c591fa
! 			    && lnum < end_lnum
Karsten Hopp c591fa
! 			    && (line = ml_get(++lnum)) != NULL)
Karsten Hopp c591fa
! 			&& !(	depth >= 0
Karsten Hopp c591fa
! 			    && !vim_fgets(line = file_line,
Karsten Hopp c591fa
! 						     LSIZE, files[depth].fp)))
Karsten Hopp c591fa
  			goto exit_matched;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		    /* we read a line, set "already" to check this "line" later
Karsten Hopp c591fa
--- 4826,4845 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		if ((compl_cont_status & CONT_ADDING) && i == compl_length)
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    /* IOSIZE > compl_length, so the STRNCPY works */
Karsten Hopp c591fa
  		    STRNCPY(IObuff, aux, i);
Karsten Hopp c591fa
! 
Karsten Hopp c591fa
! 		    /* Get the next line: when "depth" < 0  from the current
Karsten Hopp c591fa
! 		     * buffer, otherwise from the included file.  Jump to
Karsten Hopp c591fa
! 		     * exit_matched when past the last line. */
Karsten Hopp c591fa
! 		    if (depth < 0)
Karsten Hopp c591fa
! 		    {
Karsten Hopp c591fa
! 			if (lnum >= end_lnum)
Karsten Hopp c591fa
! 			    goto exit_matched;
Karsten Hopp c591fa
! 			line = ml_get(++lnum);
Karsten Hopp c591fa
! 		    }
Karsten Hopp c591fa
! 		    else if (vim_fgets(line = file_line,
Karsten Hopp c591fa
! 						      LSIZE, files[depth].fp))
Karsten Hopp c591fa
  			goto exit_matched;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		    /* we read a line, set "already" to check this "line" later
Karsten Hopp c591fa
*** ../vim-7.0.069/src/spell.c	Tue Aug 29 16:33:23 2006
Karsten Hopp c591fa
--- src/spell.c	Tue Aug 29 14:56:26 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2043,2050 ****
Karsten Hopp c591fa
      int		len;
Karsten Hopp c591fa
  # ifdef FEAT_SYN_HL
Karsten Hopp c591fa
      int		has_syntax = syntax_present(wp->w_buffer);
Karsten Hopp c591fa
-     int		col;
Karsten Hopp c591fa
  # endif
Karsten Hopp c591fa
      int		can_spell;
Karsten Hopp c591fa
      char_u	*buf = NULL;
Karsten Hopp c591fa
      int		buflen = 0;
Karsten Hopp c591fa
--- 2043,2050 ----
Karsten Hopp c591fa
      int		len;
Karsten Hopp c591fa
  # ifdef FEAT_SYN_HL
Karsten Hopp c591fa
      int		has_syntax = syntax_present(wp->w_buffer);
Karsten Hopp c591fa
  # endif
Karsten Hopp c591fa
+     int		col;
Karsten Hopp c591fa
      int		can_spell;
Karsten Hopp c591fa
      char_u	*buf = NULL;
Karsten Hopp c591fa
      int		buflen = 0;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 2093,2101 ****
Karsten Hopp c591fa
  	    capcol = (int)(skipwhite(line) - line);
Karsten Hopp c591fa
  	else if (curline && wp == curwin)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
- 	    int	    col = (int)(skipwhite(line) - line);
Karsten Hopp c591fa
- 
Karsten Hopp c591fa
  	    /* For spellbadword(): check if first word needs a capital. */
Karsten Hopp c591fa
  	    if (check_need_cap(lnum, col))
Karsten Hopp c591fa
  		capcol = col;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 2093,2100 ----
Karsten Hopp c591fa
  	    capcol = (int)(skipwhite(line) - line);
Karsten Hopp c591fa
  	else if (curline && wp == curwin)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    /* For spellbadword(): check if first word needs a capital. */
Karsten Hopp c591fa
+ 	    col = (int)(skipwhite(line) - line);
Karsten Hopp c591fa
  	    if (check_need_cap(lnum, col))
Karsten Hopp c591fa
  		capcol = col;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 5061,5067 ****
Karsten Hopp c591fa
      int		do_rep;
Karsten Hopp c591fa
      int		do_repsal;
Karsten Hopp c591fa
      int		do_sal;
Karsten Hopp c591fa
!     int		do_map;
Karsten Hopp c591fa
      int		found_map = FALSE;
Karsten Hopp c591fa
      hashitem_T	*hi;
Karsten Hopp c591fa
      int		l;
Karsten Hopp c591fa
--- 5060,5066 ----
Karsten Hopp c591fa
      int		do_rep;
Karsten Hopp c591fa
      int		do_repsal;
Karsten Hopp c591fa
      int		do_sal;
Karsten Hopp c591fa
!     int		do_mapline;
Karsten Hopp c591fa
      int		found_map = FALSE;
Karsten Hopp c591fa
      hashitem_T	*hi;
Karsten Hopp c591fa
      int		l;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 5099,5105 ****
Karsten Hopp c591fa
      do_sal = spin->si_sal.ga_len == 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Only do MAP lines when not done in another .aff file already. */
Karsten Hopp c591fa
!     do_map = spin->si_map.ga_len == 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * Allocate and init the afffile_T structure.
Karsten Hopp c591fa
--- 5098,5104 ----
Karsten Hopp c591fa
      do_sal = spin->si_sal.ga_len == 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Only do MAP lines when not done in another .aff file already. */
Karsten Hopp c591fa
!     do_mapline = spin->si_map.ga_len == 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /*
Karsten Hopp c591fa
       * Allocate and init the afffile_T structure.
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 5781,5787 ****
Karsten Hopp c591fa
  			smsg((char_u *)_("Expected MAP count in %s line %d"),
Karsten Hopp c591fa
  								 fname, lnum);
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
! 		else if (do_map)
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    int		c;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 5780,5786 ----
Karsten Hopp c591fa
  			smsg((char_u *)_("Expected MAP count in %s line %d"),
Karsten Hopp c591fa
  								 fname, lnum);
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
! 		else if (do_mapline)
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    int		c;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7508,7514 ****
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	*p = p_msm;
Karsten Hopp c591fa
      long	start = 0;
Karsten Hopp c591fa
!     long	inc = 0;
Karsten Hopp c591fa
      long	added = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (!VIM_ISDIGIT(*p))
Karsten Hopp c591fa
--- 7507,7513 ----
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
      char_u	*p = p_msm;
Karsten Hopp c591fa
      long	start = 0;
Karsten Hopp c591fa
!     long	incr = 0;
Karsten Hopp c591fa
      long	added = 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (!VIM_ISDIGIT(*p))
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7520,7526 ****
Karsten Hopp c591fa
      ++p;
Karsten Hopp c591fa
      if (!VIM_ISDIGIT(*p))
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
!     inc = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
Karsten Hopp c591fa
      if (*p != ',')
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
      ++p;
Karsten Hopp c591fa
--- 7519,7525 ----
Karsten Hopp c591fa
      ++p;
Karsten Hopp c591fa
      if (!VIM_ISDIGIT(*p))
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
!     incr = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
Karsten Hopp c591fa
      if (*p != ',')
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
      ++p;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 7530,7540 ****
Karsten Hopp c591fa
      if (*p != NUL)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (start == 0 || inc == 0 || added == 0 || inc > start)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      compress_start = start;
Karsten Hopp c591fa
!     compress_inc = inc;
Karsten Hopp c591fa
      compress_added = added;
Karsten Hopp c591fa
      return OK;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
--- 7529,7539 ----
Karsten Hopp c591fa
      if (*p != NUL)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (start == 0 || incr == 0 || added == 0 || incr > start)
Karsten Hopp c591fa
  	return FAIL;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      compress_start = start;
Karsten Hopp c591fa
!     compress_inc = incr;
Karsten Hopp c591fa
      compress_added = added;
Karsten Hopp c591fa
      return OK;
Karsten Hopp c591fa
  }
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 8292,8305 ****
Karsten Hopp c591fa
   * Returns the number of nodes used.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
! put_node(fd, node, index, regionmask, prefixtree)
Karsten Hopp c591fa
      FILE	*fd;		/* NULL when only counting */
Karsten Hopp c591fa
      wordnode_T	*node;
Karsten Hopp c591fa
!     int		index;
Karsten Hopp c591fa
      int		regionmask;
Karsten Hopp c591fa
      int		prefixtree;	/* TRUE for PREFIXTREE */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int		newindex = index;
Karsten Hopp c591fa
      int		siblingcount = 0;
Karsten Hopp c591fa
      wordnode_T	*np;
Karsten Hopp c591fa
      int		flags;
Karsten Hopp c591fa
--- 8291,8304 ----
Karsten Hopp c591fa
   * Returns the number of nodes used.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      static int
Karsten Hopp c591fa
! put_node(fd, node, idx, regionmask, prefixtree)
Karsten Hopp c591fa
      FILE	*fd;		/* NULL when only counting */
Karsten Hopp c591fa
      wordnode_T	*node;
Karsten Hopp c591fa
!     int		idx;
Karsten Hopp c591fa
      int		regionmask;
Karsten Hopp c591fa
      int		prefixtree;	/* TRUE for PREFIXTREE */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     int		newindex = idx;
Karsten Hopp c591fa
      int		siblingcount = 0;
Karsten Hopp c591fa
      wordnode_T	*np;
Karsten Hopp c591fa
      int		flags;
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 8309,8315 ****
Karsten Hopp c591fa
  	return 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Store the index where this node is written. */
Karsten Hopp c591fa
!     node->wn_u1.index = index;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Count the number of siblings. */
Karsten Hopp c591fa
      for (np = node; np != NULL; np = np->wn_sibling)
Karsten Hopp c591fa
--- 8308,8314 ----
Karsten Hopp c591fa
  	return 0;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Store the index where this node is written. */
Karsten Hopp c591fa
!     node->wn_u1.index = idx;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      /* Count the number of siblings. */
Karsten Hopp c591fa
      for (np = node; np != NULL; np = np->wn_sibling)
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 9244,9254 ****
Karsten Hopp c591fa
   * Add "word[len]" to 'spellfile' as a good or bad word.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      void
Karsten Hopp c591fa
! spell_add_word(word, len, bad, index, undo)
Karsten Hopp c591fa
      char_u	*word;
Karsten Hopp c591fa
      int		len;
Karsten Hopp c591fa
      int		bad;
Karsten Hopp c591fa
!     int		index;	    /* "zG" and "zW": zero, otherwise index in
Karsten Hopp c591fa
  			       'spellfile' */
Karsten Hopp c591fa
      int		undo;	    /* TRUE for "zug", "zuG", "zuw" and "zuW" */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
--- 9243,9253 ----
Karsten Hopp c591fa
   * Add "word[len]" to 'spellfile' as a good or bad word.
Karsten Hopp c591fa
   */
Karsten Hopp c591fa
      void
Karsten Hopp c591fa
! spell_add_word(word, len, bad, idx, undo)
Karsten Hopp c591fa
      char_u	*word;
Karsten Hopp c591fa
      int		len;
Karsten Hopp c591fa
      int		bad;
Karsten Hopp c591fa
!     int		idx;	    /* "zG" and "zW": zero, otherwise index in
Karsten Hopp c591fa
  			       'spellfile' */
Karsten Hopp c591fa
      int		undo;	    /* TRUE for "zug", "zuG", "zuw" and "zuW" */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 9262,9268 ****
Karsten Hopp c591fa
      int		i;
Karsten Hopp c591fa
      char_u	*spf;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (index == 0)	    /* use internal wordlist */
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if (int_wordlist == NULL)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
--- 9261,9267 ----
Karsten Hopp c591fa
      int		i;
Karsten Hopp c591fa
      char_u	*spf;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (idx == 0)	    /* use internal wordlist */
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	if (int_wordlist == NULL)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 9290,9300 ****
Karsten Hopp c591fa
  	for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
Karsten Hopp c591fa
! 	    if (i == index)
Karsten Hopp c591fa
  		break;
Karsten Hopp c591fa
  	    if (*spf == NUL)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
! 		EMSGN(_("E765: 'spellfile' does not have %ld entries"), index);
Karsten Hopp c591fa
  		return;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
--- 9289,9299 ----
Karsten Hopp c591fa
  	for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
Karsten Hopp c591fa
  	{
Karsten Hopp c591fa
  	    copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
Karsten Hopp c591fa
! 	    if (i == idx)
Karsten Hopp c591fa
  		break;
Karsten Hopp c591fa
  	    if (*spf == NUL)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
! 		EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx);
Karsten Hopp c591fa
  		return;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
  	}
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 13581,13633 ****
Karsten Hopp c591fa
  	 * the first "the" to itself. */
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     /* Check if the word is already there.  Also check the length that is
Karsten Hopp c591fa
!      * being replaced "thes," -> "these" is a different suggestion from
Karsten Hopp c591fa
!      * "thes" -> "these". */
Karsten Hopp c591fa
!     stp = &SUG(*gap, 0);
Karsten Hopp c591fa
!     for (i = gap->ga_len; --i >= 0; ++stp)
Karsten Hopp c591fa
! 	if (stp->st_wordlen == goodlen
Karsten Hopp c591fa
! 		&& stp->st_orglen == badlen
Karsten Hopp c591fa
! 		&& STRNCMP(stp->st_word, goodword, goodlen) == 0)
Karsten Hopp c591fa
! 	{
Karsten Hopp c591fa
! 	    /*
Karsten Hopp c591fa
! 	     * Found it.  Remember the word with the lowest score.
Karsten Hopp c591fa
! 	     */
Karsten Hopp c591fa
! 	    if (stp->st_slang == NULL)
Karsten Hopp c591fa
! 		stp->st_slang = slang;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	    new_sug.st_score = score;
Karsten Hopp c591fa
! 	    new_sug.st_altscore = altscore;
Karsten Hopp c591fa
! 	    new_sug.st_had_bonus = had_bonus;
Karsten Hopp c591fa
! 
Karsten Hopp c591fa
! 	    if (stp->st_had_bonus != had_bonus)
Karsten Hopp c591fa
! 	    {
Karsten Hopp c591fa
! 		/* Only one of the two had the soundalike score computed.
Karsten Hopp c591fa
! 		 * Need to do that for the other one now, otherwise the
Karsten Hopp c591fa
! 		 * scores can't be compared.  This happens because
Karsten Hopp c591fa
! 		 * suggest_try_change() doesn't compute the soundalike
Karsten Hopp c591fa
! 		 * word to keep it fast, while some special methods set
Karsten Hopp c591fa
! 		 * the soundalike score to zero. */
Karsten Hopp c591fa
! 		if (had_bonus)
Karsten Hopp c591fa
! 		    rescore_one(su, stp);
Karsten Hopp c591fa
! 		else
Karsten Hopp c591fa
! 		{
Karsten Hopp c591fa
! 		    new_sug.st_word = stp->st_word;
Karsten Hopp c591fa
! 		    new_sug.st_wordlen = stp->st_wordlen;
Karsten Hopp c591fa
! 		    new_sug.st_slang = stp->st_slang;
Karsten Hopp c591fa
! 		    new_sug.st_orglen = badlen;
Karsten Hopp c591fa
! 		    rescore_one(su, &new_sug);
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
- 	    }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 	    if (stp->st_score > new_sug.st_score)
Karsten Hopp c591fa
! 	    {
Karsten Hopp c591fa
! 		stp->st_score = new_sug.st_score;
Karsten Hopp c591fa
! 		stp->st_altscore = new_sug.st_altscore;
Karsten Hopp c591fa
! 		stp->st_had_bonus = new_sug.st_had_bonus;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
! 	    break;
Karsten Hopp c591fa
! 	}
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (i < 0 && ga_grow(gap, 1) == OK)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
--- 13580,13637 ----
Karsten Hopp c591fa
  	 * the first "the" to itself. */
Karsten Hopp c591fa
  	return;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
!     if (gap->ga_len == 0)
Karsten Hopp c591fa
! 	i = -1;
Karsten Hopp c591fa
!     else
Karsten Hopp c591fa
!     {
Karsten Hopp c591fa
! 	/* Check if the word is already there.  Also check the length that is
Karsten Hopp c591fa
! 	 * being replaced "thes," -> "these" is a different suggestion from
Karsten Hopp c591fa
! 	 * "thes" -> "these". */
Karsten Hopp c591fa
! 	stp = &SUG(*gap, 0);
Karsten Hopp c591fa
! 	for (i = gap->ga_len; --i >= 0; ++stp)
Karsten Hopp c591fa
! 	    if (stp->st_wordlen == goodlen
Karsten Hopp c591fa
! 		    && stp->st_orglen == badlen
Karsten Hopp c591fa
! 		    && STRNCMP(stp->st_word, goodword, goodlen) == 0)
Karsten Hopp c591fa
! 	    {
Karsten Hopp c591fa
! 		/*
Karsten Hopp c591fa
! 		 * Found it.  Remember the word with the lowest score.
Karsten Hopp c591fa
! 		 */
Karsten Hopp c591fa
! 		if (stp->st_slang == NULL)
Karsten Hopp c591fa
! 		    stp->st_slang = slang;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 		new_sug.st_score = score;
Karsten Hopp c591fa
! 		new_sug.st_altscore = altscore;
Karsten Hopp c591fa
! 		new_sug.st_had_bonus = had_bonus;
Karsten Hopp c591fa
! 
Karsten Hopp c591fa
! 		if (stp->st_had_bonus != had_bonus)
Karsten Hopp c591fa
! 		{
Karsten Hopp c591fa
! 		    /* Only one of the two had the soundalike score computed.
Karsten Hopp c591fa
! 		     * Need to do that for the other one now, otherwise the
Karsten Hopp c591fa
! 		     * scores can't be compared.  This happens because
Karsten Hopp c591fa
! 		     * suggest_try_change() doesn't compute the soundalike
Karsten Hopp c591fa
! 		     * word to keep it fast, while some special methods set
Karsten Hopp c591fa
! 		     * the soundalike score to zero. */
Karsten Hopp c591fa
! 		    if (had_bonus)
Karsten Hopp c591fa
! 			rescore_one(su, stp);
Karsten Hopp c591fa
! 		    else
Karsten Hopp c591fa
! 		    {
Karsten Hopp c591fa
! 			new_sug.st_word = stp->st_word;
Karsten Hopp c591fa
! 			new_sug.st_wordlen = stp->st_wordlen;
Karsten Hopp c591fa
! 			new_sug.st_slang = stp->st_slang;
Karsten Hopp c591fa
! 			new_sug.st_orglen = badlen;
Karsten Hopp c591fa
! 			rescore_one(su, &new_sug);
Karsten Hopp c591fa
! 		    }
Karsten Hopp c591fa
  		}
Karsten Hopp c591fa
  
Karsten Hopp c591fa
! 		if (stp->st_score > new_sug.st_score)
Karsten Hopp c591fa
! 		{
Karsten Hopp c591fa
! 		    stp->st_score = new_sug.st_score;
Karsten Hopp c591fa
! 		    stp->st_altscore = new_sug.st_altscore;
Karsten Hopp c591fa
! 		    stp->st_had_bonus = new_sug.st_had_bonus;
Karsten Hopp c591fa
! 		}
Karsten Hopp c591fa
! 		break;
Karsten Hopp c591fa
  	    }
Karsten Hopp c591fa
!     }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (i < 0 && ga_grow(gap, 1) == OK)
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
*** ../vim-7.0.069/src/ui.c	Mon Mar 27 23:02:40 2006
Karsten Hopp c591fa
--- src/ui.c	Thu Aug 24 22:31:38 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1137,1143 ****
Karsten Hopp c591fa
      int		len;
Karsten Hopp c591fa
  #ifdef FEAT_MBYTE
Karsten Hopp c591fa
      char_u	*p;
Karsten Hopp c591fa
-     int		i;
Karsten Hopp c591fa
  #endif
Karsten Hopp c591fa
      int		row1 = clip_star.start.lnum;
Karsten Hopp c591fa
      int		col1 = clip_star.start.col;
Karsten Hopp c591fa
--- 1137,1142 ----
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1218,1223 ****
Karsten Hopp c591fa
--- 1217,1224 ----
Karsten Hopp c591fa
  #ifdef FEAT_MBYTE
Karsten Hopp c591fa
  	    if (enc_dbcs != 0)
Karsten Hopp c591fa
  	    {
Karsten Hopp c591fa
+ 		int	i;
Karsten Hopp c591fa
+ 
Karsten Hopp c591fa
  		p = ScreenLines + LineOffset[row];
Karsten Hopp c591fa
  		for (i = start_col; i < end_col; ++i)
Karsten Hopp c591fa
  		    if (enc_dbcs == DBCS_JPNU && p[i] == 0x8e)
Karsten Hopp c591fa
*** ../vim-7.0.069/src/undo.c	Wed Jul 12 21:48:56 2006
Karsten Hopp c591fa
--- src/undo.c	Thu Aug 24 22:32:41 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1187,1193 ****
Karsten Hopp c591fa
      int		did_undo;	/* just did an undo */
Karsten Hopp c591fa
      int		absolute;	/* used ":undo N" */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     char	*msg;
Karsten Hopp c591fa
      u_header_T	*uhp;
Karsten Hopp c591fa
      char_u	msgbuf[80];
Karsten Hopp c591fa
  
Karsten Hopp c591fa
--- 1187,1193 ----
Karsten Hopp c591fa
      int		did_undo;	/* just did an undo */
Karsten Hopp c591fa
      int		absolute;	/* used ":undo N" */
Karsten Hopp c591fa
  {
Karsten Hopp c591fa
!     char	*msgstr;
Karsten Hopp c591fa
      u_header_T	*uhp;
Karsten Hopp c591fa
      char_u	msgbuf[80];
Karsten Hopp c591fa
  
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1205,1224 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      u_oldcount -= u_newcount;
Karsten Hopp c591fa
      if (u_oldcount == -1)
Karsten Hopp c591fa
! 	msg = N_("more line");
Karsten Hopp c591fa
      else if (u_oldcount < 0)
Karsten Hopp c591fa
! 	msg = N_("more lines");
Karsten Hopp c591fa
      else if (u_oldcount == 1)
Karsten Hopp c591fa
! 	msg = N_("line less");
Karsten Hopp c591fa
      else if (u_oldcount > 1)
Karsten Hopp c591fa
! 	msg = N_("fewer lines");
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	u_oldcount = u_newcount;
Karsten Hopp c591fa
  	if (u_newcount == 1)
Karsten Hopp c591fa
! 	    msg = N_("change");
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
! 	    msg = N_("changes");
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (curbuf->b_u_curhead != NULL)
Karsten Hopp c591fa
--- 1205,1224 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      u_oldcount -= u_newcount;
Karsten Hopp c591fa
      if (u_oldcount == -1)
Karsten Hopp c591fa
! 	msgstr = N_("more line");
Karsten Hopp c591fa
      else if (u_oldcount < 0)
Karsten Hopp c591fa
! 	msgstr = N_("more lines");
Karsten Hopp c591fa
      else if (u_oldcount == 1)
Karsten Hopp c591fa
! 	msgstr = N_("line less");
Karsten Hopp c591fa
      else if (u_oldcount > 1)
Karsten Hopp c591fa
! 	msgstr = N_("fewer lines");
Karsten Hopp c591fa
      else
Karsten Hopp c591fa
      {
Karsten Hopp c591fa
  	u_oldcount = u_newcount;
Karsten Hopp c591fa
  	if (u_newcount == 1)
Karsten Hopp c591fa
! 	    msgstr = N_("change");
Karsten Hopp c591fa
  	else
Karsten Hopp c591fa
! 	    msgstr = N_("changes");
Karsten Hopp c591fa
      }
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      if (curbuf->b_u_curhead != NULL)
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 1244,1250 ****
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      smsg((char_u *)_("%ld %s; %s #%ld  %s"),
Karsten Hopp c591fa
  	    u_oldcount < 0 ? -u_oldcount : u_oldcount,
Karsten Hopp c591fa
! 	    _(msg),
Karsten Hopp c591fa
  	    did_undo ? _("before") : _("after"),
Karsten Hopp c591fa
  	    uhp == NULL ? 0L : uhp->uh_seq,
Karsten Hopp c591fa
  	    msgbuf);
Karsten Hopp c591fa
--- 1244,1250 ----
Karsten Hopp c591fa
  
Karsten Hopp c591fa
      smsg((char_u *)_("%ld %s; %s #%ld  %s"),
Karsten Hopp c591fa
  	    u_oldcount < 0 ? -u_oldcount : u_oldcount,
Karsten Hopp c591fa
! 	    _(msgstr),
Karsten Hopp c591fa
  	    did_undo ? _("before") : _("after"),
Karsten Hopp c591fa
  	    uhp == NULL ? 0L : uhp->uh_seq,
Karsten Hopp c591fa
  	    msgbuf);
Karsten Hopp c591fa
*** ../vim-7.0.069/src/window.c	Sat May  6 23:37:40 2006
Karsten Hopp c591fa
--- src/window.c	Thu Aug 24 22:33:40 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 340,349 ****
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    tabpage_T	*oldtab = curtab;
Karsten Hopp c591fa
  		    tabpage_T	*newtab;
Karsten Hopp c591fa
- 		    win_T	*wp = curwin;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		    /* First create a new tab with the window, then go back to
Karsten Hopp c591fa
  		     * the old tab and close the window there. */
Karsten Hopp c591fa
  		    if (win_new_tabpage((int)Prenum) == OK
Karsten Hopp c591fa
  						     && valid_tabpage(oldtab))
Karsten Hopp c591fa
  		    {
Karsten Hopp c591fa
--- 340,349 ----
Karsten Hopp c591fa
  		{
Karsten Hopp c591fa
  		    tabpage_T	*oldtab = curtab;
Karsten Hopp c591fa
  		    tabpage_T	*newtab;
Karsten Hopp c591fa
  
Karsten Hopp c591fa
  		    /* First create a new tab with the window, then go back to
Karsten Hopp c591fa
  		     * the old tab and close the window there. */
Karsten Hopp c591fa
+ 		    wp = curwin;
Karsten Hopp c591fa
  		    if (win_new_tabpage((int)Prenum) == OK
Karsten Hopp c591fa
  						     && valid_tabpage(oldtab))
Karsten Hopp c591fa
  		    {
Karsten Hopp c591fa
*** ../vim-7.0.069/src/version.c	Tue Aug 29 16:52:01 2006
Karsten Hopp c591fa
--- src/version.c	Tue Aug 29 17:02:00 2006
Karsten Hopp c591fa
***************
Karsten Hopp c591fa
*** 668,669 ****
Karsten Hopp c591fa
--- 668,671 ----
Karsten Hopp c591fa
  {   /* Add new patch number below this line */
Karsten Hopp c591fa
+ /**/
Karsten Hopp c591fa
+     70,
Karsten Hopp c591fa
  /**/
Karsten Hopp c591fa
Karsten Hopp c591fa
-- 
Karsten Hopp c591fa
hundred-and-one symptoms of being an internet addict:
Karsten Hopp c591fa
267. You get an extra phone line so you can get phone calls.
Karsten Hopp c591fa
Karsten Hopp c591fa
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp c591fa
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp c591fa
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp c591fa
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///