Patch 7.3.1165
Problem:    HP-UX compiler can't handle zero size array. (Charles Cooper)
Solution:   Make the array one item big.
Files:      src/regexp.h, src/regexp_nfa.c


*** ../vim-7.3.1164/src/regexp.h        2013-06-08 18:19:39.000000000 +0200
--- src/regexp.h        2013-06-11 10:53:14.000000000 +0200
***************
*** 101,107 ****
  #endif
      int                       nsubexp;        /* number of () */
      int                       nstate;
!     nfa_state_T               state[0];       /* actually longer.. */
  } nfa_regprog_T;
  
  /*
--- 101,107 ----
  #endif
      int                       nsubexp;        /* number of () */
      int                       nstate;
!     nfa_state_T               state[1];       /* actually longer.. */
  } nfa_regprog_T;
  
  /*
*** ../vim-7.3.1164/src/regexp_nfa.c    2013-06-10 16:35:11.000000000 +0200
--- src/regexp_nfa.c    2013-06-11 11:19:17.000000000 +0200
***************
*** 6391,6398 ****
       */
      post2nfa(postfix, post_ptr, TRUE);
  
!     /* Space for compiled regexp */
!     prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * nstate;
      prog = (nfa_regprog_T *)lalloc(prog_size, TRUE);
      if (prog == NULL)
        goto fail;
--- 6391,6398 ----
       */
      post2nfa(postfix, post_ptr, TRUE);
  
!     /* allocate the regprog with space for the compiled regexp */
!     prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * (nstate - 1);
      prog = (nfa_regprog_T *)lalloc(prog_size, TRUE);
      if (prog == NULL)
        goto fail;
*** ../vim-7.3.1164/src/version.c       2013-06-11 18:40:06.000000000 +0200
--- src/version.c       2013-06-11 18:41:47.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
  {   /* Add new patch number below this line */
+ /**/
+     1165,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
145. You e-mail your boss, informing him you'll be late.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui