35 require_once(
'PEAR.php');
94 $this->_byte_order =
'';
111 $teststr = pack(
"d", 1.2345);
112 $number = pack(
"C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F);
113 if ($number == $teststr) {
116 elseif ($number == strrev($teststr)){
121 return $this->raiseError(
"Required floating point format ".
122 "not supported on this platform.");
124 $this->_byte_order = $byte_order;
135 if (strlen(
$data) > $this->_limit) {
138 $this->_data =
$data.$this->_data;
139 $this->_datasize += strlen(
$data);
150 if (strlen(
$data) > $this->_limit) {
153 $this->_data = $this->_data.$data;
154 $this->_datasize += strlen(
$data);
171 if ($this->_BIFF_version == 0x0500) {
177 elseif ($this->_BIFF_version == 0x0600) {
179 $unknown = pack(
"VV", 0x00000041, 0x00000006);
185 $header = pack(
"vv", $record, $length);
186 $data = pack(
"vvvv", $version, $type, $build, $year);
187 $this->
_prepend($header.$data.$unknown);
199 $header = pack(
"vv", $record, $length);
222 $tmp = substr(
$data, 0, 2).pack(
"v", $limit-4).substr(
$data, 4, $limit - 4);
224 $header = pack(
"vv", $record, $limit);
227 for($i = $limit; $i < strlen(
$data) - $limit; $i += $limit)
230 $tmp .= substr(
$data, $i, $limit);
234 $header = pack(
"vv", $record, strlen(
$data) - $i);