Patch 8.2.3533
Problem:    Inefficient code in xxd.
Solution:   Don't use "p" when "hextype" is non-zero. (closes #9013)
Files:      src/xxd/xxd.c


*** ../vim-8.2.3532/src/xxd/xxd.c       2021-10-17 16:09:05.286073690 +0100
--- src/xxd/xxd.c       2021-10-18 13:14:41.640950478 +0100
***************
*** 302,321 ****
  
        ign_garb = 0;
  
!       if (p >= cols)
        {
!         if (!hextype)
            {
!             if (n1 < 0)
!               {
!                 p = 0;
!                 continue;
!               }
!             want_off = (want_off << 4) | n1;
              continue;
            }
!         else
!           p = 0;
        }
  
        if (base_off + want_off != have_off)
--- 302,316 ----
  
        ign_garb = 0;
  
!       if (!hextype && (p >= cols))
        {
!         if (n1 < 0)
            {
!             p = 0;
              continue;
            }
!         want_off = (want_off << 4) | n1;
!         continue;
        }
  
        if (base_off + want_off != have_off)
***************
*** 344,350 ****
          have_off++;
          want_off++;
          n1 = -1;
!         if ((++p >= cols) && !hextype)
            {
              /* skip the rest of the line as garbage */
              n2 = -1;
--- 339,345 ----
          have_off++;
          want_off++;
          n1 = -1;
!         if (!hextype && (++p >= cols))
            {
              /* skip the rest of the line as garbage */
              n2 = -1;
*** ../vim-8.2.3532/src/version.c       2021-10-17 21:53:54.588481239 +0100
--- src/version.c       2021-10-18 13:15:47.973723108 +0100
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3533,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
189. You put your e-mail address in the upper left-hand corner of envelopes.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211018121631.B2F16C80055%40moolenaar.net.

Raspunde prin e-mail lui