Karsten Hopp 4be79b
To: vim_dev@googlegroups.com
Karsten Hopp 4be79b
Subject: Patch 7.3.983
Karsten Hopp 4be79b
Fcc: outbox
Karsten Hopp 4be79b
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4be79b
Mime-Version: 1.0
Karsten Hopp 4be79b
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 4be79b
Content-Transfer-Encoding: 8bit
Karsten Hopp 4be79b
------------
Karsten Hopp 4be79b
Karsten Hopp 4be79b
Patch 7.3.983
Karsten Hopp 4be79b
Problem:    Uneccessary temp variable.
Karsten Hopp 4be79b
Solution:   Remove the variable.
Karsten Hopp 4be79b
Files:	    src/regexp_nfa.c
Karsten Hopp 4be79b
Karsten Hopp 4be79b
Karsten Hopp 4be79b
*** ../vim-7.3.982/src/regexp_nfa.c	2013-05-21 12:34:13.000000000 +0200
Karsten Hopp 4be79b
--- src/regexp_nfa.c	2013-05-21 12:35:37.000000000 +0200
Karsten Hopp 4be79b
***************
Karsten Hopp 4be79b
*** 2833,2839 ****
Karsten Hopp 4be79b
      int		old_reglnum = -1;
Karsten Hopp 4be79b
      int		reginput_updated = FALSE;
Karsten Hopp 4be79b
      thread_T	*t;
Karsten Hopp 4be79b
-     char_u	*cc;
Karsten Hopp 4be79b
      char_u	*old_reginput = NULL;
Karsten Hopp 4be79b
      char_u	*old_regline = NULL;
Karsten Hopp 4be79b
      nfa_state_T	*sta;
Karsten Hopp 4be79b
--- 2833,2838 ----
Karsten Hopp 4be79b
***************
Karsten Hopp 4be79b
*** 2931,2937 ****
Karsten Hopp 4be79b
  	}
Karsten Hopp 4be79b
  	if (c == NUL)
Karsten Hopp 4be79b
  	    n = 0;
Karsten Hopp 4be79b
- 	cc = reginput;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	/* swap lists */
Karsten Hopp 4be79b
  	thislist = &list[flag];
Karsten Hopp 4be79b
--- 2930,2935 ----
Karsten Hopp 4be79b
***************
Karsten Hopp 4be79b
*** 3261,3272 ****
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_KWORD:	/*  \k	*/
Karsten Hopp 4be79b
! 		result = vim_iswordp(cc);
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_SKWORD:	/*  \K	*/
Karsten Hopp 4be79b
! 		result = !VIM_ISDIGIT(c) && vim_iswordp(cc);
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
--- 3259,3270 ----
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_KWORD:	/*  \k	*/
Karsten Hopp 4be79b
! 		result = vim_iswordp(reginput);
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_SKWORD:	/*  \K	*/
Karsten Hopp 4be79b
! 		result = !VIM_ISDIGIT(c) && vim_iswordp(reginput);
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
***************
Karsten Hopp 4be79b
*** 3281,3292 ****
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_PRINT:	/*  \p	*/
Karsten Hopp 4be79b
! 		result = ptr2cells(cc) == 1;
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_SPRINT:	/*  \P	*/
Karsten Hopp 4be79b
! 		result = !VIM_ISDIGIT(c) && ptr2cells(cc) == 1;
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
--- 3279,3290 ----
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_PRINT:	/*  \p	*/
Karsten Hopp 4be79b
! 		result = ptr2cells(reginput) == 1;
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
  	    case NFA_SPRINT:	/*  \P	*/
Karsten Hopp 4be79b
! 		result = !VIM_ISDIGIT(c) && ptr2cells(reginput) == 1;
Karsten Hopp 4be79b
  		ADD_POS_NEG_STATE(t->state);
Karsten Hopp 4be79b
  		break;
Karsten Hopp 4be79b
  
Karsten Hopp 4be79b
*** ../vim-7.3.982/src/version.c	2013-05-21 12:34:13.000000000 +0200
Karsten Hopp 4be79b
--- src/version.c	2013-05-21 12:41:58.000000000 +0200
Karsten Hopp 4be79b
***************
Karsten Hopp 4be79b
*** 730,731 ****
Karsten Hopp 4be79b
--- 730,733 ----
Karsten Hopp 4be79b
  {   /* Add new patch number below this line */
Karsten Hopp 4be79b
+ /**/
Karsten Hopp 4be79b
+     983,
Karsten Hopp 4be79b
  /**/
Karsten Hopp 4be79b
Karsten Hopp 4be79b
-- 
Karsten Hopp 4be79b
Communication is one of the most compli..., eh, well, it's hard.
Karsten Hopp 4be79b
You know what I mean.  Not?
Karsten Hopp 4be79b
Karsten Hopp 4be79b
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4be79b
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4be79b
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 4be79b
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///