300baf826ba39003b861e7716c35bae372e6f23eTimo Sirainen/* Copyright (c) 2007-2018 Dovecot authors, see the included COPYING file */
#include "read-full.h"
#include "write-full.h"
#include "ostream.h"
#include "mmap-util.h"
#include "squat-trie-private.h"
#include "squat-uidlist.h"
#include <stdio.h>
const char *reason)
if (datastack)
base_uid++;
for (; i < uid_count; i++) {
if (num != 0) {
prev = 0;
for (i = 0; i < uid_count; i++) {
if (!datastack)
goto bitmask_build;
if (write_size) {
if (!datastack)
uid_list++;
uid_count--;
T_BEGIN {
} T_END;
return ret;
sizeof(uint32_t));
sizeof(block_count)) < 0)
if (ret <= 0) {
if (ret < 0) {
return uidlist;
if (ret == 0) {
if (ret < 0)
if (ret == 0)
if (ret < 0)
if (ret == 0) {
if (ret == 0 &&
if (ret < 0) {
bool write_old_blocks)
if (align != 0) {
if (count == 0)
for (j = 0; j < max; j++) {
for (j = 0; j < max; j++) {
bool compress,
if (!compress) {
T_BEGIN {
} T_END;
if (ret < 0)
if (count == 0)
ret = 0;
for (i = 0; i < count; i++) {
return ret;
for (i = 0; i < count; i++) {
return ret;
bool cancel)
ret = 0;
if (ret > 0) {
FALSE);
if (ret <= 0)
static struct uidlist_list *
return list;
uint32_t *p;
return uid_list_idx;
return uid_list_idx;
if (uid_list_idx == 0) {
idx = 0;
return uid_list_idx;
return uid_list_idx;
return uid_list_idx;
*p |= UID_LIST_MASK_RANGE;
return uid_list_idx;
*p = uid;
return uid_list_idx;
if (count == 0) {
UID_LIST_MASK_RANGE) != 0) {
if (count == 0) {
UID_LIST_MASK_RANGE) != 0) {
if (num != 0)
SQUAT_PACK_MAX_SIZE) < 0)
0, uids) < 0)
next_uid = 0;
for (i = 0; i < size; i++) {
base_uid);
if (p == end)
idx++;
max_map_size) < 0)
return idx;
i_unreached();
if (ret == 0) {
for (i = 0; i < count; i++) {
return ret;
if (parent_count == 0)
parent_idx = 0;
for (i = 0; i < rel_count; i++) {
while (diff > 0) {
parent_uid++;
diff--;
while (diff > 0) {
parent_uid++;
diff--;
return ret;
unsigned int *count_r)