From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9415E138330 for ; Sun, 11 Sep 2016 16:39:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37C78E0B91; Sun, 11 Sep 2016 16:39:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 092D7E0B91 for ; Sun, 11 Sep 2016 16:39:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E964E340961 for ; Sun, 11 Sep 2016 16:38:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 55C4B2464 for ; Sun, 11 Sep 2016 16:38:57 +0000 (UTC) From: "Michael Orlitzky" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" Message-ID: <1473611822.8843015ce30572ccf57bdf181f756728ff272fd0.mjo@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/PEAR-Spreadsheet_Excel_Writer/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch X-VCS-Directories: dev-php/PEAR-Spreadsheet_Excel_Writer/files/ X-VCS-Committer: mjo X-VCS-Committer-Name: Michael Orlitzky X-VCS-Revision: 8843015ce30572ccf57bdf181f756728ff272fd0 X-VCS-Branch: master Date: Sun, 11 Sep 2016 16:38:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4d50834d-236a-4d23-966b-aed1306f128a X-Archives-Hash: 01544b75e729469d8b7c1305e6396cf1 commit: 8843015ce30572ccf57bdf181f756728ff272fd0 Author: Michael Mair-Keimberger (asterix) gmail com> AuthorDate: Thu Sep 8 17:51:18 2016 +0000 Commit: Michael Orlitzky gentoo org> CommitDate: Sun Sep 11 16:37:02 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8843015c dev-php:PEAR-Spreadsheet_Excel_Writer: remove unused patch Signed-off-by: Michael Orlitzky gentoo.org> .../PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch | 199 --------------------- 1 file changed, 199 deletions(-) diff --git a/dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch b/dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch deleted file mode 100644 index d21d15d..00000000 --- a/dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch +++ /dev/null @@ -1,199 +0,0 @@ -http://pear.php.net/bugs/bug.php?id=1572 -http://bugs.gentoo.org/show_bug.cgi?id=199675 ---- Writer/Workbook.php_orig 2007-11-19 13:58:36.000000000 +0100 -+++ Writer/Workbook.php 2007-11-19 18:10:42.000000000 +0100 -@@ -1311,9 +1311,10 @@ - 8228 : Maximum Excel97 block size - -4 : Length of block header - -8 : Length of additional SST header information -- = 8216 -+ -8 : Arbitrary number to keep within _add_continue() limit -+ = 8208 - */ -- $continue_limit = 8216; -+ $continue_limit = 8208; - $block_length = 0; - $written = 0; - $this->_block_sizes = array(); -@@ -1321,6 +1322,9 @@ - - foreach (array_keys($this->_str_table) as $string) { - $string_length = strlen($string); -+ $headerinfo = unpack("vlength/Cencoding", $string); -+ $encoding = $headerinfo["encoding"]; -+ $split_string = 0; - - // Block length is the total length of the strings that will be - // written out in a single SST or CONTINUE block. -@@ -1347,16 +1351,39 @@ - boundaries. Therefore, in some cases we need to reduce the - amount of available - */ -+ $align = 0; -+ -+ // Only applies to Unicode strings -+ if ($encoding == 1) { -+ // Min string + header size -1 -+ $header_length = 4; -+ -+ if ($space_remaining > $header_length) { -+ // String contains 3 byte header => split on odd boundary -+ if (!$split_string && $space_remaining % 2 != 1) { -+ $space_remaining--; -+ $align = 1; -+ } -+ // Split section without header => split on even boundary -+ else if ($split_string && $space_remaining % 2 == 1) { -+ $space_remaining--; -+ $align = 1; -+ } -+ -+ $split_string = 1; -+ } -+ } -+ - - if ($space_remaining > $header_length) { - // Write as much as possible of the string in the current block - $written += $space_remaining; - - // Reduce the current block length by the amount written -- $block_length -= $continue_limit - $continue; -+ $block_length -= $continue_limit - $continue - $align; - - // Store the max size for this block -- $this->_block_sizes[] = $continue_limit; -+ $this->_block_sizes[] = $continue_limit - $align; - - // If the current string was split then the next CONTINUE block - // should have the string continue flag (grbit) set unless the -@@ -1398,13 +1425,19 @@ - This length is required to set the offsets in the BOUNDSHEET records since - they must be written before the SST records - */ -- $total_offset = array_sum($this->_block_sizes); -- // SST information -- $total_offset += 8; -- if (!empty($this->_block_sizes)) { -- $total_offset += (count($this->_block_sizes)) * 4; // add CONTINUE headers -+ -+ $tmp_block_sizes = array(); -+ $tmp_block_sizes = $this->_block_sizes; -+ -+ $length = 12; -+ if (!empty($tmp_block_sizes)) { -+ $length += array_shift($tmp_block_sizes); // SST information - } -- return $total_offset; -+ while (!empty($tmp_block_sizes)) { -+ $length += 4 + array_shift($tmp_block_sizes); // add CONTINUE headers -+ } -+ -+ return $length; - } - - /** -@@ -1421,9 +1454,30 @@ - function _storeSharedStringsTable() - { - $record = 0x00fc; // Record identifier -+ $length = 0x0008; // Number of bytes to follow -+ $total = 0x0000; -+ -+ // Iterate through the strings to calculate the CONTINUE block sizes -+ $continue_limit = 8208; -+ $block_length = 0; -+ $written = 0; -+ $continue = 0; -+ - // sizes are upside down -- $this->_block_sizes = array_reverse($this->_block_sizes); -- $length = array_pop($this->_block_sizes) + 8; // First block size plus SST information -+ $tmp_block_sizes = $this->_block_sizes; -+// $tmp_block_sizes = array_reverse($this->_block_sizes); -+ -+ // The SST record is required even if it contains no strings. Thus we will -+ // always have a length -+ // -+ if (!empty($tmp_block_sizes)) { -+ $length = 8 + array_shift($tmp_block_sizes); -+ } else { -+ // No strings -+ $length = 8; -+ } -+ -+ - - // Write the SST block header information - $header = pack("vv", $record, $length); -@@ -1431,18 +1485,14 @@ - $this->_append($header . $data); - - -- // Iterate through the strings to calculate the CONTINUE block sizes -- $continue_limit = 8216; -- $block_length = 0; -- $written = 0; -- $continue = 0; - - - /* TODO: not good for performance */ - foreach (array_keys($this->_str_table) as $string) { - - $string_length = strlen($string); -- $encoding = 0; // assume there are no Unicode strings -+ $headerinfo = unpack("vlength/Cencoding", $string); -+ $encoding = $headerinfo["encoding"]; - $split_string = 0; - - // Block length is the total length of the strings that will be -@@ -1473,6 +1523,30 @@ - - // Unicode data should only be split on char (2 byte) boundaries. - // Therefore, in some cases we need to reduce the amount of available -+ // space by 1 byte to ensure the correct alignment. -+ $align = 0; -+ -+ // Only applies to Unicode strings -+ if ($encoding == 1) { -+ // Min string + header size -1 -+ $header_length = 4; -+ -+ if ($space_remaining > $header_length) { -+ // String contains 3 byte header => split on odd boundary -+ if (!$split_string && $space_remaining % 2 != 1) { -+ $space_remaining--; -+ $align = 1; -+ } -+ // Split section without header => split on even boundary -+ else if ($split_string && $space_remaining % 2 == 1) { -+ $space_remaining--; -+ $align = 1; -+ } -+ -+ $split_string = 1; -+ } -+ } -+ - - if ($space_remaining > $header_length) { - // Write as much as possible of the string in the current block -@@ -1483,7 +1557,7 @@ - $string = substr($string, $space_remaining); - - // Reduce the current block length by the amount written -- $block_length -= $continue_limit - $continue; -+ $block_length -= $continue_limit - $continue - $align; - - // If the current string was split then the next CONTINUE block - // should have the string continue flag (grbit) set unless the -@@ -1503,7 +1577,7 @@ - // Write the CONTINUE block header - if (!empty($this->_block_sizes)) { - $record = 0x003C; -- $length = array_pop($this->_block_sizes); -+ $length = array_shift($tmp_block_sizes); - $header = pack('vv', $record, $length); - if ($continue) { - $header .= pack('C', $encoding); -