Lines Matching refs:fp

95         list($fp, $lines) = $this->readloglines($rev);
96 if ($fp) {
97 fclose($fp);
170 $fp = fopen($file, 'rb'); // "file pointer"
171 if ($fp === false) {
174 fseek($fp, 0, SEEK_END);
175 $tail = ftell($fp);
180 $nl = $this->getNewlinepointer($fp, $finger);
194 while ($got < $read_size && !feof($fp)) {
195 $tmp = @fread($fp, max(min($this->chunk_size, $read_size - $got), 0));
217 fclose($fp);
270 list($fp, $lines, $head, $tail, $eof) = $this->readloglines($rev);
304 $checkotherchunck = $fp
309 … list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, $direction);
314 if ($fp) {
315 fclose($fp);
348 … list($revs2, $allrevs, $fp, $lines, $head, $tail) = $this->retrieveRevisionsAround($rev2, $max);
373 list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, -1);
411 $fp = null;
424 $fp = fopen($file, 'rb'); // "file pointer"
425 if ($fp === false) {
429 fseek($fp, 0, SEEK_END);
430 $eof = ftell($fp);
436 $finger = $this->getNewlinepointer($fp, $finger);
437 $tmp = fgets($fp);
453 fclose($fp);
457 $lines = $this->readChunk($fp, $head, $tail);
460 $fp,
472 * @param resource $fp resource filepointer
477 protected function readChunk($fp, $head, $tail) argument
482 fseek($fp, $head);
483 while ($got < $chunk_size && !feof($fp)) {
484 $tmp = @fread($fp, max(min($this->chunk_size, $chunk_size - $got), 0));
499 * @param resource $fp filepointer
503 protected function getNewlinepointer($fp, $finger) argument
505 fseek($fp, $finger);
508 fgets($fp); // slip the finger forward to a new line
509 $nl = ftell($fp);
549 * @param resource $fp filepointer
558 protected function readAdjacentChunk($fp, $head, $tail, $direction) argument
560 if (!$fp) return array(array(), $head, $tail);
566 $tail = $this->getNewlinepointer($fp, $tail);
572 $nl = $this->getNewlinepointer($fp, $head);
584 $lines = $this->readChunk($fp, $head, $tail);
606 list($fp, $lines, $starthead, $starttail, /* $eof */) = $this->readloglines($rev);
630 list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, 1);
643 list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, -1);
664 return array($requestedrevs, $revs, $fp, $lines, $head, $lasttail);