Karsten Hopp ce2f4c
To: vim_dev@googlegroups.com
Karsten Hopp ce2f4c
Subject: Patch 7.4.456
Karsten Hopp ce2f4c
Fcc: outbox
Karsten Hopp ce2f4c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp ce2f4c
Mime-Version: 1.0
Karsten Hopp ce2f4c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp ce2f4c
Content-Transfer-Encoding: 8bit
Karsten Hopp ce2f4c
------------
Karsten Hopp ce2f4c
Karsten Hopp ce2f4c
Patch 7.4.456
Karsten Hopp ce2f4c
Problem:    'backupcopy' is global, cannot write only some files in a
Karsten Hopp ce2f4c
	    different way.
Karsten Hopp ce2f4c
Solution:   Make 'backupcopy' global-local. (Christian Brabandt)
Karsten Hopp ce2f4c
Files:	    runtime/doc/options.txt, src/buffer.c, src/fileio.c, src/option.c,
Karsten Hopp ce2f4c
	    src/option.h, src/proto/option.pro, src/structs.h
Karsten Hopp ce2f4c
Karsten Hopp ce2f4c
Karsten Hopp ce2f4c
*** ../vim-7.4.455/runtime/doc/options.txt	2014-08-10 13:34:59.052785459 +0200
Karsten Hopp ce2f4c
--- runtime/doc/options.txt	2014-09-23 14:28:40.530791041 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 921,927 ****
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  						*'backupcopy'* *'bkc'*
Karsten Hopp ce2f4c
  'backupcopy' 'bkc'	string	(Vi default for Unix: "yes", otherwise: "auto")
Karsten Hopp ce2f4c
! 			global
Karsten Hopp ce2f4c
  			{not in Vi}
Karsten Hopp ce2f4c
  	When writing a file and a backup is made, this option tells how it's
Karsten Hopp ce2f4c
  	done.  This is a comma separated list of words.
Karsten Hopp ce2f4c
--- 921,927 ----
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  						*'backupcopy'* *'bkc'*
Karsten Hopp ce2f4c
  'backupcopy' 'bkc'	string	(Vi default for Unix: "yes", otherwise: "auto")
Karsten Hopp ce2f4c
! 			global or local to buffer |global-local|
Karsten Hopp ce2f4c
  			{not in Vi}
Karsten Hopp ce2f4c
  	When writing a file and a backup is made, this option tells how it's
Karsten Hopp ce2f4c
  	done.  This is a comma separated list of words.
Karsten Hopp ce2f4c
*** ../vim-7.4.455/src/buffer.c	2014-09-23 14:24:36.406790508 +0200
Karsten Hopp ce2f4c
--- src/buffer.c	2014-09-23 14:28:40.530791041 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 2001,2006 ****
Karsten Hopp ce2f4c
--- 2001,2007 ----
Karsten Hopp ce2f4c
  #ifdef FEAT_LISP
Karsten Hopp ce2f4c
      clear_string_option(&buf->b_p_lw);
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
+     clear_string_option(&buf->b_p_bkc);
Karsten Hopp ce2f4c
  }
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  /*
Karsten Hopp ce2f4c
*** ../vim-7.4.455/src/fileio.c	2014-09-09 16:59:34.792537789 +0200
Karsten Hopp ce2f4c
--- src/fileio.c	2014-09-23 14:28:40.530791041 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 3149,3154 ****
Karsten Hopp ce2f4c
--- 3149,3155 ----
Karsten Hopp ce2f4c
      int		    write_undo_file = FALSE;
Karsten Hopp ce2f4c
      context_sha256_T sha_ctx;
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
+     unsigned int    bkc = get_bkc_value(buf);
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
      if (fname == NULL || *fname == NUL)	/* safety check */
Karsten Hopp ce2f4c
  	return FAIL;
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 3647,3656 ****
Karsten Hopp ce2f4c
  	struct stat st;
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
! 	if ((bkc_flags & BKC_YES) || append)	/* "yes" */
Karsten Hopp ce2f4c
  	    backup_copy = TRUE;
Karsten Hopp ce2f4c
  #if defined(UNIX) || defined(WIN32)
Karsten Hopp ce2f4c
! 	else if ((bkc_flags & BKC_AUTO))	/* "auto" */
Karsten Hopp ce2f4c
  	{
Karsten Hopp ce2f4c
  	    int		i;
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
--- 3648,3657 ----
Karsten Hopp ce2f4c
  	struct stat st;
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
! 	if ((bkc & BKC_YES) || append)	/* "yes" */
Karsten Hopp ce2f4c
  	    backup_copy = TRUE;
Karsten Hopp ce2f4c
  #if defined(UNIX) || defined(WIN32)
Karsten Hopp ce2f4c
! 	else if ((bkc & BKC_AUTO))	/* "auto" */
Karsten Hopp ce2f4c
  	{
Karsten Hopp ce2f4c
  	    int		i;
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 3738,3744 ****
Karsten Hopp ce2f4c
  	/*
Karsten Hopp ce2f4c
  	 * Break symlinks and/or hardlinks if we've been asked to.
Karsten Hopp ce2f4c
  	 */
Karsten Hopp ce2f4c
! 	if ((bkc_flags & BKC_BREAKSYMLINK) || (bkc_flags & BKC_BREAKHARDLINK))
Karsten Hopp ce2f4c
  	{
Karsten Hopp ce2f4c
  # ifdef UNIX
Karsten Hopp ce2f4c
  	    int	lstat_res;
Karsten Hopp ce2f4c
--- 3739,3745 ----
Karsten Hopp ce2f4c
  	/*
Karsten Hopp ce2f4c
  	 * Break symlinks and/or hardlinks if we've been asked to.
Karsten Hopp ce2f4c
  	 */
Karsten Hopp ce2f4c
! 	if ((bkc & BKC_BREAKSYMLINK) || (bkc & BKC_BREAKHARDLINK))
Karsten Hopp ce2f4c
  	{
Karsten Hopp ce2f4c
  # ifdef UNIX
Karsten Hopp ce2f4c
  	    int	lstat_res;
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 3746,3769 ****
Karsten Hopp ce2f4c
  	    lstat_res = mch_lstat((char *)fname, &st);
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  	    /* Symlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc_flags & BKC_BREAKSYMLINK)
Karsten Hopp ce2f4c
  		    && lstat_res == 0
Karsten Hopp ce2f4c
  		    && st.st_ino != st_old.st_ino)
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  	    /* Hardlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc_flags & BKC_BREAKHARDLINK)
Karsten Hopp ce2f4c
  		    && st_old.st_nlink > 1
Karsten Hopp ce2f4c
  		    && (lstat_res != 0 || st.st_ino == st_old.st_ino))
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  # else
Karsten Hopp ce2f4c
  #  if defined(WIN32)
Karsten Hopp ce2f4c
  	    /* Symlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc_flags & BKC_BREAKSYMLINK) && mch_is_symbolic_link(fname))
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  	    /* Hardlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc_flags & BKC_BREAKHARDLINK) && mch_is_hard_link(fname))
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  #  endif
Karsten Hopp ce2f4c
  # endif
Karsten Hopp ce2f4c
--- 3747,3770 ----
Karsten Hopp ce2f4c
  	    lstat_res = mch_lstat((char *)fname, &st);
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  	    /* Symlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc & BKC_BREAKSYMLINK)
Karsten Hopp ce2f4c
  		    && lstat_res == 0
Karsten Hopp ce2f4c
  		    && st.st_ino != st_old.st_ino)
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  	    /* Hardlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc & BKC_BREAKHARDLINK)
Karsten Hopp ce2f4c
  		    && st_old.st_nlink > 1
Karsten Hopp ce2f4c
  		    && (lstat_res != 0 || st.st_ino == st_old.st_ino))
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  # else
Karsten Hopp ce2f4c
  #  if defined(WIN32)
Karsten Hopp ce2f4c
  	    /* Symlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc & BKC_BREAKSYMLINK) && mch_is_symbolic_link(fname))
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  	    /* Hardlinks. */
Karsten Hopp ce2f4c
! 	    if ((bkc & BKC_BREAKHARDLINK) && mch_is_hard_link(fname))
Karsten Hopp ce2f4c
  		backup_copy = FALSE;
Karsten Hopp ce2f4c
  #  endif
Karsten Hopp ce2f4c
  # endif
Karsten Hopp ce2f4c
*** ../vim-7.4.455/src/option.c	2014-09-09 17:33:02.700542175 +0200
Karsten Hopp ce2f4c
--- src/option.c	2014-09-23 14:41:25.890792713 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 56,61 ****
Karsten Hopp ce2f4c
--- 56,62 ----
Karsten Hopp ce2f4c
   */
Karsten Hopp ce2f4c
  #define PV_AI		OPT_BUF(BV_AI)
Karsten Hopp ce2f4c
  #define PV_AR		OPT_BOTH(OPT_BUF(BV_AR))
Karsten Hopp ce2f4c
+ #define PV_BKC		OPT_BOTH(OPT_BUF(BV_BKC))
Karsten Hopp ce2f4c
  #ifdef FEAT_QUICKFIX
Karsten Hopp ce2f4c
  # define PV_BH		OPT_BUF(BV_BH)
Karsten Hopp ce2f4c
  # define PV_BT		OPT_BUF(BV_BT)
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 582,588 ****
Karsten Hopp ce2f4c
  			    (char_u *)&p_bk, PV_NONE,
Karsten Hopp ce2f4c
  			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp ce2f4c
      {"backupcopy",  "bkc",  P_STRING|P_VIM|P_COMMA|P_NODUP,
Karsten Hopp ce2f4c
! 			    (char_u *)&p_bkc, PV_NONE,
Karsten Hopp ce2f4c
  #ifdef UNIX
Karsten Hopp ce2f4c
  			    {(char_u *)"yes", (char_u *)"auto"}
Karsten Hopp ce2f4c
  #else
Karsten Hopp ce2f4c
--- 583,589 ----
Karsten Hopp ce2f4c
  			    (char_u *)&p_bk, PV_NONE,
Karsten Hopp ce2f4c
  			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
Karsten Hopp ce2f4c
      {"backupcopy",  "bkc",  P_STRING|P_VIM|P_COMMA|P_NODUP,
Karsten Hopp ce2f4c
! 			    (char_u *)&p_bkc, PV_BKC,
Karsten Hopp ce2f4c
  #ifdef UNIX
Karsten Hopp ce2f4c
  			    {(char_u *)"yes", (char_u *)"auto"}
Karsten Hopp ce2f4c
  #else
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 5412,5417 ****
Karsten Hopp ce2f4c
--- 5413,5419 ----
Karsten Hopp ce2f4c
  #ifdef FEAT_LISP
Karsten Hopp ce2f4c
      check_string_option(&buf->b_p_lw);
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
+     check_string_option(&buf->b_p_bkc);
Karsten Hopp ce2f4c
  }
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  /*
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 5729,5744 ****
Karsten Hopp ce2f4c
      }
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
      /* 'backupcopy' */
Karsten Hopp ce2f4c
!     else if (varp == &p_bkc)
Karsten Hopp ce2f4c
      {
Karsten Hopp ce2f4c
! 	if (opt_strings_flags(p_bkc, p_bkc_values, &bkc_flags, TRUE) != OK)
Karsten Hopp ce2f4c
  	    errmsg = e_invarg;
Karsten Hopp ce2f4c
! 	if (((bkc_flags & BKC_AUTO) != 0)
Karsten Hopp ce2f4c
! 		+ ((bkc_flags & BKC_YES) != 0)
Karsten Hopp ce2f4c
! 		+ ((bkc_flags & BKC_NO) != 0) != 1)
Karsten Hopp ce2f4c
  	{
Karsten Hopp ce2f4c
  	    /* Must have exactly one of "auto", "yes"  and "no". */
Karsten Hopp ce2f4c
! 	    (void)opt_strings_flags(oldval, p_bkc_values, &bkc_flags, TRUE);
Karsten Hopp ce2f4c
  	    errmsg = e_invarg;
Karsten Hopp ce2f4c
  	}
Karsten Hopp ce2f4c
      }
Karsten Hopp ce2f4c
--- 5731,5755 ----
Karsten Hopp ce2f4c
      }
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
      /* 'backupcopy' */
Karsten Hopp ce2f4c
!     else if (gvarp == &p_bkc)
Karsten Hopp ce2f4c
      {
Karsten Hopp ce2f4c
! 	char_u		*bkc = p_bkc;
Karsten Hopp ce2f4c
! 	unsigned int	*flags = &bkc_flags;
Karsten Hopp ce2f4c
! 
Karsten Hopp ce2f4c
! 	if (opt_flags & OPT_LOCAL)
Karsten Hopp ce2f4c
! 	{
Karsten Hopp ce2f4c
! 	    bkc = curbuf->b_p_bkc;
Karsten Hopp ce2f4c
! 	    flags = &curbuf->b_bkc_flags;
Karsten Hopp ce2f4c
! 	}
Karsten Hopp ce2f4c
! 
Karsten Hopp ce2f4c
! 	if (opt_strings_flags(bkc, p_bkc_values, flags, TRUE) != OK)
Karsten Hopp ce2f4c
  	    errmsg = e_invarg;
Karsten Hopp ce2f4c
! 	if ((((int)*flags & BKC_AUTO) != 0)
Karsten Hopp ce2f4c
! 		+ (((int)*flags & BKC_YES) != 0)
Karsten Hopp ce2f4c
! 		+ (((int)*flags & BKC_NO) != 0) != 1)
Karsten Hopp ce2f4c
  	{
Karsten Hopp ce2f4c
  	    /* Must have exactly one of "auto", "yes"  and "no". */
Karsten Hopp ce2f4c
! 	    (void)opt_strings_flags(oldval, p_bkc_values, flags, TRUE);
Karsten Hopp ce2f4c
  	    errmsg = e_invarg;
Karsten Hopp ce2f4c
  	}
Karsten Hopp ce2f4c
      }
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 9025,9036 ****
Karsten Hopp ce2f4c
  }
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  /*
Karsten Hopp ce2f4c
!  * Iterate over options. First argument is a pointer to a pointer to a structure 
Karsten Hopp ce2f4c
!  * inside options[] array, second is option type like in the above function.
Karsten Hopp ce2f4c
   *
Karsten Hopp ce2f4c
!  * If first argument points to NULL it is assumed that iteration just started 
Karsten Hopp ce2f4c
   * and caller needs the very first value.
Karsten Hopp ce2f4c
!  * If first argument points to the end marker function returns NULL and sets 
Karsten Hopp ce2f4c
   * first argument to NULL.
Karsten Hopp ce2f4c
   *
Karsten Hopp ce2f4c
   * Returns full option name for current option on each call.
Karsten Hopp ce2f4c
--- 9036,9048 ----
Karsten Hopp ce2f4c
  }
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
  /*
Karsten Hopp ce2f4c
!  * Iterate over options. First argument is a pointer to a pointer to a
Karsten Hopp ce2f4c
!  * structure inside options[] array, second is option type like in the above
Karsten Hopp ce2f4c
!  * function.
Karsten Hopp ce2f4c
   *
Karsten Hopp ce2f4c
!  * If first argument points to NULL it is assumed that iteration just started
Karsten Hopp ce2f4c
   * and caller needs the very first value.
Karsten Hopp ce2f4c
!  * If first argument points to the end marker function returns NULL and sets
Karsten Hopp ce2f4c
   * first argument to NULL.
Karsten Hopp ce2f4c
   *
Karsten Hopp ce2f4c
   * Returns full option name for current option on each call.
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 9856,9861 ****
Karsten Hopp ce2f4c
--- 9868,9877 ----
Karsten Hopp ce2f4c
  	case PV_AR:
Karsten Hopp ce2f4c
  	    buf->b_p_ar = -1;
Karsten Hopp ce2f4c
  	    break;
Karsten Hopp ce2f4c
+ 	case PV_BKC:
Karsten Hopp ce2f4c
+ 	    clear_string_option(&buf->b_p_bkc);
Karsten Hopp ce2f4c
+ 	    buf->b_bkc_flags = 0;
Karsten Hopp ce2f4c
+ 	    break;
Karsten Hopp ce2f4c
  	case PV_TAGS:
Karsten Hopp ce2f4c
  	    clear_string_option(&buf->b_p_tags);
Karsten Hopp ce2f4c
  	    break;
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 9961,9966 ****
Karsten Hopp ce2f4c
--- 9977,9983 ----
Karsten Hopp ce2f4c
  #ifdef FEAT_LISP
Karsten Hopp ce2f4c
  	    case PV_LW:   return (char_u *)&(curbuf->b_p_lw);
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
+ 	    case PV_BKC:  return (char_u *)&(curbuf->b_p_bkc);
Karsten Hopp ce2f4c
  	}
Karsten Hopp ce2f4c
  	return NULL; /* "cannot happen" */
Karsten Hopp ce2f4c
      }
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 9993,9998 ****
Karsten Hopp ce2f4c
--- 10010,10017 ----
Karsten Hopp ce2f4c
  				    ? (char_u *)&(curbuf->b_p_ar) : p->var;
Karsten Hopp ce2f4c
  	case PV_TAGS:	return *curbuf->b_p_tags != NUL
Karsten Hopp ce2f4c
  				    ? (char_u *)&(curbuf->b_p_tags) : p->var;
Karsten Hopp ce2f4c
+ 	case PV_BKC:	return *curbuf->b_p_bkc != NUL
Karsten Hopp ce2f4c
+ 				    ? (char_u *)&(curbuf->b_p_bkc) : p->var;
Karsten Hopp ce2f4c
  #ifdef FEAT_FIND_ID
Karsten Hopp ce2f4c
  	case PV_DEF:	return *curbuf->b_p_def != NUL
Karsten Hopp ce2f4c
  				    ? (char_u *)&(curbuf->b_p_def) : p->var;
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 10585,10590 ****
Karsten Hopp ce2f4c
--- 10604,10611 ----
Karsten Hopp ce2f4c
  	     * are not copied, start using the global value */
Karsten Hopp ce2f4c
  	    buf->b_p_ar = -1;
Karsten Hopp ce2f4c
  	    buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
Karsten Hopp ce2f4c
+ 	    buf->b_p_bkc = empty_option;
Karsten Hopp ce2f4c
+ 	    buf->b_bkc_flags = 0;
Karsten Hopp ce2f4c
  #ifdef FEAT_QUICKFIX
Karsten Hopp ce2f4c
  	    buf->b_p_gp = empty_option;
Karsten Hopp ce2f4c
  	    buf->b_p_mp = empty_option;
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 12052,12054 ****
Karsten Hopp ce2f4c
--- 12073,12085 ----
Karsten Hopp ce2f4c
      return OK;
Karsten Hopp ce2f4c
  }
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
+ 
Karsten Hopp ce2f4c
+ /*
Karsten Hopp ce2f4c
+  * Get the local or global value of 'backupcopy'.
Karsten Hopp ce2f4c
+  */
Karsten Hopp ce2f4c
+     unsigned int
Karsten Hopp ce2f4c
+ get_bkc_value(buf)
Karsten Hopp ce2f4c
+     buf_T *buf;
Karsten Hopp ce2f4c
+ {
Karsten Hopp ce2f4c
+     return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags;
Karsten Hopp ce2f4c
+ }
Karsten Hopp ce2f4c
*** ../vim-7.4.455/src/option.h	2014-08-06 14:52:05.047236174 +0200
Karsten Hopp ce2f4c
--- src/option.h	2014-09-23 14:41:45.614792756 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 327,333 ****
Karsten Hopp ce2f4c
  EXTERN char_u	*p_bg;		/* 'background' */
Karsten Hopp ce2f4c
  EXTERN int	p_bk;		/* 'backup' */
Karsten Hopp ce2f4c
  EXTERN char_u	*p_bkc;		/* 'backupcopy' */
Karsten Hopp ce2f4c
! EXTERN unsigned	bkc_flags;
Karsten Hopp ce2f4c
  #ifdef IN_OPTION_C
Karsten Hopp ce2f4c
  static char *(p_bkc_values[]) = {"yes", "auto", "no", "breaksymlink", "breakhardlink", NULL};
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
--- 327,333 ----
Karsten Hopp ce2f4c
  EXTERN char_u	*p_bg;		/* 'background' */
Karsten Hopp ce2f4c
  EXTERN int	p_bk;		/* 'backup' */
Karsten Hopp ce2f4c
  EXTERN char_u	*p_bkc;		/* 'backupcopy' */
Karsten Hopp ce2f4c
! EXTERN unsigned	bkc_flags;	/* flags from 'backupcopy' */
Karsten Hopp ce2f4c
  #ifdef IN_OPTION_C
Karsten Hopp ce2f4c
  static char *(p_bkc_values[]) = {"yes", "auto", "no", "breaksymlink", "breakhardlink", NULL};
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 918,923 ****
Karsten Hopp ce2f4c
--- 918,926 ----
Karsten Hopp ce2f4c
      , BV_AR
Karsten Hopp ce2f4c
  #ifdef FEAT_QUICKFIX
Karsten Hopp ce2f4c
      , BV_BH
Karsten Hopp ce2f4c
+ #endif
Karsten Hopp ce2f4c
+     , BV_BKC
Karsten Hopp ce2f4c
+ #ifdef FEAT_QUICKFIX
Karsten Hopp ce2f4c
      , BV_BT
Karsten Hopp ce2f4c
      , BV_EFM
Karsten Hopp ce2f4c
      , BV_GP
Karsten Hopp ce2f4c
*** ../vim-7.4.455/src/proto/option.pro	2014-08-24 21:39:45.488526954 +0200
Karsten Hopp ce2f4c
--- src/proto/option.pro	2014-09-23 14:28:40.534791041 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 62,65 ****
Karsten Hopp ce2f4c
--- 62,66 ----
Karsten Hopp ce2f4c
  long get_sw_value __ARGS((buf_T *buf));
Karsten Hopp ce2f4c
  long get_sts_value __ARGS((void));
Karsten Hopp ce2f4c
  void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
Karsten Hopp ce2f4c
+ unsigned int get_bkc_value __ARGS((buf_T *buf));
Karsten Hopp ce2f4c
  /* vim: set ft=c : */
Karsten Hopp ce2f4c
*** ../vim-7.4.455/src/structs.h	2014-08-10 13:34:59.064785459 +0200
Karsten Hopp ce2f4c
--- src/structs.h	2014-09-23 14:41:56.218792779 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 137,143 ****
Karsten Hopp ce2f4c
  #ifdef FEAT_LINEBREAK
Karsten Hopp ce2f4c
      int		wo_bri;
Karsten Hopp ce2f4c
  # define w_p_bri w_onebuf_opt.wo_bri	/* 'breakindent' */
Karsten Hopp ce2f4c
!     char_u		*wo_briopt;
Karsten Hopp ce2f4c
  # define w_p_briopt w_onebuf_opt.wo_briopt /* 'breakindentopt' */
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
  #ifdef FEAT_DIFF
Karsten Hopp ce2f4c
--- 137,143 ----
Karsten Hopp ce2f4c
  #ifdef FEAT_LINEBREAK
Karsten Hopp ce2f4c
      int		wo_bri;
Karsten Hopp ce2f4c
  # define w_p_bri w_onebuf_opt.wo_bri	/* 'breakindent' */
Karsten Hopp ce2f4c
!     char_u	*wo_briopt;
Karsten Hopp ce2f4c
  # define w_p_briopt w_onebuf_opt.wo_briopt /* 'breakindentopt' */
Karsten Hopp ce2f4c
  #endif
Karsten Hopp ce2f4c
  #ifdef FEAT_DIFF
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 1537,1542 ****
Karsten Hopp ce2f4c
--- 1537,1544 ----
Karsten Hopp ce2f4c
  
Karsten Hopp ce2f4c
      int		b_p_ai;		/* 'autoindent' */
Karsten Hopp ce2f4c
      int		b_p_ai_nopaste;	/* b_p_ai saved for paste mode */
Karsten Hopp ce2f4c
+     char_u	*b_p_bkc;	/* 'backupcopy' */
Karsten Hopp ce2f4c
+     unsigned	b_bkc_flags;    /* flags for 'backupcopy' */
Karsten Hopp ce2f4c
      int		b_p_ci;		/* 'copyindent' */
Karsten Hopp ce2f4c
      int		b_p_bin;	/* 'binary' */
Karsten Hopp ce2f4c
  #ifdef FEAT_MBYTE
Karsten Hopp ce2f4c
*** ../vim-7.4.455/src/version.c	2014-09-23 14:24:36.410790508 +0200
Karsten Hopp ce2f4c
--- src/version.c	2014-09-23 14:29:15.706791118 +0200
Karsten Hopp ce2f4c
***************
Karsten Hopp ce2f4c
*** 743,744 ****
Karsten Hopp ce2f4c
--- 743,746 ----
Karsten Hopp ce2f4c
  {   /* Add new patch number below this line */
Karsten Hopp ce2f4c
+ /**/
Karsten Hopp ce2f4c
+     456,
Karsten Hopp ce2f4c
  /**/
Karsten Hopp ce2f4c
Karsten Hopp ce2f4c
-- 
Karsten Hopp ce2f4c
If Apple would build a car...
Karsten Hopp ce2f4c
... it would be powered by the sun, be reliable, five times
Karsten Hopp ce2f4c
as fast and twice as easy to drive; but would only run on
Karsten Hopp ce2f4c
five percent of the roads.
Karsten Hopp ce2f4c
Karsten Hopp ce2f4c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp ce2f4c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp ce2f4c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp ce2f4c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///