/dovecot/src/lib/ |
H A D | sendfile-util.h | 5 it isn't supported for some reason (out_fd isn't a socket, offset is too 7 ssize_t safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count);
|
H A D | utc-offset.c | 4 #include "utc-offset.h" 14 int offset; 21 /* max offset of 24 hours */ 24 offset = -24 * 60; 27 offset = 24 * 60; 29 offset = 0; 31 offset += (ltm.tm_hour - gtm.tm_hour) * 60; 32 offset += (ltm.tm_min - gtm.tm_min); 36 return offset;
|
H A D | sendfile-util.c | 19 ssize_t safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count) argument 28 /* make sure given offset fits into off_t */ 31 if (*offset >= 2147483647L) { 35 if (count > 2147483647L - *offset) 36 count = 2147483647L - *offset; 42 if (*offset >= OFF_T_MAX) { 46 if (count > OFF_T_MAX - *offset) 47 count = OFF_T_MAX - *offset; 50 safe_offset = (off_t)*offset; 53 *offset 62 safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count) argument 98 safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count) argument [all...] |
H A D | ostream-buffer.c | 13 static int o_stream_buffer_seek(struct ostream_private *stream, uoff_t offset) argument 18 stream->ostream.offset = offset; 24 const void *data, size_t size, uoff_t offset) 28 buffer_write(bstream->buf, offset, data, size); 37 size_t left, n, offset; local 41 offset = bstream->seeked ? stream->ostream.offset : bstream->buf->used; 45 stream->ostream.offset; 47 buffer_write(bstream->buf, offset, io 23 o_stream_buffer_write_at(struct ostream_private *stream, const void *data, size_t size, uoff_t offset) argument [all...] |
H A D | read-full.h | 7 int pread_full(int fd, void *data, size_t size, off_t offset);
|
H A D | write-full.h | 8 int pwrite_full(int fd, const void *data, size_t size, off_t offset);
|
H A D | test-ostream-escaped.c | 26 test_assert(os_encode->offset == 12); 27 test_assert(os_sink->offset == 12); 31 str_truncate(str, 0); os_sink->offset = 0; os_encode->offset = 0; 37 test_assert(os_encode->offset == 12); 38 test_assert(os_sink->offset == 2*6 + 1 + 3*6 + 6); 42 str_truncate(str, 0); os_sink->offset = 0; os_encode->offset = 0; 54 test_assert((ssize_t)os_encode->offset == ret); 55 test_assert(os_sink->offset [all...] |
H A D | file-cache.c | 104 ssize_t file_cache_read(struct file_cache *cache, uoff_t offset, size_t size) argument 119 if (offset >= (uoff_t)-1 - size) 120 size = (uoff_t)-1 - offset; 122 if (offset + size > cache->mmap_length && 123 offset + size - cache->mmap_length > 1024*1024) { 135 if (offset + size > (uoff_t)st.st_size) { 136 if (offset >= (uoff_t)st.st_size) 138 size = (uoff_t)st.st_size - offset; 142 if (file_cache_set_size(cache, offset + size) < 0) 145 poffset = offset / page_siz 236 file_cache_write(struct file_cache *cache, const void *data, size_t size, uoff_t offset) argument 280 file_cache_invalidate(struct file_cache *cache, uoff_t offset, uoff_t size) argument [all...] |
H A D | file-cache.h | 21 ssize_t file_cache_read(struct file_cache *cache, uoff_t offset, size_t size); 30 uoff_t offset); 35 uoff_t offset, uoff_t size);
|
H A D | read-full.c | 24 int pread_full(int fd, void *data, size_t size, off_t offset) argument 30 size : SSIZE_T_MAX, offset); 36 offset += ret;
|
H A D | test-iostream-temp.c | 18 test_assert(output->offset == 3); 20 test_assert(output->offset == 4); 40 test_assert(output->offset == 3); 42 test_assert(output->offset == 4); 45 test_assert(output->offset == 5); 60 test_assert(output->offset == 3); 64 test_assert(output->offset == 5); 95 test_assert(output->offset == 6); 105 test_assert(output->offset == 4); 108 test_assert(output->offset [all...] |
H A D | file-set-size.c | 28 off_t offset; local 68 offset = st.st_size; 69 memset(block, 0, I_MIN((ssize_t)sizeof(block), size - offset)); 71 while (offset < size) { 73 I_MIN((ssize_t)sizeof(block), size - offset), 74 offset); 80 offset += ret;
|
H A D | write-full.c | 31 int pwrite_full(int fd, const void *data, size_t size, off_t offset) argument 37 size : SSIZE_T_MAX, offset); 50 offset += ret;
|
H A D | test-istream-base64-encoder.c | 77 unsigned int offset, len = strlen(textout); local 89 for (offset = 0; offset < len; offset++) { 90 i_stream_seek(input, offset); 95 test_assert(size == len-offset); 96 test_assert(memcmp(data, textout+offset, size) == 0);
|
H A D | iostream-temp.c | 85 uoff_t offset = 0; local 90 while (offset < tstream->ostream.ostream.offset && 91 (ret = pread(tstream->fd, buf, sizeof(buf), offset)) > 0) { 92 if ((size_t)ret > tstream->ostream.ostream.offset - offset) 93 ret = tstream->ostream.ostream.offset - offset; 95 offset += ret; 127 tstream->ostream.ostream.offset 265 o_stream_temp_write_at(struct ostream_private *stream, const void *data, size_t size, uoff_t offset) argument 286 o_stream_temp_seek(struct ostream_private *_stream, uoff_t offset) argument [all...] |
H A D | istream-sized.h | 24 uoff_t offset, uoff_t size); 28 uoff_t offset, uoff_t min_size);
|
H A D | test-ostream-file.c | 21 unsigned int i, offset, size; local 39 offset = i_rand_limit(MAX_BUFSIZE * 3); 42 memcpy(buf + offset, randbuf, size); 43 test_assert(o_stream_pwrite(output, randbuf, size, offset) == 0); 99 test_assert(output->offset == 4); 113 test_assert(output->offset == 3); 125 test_assert(output->offset == 5); 163 test_assert(output->offset == 4);
|
/dovecot/src/lib-index/ |
H A D | mail-index-util.c | 8 uint32_t mail_index_uint32_to_offset(uint32_t offset) argument 10 i_assert(offset < 0x40000000); 11 i_assert((offset & 3) == 0); 13 offset >>= 2; 14 offset = 0x00000080 | ((offset & 0x0000007f)) | 15 0x00008000 | ((offset & 0x00003f80) >> 7 << 8) | 16 0x00800000 | ((offset & 0x001fc000) >> 14 << 16) | 17 0x80000000 | ((offset & 0x0fe00000) >> 21 << 24); 19 return cpu32_to_be(offset); 22 mail_index_offset_to_uint32(uint32_t offset) argument [all...] |
H A D | mail-index-util.h | 6 uint32_t mail_index_uint32_to_offset(uint32_t offset); 7 uint32_t mail_index_offset_to_uint32(uint32_t offset);
|
H A D | test-mail-transaction-log-view.c | 52 uoff_t offset ATTR_UNUSED, uint64_t *highest_modseq_r, 136 uoff_t offset, last_log_size; local 169 mail_transaction_log_view_get_prev_pos(view, &seq, &offset); 170 test_assert(seq == 1 && offset == sizeof(struct mail_transaction_log_header)); 177 mail_transaction_log_view_get_prev_pos(view, &seq, &offset); 178 test_assert(seq == 3 && offset == last_log_size); 183 mail_transaction_log_view_get_prev_pos(view, &seq, &offset); 184 test_assert(seq == 1 && offset == sizeof(struct mail_transaction_log_header)); 186 mail_transaction_log_view_get_prev_pos(view, &seq, &offset); 187 test_assert(seq == 1 && offset [all...] |
H A D | mail-cache-lookup.c | 12 int mail_cache_get_record(struct mail_cache *cache, uint32_t offset, argument 19 i_assert(offset != 0); 21 if (offset % sizeof(uint32_t) != 0) { 23 mail_cache_set_corrupted(cache, "invalid record offset"); 28 if (mail_cache_map(cache, offset, sizeof(*rec) + CACHE_PREFETCH, 32 if (offset + sizeof(*rec) > cache->mmap_length) { 44 if ((ret = mail_cache_map(cache, offset, rec->size, &data)) < 0) 63 uint32_t offset; local 70 offset = *((const uint32_t *)data); 71 if (offset 83 uint32_t offset, reset_id; local 113 mail_cache_track_loops(struct mail_cache_loop_track *loop_track, uoff_t offset, uoff_t size) argument 651 uint32_t offset, reset_id; local [all...] |
/dovecot/src/lib-mail/ |
H A D | message-date.c | 5 #include "utc-offset.h" 33 int offset; local 37 /* numeric offset */ 42 offset = ((str[1]-'0') * 10 + (str[2]-'0')) * 60 + 44 return *str == '+' ? offset : -offset; 75 offset = -5 * 60; 78 offset = -6 * 60; 81 offset = -7 * 60; 84 offset 263 int offset; local [all...] |
/dovecot/src/lib-old-stats/ |
H A D | stats-parser.c | 50 unsigned int offset = fields[i].offset; local 51 void *dest = PTR_OFFSET(diff_stats_r, offset); 52 const void *src1 = CONST_PTR_OFFSET(stats1, offset); 53 const void *src2 = CONST_PTR_OFFSET(stats2, offset); 113 unsigned int offset = fields[i].offset; local 114 void *f_dest = PTR_OFFSET(dest, offset); 115 const void *f_src = CONST_PTR_OFFSET(src, offset); 149 const void *ptr = CONST_PTR_OFFSET(data, field->offset); [all...] |
H A D | stats-parser.h | 13 unsigned int offset; member in struct:stats_parser_field
|
/dovecot/src/lib-storage/index/mbox/ |
H A D | istream-raw-mbox.h | 9 /* Return offset to beginning of the "\nFrom"-line. */ 11 /* Return offset to beginning of the headers. */ 14 /* Return offset to beginning of the body. */ 38 /* Seek to message at given offset. offset must point to beginning of 39 "\nFrom ", or 0 for beginning of file. Returns -1 if it offset doesn't 41 int istream_raw_mbox_seek(struct istream *stream, uoff_t offset); 42 /* Set next message's start offset. If this isn't set, read stops at the next 45 void istream_raw_mbox_set_next_offset(struct istream *stream, uoff_t offset);
|