Lines Matching refs:max
159 $rev = max(0, $rev);
221 $num = max($num, 0);
232 $first = max($first + 1, 0);
252 $finger = max($tail - $this->chunk_size, 0);
258 $finger = max($finger - $this->chunk_size, 0);
266 $read_size = max($tail - $finger, 0); // found chunk size
269 $tmp = @fread($fp, max(min($this->chunk_size, $read_size - $got), 0));
288 $finger = max($tail - $this->chunk_size, 0);
295 $num = max(min(count($lines) - $first, $num), 0);
297 $lines = array_slice($lines, max(count($lines) - $first - $num, 0), $num);
299 $lines = array_slice($lines, 0, max(count($lines) - $first, 0));
301 $lines = array_slice($lines, max(count($lines) - $num, 0));
334 $rev = max($rev, 0);
401 * @param int $max maximum number of revisions returned
404 public function getRevisionsAround($rev1, $rev2, $max = 50) argument
406 $max = (int) (abs($max) / 2) * 2 + 1;
407 $rev1 = max($rev1, 0);
408 $rev2 = max($rev2, 0);
421 $result2 = $this->retrieveRevisionsAround($rev2, $max);
431 $result1 = $this->retrieveRevisionsAround($rev1, $max);
449 if ($index > (int) ($max / 2)) {
461 $revs1 = array_slice($revs1, max($index - (int) ($max / 2), 0), $max);
496 * @param int $max maximum number of revisions to be returned
507 protected function retrieveRevisionsAround($rev, $max) argument
535 if ($afterCount > (int) ($max / 2)) {
547 $lastTail == $eof && $afterCount <= (int) ($max / 2) &&
573 if ($beforeCount > max((int) ($max / 2), $max - $afterCount)) {
585 $requestedRevs = array_slice($revs, -$max, $max);
650 'date' => max($lastRev + 1, time() - 1), // 1 sec before now or last revision +1