Karsten Hopp 4f5680
To: vim_dev@googlegroups.com
Karsten Hopp 4f5680
Subject: Patch 7.3.1132
Karsten Hopp 4f5680
Fcc: outbox
Karsten Hopp 4f5680
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4f5680
Mime-Version: 1.0
Karsten Hopp 4f5680
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 4f5680
Content-Transfer-Encoding: 8bit
Karsten Hopp 4f5680
------------
Karsten Hopp 4f5680
Karsten Hopp 4f5680
Patch 7.3.1132
Karsten Hopp 4f5680
Problem:    Crash when debugging regexp.
Karsten Hopp 4f5680
Solution:   Do not try to dump subexpr that were not set.  Skip over count of
Karsten Hopp 4f5680
	    \% items.
Karsten Hopp 4f5680
Files:	    src/regexp.c, src/regexp_nfa.c
Karsten Hopp 4f5680
Karsten Hopp 4f5680
Karsten Hopp 4f5680
*** ../vim-7.3.1131/src/regexp.c	2013-06-05 21:42:49.000000000 +0200
Karsten Hopp 4f5680
--- src/regexp.c	2013-06-06 18:04:09.000000000 +0200
Karsten Hopp 4f5680
***************
Karsten Hopp 4f5680
*** 6548,6553 ****
Karsten Hopp 4f5680
--- 6548,6559 ----
Karsten Hopp 4f5680
  	    fprintf(f, " count %ld", OPERAND_MIN(s));
Karsten Hopp 4f5680
  	    s += 4;
Karsten Hopp 4f5680
  	}
Karsten Hopp 4f5680
+ 	else if (op == RE_LNUM || op == RE_COL || op == RE_VCOL)
Karsten Hopp 4f5680
+ 	{
Karsten Hopp 4f5680
+ 	    /* one int plus comperator */
Karsten Hopp 4f5680
+ 	    fprintf(f, " count %ld", OPERAND_MIN(s));
Karsten Hopp 4f5680
+ 	    s += 5;
Karsten Hopp 4f5680
+ 	}
Karsten Hopp 4f5680
  	s += 3;
Karsten Hopp 4f5680
  	if (op == ANYOF || op == ANYOF + ADD_NL
Karsten Hopp 4f5680
  		|| op == ANYBUT || op == ANYBUT + ADD_NL
Karsten Hopp 4f5680
*** ../vim-7.3.1131/src/regexp_nfa.c	2013-06-06 16:22:01.000000000 +0200
Karsten Hopp 4f5680
--- src/regexp_nfa.c	2013-06-06 18:03:27.000000000 +0200
Karsten Hopp 4f5680
***************
Karsten Hopp 4f5680
*** 256,262 ****
Karsten Hopp 4f5680
  /* 0 for first call to nfa_regmatch(), 1 for recursive call. */
Karsten Hopp 4f5680
  static int nfa_ll_index = 0;
Karsten Hopp 4f5680
  
Karsten Hopp 4f5680
! static int nfa_regcomp_start __ARGS((char_u*expr, int re_flags));
Karsten Hopp 4f5680
  static int nfa_recognize_char_class __ARGS((char_u *start, char_u *end, int extra_newl));
Karsten Hopp 4f5680
  static int nfa_emit_equi_class __ARGS((int c, int neg));
Karsten Hopp 4f5680
  static int nfa_regatom __ARGS((void));
Karsten Hopp 4f5680
--- 256,262 ----
Karsten Hopp 4f5680
  /* 0 for first call to nfa_regmatch(), 1 for recursive call. */
Karsten Hopp 4f5680
  static int nfa_ll_index = 0;
Karsten Hopp 4f5680
  
Karsten Hopp 4f5680
! static int nfa_regcomp_start __ARGS((char_u *expr, int re_flags));
Karsten Hopp 4f5680
  static int nfa_recognize_char_class __ARGS((char_u *start, char_u *end, int extra_newl));
Karsten Hopp 4f5680
  static int nfa_emit_equi_class __ARGS((int c, int neg));
Karsten Hopp 4f5680
  static int nfa_regatom __ARGS((void));
Karsten Hopp 4f5680
***************
Karsten Hopp 4f5680
*** 2927,2933 ****
Karsten Hopp 4f5680
  {
Karsten Hopp 4f5680
      log_subexpr(&subs->norm);
Karsten Hopp 4f5680
  # ifdef FEAT_SYN_HL
Karsten Hopp 4f5680
!     log_subexpr(&subs->synt);
Karsten Hopp 4f5680
  # endif
Karsten Hopp 4f5680
  }
Karsten Hopp 4f5680
  
Karsten Hopp 4f5680
--- 2927,2934 ----
Karsten Hopp 4f5680
  {
Karsten Hopp 4f5680
      log_subexpr(&subs->norm);
Karsten Hopp 4f5680
  # ifdef FEAT_SYN_HL
Karsten Hopp 4f5680
!     if (nfa_has_zsubexpr)
Karsten Hopp 4f5680
! 	log_subexpr(&subs->synt);
Karsten Hopp 4f5680
  # endif
Karsten Hopp 4f5680
  }
Karsten Hopp 4f5680
  
Karsten Hopp 4f5680
*** ../vim-7.3.1131/src/version.c	2013-06-06 16:22:01.000000000 +0200
Karsten Hopp 4f5680
--- src/version.c	2013-06-06 17:58:00.000000000 +0200
Karsten Hopp 4f5680
***************
Karsten Hopp 4f5680
*** 730,731 ****
Karsten Hopp 4f5680
--- 730,733 ----
Karsten Hopp 4f5680
  {   /* Add new patch number below this line */
Karsten Hopp 4f5680
+ /**/
Karsten Hopp 4f5680
+     1132,
Karsten Hopp 4f5680
  /**/
Karsten Hopp 4f5680
Karsten Hopp 4f5680
-- 
Karsten Hopp 4f5680
Momento mori, ergo carpe diem
Karsten Hopp 4f5680
Karsten Hopp 4f5680
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4f5680
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4f5680
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 4f5680
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///