| /dovecot/src/lib/ |
| H A D | test-crc32.c | 8 const char str[] = "foo\0bar"; local 11 test_assert(crc32_str(str) == 0x8c736521); 12 test_assert(crc32_data(str, sizeof(str)) == 0x32c9723d);
|
| H A D | strfuncs.h | 13 char *p_strdup(pool_t pool, const char *str) ATTR_MALLOC; 15 /* return NULL if str = "" */ 16 char *p_strdup_empty(pool_t pool, const char *str) ATTR_MALLOC; 20 char *p_strndup(pool_t pool, const void *str, size_t max_chars) ATTR_MALLOC; 29 const char *t_strdup(const char *str) ATTR_MALLOC; 30 char *t_strdup_noconst(const char *str) ATTR_MALLOC; 31 /* return NULL if str = "" */ 32 const char *t_strdup_empty(const char *str) ATTR_MALLOC; 36 const char *t_strndup(const void *str, size_t max_chars) ATTR_MALLOC; 45 const char *t_strcut(const char *str, cha 75 i_strchr_to_next(const char *str, char chr) argument [all...] |
| H A D | test-hash-format.c | 4 #include "str.h" 37 string_t *str = t_str_new(128); local 49 str_truncate(str, 0); 50 hash_format_deinit(&format, str); 51 test_assert(strcmp(str_c(str), tests[i].output) == 0);
|
| H A D | test-ostream-escaped.c | 4 #include "str.h" 14 string_t *str = t_str_new(64); local 17 os_sink = o_stream_create_buffer(str); 28 test_assert(strcmp(str_c(str), "hello, world") == 0); 31 str_truncate(str, 0); os_sink->offset = 0; os_encode->offset = 0; 39 test_assert(strcmp(str_c(str), "\\u0015\\u0000!\\u0000\\u0015\\u0011123456") == 0); 42 str_truncate(str, 0); os_sink->offset = 0; os_encode->offset = 0; 55 test_assert(os_sink->offset == str_len(str)); 56 test_assert(strcmp(str_c(str), "\\u0015!\\u0001?#&") == 0); 68 string_t *str local [all...] |
| H A D | test-str-sanitize.c | 4 #include "str.h" 5 #include "str-sanitize.h" 8 const char *str; member in struct:str_sanitize_test 36 const char *str; local 42 str = str_sanitize(tests[i].str, tests[i].max_len); 44 test_assert_idx(null_strcmp(str, tests[i].sanitized) == 0, i); 46 test_assert_idx(str == tests[i].str, i); 53 if (tests[i].str [all...] |
| /dovecot/src/imap/ |
| H A D | imap-list.c | 4 #include "str.h" 7 bool imap_mailbox_flags2str(string_t *str, enum mailbox_info_flags flags) argument 9 size_t orig_len = str_len(str); 12 str_append(str, "\\Subscribed "); 15 str_append(str, "\\Noselect "); 17 str_append(str, "\\NonExistent "); 20 str_append(str, "\\HasChildren "); 22 str_append(str, "\\NoInferiors "); 24 str_append(str, "\\HasNoChildren "); 27 str_append(str, "\\Marke [all...] |
| H A D | cmd-enable.c | 4 #include "str.h" 9 const char *str; local 18 if (!imap_arg_get_atom(args, &str)) { 22 str = t_str_ucase(str); 23 if (strcmp(str, "CONDSTORE") == 0) { 27 } else if (strcmp(str, "QRESYNC") == 0) {
|
| H A D | imap-commands-util.h | 5 string_t *str; member in struct:msgset_generator_context 74 void msgset_generator_init(struct msgset_generator_context *ctx, string_t *str);
|
| H A D | mail-storage-callbacks.c | 17 const char *str; local 19 str = t_strconcat("* OK ", text, "\r\n", NULL); 20 o_stream_nsend_str(client->output, str); 34 const char *str; local 36 str = t_strconcat("* NO ", text, "\r\n", NULL); 37 o_stream_nsend_str(client->output, str);
|
| /dovecot/src/lib-mail/ |
| H A D | test-message-snippet.c | 4 #include "str.h" 72 string_t *str = t_str_new(128); local 78 str_truncate(str, 0); 80 test_assert_idx(message_snippet_generate(input, tests[i].max_snippet_chars, str) == 0, i); 81 test_assert_idx(strcmp(tests[i].output, str_c(str)) == 0, i);
|
| H A D | mail-user-hash.c | 5 #include "str.h" 33 string_t *str = t_str_new(128); local 36 ret = var_expand(str, format, tab, &error); 40 md5_get_digest(str_data(str), str_len(str), md5);
|
| H A D | message-id.c | 4 #include "str.h" 49 static void strip_lwsp(char *str) argument 55 while (*str != ' ' && *str != '\t' && *str != '\r' && *str != '\n') { 56 if (*str == '\0') 58 str++; 61 for (dest = str; *str ! 72 string_t *str = NULL; local [all...] |
| H A D | test-mail-html2text.c | 4 #include "str.h" 53 string_t *str = t_str_new(128); local 62 mail_html2text_more(ht, &c, 1, str); 64 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 66 str_truncate(str, 0); 72 strlen(test_blockquote_input), str); local 73 test_assert(strcmp(str_c(str), test_blockquote_output) == 0); 81 string_t *str = t_str_new(128); local 93 mail_html2text_more(ht, s, i_rand_minmax(1, 2), str); 96 str_truncate(str, [all...] |
| H A D | test-qp-decoder.c | 4 #include "str.h" 46 string_t *str; local 50 str = t_str_new(128); 53 struct qp_decoder *qp = qp_decoder_init(str); 67 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 70 str_truncate(str, 0); 80 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 83 str_truncate(str, 0);
|
| H A D | test-qp-encoder.c | 4 #include "str.h" 28 string_t *str; local 32 str = t_str_new(128); 35 struct qp_encoder *qp = qp_encoder_init(str, 20, 0); 41 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 44 str_truncate(str, 0); 50 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 53 str_truncate(str, 0); 69 string_t *str; local 73 str 113 string_t *str; local [all...] |
| H A D | test-rfc822-parser.c | 4 #include "str.h" 24 string_t *str = t_str_new(64); local 31 test_assert_idx(rfc822_parse_quoted_string(&parser, str) == tests[i].ret, i); 33 strcmp(tests[i].output, str_c(str)) == 0, i); 34 str_truncate(str, 0);
|
| /dovecot/src/lib-storage/ |
| H A D | mail-thread.c | 15 bool mail_thread_type_parse(const char *str, enum mail_thread_type *type_r) argument 20 if (strcasecmp(str, mail_thread_type_strings[i].name) == 0) {
|
| H A D | mail-search-parser-cmdline.c | 66 const char *str) 73 if (strcasecmp(parser->args[0], str) != 0) 65 cmdline_search_parse_skip_next(struct mail_search_parser *_parser, const char *str) argument
|
| /dovecot/src/plugins/old-stats/ |
| H A D | mail-stats-connection.c | 7 #include "str.h" 18 string_t *str = t_str_new(128); local 20 str_append(str, "CONNECT\t"); 22 str_append(str, suser->stats_session_id); 23 str_append_c(str, '\t'); 24 str_append_tabescaped(str, user->username); 25 str_append_c(str, '\t'); 26 str_append_tabescaped(str, user->service); 27 str_printfa(str, "\t%s", my_pid); 31 str_append(str, "\tli 46 string_t *str = t_str_new(128); local 62 string_t *str = t_str_new(256); local [all...] |
| /dovecot/src/auth/ |
| H A D | db-dict-cache-key.c | 5 #include "str.h" 32 string_t *str = t_str_new(128); local 51 str_printfa(str, "\t%s", key->key); 53 str_printfa(str, "\t%%%c", p[0]); 55 str_append(str, "\t%{"); 56 str_append_n(str, p, size); 57 str_append_c(str, '}'); 63 str_printfa(str, "\t%s", (*keyp)->key); 64 return str_c(str);
|
| H A D | password-scheme-rpa.c | 10 void *ucs2be_str(pool_t pool, const char *str, size_t *size); 15 void *ucs2be_str(pool_t pool, const char *str, size_t *size) argument 19 while (*str != '\0') { 21 buffer_append_c(buf, *str++);
|
| /dovecot/src/doveadm/ |
| H A D | doveadm-mutf7.c | 4 #include "str.h" 13 string_t *str; local 36 str = t_str_new(128); 38 str_truncate(str, 0); 40 if (imap_utf8_to_utf7(argv[i], str) < 0) { 46 if (imap_utf7_to_utf8(argv[i], str) < 0) { 52 printf("%s\n", str_c(str));
|
| /dovecot/src/lib-fts/ |
| H A D | fts-filter-english-possessive.c | 8 static unichar_t get_ending_utf8_char(const char *str, size_t *end_pos) argument 12 while (!UTF8_IS_START_SEQ(str[*end_pos])) { 16 if (uni_utf8_get_char(str + *end_pos, &c) <= 0)
|
| /dovecot/src/lib-sasl/ |
| H A D | mech-plain.c | 4 #include "str.h" 39 string_t *str; local 50 str = str_new(_client->pool, 64); 52 str_append(str, _client->set.authzid); 53 str_append_c(str, '\0'); 54 str_append(str, _client->set.authid); 55 str_append_c(str, '\0'); 56 str_append(str, _client->password); 58 *output_r = str_data(str); 59 *output_len_r = str_len(str); [all...] |
| /dovecot/src/lib-storage/index/dbox-common/ |
| H A D | dbox-attachment.c | 5 #include "str.h" 11 string_t *str) 19 str_append_c(str, DBOX_METADATA_EXT_REF); 20 index_attachment_append_extrefs(str, extrefs); 21 str_append_c(str, '\n'); 10 dbox_attachment_save_write_metadata(struct mail_save_context *ctx, string_t *str) argument
|