diff options
author | Alain Magloire <alainm@gnu.org> | 2001-10-15 05:29:37 +0000 |
---|---|---|
committer | Alain Magloire <alainm@gnu.org> | 2001-10-15 05:29:37 +0000 |
commit | 24361598116c688aeabec17db0a133af03ed0d64 (patch) | |
tree | 8fab4816d670aeba6d11f6b531752525529f053d /frm | |
parent | 9b87545a76b9bfa7dba19f0b7c92293c7483ec00 (diff) | |
download | mailutils-24361598116c688aeabec17db0a133af03ed0d64.tar.gz mailutils-24361598116c688aeabec17db0a133af03ed0d64.tar.bz2 |
The code for IMAP, is a pain, the rewrite should clean all those
hacks. Something to remember for the mailbox2 is to do some
smart caching, the current buffered stream is not good enough.
* configure.in: VERSION is set to 0.0.9a for the alpha.
* frm/frm.c: Protype for usage(). get_personal() should use
const char *.
* mail/mail.c (main): Use mailbox_scan() instead of
mailbox_messages_count () it is faster for IMAP.
* mailbox/mbx_imap.c(imap_get_message0): Remove the
stream_setbufsiz() it is no longer used.
(imap_message_readline imap_body_readline):
Bug fix, readline will only consume up to '\n' even though the
buffer is bigger. So we have to adjust the offset/lines/size
to reflect what we consume. This is not very good for example
doing:
{
off_t offset = 14;
char buffer[512];
stream_readline (stream, buffer, sizeof buffer, offset, NULL);
...
}
Will send to the impap server.
C: g445 FETCH 4 BODY.PEEK[2]<0.2048>
S: * 4 FETCH (BODY[2]<0> {739}
S: g445 OK FETCH completed
This is waste since the first line is only 37 bytes. We will
have to come up on the second API with some smart caching.
* mailbox/memory_stream.c (_memory_write): Nasty bug
was not updating the stream size.
* mailbox/stream.c(stream_readline): Take care of known
case where the buflen is 0 or 1.
Diffstat (limited to 'frm')
-rw-r--r-- | frm/frm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -33,6 +33,7 @@ #include <mailutils/address.h> static int action (observer_t, size_t); +static void usage (const char *argv); static struct option long_options[] = { @@ -71,7 +72,7 @@ static int selected; /* Retrieve the Personal Name from the header To: or From: */ static int -get_personal (header_t hdr, char *field, char *personal, size_t buflen) +get_personal (header_t hdr, const char *field, char *personal, size_t buflen) { char hfield[512]; int status; @@ -193,7 +194,7 @@ action (observer_t o, size_t type) return 0; } -void +static void usage (const char *argv) { printf ("GNU Mailutils.\n"); @@ -323,7 +324,6 @@ main(int argc, char **argv) mailbox_t mbox; observer_t observer; observable_t observable; - int status; if ((status = mailbox_create_default (&mbox, mailbox_name) != 0) || (status = mailbox_open (mbox, MU_STREAM_READ) != 0)) |