Lines Matching refs:range

685 				php_stream_mmap_range *range = (php_stream_mmap_range*)ptrparam;  in php_stdiop_set_option()  local
696 if (range->length == 0 && range->offset > 0 && range->offset < data->sb.st_size) { in php_stdiop_set_option()
697 range->length = data->sb.st_size - range->offset; in php_stdiop_set_option()
699 if (range->length == 0 || range->length > data->sb.st_size) { in php_stdiop_set_option()
700 range->length = data->sb.st_size; in php_stdiop_set_option()
702 if (range->offset >= data->sb.st_size) { in php_stdiop_set_option()
703 range->offset = data->sb.st_size; in php_stdiop_set_option()
704 range->length = 0; in php_stdiop_set_option()
706 switch (range->mode) { in php_stdiop_set_option()
726 range->mapped = (char*)mmap(NULL, range->length, prot, flags, fd, range->offset); in php_stdiop_set_option()
727 if (range->mapped == (char*)MAP_FAILED) { in php_stdiop_set_option()
728 range->mapped = NULL; in php_stdiop_set_option()
732 data->last_mapped_addr = range->mapped; in php_stdiop_set_option()
733 data->last_mapped_len = range->length; in php_stdiop_set_option()
748 php_stream_mmap_range *range = (php_stream_mmap_range*)ptrparam; in php_stdiop_set_option() local
757 switch (range->mode) { in php_stdiop_set_option()
788 if (range->length == 0 && range->offset > 0 && range->offset < size) { in php_stdiop_set_option()
789 range->length = size - range->offset; in php_stdiop_set_option()
791 if (range->length == 0 || range->length > size) { in php_stdiop_set_option()
792 range->length = size; in php_stdiop_set_option()
794 if (range->offset >= size) { in php_stdiop_set_option()
795 range->offset = size; in php_stdiop_set_option()
796 range->length = 0; in php_stdiop_set_option()
800 if (range->offset != 0) { in php_stdiop_set_option()
806 loffs = ((DWORD)range->offset / gran) * gran; in php_stdiop_set_option()
807 delta = (DWORD)range->offset - loffs; in php_stdiop_set_option()
810 … data->last_mapped_addr = MapViewOfFile(data->file_mapping, acc, 0, loffs, range->length + delta); in php_stdiop_set_option()
814 range->mapped = data->last_mapped_addr + delta; in php_stdiop_set_option()