Searched refs:len (Results 1 - 25 of 167) sorted by relevance

1234567

/dovecot/src/lib-fts/
H A Dfts-tokenizer-common.h5 size_t *len);
8 size_t *len);
H A Dfts-tokenizer-common.c8 size_t *len)
15 for (pos = *len-1; pos > 0; pos--) {
20 if (char_bytes != *len-pos) {
21 i_assert(char_bytes > *len-pos);
22 *len = pos;
26 size_t *len)
28 size_t pos = *len;
34 *len = pos;
7 fts_tokenizer_delete_trailing_partial_char(const unsigned char *data, size_t *len) argument
25 fts_tokenizer_delete_trailing_invalid_char(const unsigned char *data, size_t *len) argument
H A Dfts-filter-common.c16 size_t len = max_length;
17 fts_tokenizer_delete_trailing_partial_char(token->data, &len);
18 str_truncate(token, len);
19 i_assert(len <= max_length);
H A Dfts-filter-english-possessive.c26 size_t len = strlen(*token); local
29 if (len > 1 && ((*token)[len-1] == 's' || (*token)[len-1] == 'S')) {
30 len -= 2;
31 c = get_ending_utf8_char(*token, &len);
33 *token = t_strndup(*token, len);
/dovecot/src/lib/
H A Dstr-sanitize.c14 int len = uni_utf8_get_char_n(src+i, max_bytes-i, &chr); local
15 if (len <= 0)
19 i += len;
28 size_t len = str_len(dest); local
30 if (len == initial_pos)
33 i_assert(len > 0);
34 if ((data[len-1] & 0x80) == 0) {
35 str_truncate(dest, len-1);
39 while (len > 0 && (data[len
54 int len = uni_utf8_get_char_n(src+i, max_bytes-i, &chr); local
[all...]
H A Dtest-bsearch-insert-pos.c20 unsigned int key, len, i, idx; local
25 for (len = 0; cur[len] != UINT_MAX; len++) ;
27 if (bsearch_insert_pos(&key, cur, len, sizeof(*cur),
32 else if (idx == len)
33 success = cur[len-1] < key;
41 cur += len + 1;
H A Dmurmurhash3.h19 void murmurhash3_32(const void * key, size_t len, uint32_t seed,
21 void murmurhash3_128(const void * key, size_t len, uint32_t seed,
H A Dunichar.c25 unsigned int len = 0; local
27 for (len = 0; str[len] != 0; len++) ;
29 return len;
44 unsigned int i, len; local
54 /* first byte has len highest bits set, followed by zero bit.
57 len = uni_utf8_char_bytes(*input);
58 switch (len) {
75 /* only 7bit chars should have len
116 int len = uni_utf8_get_char(input, &chr); local
134 int len = uni_utf8_get_char_n(input, size, &chr); local
144 uni_ucs4_to_utf8(const unichar_t *input, size_t len, buffer_t *output) argument
207 unsigned int count, len = 0; local
362 int len = uni_utf8_get_char_n(input, size, &chr); local
369 size_t i, len; local
390 size_t i, len; local
[all...]
H A Dstr.h10 string is no longer used. len must contain strlen(str). */
11 string_t *str_new_const(pool_t pool, const char *str, size_t len);
12 string_t *t_str_new_const(const char *str, size_t len);
36 static inline void str_append_data(string_t *str, const void *data, size_t len) argument
38 buffer_append(str, data, len);
62 static inline void str_delete(string_t *str, size_t pos, size_t len) argument
64 buffer_delete(str, pos, len);
69 static inline void str_truncate(string_t *str, size_t len) argument
71 if (str_len(str) > len)
72 buffer_set_used_size(str, len);
[all...]
H A Dhex-dec.h10 uintmax_t hex2dec(const unsigned char *data, unsigned int len) ATTR_PURE;
H A Dsha2.h42 size_t len; member in struct:sha256_ctx
49 size_t len; member in struct:sha512_ctx
55 void sha256_loop(struct sha256_ctx *ctx, const void *data, size_t len);
63 void sha512_loop(struct sha512_ctx *ctx, const void *data, size_t len);
H A Dprocess-title.c73 size_t len, memblock_len = 0; local
90 len = strlen(old_argv[i]) + 1;
91 memcpy(memblock, old_argv[i], len);
92 memblock = PTR_OFFSET(memblock, len);
101 size_t len = strlen(title); local
104 if (len >= process_title_len-1)
105 len = process_title_len - 2;
107 memcpy(process_title, title, len);
108 process_title[len++] = '\0';
109 process_title[len
[all...]
H A Dstr.c18 string_t *str_new_const(pool_t pool, const char *str, size_t len) argument
22 i_assert(str[len] == '\0');
25 buffer_create_from_const_data(ret, str, len + 1);
26 str_truncate(ret, len);
35 string_t *t_str_new_const(const char *str, size_t len) argument
37 return str_new_const(pool_datastack_create(), str, len);
51 size_t len = str_len(str); local
54 if (len == alloc || data[len] != '\0') {
55 buffer_write(str, len, "",
90 size_t len; local
[all...]
H A Dtest-istream-tee.c17 unsigned int i, len, delta; local
29 for (len = 1; len < TEST_BUF_SIZE; len += delta) {
30 test_istream_set_size(test_input, len);
32 test_assert_idx(i_stream_read(child_input[i]) == (int)delta, len); local
33 test_assert_idx(!tee_i_stream_child_is_waiting(child_input[i]), len);
34 test_assert_idx(i_stream_read(child_input[i]) == 0, len); local
35 test_assert_idx(!tee_i_stream_child_is_waiting(child_input[i]), len);
38 if(delta > TEST_BUF_SIZE - len)
[all...]
H A Dtest-strnum.c15 int len = 0; local
17 len = crappy_uintmax_to_str(into, val/BIGBASE);
19 i_snprintf(into + len, 10, "%09llu",
21 return len + strlen(STRINGIFY2(BIGBASE))-4;
31 int len, ret; local
42 len = crappy_uintmax_to_str(buff, value);
48 buff[len] = 'x'; /* don't even null-terminate, let's be evil */
56 test_assert_idx(endp == &buff[len], i);
67 len = crappy_uintmax_to_str(buff, value);
68 buff[len]
88 int len = 0; local
104 int len, ret; local
164 int len = 0; local
180 int len, ret; local
[all...]
H A Dimem.c58 size_t len; local
65 const char *temp = vstrconcat(str1, args, &len);
66 t_buffer_alloc(len);
67 ret = p_malloc(default_pool, len);
68 memcpy(ret, temp, len);
H A Dtest-istream-crlf.c99 size_t len = 0; local
100 while (len < sizeof(buf) - 1) {
103 case 1: buf[len] = '\r'; break;
104 case 2: buf[len] = '\n'; break;
105 default: buf[len]= '.'; break;
107 len++;
110 buf[len] = '\0';
111 if (len > 0)
H A Dtest-printf-format-fix.c37 size_t len; local
41 test_assert_idx(printf_format_fix_get_len(tests[i], &len)
43 test_assert_idx(len == strlen(tests[i]), i);
69 size_t len; local
84 chgd = printf_format_fix_get_len(tests[i], &len);
86 test_assert_idx(len == strlen(chgd), i);
92 test_assert_idx(memcmp(chgd+offs+needlen, tests[i]+offs+2, len-needlen-offs) == 0, i);
H A Dbloomfilter.c55 size_t bloomfilter_murmur3_hash(const void *data, size_t len, uint32_t seed) argument
58 murmurhash3_128(data, len, seed, result);
63 size_t bloomfilter_md5_hash(const void *data, size_t len, uint32_t seed) argument
66 md5_get_digest(data, len, result);
117 bool bloomfilter_has_data(struct bloomfilter *bf, const void *data, size_t len) argument
119 i_assert(data != NULL || len == 0);
123 result = (*k)(data, len, bf->seed) % bf->size;
130 void bloomfilter_set_data(struct bloomfilter *bf, const void *data, size_t len) argument
132 i_assert(data != NULL || len == 0);
139 result = (*k)(data, len, b
[all...]
/dovecot/src/lib-mail/
H A Dmessage-header-encode.h9 void message_header_encode_data(const unsigned char *input, unsigned int len,
16 void message_header_encode_q(const unsigned char *input, unsigned int len,
18 void message_header_encode_b(const unsigned char *input, unsigned int len,
H A Dmessage-date.c31 static int parse_timezone(const unsigned char *str, size_t len) argument
36 if (len == 5 && (*str == '+' || *str == '-')) {
47 if (len == 1) {
63 if (len == 2 && i_toupper(str[0]) == 'U' && i_toupper(str[1]) == 'T') {
68 if (len == 3) {
120 size_t i, len; local
129 if (next_token(ctx, &value, &len) <= 0)
131 if (len == 3) {
137 if (next_token(ctx, &value, &len) <= 0)
142 if (len <
[all...]
H A Dmessage-header-encode.c15 unsigned int i, unsigned int len)
19 if (i+1 == len || input[i+1] != '\n')
24 if (i+1 == len) {
42 if ((i == 0 || IS_LWSP(input[i-1])) && i+2 <= len &&
58 void message_header_encode_q(const unsigned char *input, unsigned int len, argument
73 for (i = 0; i < len; i++) {
109 void message_header_encode_b(const unsigned char *input, unsigned int len, argument
125 if (max > len)
126 max = len;
143 len
14 input_idx_need_encoding(const unsigned char *input, unsigned int i, unsigned int len) argument
158 message_header_encode_data(const unsigned char *input, unsigned int len, string_t *output) argument
[all...]
/dovecot/src/imap/
H A Dcmd-create.c14 size_t len; local
25 len = strlen(orig_mailbox);
26 if (len == 0 || orig_mailbox[len-1] != mail_namespace_get_sep(ns))
36 if (len == strlen(mailbox))
37 mailbox = t_strndup(mailbox, len-1);
/dovecot/src/ipc/
H A Dmain.c13 size_t len; local
18 len = strlen(name);
19 if (len > 7 && strcmp(name + len - 7, "-client") == 0)
/dovecot/src/lib-ntlm/
H A Dntlm-encrypt.c55 size_t len; local
56 void *wpwd = t_unicode_str(passwd, FALSE, &len);
58 md4_get_digest(wpwd, len, hash);
60 safe_memset(wpwd, 0, len);
66 size_t len; local
67 unsigned char *wstr = t_unicode_str(str, TRUE, &len);
69 hmac_update(ctx, wstr, len);

Completed in 30 milliseconds

1234567