home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.1022 < prev    next >
Encoding:
Internet Message Format  |  2013-05-25  |  21.5 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1022
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.1022
  11. Problem:    Compiler warning for shadowed variable. (John Little)
  12. Solution:   Move declaration, rename variables.
  13. Files:        src/regexp_nfa.c
  14.  
  15.  
  16. *** ../vim-7.3.1021/src/regexp_nfa.c    2013-05-26 14:32:01.000000000 +0200
  17. --- src/regexp_nfa.c    2013-05-26 14:50:27.000000000 +0200
  18. ***************
  19. *** 604,610 ****
  20.       char_u    *endp;
  21.   #ifdef FEAT_MBYTE
  22.       char_u    *old_regparse = regparse;
  23. -     int        i;
  24.   #endif
  25.       int        extra = 0;
  26.       int        first;
  27. --- 604,609 ----
  28. ***************
  29. *** 827,850 ****
  30.           case 'u':   /* %uabcd hex 4 */
  31.           case 'U':   /* %U1234abcd hex 8 */
  32.               {
  33. !             int i;
  34.   
  35.               switch (c)
  36.               {
  37. !                 case 'd': i = getdecchrs(); break;
  38. !                 case 'o': i = getoctchrs(); break;
  39. !                 case 'x': i = gethexchrs(2); break;
  40. !                 case 'u': i = gethexchrs(4); break;
  41. !                 case 'U': i = gethexchrs(8); break;
  42. !                 default:  i = -1; break;
  43.               }
  44.   
  45. !             if (i < 0)
  46.                   EMSG2_RET_FAIL(
  47.                      _("E678: Invalid character after %s%%[dxouU]"),
  48.                       reg_magic == MAGIC_ALL);
  49.               /* TODO: what if a composing character follows? */
  50. !             EMIT(i);
  51.               }
  52.               break;
  53.   
  54. --- 826,849 ----
  55.           case 'u':   /* %uabcd hex 4 */
  56.           case 'U':   /* %U1234abcd hex 8 */
  57.               {
  58. !             int nr;
  59.   
  60.               switch (c)
  61.               {
  62. !                 case 'd': nr = getdecchrs(); break;
  63. !                 case 'o': nr = getoctchrs(); break;
  64. !                 case 'x': nr = gethexchrs(2); break;
  65. !                 case 'u': nr = gethexchrs(4); break;
  66. !                 case 'U': nr = gethexchrs(8); break;
  67. !                 default:  nr = -1; break;
  68.               }
  69.   
  70. !             if (nr < 0)
  71.                   EMSG2_RET_FAIL(
  72.                      _("E678: Invalid character after %s%%[dxouU]"),
  73.                       reg_magic == MAGIC_ALL);
  74.               /* TODO: what if a composing character follows? */
  75. !             EMIT(nr);
  76.               }
  77.               break;
  78.   
  79. ***************
  80. *** 1229,1234 ****
  81. --- 1228,1235 ----
  82.                   != (plen = (*mb_ptr2len)(old_regparse))
  83.                                  || utf_iscomposing(c)))
  84.           {
  85. +             int i = 0;
  86.               /* A base character plus composing characters, or just one
  87.                * or more composing characters.
  88.                * This requires creating a separate atom as if enclosing
  89. ***************
  90. *** 1237,1243 ****
  91.                * building the postfix form, not the NFA itself;
  92.                * a composing char could be: a, b, c, NFA_COMPOSING
  93.                * where 'b' and 'c' are chars with codes > 256. */
  94. -             i = 0;
  95.               for (;;)
  96.               {
  97.               EMIT(c);
  98. --- 1238,1243 ----
  99. ***************
  100. *** 2923,2931 ****
  101.       regsub_T        *submatch;
  102.       regsub_T        *m;
  103.   {
  104. -     int        c;
  105. -     int        n;
  106. -     int        i = 0;
  107.       int        result;
  108.       int        size = 0;
  109.       int        match = FALSE;
  110. --- 2923,2928 ----
  111. ***************
  112. *** 2939,2944 ****
  113. --- 2936,2942 ----
  114.       nfa_list_T    *listtbl[2][2];
  115.       nfa_list_T    *ll;
  116.       int        listid = 1;
  117. +     int        listidx;
  118.       nfa_list_T    *thislist;
  119.       nfa_list_T    *nextlist;
  120.       nfa_list_T    *neglist;
  121. ***************
  122. *** 3004,3010 ****
  123.   #define    ADD_POS_NEG_STATE(node)                            \
  124.       ll = listtbl[result ? 1 : 0][node->negated];                \
  125.       if (ll != NULL)                                \
  126. !     addstate(ll, node->out , &t->sub, n, listid + 1, &match);
  127.   
  128.   
  129.       /*
  130. --- 3002,3008 ----
  131.   #define    ADD_POS_NEG_STATE(node)                            \
  132.       ll = listtbl[result ? 1 : 0][node->negated];                \
  133.       if (ll != NULL)                                \
  134. !     addstate(ll, node->out , &t->sub, clen, listid + 1, &match);
  135.   
  136.   
  137.       /*
  138. ***************
  139. *** 3012,3032 ****
  140.        */
  141.       for (;;)
  142.       {
  143.   #ifdef FEAT_MBYTE
  144.       if (has_mbyte)
  145.       {
  146. !         c = (*mb_ptr2char)(reginput);
  147. !         n = (*mb_ptr2len)(reginput);
  148.       }
  149.       else
  150.   #endif
  151.       {
  152. !         c = *reginput;
  153. !         n = 1;
  154.       }
  155. !     if (c == NUL)
  156.       {
  157. !         n = 0;
  158.           go_to_nextline = FALSE;
  159.       }
  160.   
  161. --- 3010,3033 ----
  162.        */
  163.       for (;;)
  164.       {
  165. +     int    curc;
  166. +     int    clen;
  167.   #ifdef FEAT_MBYTE
  168.       if (has_mbyte)
  169.       {
  170. !         curc = (*mb_ptr2char)(reginput);
  171. !         clen = (*mb_ptr2len)(reginput);
  172.       }
  173.       else
  174.   #endif
  175.       {
  176. !         curc = *reginput;
  177. !         clen = 1;
  178.       }
  179. !     if (curc == NUL)
  180.       {
  181. !         clen = 0;
  182.           go_to_nextline = FALSE;
  183.       }
  184.   
  185. ***************
  186. *** 3040,3049 ****
  187.   #ifdef ENABLE_LOG
  188.       fprintf(log_fd, "------------------------------------------\n");
  189.       fprintf(log_fd, ">>> Reginput is \"%s\"\n", reginput);
  190. !     fprintf(log_fd, ">>> Advanced one character ... Current char is %c (code %d) \n", c, (int)c);
  191.       fprintf(log_fd, ">>> Thislist has %d states available: ", thislist->n);
  192. !     for (i = 0; i < thislist->n; i++)
  193. !         fprintf(log_fd, "%d  ", abs(thislist->t[i].state->id));
  194.       fprintf(log_fd, "\n");
  195.   #endif
  196.   
  197. --- 3041,3054 ----
  198.   #ifdef ENABLE_LOG
  199.       fprintf(log_fd, "------------------------------------------\n");
  200.       fprintf(log_fd, ">>> Reginput is \"%s\"\n", reginput);
  201. !     fprintf(log_fd, ">>> Advanced one character ... Current char is %c (code %d) \n", curc, (int)curc);
  202.       fprintf(log_fd, ">>> Thislist has %d states available: ", thislist->n);
  203. !     {
  204. !         int i;
  205. !         for (i = 0; i < thislist->n; i++)
  206. !         fprintf(log_fd, "%d  ", abs(thislist->t[i].state->id));
  207. !     }
  208.       fprintf(log_fd, "\n");
  209.   #endif
  210.   
  211. ***************
  212. *** 3057,3072 ****
  213.           break;
  214.   
  215.       /* compute nextlist */
  216. !     for (i = 0; i < thislist->n || neglist->n > 0; ++i)
  217.       {
  218.           if (neglist->n > 0)
  219.           {
  220.           t = &neglist->t[0];
  221.           neglist->n--;
  222. !         i--;
  223.           }
  224.           else
  225. !         t = &thislist->t[i];
  226.   
  227.   #ifdef NFA_REGEXP_DEBUG_LOG
  228.           nfa_set_code(t->state->c);
  229. --- 3062,3077 ----
  230.           break;
  231.   
  232.       /* compute nextlist */
  233. !     for (listidx = 0; listidx < thislist->n || neglist->n > 0; ++listidx)
  234.       {
  235.           if (neglist->n > 0)
  236.           {
  237.           t = &neglist->t[0];
  238.           neglist->n--;
  239. !         listidx--;
  240.           }
  241.           else
  242. !         t = &thislist->t[listidx];
  243.   
  244.   #ifdef NFA_REGEXP_DEBUG_LOG
  245.           nfa_set_code(t->state->c);
  246. ***************
  247. *** 3116,3122 ****
  248.            * the parent call. */
  249.           if (start->c == NFA_MOPEN + 0)
  250.               addstate_here(thislist, t->state->out, &t->sub, listid,
  251. !                                   &match, &i);
  252.           else
  253.           {
  254.               *m = t->sub;
  255. --- 3121,3127 ----
  256.            * the parent call. */
  257.           if (start->c == NFA_MOPEN + 0)
  258.               addstate_here(thislist, t->state->out, &t->sub, listid,
  259. !                                 &match, &listidx);
  260.           else
  261.           {
  262.               *m = t->sub;
  263. ***************
  264. *** 3190,3196 ****
  265.               }
  266.               /* t->state->out1 is the corresponding END_INVISIBLE node */
  267.               addstate_here(thislist, t->state->out1->out, &t->sub,
  268. !                               listid, &match, &i);
  269.           }
  270.           else
  271.           {
  272. --- 3195,3201 ----
  273.               }
  274.               /* t->state->out1 is the corresponding END_INVISIBLE node */
  275.               addstate_here(thislist, t->state->out1->out, &t->sub,
  276. !                             listid, &match, &listidx);
  277.           }
  278.           else
  279.           {
  280. ***************
  281. *** 3202,3221 ****
  282.           case NFA_BOL:
  283.           if (reginput == regline)
  284.               addstate_here(thislist, t->state->out, &t->sub, listid,
  285. !                                   &match, &i);
  286.           break;
  287.   
  288.           case NFA_EOL:
  289. !         if (c == NUL)
  290.               addstate_here(thislist, t->state->out, &t->sub, listid,
  291. !                                   &match, &i);
  292.           break;
  293.   
  294.           case NFA_BOW:
  295.           {
  296.           int bow = TRUE;
  297.   
  298. !         if (c == NUL)
  299.               bow = FALSE;
  300.   #ifdef FEAT_MBYTE
  301.           else if (has_mbyte)
  302. --- 3207,3226 ----
  303.           case NFA_BOL:
  304.           if (reginput == regline)
  305.               addstate_here(thislist, t->state->out, &t->sub, listid,
  306. !                                 &match, &listidx);
  307.           break;
  308.   
  309.           case NFA_EOL:
  310. !         if (curc == NUL)
  311.               addstate_here(thislist, t->state->out, &t->sub, listid,
  312. !                                 &match, &listidx);
  313.           break;
  314.   
  315.           case NFA_BOW:
  316.           {
  317.           int bow = TRUE;
  318.   
  319. !         if (curc == NUL)
  320.               bow = FALSE;
  321.   #ifdef FEAT_MBYTE
  322.           else if (has_mbyte)
  323. ***************
  324. *** 3230,3242 ****
  325.               bow = FALSE;
  326.           }
  327.   #endif
  328. !         else if (!vim_iswordc_buf(c, reg_buf)
  329.                  || (reginput > regline
  330.                      && vim_iswordc_buf(reginput[-1], reg_buf)))
  331.               bow = FALSE;
  332.           if (bow)
  333.               addstate_here(thislist, t->state->out, &t->sub, listid,
  334. !                                   &match, &i);
  335.           break;
  336.           }
  337.   
  338. --- 3235,3247 ----
  339.               bow = FALSE;
  340.           }
  341.   #endif
  342. !         else if (!vim_iswordc_buf(curc, reg_buf)
  343.                  || (reginput > regline
  344.                      && vim_iswordc_buf(reginput[-1], reg_buf)))
  345.               bow = FALSE;
  346.           if (bow)
  347.               addstate_here(thislist, t->state->out, &t->sub, listid,
  348. !                                 &match, &listidx);
  349.           break;
  350.           }
  351.   
  352. ***************
  353. *** 3260,3277 ****
  354.           }
  355.   #endif
  356.           else if (!vim_iswordc_buf(reginput[-1], reg_buf)
  357. !             || (reginput[0] != NUL && vim_iswordc_buf(c, reg_buf)))
  358.               eow = FALSE;
  359.           if (eow)
  360.               addstate_here(thislist, t->state->out, &t->sub, listid,
  361. !                                   &match, &i);
  362.           break;
  363.           }
  364.   
  365.   #ifdef FEAT_MBYTE
  366.           case NFA_COMPOSING:
  367.           {
  368. !         int        mc = c;
  369.           int        len = 0;
  370.           nfa_state_T *end;
  371.           nfa_state_T *sta;
  372. --- 3265,3283 ----
  373.           }
  374.   #endif
  375.           else if (!vim_iswordc_buf(reginput[-1], reg_buf)
  376. !             || (reginput[0] != NUL
  377. !                        && vim_iswordc_buf(curc, reg_buf)))
  378.               eow = FALSE;
  379.           if (eow)
  380.               addstate_here(thislist, t->state->out, &t->sub, listid,
  381. !                                 &match, &listidx);
  382.           break;
  383.           }
  384.   
  385.   #ifdef FEAT_MBYTE
  386.           case NFA_COMPOSING:
  387.           {
  388. !         int        mc = curc;
  389.           int        len = 0;
  390.           nfa_state_T *end;
  391.           nfa_state_T *sta;
  392. ***************
  393. *** 3286,3299 ****
  394.               /* Only match composing character(s), ignore base
  395.                * character.  Used for ".{composing}" and "{composing}"
  396.                * (no preceding character). */
  397. !             len += mb_char2len(c);
  398.           }
  399.           if (ireg_icombine)
  400.           {
  401.               /* If \Z was present, then ignore composing characters.
  402.                * When ignoring the base character this always matches. */
  403.               /* TODO: How about negated? */
  404. !             if (len == 0 && sta->c != c)
  405.               result = FAIL;
  406.               else
  407.               result = OK;
  408. --- 3292,3305 ----
  409.               /* Only match composing character(s), ignore base
  410.                * character.  Used for ".{composing}" and "{composing}"
  411.                * (no preceding character). */
  412. !             len += mb_char2len(mc);
  413.           }
  414.           if (ireg_icombine)
  415.           {
  416.               /* If \Z was present, then ignore composing characters.
  417.                * When ignoring the base character this always matches. */
  418.               /* TODO: How about negated? */
  419. !             if (len == 0 && sta->c != curc)
  420.               result = FAIL;
  421.               else
  422.               result = OK;
  423. ***************
  424. *** 3312,3318 ****
  425.   
  426.               /* We don't care about the order of composing characters.
  427.                * Get them into cchars[] first. */
  428. !             while (len < n)
  429.               {
  430.               mc = mb_ptr2char(reginput + len);
  431.               cchars[ccount++] = mc;
  432. --- 3318,3324 ----
  433.   
  434.               /* We don't care about the order of composing characters.
  435.                * Get them into cchars[] first. */
  436. !             while (len < clen)
  437.               {
  438.               mc = mb_ptr2char(reginput + len);
  439.               cchars[ccount++] = mc;
  440. ***************
  441. *** 3349,3355 ****
  442.   
  443.           case NFA_NEWL:
  444.           if (!reg_line_lbr && REG_MULTI
  445. !                     && c == NUL && reglnum <= reg_maxline)
  446.           {
  447.               go_to_nextline = TRUE;
  448.               /* Pass -1 for the offset, which means taking the position
  449. --- 3355,3361 ----
  450.   
  451.           case NFA_NEWL:
  452.           if (!reg_line_lbr && REG_MULTI
  453. !                      && curc == NUL && reglnum <= reg_maxline)
  454.           {
  455.               go_to_nextline = TRUE;
  456.               /* Pass -1 for the offset, which means taking the position
  457. ***************
  458. *** 3375,3409 ****
  459.           case NFA_CLASS_RETURN:
  460.           case NFA_CLASS_BACKSPACE:
  461.           case NFA_CLASS_ESCAPE:
  462. !         result = check_char_class(t->state->c, c);
  463.           ADD_POS_NEG_STATE(t->state);
  464.           break;
  465.   
  466.           case NFA_END_NEG_RANGE:
  467.           /* This follows a series of negated nodes, like:
  468.            * CHAR(x), NFA_NOT, CHAR(y), NFA_NOT etc. */
  469. !         if (c > 0)
  470. !             addstate(nextlist, t->state->out, &t->sub, n, listid + 1,
  471. !                                     &match);
  472.           break;
  473.   
  474.           case NFA_ANY:
  475.           /* Any char except '\0', (end of input) does not match. */
  476. !         if (c > 0)
  477. !             addstate(nextlist, t->state->out, &t->sub, n, listid + 1,
  478. !                                     &match);
  479.           break;
  480.   
  481.           /*
  482.            * Character classes like \a for alpha, \d for digit etc.
  483.            */
  484.           case NFA_IDENT:    /*  \i    */
  485. !         result = vim_isIDc(c);
  486.           ADD_POS_NEG_STATE(t->state);
  487.           break;
  488.   
  489.           case NFA_SIDENT:    /*  \I    */
  490. !         result = !VIM_ISDIGIT(c) && vim_isIDc(c);
  491.           ADD_POS_NEG_STATE(t->state);
  492.           break;
  493.   
  494. --- 3381,3415 ----
  495.           case NFA_CLASS_RETURN:
  496.           case NFA_CLASS_BACKSPACE:
  497.           case NFA_CLASS_ESCAPE:
  498. !         result = check_char_class(t->state->c, curc);
  499.           ADD_POS_NEG_STATE(t->state);
  500.           break;
  501.   
  502.           case NFA_END_NEG_RANGE:
  503.           /* This follows a series of negated nodes, like:
  504.            * CHAR(x), NFA_NOT, CHAR(y), NFA_NOT etc. */
  505. !         if (curc > 0)
  506. !             addstate(nextlist, t->state->out, &t->sub, clen,
  507. !                               listid + 1, &match);
  508.           break;
  509.   
  510.           case NFA_ANY:
  511.           /* Any char except '\0', (end of input) does not match. */
  512. !         if (curc > 0)
  513. !             addstate(nextlist, t->state->out, &t->sub, clen,
  514. !                               listid + 1, &match);
  515.           break;
  516.   
  517.           /*
  518.            * Character classes like \a for alpha, \d for digit etc.
  519.            */
  520.           case NFA_IDENT:    /*  \i    */
  521. !         result = vim_isIDc(curc);
  522.           ADD_POS_NEG_STATE(t->state);
  523.           break;
  524.   
  525.           case NFA_SIDENT:    /*  \I    */
  526. !         result = !VIM_ISDIGIT(curc) && vim_isIDc(curc);
  527.           ADD_POS_NEG_STATE(t->state);
  528.           break;
  529.   
  530. ***************
  531. *** 3413,3429 ****
  532.           break;
  533.   
  534.           case NFA_SKWORD:    /*  \K    */
  535. !         result = !VIM_ISDIGIT(c) && vim_iswordp_buf(reginput, reg_buf);
  536.           ADD_POS_NEG_STATE(t->state);
  537.           break;
  538.   
  539.           case NFA_FNAME:    /*  \f    */
  540. !         result = vim_isfilec(c);
  541.           ADD_POS_NEG_STATE(t->state);
  542.           break;
  543.   
  544.           case NFA_SFNAME:    /*  \F    */
  545. !         result = !VIM_ISDIGIT(c) && vim_isfilec(c);
  546.           ADD_POS_NEG_STATE(t->state);
  547.           break;
  548.   
  549. --- 3419,3436 ----
  550.           break;
  551.   
  552.           case NFA_SKWORD:    /*  \K    */
  553. !         result = !VIM_ISDIGIT(curc)
  554. !                     && vim_iswordp_buf(reginput, reg_buf);
  555.           ADD_POS_NEG_STATE(t->state);
  556.           break;
  557.   
  558.           case NFA_FNAME:    /*  \f    */
  559. !         result = vim_isfilec(curc);
  560.           ADD_POS_NEG_STATE(t->state);
  561.           break;
  562.   
  563.           case NFA_SFNAME:    /*  \F    */
  564. !         result = !VIM_ISDIGIT(curc) && vim_isfilec(curc);
  565.           ADD_POS_NEG_STATE(t->state);
  566.           break;
  567.   
  568. ***************
  569. *** 3433,3529 ****
  570.           break;
  571.   
  572.           case NFA_SPRINT:    /*  \P    */
  573. !         result = !VIM_ISDIGIT(c) && ptr2cells(reginput) == 1;
  574.           ADD_POS_NEG_STATE(t->state);
  575.           break;
  576.   
  577.           case NFA_WHITE:    /*  \s    */
  578. !         result = vim_iswhite(c);
  579.           ADD_POS_NEG_STATE(t->state);
  580.           break;
  581.   
  582.           case NFA_NWHITE:    /*  \S    */
  583. !         result = c != NUL && !vim_iswhite(c);
  584.           ADD_POS_NEG_STATE(t->state);
  585.           break;
  586.   
  587.           case NFA_DIGIT:    /*  \d    */
  588. !         result = ri_digit(c);
  589.           ADD_POS_NEG_STATE(t->state);
  590.           break;
  591.   
  592.           case NFA_NDIGIT:    /*  \D    */
  593. !         result = c != NUL && !ri_digit(c);
  594.           ADD_POS_NEG_STATE(t->state);
  595.           break;
  596.   
  597.           case NFA_HEX:    /*  \x    */
  598. !         result = ri_hex(c);
  599.           ADD_POS_NEG_STATE(t->state);
  600.           break;
  601.   
  602.           case NFA_NHEX:    /*  \X    */
  603. !         result = c != NUL && !ri_hex(c);
  604.           ADD_POS_NEG_STATE(t->state);
  605.           break;
  606.   
  607.           case NFA_OCTAL:    /*  \o    */
  608. !         result = ri_octal(c);
  609.           ADD_POS_NEG_STATE(t->state);
  610.           break;
  611.   
  612.           case NFA_NOCTAL:    /*  \O    */
  613. !         result = c != NUL && !ri_octal(c);
  614.           ADD_POS_NEG_STATE(t->state);
  615.           break;
  616.   
  617.           case NFA_WORD:    /*  \w    */
  618. !         result = ri_word(c);
  619.           ADD_POS_NEG_STATE(t->state);
  620.           break;
  621.   
  622.           case NFA_NWORD:    /*  \W    */
  623. !         result = c != NUL && !ri_word(c);
  624.           ADD_POS_NEG_STATE(t->state);
  625.           break;
  626.   
  627.           case NFA_HEAD:    /*  \h    */
  628. !         result = ri_head(c);
  629.           ADD_POS_NEG_STATE(t->state);
  630.           break;
  631.   
  632.           case NFA_NHEAD:    /*  \H    */
  633. !         result = c != NUL && !ri_head(c);
  634.           ADD_POS_NEG_STATE(t->state);
  635.           break;
  636.   
  637.           case NFA_ALPHA:    /*  \a    */
  638. !         result = ri_alpha(c);
  639.           ADD_POS_NEG_STATE(t->state);
  640.           break;
  641.   
  642.           case NFA_NALPHA:    /*  \A    */
  643. !         result = c != NUL && !ri_alpha(c);
  644.           ADD_POS_NEG_STATE(t->state);
  645.           break;
  646.   
  647.           case NFA_LOWER:    /*  \l    */
  648. !         result = ri_lower(c);
  649.           ADD_POS_NEG_STATE(t->state);
  650.           break;
  651.   
  652.           case NFA_NLOWER:    /*  \L    */
  653. !         result = c != NUL && !ri_lower(c);
  654.           ADD_POS_NEG_STATE(t->state);
  655.           break;
  656.   
  657.           case NFA_UPPER:    /*  \u    */
  658. !         result = ri_upper(c);
  659.           ADD_POS_NEG_STATE(t->state);
  660.           break;
  661.   
  662.           case NFA_NUPPER:    /* \U    */
  663. !         result = c != NUL && !ri_upper(c);
  664.           ADD_POS_NEG_STATE(t->state);
  665.           break;
  666.   
  667. --- 3440,3536 ----
  668.           break;
  669.   
  670.           case NFA_SPRINT:    /*  \P    */
  671. !         result = !VIM_ISDIGIT(curc) && ptr2cells(reginput) == 1;
  672.           ADD_POS_NEG_STATE(t->state);
  673.           break;
  674.   
  675.           case NFA_WHITE:    /*  \s    */
  676. !         result = vim_iswhite(curc);
  677.           ADD_POS_NEG_STATE(t->state);
  678.           break;
  679.   
  680.           case NFA_NWHITE:    /*  \S    */
  681. !         result = curc != NUL && !vim_iswhite(curc);
  682.           ADD_POS_NEG_STATE(t->state);
  683.           break;
  684.   
  685.           case NFA_DIGIT:    /*  \d    */
  686. !         result = ri_digit(curc);
  687.           ADD_POS_NEG_STATE(t->state);
  688.           break;
  689.   
  690.           case NFA_NDIGIT:    /*  \D    */
  691. !         result = curc != NUL && !ri_digit(curc);
  692.           ADD_POS_NEG_STATE(t->state);
  693.           break;
  694.   
  695.           case NFA_HEX:    /*  \x    */
  696. !         result = ri_hex(curc);
  697.           ADD_POS_NEG_STATE(t->state);
  698.           break;
  699.   
  700.           case NFA_NHEX:    /*  \X    */
  701. !         result = curc != NUL && !ri_hex(curc);
  702.           ADD_POS_NEG_STATE(t->state);
  703.           break;
  704.   
  705.           case NFA_OCTAL:    /*  \o    */
  706. !         result = ri_octal(curc);
  707.           ADD_POS_NEG_STATE(t->state);
  708.           break;
  709.   
  710.           case NFA_NOCTAL:    /*  \O    */
  711. !         result = curc != NUL && !ri_octal(curc);
  712.           ADD_POS_NEG_STATE(t->state);
  713.           break;
  714.   
  715.           case NFA_WORD:    /*  \w    */
  716. !         result = ri_word(curc);
  717.           ADD_POS_NEG_STATE(t->state);
  718.           break;
  719.   
  720.           case NFA_NWORD:    /*  \W    */
  721. !         result = curc != NUL && !ri_word(curc);
  722.           ADD_POS_NEG_STATE(t->state);
  723.           break;
  724.   
  725.           case NFA_HEAD:    /*  \h    */
  726. !         result = ri_head(curc);
  727.           ADD_POS_NEG_STATE(t->state);
  728.           break;
  729.   
  730.           case NFA_NHEAD:    /*  \H    */
  731. !         result = curc != NUL && !ri_head(curc);
  732.           ADD_POS_NEG_STATE(t->state);
  733.           break;
  734.   
  735.           case NFA_ALPHA:    /*  \a    */
  736. !         result = ri_alpha(curc);
  737.           ADD_POS_NEG_STATE(t->state);
  738.           break;
  739.   
  740.           case NFA_NALPHA:    /*  \A    */
  741. !         result = curc != NUL && !ri_alpha(curc);
  742.           ADD_POS_NEG_STATE(t->state);
  743.           break;
  744.   
  745.           case NFA_LOWER:    /*  \l    */
  746. !         result = ri_lower(curc);
  747.           ADD_POS_NEG_STATE(t->state);
  748.           break;
  749.   
  750.           case NFA_NLOWER:    /*  \L    */
  751. !         result = curc != NUL && !ri_lower(curc);
  752.           ADD_POS_NEG_STATE(t->state);
  753.           break;
  754.   
  755.           case NFA_UPPER:    /*  \u    */
  756. !         result = ri_upper(curc);
  757.           ADD_POS_NEG_STATE(t->state);
  758.           break;
  759.   
  760.           case NFA_NUPPER:    /* \U    */
  761. !         result = curc != NUL && !ri_upper(curc);
  762.           ADD_POS_NEG_STATE(t->state);
  763.           break;
  764.   
  765. ***************
  766. *** 3549,3565 ****
  767.           /* TODO: put this in #ifdef later */
  768.           if (t->state->c < -256)
  769.               EMSGN("INTERNAL: Negative state char: %ld", t->state->c);
  770. !         result = (no_Magic(t->state->c) == c);
  771.   
  772.           if (!result)
  773.               result = ireg_ic == TRUE
  774. !                 && MB_TOLOWER(t->state->c) == MB_TOLOWER(c);
  775.   #ifdef FEAT_MBYTE
  776.           /* If there is a composing character which is not being
  777.            * ignored there can be no match. Match with composing
  778.            * character uses NFA_COMPOSING above. */
  779.           if (result && enc_utf8 && !ireg_icombine
  780. !                               && n != utf_char2len(c))
  781.               result = FALSE;
  782.   #endif
  783.           ADD_POS_NEG_STATE(t->state);
  784. --- 3556,3572 ----
  785.           /* TODO: put this in #ifdef later */
  786.           if (t->state->c < -256)
  787.               EMSGN("INTERNAL: Negative state char: %ld", t->state->c);
  788. !         result = (no_Magic(t->state->c) == curc);
  789.   
  790.           if (!result)
  791.               result = ireg_ic == TRUE
  792. !                    && MB_TOLOWER(t->state->c) == MB_TOLOWER(curc);
  793.   #ifdef FEAT_MBYTE
  794.           /* If there is a composing character which is not being
  795.            * ignored there can be no match. Match with composing
  796.            * character uses NFA_COMPOSING above. */
  797.           if (result && enc_utf8 && !ireg_icombine
  798. !                         && clen != utf_char2len(curc))
  799.               result = FALSE;
  800.   #endif
  801.           ADD_POS_NEG_STATE(t->state);
  802. ***************
  803. *** 3578,3598 ****
  804.   #ifdef ENABLE_LOG
  805.           fprintf(log_fd, "(---) STARTSTATE\n");
  806.   #endif
  807. !         addstate(nextlist, start, m, n, listid + 1, &match);
  808.       }
  809.   
  810.   #ifdef ENABLE_LOG
  811.       fprintf(log_fd, ">>> Thislist had %d states available: ", thislist->n);
  812. !     for (i = 0; i< thislist->n; i++)
  813. !         fprintf(log_fd, "%d  ", abs(thislist->t[i].state->id));
  814.       fprintf(log_fd, "\n");
  815.   #endif
  816.   
  817.   nextchar:
  818.       /* Advance to the next character, or advance to the next line, or
  819.        * finish. */
  820. !     if (n != 0)
  821. !         reginput += n;
  822.       else if (go_to_nextline)
  823.           reg_nextline();
  824.       else
  825. --- 3585,3609 ----
  826.   #ifdef ENABLE_LOG
  827.           fprintf(log_fd, "(---) STARTSTATE\n");
  828.   #endif
  829. !         addstate(nextlist, start, m, clen, listid + 1, &match);
  830.       }
  831.   
  832.   #ifdef ENABLE_LOG
  833.       fprintf(log_fd, ">>> Thislist had %d states available: ", thislist->n);
  834. !     {
  835. !         int i;
  836. !         for (i = 0; i < thislist->n; i++)
  837. !         fprintf(log_fd, "%d  ", abs(thislist->t[i].state->id));
  838. !     }
  839.       fprintf(log_fd, "\n");
  840.   #endif
  841.   
  842.   nextchar:
  843.       /* Advance to the next character, or advance to the next line, or
  844.        * finish. */
  845. !     if (clen != 0)
  846. !         reginput += clen;
  847.       else if (go_to_nextline)
  848.           reg_nextline();
  849.       else
  850. *** ../vim-7.3.1021/src/version.c    2013-05-26 14:32:01.000000000 +0200
  851. --- src/version.c    2013-05-26 14:39:12.000000000 +0200
  852. ***************
  853. *** 730,731 ****
  854. --- 730,733 ----
  855.   {   /* Add new patch number below this line */
  856. + /**/
  857. +     1022,
  858.   /**/
  859.  
  860. -- 
  861. Female engineers become irresistible at the age of consent and remain that
  862. way until about thirty minutes after their clinical death.  Longer if it's a
  863. warm day.
  864.                 (Scott Adams - The Dilbert principle)
  865.  
  866.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  867. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  868. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  869.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  870.