To: vim_dev@googlegroups.com Subject: Patch 8.2.3533 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///