Lines Matching defs:tail
113 * if success returns array(fp, array(changeloglines), $head, $tail, $eof)
127 $tail = 0;
144 $tail = $eof;
147 while ($tail - $head > $this->chunk_size) {
148 $finger = $head + (int)(($tail - $head) / 2);
151 if ($finger == $head || $finger == $tail) {
158 $tail = $finger;
164 if ($tail - $head < 1) {
170 $lines = $this->readChunk($fp, $head, $tail);
172 return [$fp, $lines, $head, $tail, $eof];
177 * Has no check if $head and $tail are really at a new line
181 * @param int $tail end point chunk
184 protected function readChunk($fp, $head, $tail)
187 $chunk_size = max($tail - $head, 0); // found chunk size
222 * Returns the next lines of the changelog of the chunk before head or after tail
226 * @param int $tail position tail of last chunk
231 * - $tail: tail of chunk
233 protected function readAdjacentChunk($fp, $head, $tail, $direction)
235 if (!$fp) return [[], $head, $tail];
239 $head = $tail;
240 $tail = $head + (int)($this->chunk_size * (2 / 3));
241 $tail = $this->getNewlinepointer($fp, $tail);
244 $tail = $head;
245 $head = max($tail - $this->chunk_size, 0);
249 if ($nl > 0 && $tail <= $nl) {
259 $lines = $this->readChunk($fp, $head, $tail);
260 return [$lines, $head, $tail];