Karsten Hopp 83157d
To: vim_dev@googlegroups.com
Karsten Hopp 83157d
Subject: Patch 7.3.4
Karsten Hopp 83157d
Fcc: outbox
Karsten Hopp 83157d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 83157d
Mime-Version: 1.0
Karsten Hopp 83157d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 83157d
Content-Transfer-Encoding: 8bit
Karsten Hopp 83157d
------------
Karsten Hopp 83157d
Karsten Hopp 83157d
Patch 7.3.495 (after 7.3.492)
Karsten Hopp 83157d
Problem:    Compiler warnings.
Karsten Hopp 83157d
Solution:   Add function declaration.  Remove "offset" argument.
Karsten Hopp 83157d
Files:      src/misc1.c
Karsten Hopp 83157d
Karsten Hopp 83157d
Karsten Hopp 83157d
*** ../vim-7.3.494/src/misc1.c	2012-04-06 13:56:00.000000000 +0200
Karsten Hopp 83157d
--- src/misc1.c	2012-04-09 20:25:58.000000000 +0200
Karsten Hopp 83157d
***************
Karsten Hopp 83157d
*** 4972,4977 ****
Karsten Hopp 83157d
--- 4972,4978 ----
Karsten Hopp 83157d
  static int	cin_iselse __ARGS((char_u *));
Karsten Hopp 83157d
  static int	cin_isdo __ARGS((char_u *));
Karsten Hopp 83157d
  static int	cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
Karsten Hopp 83157d
+ static int	cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset));
Karsten Hopp 83157d
  static int	cin_iswhileofdo_end __ARGS((int terminated, int	ind_maxparen, int ind_maxcomment));
Karsten Hopp 83157d
  static int	cin_isbreak __ARGS((char_u *));
Karsten Hopp 83157d
  static int	cin_is_cpp_baseclass __ARGS((colnr_T *col));
Karsten Hopp 83157d
***************
Karsten Hopp 83157d
*** 5771,5787 ****
Karsten Hopp 83157d
  }
Karsten Hopp 83157d
  
Karsten Hopp 83157d
  /*
Karsten Hopp 83157d
!  * Check whether in "p" there is an "if", "for" or "while" before offset.
Karsten Hopp 83157d
   * Return 0 if there is none.
Karsten Hopp 83157d
   * Otherwise return !0 and update "*poffset" to point to the place where the
Karsten Hopp 83157d
   * string was found.
Karsten Hopp 83157d
   */
Karsten Hopp 83157d
      static int
Karsten Hopp 83157d
! cin_is_if_for_while_before_offset(line, offset, poffset)
Karsten Hopp 83157d
      char_u *line;
Karsten Hopp 83157d
-     size_t offset;
Karsten Hopp 83157d
      int    *poffset;
Karsten Hopp 83157d
  {
Karsten Hopp 83157d
  
Karsten Hopp 83157d
      if (offset-- < 2)
Karsten Hopp 83157d
  	return 0;
Karsten Hopp 83157d
--- 5772,5788 ----
Karsten Hopp 83157d
  }
Karsten Hopp 83157d
  
Karsten Hopp 83157d
  /*
Karsten Hopp 83157d
!  * Check whether in "p" there is an "if", "for" or "while" before "*poffset".
Karsten Hopp 83157d
   * Return 0 if there is none.
Karsten Hopp 83157d
   * Otherwise return !0 and update "*poffset" to point to the place where the
Karsten Hopp 83157d
   * string was found.
Karsten Hopp 83157d
   */
Karsten Hopp 83157d
      static int
Karsten Hopp 83157d
! cin_is_if_for_while_before_offset(line, poffset)
Karsten Hopp 83157d
      char_u *line;
Karsten Hopp 83157d
      int    *poffset;
Karsten Hopp 83157d
  {
Karsten Hopp 83157d
+     int offset = *poffset;
Karsten Hopp 83157d
  
Karsten Hopp 83157d
      if (offset-- < 2)
Karsten Hopp 83157d
  	return 0;
Karsten Hopp 83157d
***************
Karsten Hopp 83157d
*** 5805,5812 ****
Karsten Hopp 83157d
  		goto probablyFound;
Karsten Hopp 83157d
  	}
Karsten Hopp 83157d
      }
Karsten Hopp 83157d
- 
Karsten Hopp 83157d
      return 0;
Karsten Hopp 83157d
  probablyFound:
Karsten Hopp 83157d
      if (!offset || !vim_isIDc(line[offset - 1]))
Karsten Hopp 83157d
      {
Karsten Hopp 83157d
--- 5806,5813 ----
Karsten Hopp 83157d
  		goto probablyFound;
Karsten Hopp 83157d
  	}
Karsten Hopp 83157d
      }
Karsten Hopp 83157d
      return 0;
Karsten Hopp 83157d
+ 
Karsten Hopp 83157d
  probablyFound:
Karsten Hopp 83157d
      if (!offset || !vim_isIDc(line[offset - 1]))
Karsten Hopp 83157d
      {
Karsten Hopp 83157d
***************
Karsten Hopp 83157d
*** 6890,6897 ****
Karsten Hopp 83157d
  		line = ml_get(outermost.lnum);
Karsten Hopp 83157d
  
Karsten Hopp 83157d
  		is_if_for_while =
Karsten Hopp 83157d
! 		    cin_is_if_for_while_before_offset(line, outermost.col,
Karsten Hopp 83157d
! 						      &outermost.col);
Karsten Hopp 83157d
  	    }
Karsten Hopp 83157d
  
Karsten Hopp 83157d
  	    amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment);
Karsten Hopp 83157d
--- 6891,6897 ----
Karsten Hopp 83157d
  		line = ml_get(outermost.lnum);
Karsten Hopp 83157d
  
Karsten Hopp 83157d
  		is_if_for_while =
Karsten Hopp 83157d
! 		    cin_is_if_for_while_before_offset(line, &outermost.col);
Karsten Hopp 83157d
  	    }
Karsten Hopp 83157d
  
Karsten Hopp 83157d
  	    amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment);
Karsten Hopp 83157d
*** ../vim-7.3.494/src/version.c	2012-04-06 14:30:55.000000000 +0200
Karsten Hopp 83157d
--- src/version.c	2012-04-09 20:41:44.000000000 +0200
Karsten Hopp 83157d
***************
Karsten Hopp 83157d
*** 716,717 ****
Karsten Hopp 83157d
--- 716,719 ----
Karsten Hopp 83157d
  {   /* Add new patch number below this line */
Karsten Hopp 83157d
+ /**/
Karsten Hopp 83157d
+     495,
Karsten Hopp 83157d
  /**/
Karsten Hopp 83157d
Karsten Hopp 83157d
-- 
Karsten Hopp 83157d
    [clop clop]
Karsten Hopp 83157d
GUARD #1:  Halt!  Who goes there?
Karsten Hopp 83157d
ARTHUR:    It is I, Arthur, son of Uther Pendragon, from the castle of
Karsten Hopp 83157d
           Camelot.  King of the Britons, defeator of the Saxons, sovereign of
Karsten Hopp 83157d
           all England!
Karsten Hopp 83157d
GUARD #1:  Pull the other one!
Karsten Hopp 83157d
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 83157d
Karsten Hopp 83157d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 83157d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 83157d
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 83157d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///