/dovecot/src/lib/ |
H A D | test-str.c | 15 test_assert(str->used == 5 && memcmp(str_data(str), "foo|\0", 5) == 0); 21 test_assert(str->used == 5+7 && memcmp(str_data(str), "foo|\0sec\0ond", 5+7) == 0); 57 test_assert(str->used == 8 && memcmp(str_data(str), "<foobar>", 8) == 0); 60 test_assert(str->used == 11 && memcmp(str_data(str), "<foobar>\0\0!", 11) == 0); 75 test_assert(str->used == 3 && memcmp(str_data(str), "245", 3) == 0); 78 test_assert(str->used == 1 && memcmp(str_data(str), "2", 1) == 0); 82 test_assert(str->used == 1 && memcmp(str_data(str), "2", 1) == 0); 93 test_assert(str->used == 0); 96 test_assert(str->used == 0); 99 test_assert(str->used [all...] |
H A D | test-memarea.c | 26 area = memarea_init(buf->data, buf->used, test_callback, buf); 28 test_assert(memarea_get(area, &size) == buf->data && size == buf->used); 33 test_assert(memarea_get(area2, &size) == buf->data && size == buf->used);
|
H A D | istream-callback.c | 41 i_assert(cstream->buf->used >= cstream->prev_pos); 43 if (cstream->buf->used > pos) { 49 if (cstream->buf->used == pos || 54 } else if (cstream->buf->used == pos) { 56 i_assert(cstream->buf->used > 0); 59 i_assert(cstream->buf->used > pos); 61 cstream->prev_pos = stream->pos = cstream->buf->used; 62 return cstream->buf->used - pos;
|
H A D | test-mempool-allocfree.c | 26 size_t used = 0; local 38 used -= last_alloc; 46 used -= last_alloc; 54 used += i*2; 58 used -= last_alloc; 66 used += i-2; 72 used += i; 78 test_assert(pool_allocfree_get_total_used_size(pool) == used);
|
H A D | buffer.c | 11 size_t used; member in struct:real_buffer 55 if (new_size > buf->used && buf->used < buf->dirty) { 56 /* clear used..dirty area */ 59 memset(buf->w_buffer + buf->used, 0, max - buf->used); 79 else if (new_size > buf->used && buf->alloced && 85 be used to access the buffer's memory */ 95 if (new_size > buf->used) 96 buf->used [all...] |
H A D | test-hex-binary.c | 46 test_assert(buf->used == 0); 49 test_assert(buf->used == N_ELEMENTS(ok_output)); 50 test_assert(memcmp(buf->data, ok_output, buf->used) == 0);
|
H A D | test-buffer.c | 24 if (buf->used == BUF_TEST_SIZE) { 25 size = shadowbuf_size = i_rand_limit(buf->used - 1); 29 i_assert(buf->used < BUF_TEST_SIZE); 49 size = i_rand_limit(BUF_TEST_SIZE - buf->used); 62 size = i_rand_limit(BUF_TEST_SIZE - I_MAX(buf->used, pos)); 121 if (buf->used != shadowbuf_size || 122 memcmp(buf->data, shadowbuf, buf->used) != 0) 141 test_assert(buf->used == 5); 195 binary_to_hex(buf->data, buf->used), 196 binary_to_10(buf->data, buf->used)); [all...] |
H A D | istream-multiplex.c | 77 size_t len = 0, used, wanted, avail; local 131 used = I_MIN(wanted, avail); 135 i_assert(stream->pos + channel->pending_pos + used <= stream->buffer_size); 137 data, used); 138 channel->pending_pos += used; 141 i_assert(stream->pos + used <= stream->buffer_size); 142 memcpy(stream->w_buffer + stream->pos, data, used); 143 stream->pos += used; 144 got += used; 147 used [all...] |
H A D | hash-method.h | 28 const char *hex = binary_to_hex(result->data, result->used); 39 return t_hash_data(meth, data->data, data->used);
|
H A D | ostream-multiplex.c | 62 (*channelp)->buf->used > 0) 72 if (mstream->bufsize <= mstream->wbuf->used + 5) 76 size_t tmp = mstream->bufsize - mstream->wbuf->used - 5; 78 size_t amt = I_MIN(UINT_MAX, I_MIN(tmp, channel->buf->used)); 89 if (mstream->wbuf->used > 0) { 91 mstream->wbuf->used); 108 if (channel->mstream->bufsize <= channel->buf->used) 113 size_t tmp = channel->mstream->bufsize - channel->buf->used;
|
H A D | test-multiplex.c | 46 if (test_channel[0].received->used > 1000 && 47 test_channel[1].received->used > 1000) 100 channel->received->used) == 0); 101 test_assert(channel->received->used == channel->received_alt->used);
|
H A D | md4.c | 180 unsigned long used, free; local 187 used = saved_lo & 0x3f; 189 if (used != 0) { 190 free = 64 - used; 193 memcpy(&ctx->buffer[used], data, size); 197 memcpy(&ctx->buffer[used], data, free); 214 unsigned long used, free; local 216 used = ctx->lo & 0x3f; 218 ctx->buffer[used++] = 0x80; 220 free = 64 - used; [all...] |
/dovecot/src/doveadm/dsync/ |
H A D | dsync-mailbox-state.c | 50 if (buf->used % 3 == 0) { 51 crc = crc32_data_more(crc, buf->data, buf->used); 52 base64_encode(buf->data, buf->used, output); 58 crc = crc32_data_more(crc, buf->data, buf->used); 60 base64_encode(buf->data, buf->used, output); 69 if ((buf->used-4) % V0_MAILBOX_SIZE != 0 || 70 le32_to_cpu_unaligned(data + buf->used-4) != crc32_data(data, buf->used-4)) 95 if (buf->used == 4 && le32_to_cpu_unaligned(data) == 0) { 99 if (buf->used < [all...] |
/dovecot/src/plugins/fts/ |
H A D | fts-search-serialize.c | 31 i_assert(*idx < buf->used); 52 i_assert(idx == buf->used); 63 i_assert(*idx < buf->used); 89 i_assert(idx == buf->used); 98 i_assert(idx == buf->used);
|
/dovecot/src/lib-index/ |
H A D | mail-transaction-log-append.c | 56 i_assert(file->buffer_offset + file->buffer->used == file->sync_offset); 58 file->sync_offset = file->buffer_offset + file->buffer->used; 66 if (ctx->output->used == 0) 75 file->sync_offset = file->buffer_offset + file->buffer->used; 79 if (write_full(file->fd, ctx->output->data, ctx->output->used) < 0) { 88 file->sync_offset + ctx->output->used == 108 file->buffer->used == file->sync_offset); 110 ctx->output->used); 112 file->sync_offset += ctx->output->used; 136 /*if (ctx->output->used [all...] |
H A D | mail-index-sync-keywords.c | 67 *rec_offset_r = buf->used; 68 buffer_write(buf, buf->used + sizeof(*kw_rec) * new_count, 70 *name_offset_root_r = buf->used; 151 rec_offset = buf->used; 169 if ((buf->used % 4) != 0) 170 buffer_append_zero(buf, 4 - (buf->used % 4)); 172 if (ext == NULL || buf->used > ext->hdr_size || 178 buf->used, keywords_count); 188 i_assert(ext->hdr_size == buf->used); 191 buffer_copy(map->hdr_copy_buf, ext->hdr_offset, buf, 0, buf->used); [all...] |
/dovecot/src/lib-test/ |
H A D | test-ostream.c | 29 if (tstream->internal_buf == NULL || tstream->internal_buf->used == 0) 31 if (tstream->output_buf->used >= tstream->max_output_size) 34 size_t left = tstream->max_output_size - tstream->output_buf->used; 35 size_t n = I_MIN(left, tstream->internal_buf->used); 38 return tstream->internal_buf->used == 0 ? 1 : 0; 58 left = tstream->max_output_size < tstream->output_buf->used ? 0 : 59 tstream->max_output_size - tstream->output_buf->used; 76 tstream->internal_buf->used; 103 tstream->internal_buf->used > 0)) 106 tstream->output_buf->used > [all...] |
/dovecot/src/lib-mail/ |
H A D | test-message-header-decode.c | 85 message_header_decode_utf8(encoded->data, encoded->used, 87 test_assert(decoded->used == buflen && 95 message_header_decode_utf8(encoded->data, encoded->used, 97 test_assert(decoded->used == buflen &&
|
H A D | istream-qp-decoder.c | 42 i_assert(stream->skip <= bstream->buf->used); 50 i_assert(stream->pos <= bstream->buf->used); 58 if (bstream->buf->used > 0) { 63 new_pos = I_MIN(bstream->buf->used, max_buffer_size); 80 i_assert(bstream->buf->used == 0);
|
H A D | istream-qp-encoder.c | 39 i_assert(stream->skip <= bstream->buf->used); 46 i_assert(stream->pos <= bstream->buf->used); 55 if (bstream->buf->used > 0) { 60 if (bstream->buf->used <= bstream->istream.max_buffer_size) { 61 new_pos = bstream->buf->used;
|
/dovecot/src/plugins/var-expand-crypt/ |
H A D | var-expand-crypt-plugin.c | 109 if (iv->used == 0) { 113 } else if (dcrypt_ctx_sym_get_iv_length(dctx) != iv->used) { 115 iv->used, 119 dcrypt_ctx_sym_set_iv(dctx, iv->data, iv->used); 122 if (dcrypt_ctx_sym_get_key_length(dctx) != key->used) { 124 key->used, 128 dcrypt_ctx_sym_set_key(dctx, key->data, key->used); 133 input->used, output, error_r) || 196 enciv = binary_to_hex(ctx.iv->data, ctx.iv->used); 197 res = binary_to_hex(tmp->data, tmp->used); [all...] |
/dovecot/src/lib-fs/ |
H A D | fs-test-async.c | 35 test_assert(test_file->contents->used > 0); 40 test_assert(test_file->contents->used == 0); 44 test_assert(test_file->contents->used == 0); 71 test_assert(test_file->contents->used > 0);
|
/dovecot/src/imap/ |
H A D | cmd-x-state.c | 28 "BAD Can't be used in SELECTED state"); 35 state->data, state->used, &error); 54 MAX_BASE64_ENCODED_SIZE(state->used)+10); 56 base64_encode(state->data, state->used, state_encoded);
|
/dovecot/src/lib-dcrypt/ |
H A D | ostream-encrypt.c | 95 return o_stream_encrypt_send(stream, values->data, values->used); 117 i = cpu32_to_be(sizeof(IOSTREAM_CRYPT_MAGIC) + 9 + stream->cipher_oid->used + stream->mac_oid->used + 8 + stream->key_data_len); 129 return o_stream_encrypt_send(stream, values->data, values->used); 170 hash->loop(hctx, secret->data, secret->used); 172 safe_memset(buffer_get_modifiable_data(secret, 0), 0, secret->used); 188 /* NB! The old code was broken and used this kind of IV - it is not correct, but 220 s = htons(ephemeral_key->used); 222 buffer_append(res, ephemeral_key->data, ephemeral_key->used); 232 s = htons(encrypted_key->used); [all...] |
/dovecot/src/auth/ |
H A D | password-scheme-rpa.c | 24 *size = buf->used;
|