|
Karsten Hopp |
a1ee54 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
a1ee54 |
Subject: Patch 7.3.1224
|
|
Karsten Hopp |
a1ee54 |
Fcc: outbox
|
|
Karsten Hopp |
a1ee54 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
a1ee54 |
Mime-Version: 1.0
|
|
Karsten Hopp |
a1ee54 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
a1ee54 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
a1ee54 |
------------
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
Patch 7.3.1224
|
|
Karsten Hopp |
a1ee54 |
Problem: Clang gives warnings on xxd.
|
|
Karsten Hopp |
a1ee54 |
Solution: Change how to use part of a string. (Dominique Pelle) Also avoid
|
|
Karsten Hopp |
a1ee54 |
warning for return not reached.
|
|
Karsten Hopp |
a1ee54 |
Files: src/xxd/xxd.c, src/regexp_nfa.c
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
*** ../vim-7.3.1223/src/xxd/xxd.c 2013-02-26 14:14:01.000000000 +0100
|
|
Karsten Hopp |
a1ee54 |
--- src/xxd/xxd.c 2013-06-21 18:23:53.000000000 +0200
|
|
Karsten Hopp |
a1ee54 |
***************
|
|
Karsten Hopp |
a1ee54 |
*** 722,728 ****
|
|
Karsten Hopp |
a1ee54 |
while ((length < 0 || p < length) && (c = getc(fp)) != EOF)
|
|
Karsten Hopp |
a1ee54 |
{
|
|
Karsten Hopp |
a1ee54 |
if (fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X",
|
|
Karsten Hopp |
a1ee54 |
! (p % cols) ? ", " : ",\n "+2*!p, c) < 0)
|
|
Karsten Hopp |
a1ee54 |
die(3);
|
|
Karsten Hopp |
a1ee54 |
p++;
|
|
Karsten Hopp |
a1ee54 |
}
|
|
Karsten Hopp |
a1ee54 |
--- 722,728 ----
|
|
Karsten Hopp |
a1ee54 |
while ((length < 0 || p < length) && (c = getc(fp)) != EOF)
|
|
Karsten Hopp |
a1ee54 |
{
|
|
Karsten Hopp |
a1ee54 |
if (fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X",
|
|
Karsten Hopp |
a1ee54 |
! (p % cols) ? ", " : &",\n "[2*!p], c) < 0)
|
|
Karsten Hopp |
a1ee54 |
die(3);
|
|
Karsten Hopp |
a1ee54 |
p++;
|
|
Karsten Hopp |
a1ee54 |
}
|
|
Karsten Hopp |
a1ee54 |
***************
|
|
Karsten Hopp |
a1ee54 |
*** 731,737 ****
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
if (p && fputs("\n", fpo) == EOF)
|
|
Karsten Hopp |
a1ee54 |
die(3);
|
|
Karsten Hopp |
a1ee54 |
! if (fputs("};\n" + 3 * (fp == stdin), fpo) == EOF)
|
|
Karsten Hopp |
a1ee54 |
die(3);
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
if (fp != stdin)
|
|
Karsten Hopp |
a1ee54 |
--- 731,737 ----
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
if (p && fputs("\n", fpo) == EOF)
|
|
Karsten Hopp |
a1ee54 |
die(3);
|
|
Karsten Hopp |
a1ee54 |
! if (fputs(&";;\n"[3 * (fp == stdin)], fpo) == EOF)
|
|
Karsten Hopp |
a1ee54 |
die(3);
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
if (fp != stdin)
|
|
Karsten Hopp |
a1ee54 |
*** ../vim-7.3.1223/src/regexp_nfa.c 2013-06-17 21:33:36.000000000 +0200
|
|
Karsten Hopp |
a1ee54 |
--- src/regexp_nfa.c 2013-06-21 18:29:43.000000000 +0200
|
|
Karsten Hopp |
a1ee54 |
***************
|
|
Karsten Hopp |
a1ee54 |
*** 2611,2617 ****
|
|
Karsten Hopp |
a1ee54 |
if (depth > 4)
|
|
Karsten Hopp |
a1ee54 |
return -1;
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
! for (;;)
|
|
Karsten Hopp |
a1ee54 |
{
|
|
Karsten Hopp |
a1ee54 |
switch (state->c)
|
|
Karsten Hopp |
a1ee54 |
{
|
|
Karsten Hopp |
a1ee54 |
--- 2611,2617 ----
|
|
Karsten Hopp |
a1ee54 |
if (depth > 4)
|
|
Karsten Hopp |
a1ee54 |
return -1;
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
! while (state != NULL)
|
|
Karsten Hopp |
a1ee54 |
{
|
|
Karsten Hopp |
a1ee54 |
switch (state->c)
|
|
Karsten Hopp |
a1ee54 |
{
|
|
Karsten Hopp |
a1ee54 |
***************
|
|
Karsten Hopp |
a1ee54 |
*** 2810,2816 ****
|
|
Karsten Hopp |
a1ee54 |
state = state->out;
|
|
Karsten Hopp |
a1ee54 |
}
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
! /* unrecognized */
|
|
Karsten Hopp |
a1ee54 |
return -1;
|
|
Karsten Hopp |
a1ee54 |
}
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
--- 2810,2816 ----
|
|
Karsten Hopp |
a1ee54 |
state = state->out;
|
|
Karsten Hopp |
a1ee54 |
}
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
! /* unrecognized, "cannot happen" */
|
|
Karsten Hopp |
a1ee54 |
return -1;
|
|
Karsten Hopp |
a1ee54 |
}
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
*** ../vim-7.3.1223/src/version.c 2013-06-19 21:17:26.000000000 +0200
|
|
Karsten Hopp |
a1ee54 |
--- src/version.c 2013-06-21 18:25:09.000000000 +0200
|
|
Karsten Hopp |
a1ee54 |
***************
|
|
Karsten Hopp |
a1ee54 |
*** 730,731 ****
|
|
Karsten Hopp |
a1ee54 |
--- 730,733 ----
|
|
Karsten Hopp |
a1ee54 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
a1ee54 |
+ /**/
|
|
Karsten Hopp |
a1ee54 |
+ 1224,
|
|
Karsten Hopp |
a1ee54 |
/**/
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
--
|
|
Karsten Hopp |
a1ee54 |
Two fish in a tank. One says to the other:
|
|
Karsten Hopp |
a1ee54 |
"Do you know how to drive this thing?"
|
|
Karsten Hopp |
a1ee54 |
|
|
Karsten Hopp |
a1ee54 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
a1ee54 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
a1ee54 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
a1ee54 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|