| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.1165 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| 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 |
| |
| |
| |
| |
| |
| *** 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; |
| |
| /* |
| |
| |
| |
| *** 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; |
| |
| |
| |
| *** 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 -- Bram@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 /// |