Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27177 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81581 invoked by uid 1010); 22 Dec 2006 12:20:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81566 invoked from network); 22 Dec 2006 12:20:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2006 12:20:58 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 209.142.136.132 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from [209.142.136.132] ([209.142.136.132:46629] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/79-06429-78DCB854 for ; Fri, 22 Dec 2006 07:20:58 -0500 Received: from pc1 (d35-28.rt-bras.wnvl.centurytel.net [69.179.162.28]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id kBMCKJ02017759 for ; Fri, 22 Dec 2006 06:20:20 -0600 Message-ID: <01c501c725c3$8c6c32a0$0201a8c0@pc1> To: Date: Fri, 22 Dec 2006 06:20:20 -0600 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_01C2_01C72591.41A47110" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Subject: [PATCH] *printf %e bug (36392) From: php_lists@realplain.com ("Matt Wilmas") ------=_NextPart_000_01C2_01C72591.41A47110 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, Using the %e format specifier in the *printf() functions gives one less decimal place than it should. The recent *printf changes only happened to fix the problem when precision is 0. The new %E works correctly, which is obvious from the code. :-) Anyway, the attached patches remove the few problem lines. BTW, should there be a NEWS entry about the addition of %g, %G, and the previously missing %E (uppercase)? If I wasn't following the changes, that's something I'd want to see... :-) Matt ------=_NextPart_000_01C2_01C72591.41A47110 Content-Type: text/plain; name="printf_e.diff.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="printf_e.diff.txt" Index: ext/standard/formatted_print.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/formatted_print.c,v=0A= retrieving revision 1.93=0A= diff -u -r1.93 formatted_print.c=0A= --- ext/standard/formatted_print.c 20 Dec 2006 18:33:27 -0000 1.93=0A= +++ ext/standard/formatted_print.c 22 Dec 2006 11:55:29 -0000=0A= @@ -368,9 +368,6 @@=0A= =0A= switch (fmt) { =0A= case 'e':=0A= - if (precision) {=0A= - precision--;=0A= - }=0A= case 'E':=0A= case 'f':=0A= case 'F':=0A= @@ -485,9 +482,6 @@=0A= =0A= switch (fmt) { =0A= case 0x65 /* 'e' */:=0A= - if (precision) {=0A= - precision--;=0A= - }=0A= case 0x45 /* 'E' */:=0A= case 0x46 /* 'F' */:=0A= case 0x66 /* 'f' */:=0A= ------=_NextPart_000_01C2_01C72591.41A47110 Content-Type: text/plain; name="printf_e_5_2.diff.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="printf_e_5_2.diff.txt" Index: ext/standard/formatted_print.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/formatted_print.c,v=0A= retrieving revision 1.82.2.1.2.9=0A= diff -u -r1.82.2.1.2.9 formatted_print.c=0A= --- ext/standard/formatted_print.c 19 Dec 2006 13:13:29 -0000 = 1.82.2.1.2.9=0A= +++ ext/standard/formatted_print.c 22 Dec 2006 11:55:29 -0000=0A= @@ -229,9 +229,6 @@=0A= =0A= switch (fmt) { =0A= case 'e':=0A= - if (precision) {=0A= - precision--;=0A= - }=0A= case 'E':=0A= case 'f':=0A= case 'F':=0A= ------=_NextPart_000_01C2_01C72591.41A47110--