Karsten Hopp 916c48
To: vim_dev@googlegroups.com
Karsten Hopp 916c48
Subject: Patch 7.3.1165
Karsten Hopp 916c48
Fcc: outbox
Karsten Hopp 916c48
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 916c48
Mime-Version: 1.0
Karsten Hopp 916c48
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 916c48
Content-Transfer-Encoding: 8bit
Karsten Hopp 916c48
------------
Karsten Hopp 916c48
Karsten Hopp 916c48
Patch 7.3.1165
Karsten Hopp 916c48
Problem:    HP-UX compiler can't handle zero size array. (Charles Cooper)
Karsten Hopp 916c48
Solution:   Make the array one item big.
Karsten Hopp 916c48
Files:	    src/regexp.h, src/regexp_nfa.c
Karsten Hopp 916c48
Karsten Hopp 916c48
Karsten Hopp 916c48
*** ../vim-7.3.1164/src/regexp.h	2013-06-08 18:19:39.000000000 +0200
Karsten Hopp 916c48
--- src/regexp.h	2013-06-11 10:53:14.000000000 +0200
Karsten Hopp 916c48
***************
Karsten Hopp 916c48
*** 101,107 ****
Karsten Hopp 916c48
  #endif
Karsten Hopp 916c48
      int			nsubexp;	/* number of () */
Karsten Hopp 916c48
      int			nstate;
Karsten Hopp 916c48
!     nfa_state_T		state[0];	/* actually longer.. */
Karsten Hopp 916c48
  } nfa_regprog_T;
Karsten Hopp 916c48
  
Karsten Hopp 916c48
  /*
Karsten Hopp 916c48
--- 101,107 ----
Karsten Hopp 916c48
  #endif
Karsten Hopp 916c48
      int			nsubexp;	/* number of () */
Karsten Hopp 916c48
      int			nstate;
Karsten Hopp 916c48
!     nfa_state_T		state[1];	/* actually longer.. */
Karsten Hopp 916c48
  } nfa_regprog_T;
Karsten Hopp 916c48
  
Karsten Hopp 916c48
  /*
Karsten Hopp 916c48
*** ../vim-7.3.1164/src/regexp_nfa.c	2013-06-10 16:35:11.000000000 +0200
Karsten Hopp 916c48
--- src/regexp_nfa.c	2013-06-11 11:19:17.000000000 +0200
Karsten Hopp 916c48
***************
Karsten Hopp 916c48
*** 6391,6398 ****
Karsten Hopp 916c48
       */
Karsten Hopp 916c48
      post2nfa(postfix, post_ptr, TRUE);
Karsten Hopp 916c48
  
Karsten Hopp 916c48
!     /* Space for compiled regexp */
Karsten Hopp 916c48
!     prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * nstate;
Karsten Hopp 916c48
      prog = (nfa_regprog_T *)lalloc(prog_size, TRUE);
Karsten Hopp 916c48
      if (prog == NULL)
Karsten Hopp 916c48
  	goto fail;
Karsten Hopp 916c48
--- 6391,6398 ----
Karsten Hopp 916c48
       */
Karsten Hopp 916c48
      post2nfa(postfix, post_ptr, TRUE);
Karsten Hopp 916c48
  
Karsten Hopp 916c48
!     /* allocate the regprog with space for the compiled regexp */
Karsten Hopp 916c48
!     prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * (nstate - 1);
Karsten Hopp 916c48
      prog = (nfa_regprog_T *)lalloc(prog_size, TRUE);
Karsten Hopp 916c48
      if (prog == NULL)
Karsten Hopp 916c48
  	goto fail;
Karsten Hopp 916c48
*** ../vim-7.3.1164/src/version.c	2013-06-11 18:40:06.000000000 +0200
Karsten Hopp 916c48
--- src/version.c	2013-06-11 18:41:47.000000000 +0200
Karsten Hopp 916c48
***************
Karsten Hopp 916c48
*** 730,731 ****
Karsten Hopp 916c48
--- 730,733 ----
Karsten Hopp 916c48
  {   /* Add new patch number below this line */
Karsten Hopp 916c48
+ /**/
Karsten Hopp 916c48
+     1165,
Karsten Hopp 916c48
  /**/
Karsten Hopp 916c48
Karsten Hopp 916c48
-- 
Karsten Hopp 916c48
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 916c48
145. You e-mail your boss, informing him you'll be late.
Karsten Hopp 916c48
Karsten Hopp 916c48
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 916c48
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 916c48
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 916c48
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///