annotate src/lib-mail/message-size.h @ 956:26cafa3dc09c HEAD

minor optimization
author Timo Sirainen <tss@iki.fi>
date Sun, 12 Jan 2003 01:49:45 +0200
parents fd8888f6f037
children 8028c4dcf38f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 #ifndef __MESSAGE_SIZE_H
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 #define __MESSAGE_SIZE_H
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 856
diff changeset
4 struct message_size;
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5
764
f57c52738f90 Renamed IBuffer and OBuffer to IStream and OStream which describes their
Timo Sirainen <tss@iki.fi>
parents: 410
diff changeset
6 /* Calculate size of message header. Leave the input point to first
5
1b34ec11fff8 Message data is parsed in blocks (no longer entirely mmap()ed). Several
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
7 character in body. */
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 856
diff changeset
8 void message_get_header_size(struct istream *input, struct message_size *hdr);
50
d493b9cc265e Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
Timo Sirainen <tss@iki.fi>
parents: 5
diff changeset
9 /* Calculate size of message body. Read only max_virtual_size virtual bytes,
856
e49f7397af98 Some bugfixes and speedups for partial fetch handling.
Timo Sirainen <tss@iki.fi>
parents: 805
diff changeset
10 if you want it unlimited, use (uoff_t)-1. If last_cr is not NULL, it's set
e49f7397af98 Some bugfixes and speedups for partial fetch handling.
Timo Sirainen <tss@iki.fi>
parents: 805
diff changeset
11 to 1 if last character is CR, 2 if it's virtual CR. */
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 856
diff changeset
12 void message_get_body_size(struct istream *input, struct message_size *body,
856
e49f7397af98 Some bugfixes and speedups for partial fetch handling.
Timo Sirainen <tss@iki.fi>
parents: 805
diff changeset
13 uoff_t max_virtual_size, int *last_cr);
5
1b34ec11fff8 Message data is parsed in blocks (no longer entirely mmap()ed). Several
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
14
764
f57c52738f90 Renamed IBuffer and OBuffer to IStream and OStream which describes their
Timo Sirainen <tss@iki.fi>
parents: 410
diff changeset
15 /* Skip number of virtual bytes from putfer. If first character is \n, and
5
1b34ec11fff8 Message data is parsed in blocks (no longer entirely mmap()ed). Several
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
16 cr_skipped is FALSE, \r must be sent before it. msg_size is updated if
1b34ec11fff8 Message data is parsed in blocks (no longer entirely mmap()ed). Several
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
17 it's not NULL. */
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 856
diff changeset
18 void message_skip_virtual(struct istream *input, uoff_t virtual_skip,
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 856
diff changeset
19 struct message_size *msg_size, int *cr_skipped);
5
1b34ec11fff8 Message data is parsed in blocks (no longer entirely mmap()ed). Several
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
20
1b34ec11fff8 Message data is parsed in blocks (no longer entirely mmap()ed). Several
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
21 /* Sum contents of src into dest. */
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 856
diff changeset
22 void message_size_add(struct message_size *dest,
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 856
diff changeset
23 const struct message_size *src);
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 #endif