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.1016 < prev    next >
Encoding:
Internet Message Format  |  2013-05-24  |  4.3 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1016
  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.1016
  11. Problem:    Unused field in nfa_state.
  12. Solution:   Remove lastthread.
  13. Files:        src/regexp.h, src/regexp_nfa.c
  14.  
  15.  
  16. *** ../vim-7.3.1015/src/regexp.h    2013-05-19 19:16:25.000000000 +0200
  17. --- src/regexp.h    2013-05-25 15:23:33.000000000 +0200
  18. ***************
  19. *** 74,80 ****
  20.       int            id;
  21.       int            lastlist;
  22.       int            visits;
  23. -     thread_T        *lastthread;
  24.       int            negated;
  25.   };
  26.   
  27. --- 74,79 ----
  28. *** ../vim-7.3.1015/src/regexp_nfa.c    2013-05-25 14:41:58.000000000 +0200
  29. --- src/regexp_nfa.c    2013-05-25 15:23:28.000000000 +0200
  30. ***************
  31. *** 1865,1880 ****
  32.       /* grow indent for state->out */
  33.       indent->ga_len -= 1;
  34.       if (state->out1)
  35. !     ga_concat(indent, "| ");
  36.       else
  37. !     ga_concat(indent, "  ");
  38.       ga_append(indent, '\0');
  39.   
  40.       nfa_print_state2(debugf, state->out, indent);
  41.   
  42.       /* replace last part of indent for state->out1 */
  43.       indent->ga_len -= 3;
  44. !     ga_concat(indent, "  ");
  45.       ga_append(indent, '\0');
  46.   
  47.       nfa_print_state2(debugf, state->out1, indent);
  48. --- 1865,1880 ----
  49.       /* grow indent for state->out */
  50.       indent->ga_len -= 1;
  51.       if (state->out1)
  52. !     ga_concat(indent, (char_u *)"| ");
  53.       else
  54. !     ga_concat(indent, (char_u *)"  ");
  55.       ga_append(indent, '\0');
  56.   
  57.       nfa_print_state2(debugf, state->out, indent);
  58.   
  59.       /* replace last part of indent for state->out1 */
  60.       indent->ga_len -= 3;
  61. !     ga_concat(indent, (char_u *)"  ");
  62.       ga_append(indent, '\0');
  63.   
  64.       nfa_print_state2(debugf, state->out1, indent);
  65. ***************
  66. *** 1948,1954 ****
  67.   
  68.       s->id   = istate;
  69.       s->lastlist = 0;
  70. -     s->lastthread = NULL;
  71.       s->visits = 0;
  72.       s->negated = FALSE;
  73.   
  74. --- 1948,1953 ----
  75. ***************
  76. *** 2498,2503 ****
  77. --- 2497,2503 ----
  78.   {
  79.       regsub_T        save;
  80.       int            subidx = 0;
  81. +     thread_T        *lastthread;
  82.   
  83.       if (l == NULL || state == NULL)
  84.       return;
  85. ***************
  86. *** 2531,2539 ****
  87.           {
  88.           /* add the state to the list */
  89.           state->lastlist = lid;
  90. !         state->lastthread = &l->t[l->n++];
  91. !         state->lastthread->state = state;
  92. !         state->lastthread->sub = *m;
  93.           }
  94.       }
  95.   
  96. --- 2531,2539 ----
  97.           {
  98.           /* add the state to the list */
  99.           state->lastlist = lid;
  100. !         lastthread = &l->t[l->n++];
  101. !         lastthread->state = state;
  102. !         lastthread->sub = *m;
  103.           }
  104.       }
  105.   
  106. ***************
  107. *** 2983,2989 ****
  108.       fprintf(log_fd, ">>> Reginput is \"%s\"\n", reginput);
  109.       fprintf(log_fd, ">>> Advanced one character ... Current char is %c (code %d) \n", c, (int)c);
  110.       fprintf(log_fd, ">>> Thislist has %d states available: ", thislist->n);
  111. !     for (i = 0; i< thislist->n; i++)
  112.           fprintf(log_fd, "%d  ", abs(thislist->t[i].state->id));
  113.       fprintf(log_fd, "\n");
  114.   #endif
  115. --- 2983,2989 ----
  116.       fprintf(log_fd, ">>> Reginput is \"%s\"\n", reginput);
  117.       fprintf(log_fd, ">>> Advanced one character ... Current char is %c (code %d) \n", c, (int)c);
  118.       fprintf(log_fd, ">>> Thislist has %d states available: ", thislist->n);
  119. !     for (i = 0; i < thislist->n; i++)
  120.           fprintf(log_fd, "%d  ", abs(thislist->t[i].state->id));
  121.       fprintf(log_fd, "\n");
  122.   #endif
  123. ***************
  124. *** 3690,3696 ****
  125.       prog->state[i].id = i;
  126.       prog->state[i].lastlist = 0;
  127.       prog->state[i].visits = 0;
  128. -     prog->state[i].lastthread = NULL;
  129.       }
  130.   
  131.       retval = nfa_regtry(prog->start, col);
  132. --- 3690,3695 ----
  133. *** ../vim-7.3.1015/src/version.c    2013-05-25 14:41:58.000000000 +0200
  134. --- src/version.c    2013-05-25 15:28:53.000000000 +0200
  135. ***************
  136. *** 730,731 ****
  137. --- 730,733 ----
  138.   {   /* Add new patch number below this line */
  139. + /**/
  140. +     1016,
  141.   /**/
  142.  
  143. -- 
  144. For large projects, Team Leaders use sophisticated project management software
  145. to keep track of who's doing what.  The software collects the lies and guesses
  146. of the project team and organizes them in to instantly outdated charts that
  147. are too boring to look at closely.  This is called "planning".
  148.                 (Scott Adams - The Dilbert principle)
  149.  
  150.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  151. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  152. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  153.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  154.