diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-08-07 09:07:18 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-08-07 09:07:18 +0000 |
commit | 942c66b077093d7875229b8b33ed87028deb0a29 (patch) | |
tree | 33096d57d23c7dd63ea4e4df3a8909c42240f6aa /mailbox | |
parent | 1080f72c46c54957078bd93a14a745699278c7c9 (diff) | |
download | mailutils-942c66b077093d7875229b8b33ed87028deb0a29.tar.gz mailutils-942c66b077093d7875229b8b33ed87028deb0a29.tar.bz2 |
Minor changes.
Diffstat (limited to 'mailbox')
-rw-r--r-- | mailbox/mbox/url.c | 8 | ||||
-rw-r--r-- | mailbox/message.c | 2 | ||||
-rw-r--r-- | mailbox/nntp/folder.c | 2 | ||||
-rw-r--r-- | mailbox/nntp/mbox.c | 20 | ||||
-rw-r--r-- | mailbox/nntp/nntp_article.c | 2 | ||||
-rw-r--r-- | mailbox/nntp/nntp_connect.c | 1 | ||||
-rw-r--r-- | mailbox/nntp/nntp_date.c | 3 | ||||
-rw-r--r-- | mailbox/nntp/nntp_head.c | 2 | ||||
-rw-r--r-- | mailbox/nntp/nntp_ihave.c | 2 | ||||
-rw-r--r-- | mailbox/nntp/nntp_post.c | 2 |
10 files changed, 17 insertions, 27 deletions
diff --git a/mailbox/mbox/url.c b/mailbox/mbox/url.c index 9a339fd3f..59facb7df 100644 --- a/mailbox/mbox/url.c +++ b/mailbox/mbox/url.c @@ -111,7 +111,7 @@ static char * _url_path_index (const char *spooldir, const char *iuser, int index_depth) { const unsigned char* user = (const unsigned char*) iuser; - int i, ulen = strlen (user); + int i, ulen = strlen (iuser); char *mbox, *p; if (ulen == 0) @@ -131,7 +131,7 @@ _url_path_index (const char *spooldir, const char *iuser, int index_depth) *p++ = transtab[ user[ulen-1] ]; } *p++ = '/'; - strcpy (p, user); + strcpy (p, iuser); return mbox; } @@ -140,7 +140,7 @@ static char * _url_path_rev_index (const char *spooldir, const char *iuser, int index_depth) { const unsigned char* user = (const unsigned char*) iuser; - int i, ulen = strlen (user); + int i, ulen = strlen (iuser); char *mbox, *p; if (ulen == 0) @@ -160,7 +160,7 @@ _url_path_rev_index (const char *spooldir, const char *iuser, int index_depth) *p++ = transtab[ user[0] ]; } *p++ = '/'; - strcpy (p, user); + strcpy (p, iuser); return mbox; } diff --git a/mailbox/message.c b/mailbox/message.c index 2333ef22e..05db7c666 100644 --- a/mailbox/message.c +++ b/mailbox/message.c @@ -626,7 +626,7 @@ message_get_uidl (message_t msg, char *buffer, size_t buflen, size_t *pwriten) while (stream_read (stream, buf, sizeof (buf), offset, &n) == 0 && n > 0) { - MD5Update (&md5context, buf, n); + MD5Update (&md5context, (unsigned char*)buf, n); offset += n; } MD5Final (md5digest, &md5context); diff --git a/mailbox/nntp/folder.c b/mailbox/nntp/folder.c index c14c17276..b906bd88c 100644 --- a/mailbox/nntp/folder.c +++ b/mailbox/nntp/folder.c @@ -33,6 +33,7 @@ #include <mailutils/errno.h> #include <mailutils/mailbox.h> #include <mailutils/registrar.h> +#include <mailutils/url.h> #include <folder0.h> #include "nntp0.h" @@ -64,7 +65,6 @@ static int nntp_folder_list __P ((folder_t folder, const char *ref, const ch int _nntp_folder_init (folder_t folder) { - int status; f_nntp_t f_nntp; f_nntp = folder->data = calloc (1, sizeof (*f_nntp)); diff --git a/mailbox/nntp/mbox.c b/mailbox/nntp/mbox.c index d33892253..ca2d43eb4 100644 --- a/mailbox/nntp/mbox.c +++ b/mailbox/nntp/mbox.c @@ -51,6 +51,7 @@ #include <mailutils/observer.h> #include <mailutils/property.h> #include <mailutils/stream.h> +#include <mailutils/iterator.h> #include <mailutils/url.h> #include <mailutils/nntp.h> @@ -66,16 +67,20 @@ static int nntp_mailbox_close __P ((mailbox_t)); static int nntp_mailbox_get_message __P ((mailbox_t, size_t, message_t *)); static int nntp_mailbox_messages_count __P ((mailbox_t, size_t *)); static int nntp_mailbox_scan __P ((mailbox_t, size_t, size_t *)); -static int nntp_mailbox_get_size __P ((mailbox_t, off_t *)); +/* FIXME + static int nntp_mailbox_get_size __P ((mailbox_t, off_t *)); */ static int nntp_message_get_transport2 __P ((stream_t, mu_transport_t *, mu_transport_t *)); static int nntp_message_read __P ((stream_t, char *, size_t, off_t, size_t *)); static int nntp_message_size __P ((message_t, size_t *)); -static int nntp_message_line __P ((message_t, size_t *)); +/* FIXME + static int nntp_message_line __P ((message_t, size_t *)); */ static int nntp_message_uidl __P ((message_t, char *, size_t, size_t *)); static int nntp_message_uid __P ((message_t, size_t *)); -static int nntp_header_get_transport2 __P ((header_t, char *, size_t, off_t, size_t *)); +/* FIXME + static int nntp_header_get_transport2 __P ((header_t, char *, + size_t, off_t, size_t *)); */ static int nntp_header_fill __P ((header_t, char *, size_t, off_t, size_t *)); static int nntp_body_get_transport2 __P ((stream_t, mu_transport_t *, mu_transport_t *)); @@ -198,7 +203,6 @@ nntp_mailbox_open (mailbox_t mbox, int flags) int status = 0; m_nntp_t m_nntp = mbox->data; f_nntp_t f_nntp = m_nntp->f_nntp; - folder_t folder = f_nntp->folder; iterator_t iterator; /* m_nntp must have been created during mailbox initialization. */ @@ -273,7 +277,6 @@ static int nntp_mailbox_get_message (mailbox_t mbox, size_t msgno, message_t *pmsg) { m_nntp_t m_nntp = mbox->data; - f_nntp_t f_nntp = m_nntp->f_nntp; msg_nntp_t msg_nntp; message_t msg = NULL; int status; @@ -421,7 +424,7 @@ nntp_mailbox_messages_count (mailbox_t mbox, size_t *pcount) return status; } -/* Update and scanning. */ +/* Update and scanning. FIXME: Is not used */ static int nntp_is_updated (mailbox_t mbox) { @@ -522,7 +525,6 @@ nntp_message_uid (message_t msg, size_t *puid) { msg_nntp_t msg_nntp = message_get_owner (msg); m_nntp_t m_nntp = msg_nntp->m_nntp; - f_nntp_t f_nntp = m_nntp->f_nntp; int status; if (puid) @@ -539,11 +541,11 @@ nntp_message_uid (message_t msg, size_t *puid) } static int -nntp_message_uidl (message_t msg, char *buffer, size_t buflen, size_t *pnwriten) +nntp_message_uidl (message_t msg, char *buffer, size_t buflen, + size_t *pnwriten) { msg_nntp_t msg_nntp = message_get_owner (msg); m_nntp_t m_nntp = msg_nntp->m_nntp; - f_nntp_t f_nntp = m_nntp->f_nntp; int status = 0; /* Select first. */ diff --git a/mailbox/nntp/nntp_article.c b/mailbox/nntp/nntp_article.c index ec14c045b..0fb5cd4c6 100644 --- a/mailbox/nntp/nntp_article.c +++ b/mailbox/nntp/nntp_article.c @@ -50,8 +50,6 @@ int mu_nntp_article_id (mu_nntp_t nntp, const char *message_id, unsigned long *pnum, char **mid, stream_t *pstream) { int status; - unsigned long dummy = 0; - char *buf; if (nntp == NULL) return EINVAL; diff --git a/mailbox/nntp/nntp_connect.c b/mailbox/nntp/nntp_connect.c index f1c682d68..7277eb721 100644 --- a/mailbox/nntp/nntp_connect.c +++ b/mailbox/nntp/nntp_connect.c @@ -64,7 +64,6 @@ mu_nntp_connect (mu_nntp_t nntp) { size_t len = 0; int code; - char *right, *left; status = mu_nntp_response (nntp, NULL, 0, &len); MU_NNTP_CHECK_EAGAIN (nntp, status); mu_nntp_debug_ack (nntp); diff --git a/mailbox/nntp/nntp_date.c b/mailbox/nntp/nntp_date.c index 95ddefa28..be61e3fd9 100644 --- a/mailbox/nntp/nntp_date.c +++ b/mailbox/nntp/nntp_date.c @@ -32,8 +32,6 @@ mu_nntp_date (mu_nntp_t nntp, unsigned int *year, unsigned int *month, unsigned unsigned int *hour, unsigned int *min, unsigned int *sec) { int status; - unsigned long dummy = 0; - char *buf; if (nntp == NULL) return EINVAL; @@ -81,7 +79,6 @@ mu_nntp_parse_date (mu_nntp_t nntp, int code, unsigned int *year, unsigned int * unsigned int *hour, unsigned int *min, unsigned int *sec) { unsigned int dummy = 0; - char *buf; char format[32]; if (year == NULL) diff --git a/mailbox/nntp/nntp_head.c b/mailbox/nntp/nntp_head.c index 61f88f821..cec77e1ea 100644 --- a/mailbox/nntp/nntp_head.c +++ b/mailbox/nntp/nntp_head.c @@ -50,8 +50,6 @@ int mu_nntp_head_id (mu_nntp_t nntp, const char *message_id, unsigned long *pnum, char **mid, stream_t *pstream) { int status; - unsigned long dummy = 0; - char *buf; if (nntp == NULL) return EINVAL; diff --git a/mailbox/nntp/nntp_ihave.c b/mailbox/nntp/nntp_ihave.c index 7f515e985..a4b4f2e06 100644 --- a/mailbox/nntp/nntp_ihave.c +++ b/mailbox/nntp/nntp_ihave.c @@ -29,8 +29,6 @@ int mu_nntp_ihave (mu_nntp_t nntp, const char *mid, stream_t stream) { int status; - unsigned long dummy = 0; - char *buf; if (nntp == NULL) return EINVAL; diff --git a/mailbox/nntp/nntp_post.c b/mailbox/nntp/nntp_post.c index ed06e1663..003871245 100644 --- a/mailbox/nntp/nntp_post.c +++ b/mailbox/nntp/nntp_post.c @@ -29,8 +29,6 @@ int mu_nntp_post (mu_nntp_t nntp, stream_t stream) { int status; - unsigned long dummy = 0; - char *buf; if (nntp == NULL) return EINVAL; |