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 / 6.0.233 < prev    next >
Encoding:
Internet Message Format  |  2002-02-17  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.233
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.233
  11. Problem:    "\1\{,8}" in a regexp is not allowed, but it should work, because
  12.         there is an upper limit.  (Jim Battle)
  13. Solution:   Allow using "\{min,max}" after an atom that can be empty if there
  14.         is an upper limit.
  15. Files:        src/regexp.c
  16.  
  17.  
  18. *** ../vim60.232/src/regexp.c    Mon Feb  4 22:43:27 2002
  19. --- src/regexp.c    Mon Feb 18 12:30:16 2002
  20. ***************
  21. *** 1213,1220 ****
  22.       if (op == Magic('+'))
  23.           EMSG_M_RET_NULL("E57: %s+ operand could be empty",
  24.                                  reg_magic == MAGIC_ALL);
  25. !     EMSG_M_RET_NULL("E58: %s{ operand could be empty",
  26. !                               reg_magic == MAGIC_ALL);
  27.       }
  28.       *flagp = (WORST | SPSTART | (flags & HASNL));    /* default flags */
  29.   
  30. --- 1213,1219 ----
  31.       if (op == Magic('+'))
  32.           EMSG_M_RET_NULL("E57: %s+ operand could be empty",
  33.                                  reg_magic == MAGIC_ALL);
  34. !     /* "\{}" is checked below, it's allowed when there is an upper limit */
  35.       }
  36.       *flagp = (WORST | SPSTART | (flags & HASNL));    /* default flags */
  37.   
  38. ***************
  39. *** 1279,1287 ****
  40.       case Magic('?'):
  41.       case Magic('='):
  42.           /* Emit x= as (x|) */
  43. !         reginsert(BRANCH, ret); /* Either x */
  44.           regtail(ret, regnode(BRANCH));    /* or */
  45. !         next = regnode(NOTHING);/* null. */
  46.           regtail(ret, next);
  47.           regoptail(ret, next);
  48.           break;
  49. --- 1278,1286 ----
  50.       case Magic('?'):
  51.       case Magic('='):
  52.           /* Emit x= as (x|) */
  53. !         reginsert(BRANCH, ret);        /* Either x */
  54.           regtail(ret, regnode(BRANCH));    /* or */
  55. !         next = regnode(NOTHING);        /* null. */
  56.           regtail(ret, next);
  57.           regoptail(ret, next);
  58.           break;
  59. ***************
  60. *** 1289,1294 ****
  61. --- 1288,1297 ----
  62.       case Magic('{'):
  63.           if (!read_limits(&minval, &maxval))
  64.           return NULL;
  65. +         if (!(flags & HASWIDTH) && (maxval > minval
  66. +                  ? maxval >= MAX_LIMIT : minval >= MAX_LIMIT))
  67. +         EMSG_M_RET_NULL("E58: %s{ operand could be empty",
  68. +                               reg_magic == MAGIC_ALL);
  69.           if (flags & SIMPLE)
  70.           {
  71.           reginsert(BRACE_SIMPLE, ret);
  72. *** ../vim60.232/src/version.c    Mon Feb 18 12:08:34 2002
  73. --- src/version.c    Mon Feb 18 12:36:49 2002
  74. ***************
  75. *** 608,609 ****
  76. --- 608,611 ----
  77.   {   /* Add new patch number below this line */
  78. + /**/
  79. +     233,
  80.   /**/
  81.  
  82. -- 
  83. System administrators are just like women: You can't live with them and you
  84. can't live without them.
  85.  
  86.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  87. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  88. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  89.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  90.