Lines Matching refs:offset

49   /* 'offset' and 'limit' define the range in the source window. */
50 apr_size_t offset;
74 'offset' and 'limit' always refer to the "virtual" source data
76 offset to use for generating the target op is 'target_offset';
80 /* 'offset' and 'limit' define the range. */
81 apr_size_t offset;
148 apr_size_t offset = 0;
156 ndx->offs[i] = offset;
157 offset += window->ops[i].length;
159 ndx->offs[ndx->length] = offset;
172 apr_size_t offset,
177 assert(offset < ndx->offs[ndx->length]);
189 if (offset < ndx->offs[hint])
191 else if (offset < ndx->offs[hint+1])
201 if (offset < ndx->offs[op])
208 assert(ndx->offs[lo] <= offset && offset < ndx->offs[lo + 1]);
240 apr_size_t offset,
245 node->offset = offset;
268 splay_range_index(apr_size_t offset, range_index_t *ndx)
282 if (offset < tree->offset)
285 && offset < tree->left->offset)
301 else if (offset > tree->offset)
304 && offset > tree->right->offset)
332 largest offset where node->offset <= offset at the top of the
337 if (offset < tree->offset && tree->left != NULL)
366 assert((offset >= tree->offset)
411 apr_size_t const offset =
412 (node->right != NULL && node->right->offset < top_offset
413 ? node->right->offset
417 || (node->offset < limit && offset < limit))
425 top_offset = node->offset;
438 insert_range(apr_size_t offset, apr_size_t limit, apr_size_t target_offset,
445 node = alloc_range_index_node(ndx, offset, limit, target_offset);
450 if (offset == ndx->tree->offset
457 else if (offset > ndx->tree->offset
465 || ndx->tree->limit < ndx->tree->next->offset
472 if (ndx->tree->prev && ndx->tree->prev->limit > offset)
475 ndx->tree->offset = offset;
482 node = alloc_range_index_node(ndx, offset, limit,
499 else if (offset < ndx->tree->offset)
504 node = alloc_range_index_node(ndx, offset, limit, target_offset);
529 apr_size_t offset,
535 node->offset = offset;
571 build_range_list(apr_size_t offset, apr_size_t limit, range_index_t *ndx)
577 while (offset < limit)
582 offset, limit, 0);
584 if (offset < node->offset)
586 if (limit <= node->offset)
589 offset, limit, 0);
594 offset, node->offset, 0);
595 offset = node->offset;
606 if (offset >= node->limit)
611 offset - node->offset + node->target_offset;
616 offset, limit, target_offset);
621 offset, node->limit, target_offset);
622 offset = node->limit;
629 /* A range's offset isn't smaller than its limit? Impossible! */
642 copy_source_ops(apr_size_t offset, apr_size_t limit,
650 apr_size_t op_ndx = search_offset_index(ndx, offset, hint);
655 const apr_size_t fix_offset = (offset > off[0] ? offset - off[0] : 0);
676 + op->offset + fix_offset)
680 op->offset + fix_offset,
687 offset in the (virtual) target stream. */
688 assert(op->offset < off[0]);
690 if (op->offset + op->length - fix_limit <= off[0])
694 copy_source_ops(op->offset + fix_offset,
695 op->offset + op->length - fix_limit,
705 const apr_size_t ptn_length = off[0] - op->offset;
719 copy_source_ops(op->offset + ptn_overlap,
720 op->offset + ptn_overlap + length,
735 copy_source_ops(op->offset,
736 op->offset + length,
756 /* Adjust the target offset for the next op in the list. */
794 ? window_B->new_data->data + op->offset
797 op->offset, op->length,
802 /* NOTE: Remember that `offset' and `limit' refer to
805 const apr_size_t offset = op->offset;
806 const apr_size_t limit = op->offset + op->length;
810 splay_range_index(offset, range_index);
811 range_list = build_range_list(offset, limit, range_index);
818 range->limit - range->offset,
821 copy_source_ops(range->offset, range->limit, tgt_off, 0,
825 tgt_off += range->limit - range->offset;
830 insert_range(offset, limit, target_offset, range_index);
833 /* Remember the new offset in the would-be target stream. */