diff options
author | Alain Magloire <alainm@gnu.org> | 2001-05-20 04:40:49 +0000 |
---|---|---|
committer | Alain Magloire <alainm@gnu.org> | 2001-05-20 04:40:49 +0000 |
commit | c4720131db791a34cf550f66687c59a6bbd9c6fc (patch) | |
tree | 2ecb60f1be322f9fe33e19674171aa32729d4977 | |
parent | 180d9a5d7929637e49a3b2079b12b5eecb6be194 (diff) | |
download | mailutils-c4720131db791a34cf550f66687c59a6bbd9c6fc.tar.gz mailutils-c4720131db791a34cf550f66687c59a6bbd9c6fc.tar.bz2 |
Remove some '//' C++ style of comments.
-rw-r--r-- | mailbox/attachment.c | 22 | ||||
-rw-r--r-- | mailbox/folder_imap.c | 4 | ||||
-rw-r--r-- | mailbox/mbx_imap.c | 2 | ||||
-rw-r--r-- | mailbox/mbx_mbox.c | 10 | ||||
-rw-r--r-- | mailbox/mbx_pop.c | 4 | ||||
-rw-r--r-- | mailbox/smtp.c | 2 |
6 files changed, 24 insertions, 20 deletions
diff --git a/mailbox/attachment.c b/mailbox/attachment.c index 6d7f0de32..937e84825 100644 --- a/mailbox/attachment.c +++ b/mailbox/attachment.c @@ -59,7 +59,8 @@ struct _msg_info { message_t msg; int ioffset; int ooffset; - stream_t ostream; // output file/decoding stream for saving attachment + stream_t stream; /* output file/decoding stream for saving attachment */ + stream_t fstream; /* output file stream for saving attachment */ }; #define MSG_HDR "Content-Type: %s; name=%s\nContent-Transfer-Encoding: %s\nContent-Disposition: attachment; filename=%s\n\n" @@ -231,7 +232,7 @@ int message_attachment_filename(message_t msg, const char **filename) int message_save_attachment(message_t msg, const char *filename, void **data) { - stream_t istream, fstream; + stream_t istream; struct _msg_info *info = NULL; int ret; size_t size; @@ -251,8 +252,8 @@ int message_save_attachment(message_t msg, const char *filename, void **data) ret = message_attachment_filename(msg, &fname); else fname = filename; - if ( fname && ( ret = file_stream_create(&fstream) ) == 0 ) { - if ( ( ret = stream_open(fstream, fname, 0, MU_STREAM_WRITE|MU_STREAM_CREAT) ) == 0 ) { + if ( fname && ( ret = file_stream_create(&info->fstream) ) == 0 ) { + if ( ( ret = stream_open(info->fstream, fname, 0, MU_STREAM_WRITE|MU_STREAM_CREAT) ) == 0 ) { header_get_value(hdr, "Content-Transfer-Encoding", NULL, 0, &size); if ( size ) { if ( ( content_encoding = alloca(size+1) ) == NULL ) @@ -260,17 +261,17 @@ int message_save_attachment(message_t msg, const char *filename, void **data) header_get_value(hdr, "Content-Transfer-Encoding", content_encoding, size+1, 0); } else content_encoding = (char *)"7bit"; - ret = filter_create(&info->ostream, fstream, content_encoding, MU_FILTER_DECODE, MU_STREAM_READ); + ret = filter_create(&info->stream, istream, content_encoding, MU_FILTER_DECODE, MU_STREAM_READ); } } } - if ( info->ostream && istream ) { + if ( info->stream && istream ) { if ( info->nbytes ) memmove( info->buf, info->buf + (BUF_SIZE - info->nbytes), info->nbytes); - while ( (ret == 0 && info->nbytes) || ( ( ret = stream_read(istream, info->buf, BUF_SIZE, info->ioffset, &info->nbytes) ) == 0 && info->nbytes ) ) { + while ( (ret == 0 && info->nbytes) || ( ( ret = stream_read(info->stream, info->buf, BUF_SIZE, info->ioffset, &info->nbytes) ) == 0 && info->nbytes ) ) { info->ioffset += info->nbytes; while( info->nbytes ) { - if ( ( ret = stream_write(info->ostream, info->buf, info->nbytes, info->ooffset, &nbytes ) ) != 0 ) + if ( ( ret = stream_write(info->fstream, info->buf, info->nbytes, info->ooffset, &nbytes ) ) != 0 ) break; info->nbytes -= nbytes; info->ooffset += nbytes; @@ -278,8 +279,9 @@ int message_save_attachment(message_t msg, const char *filename, void **data) } } if ( ret != EAGAIN && info ) { - stream_close(info->ostream); - stream_destroy(&info->ostream, NULL); + stream_close(info->fstream); + stream_destroy(&info->stream, NULL); + stream_destroy(&info->fstream, NULL); _attachment_free(info, ret); } return ret; diff --git a/mailbox/folder_imap.c b/mailbox/folder_imap.c index f13e0a2e2..ca3d63327 100644 --- a/mailbox/folder_imap.c +++ b/mailbox/folder_imap.c @@ -599,7 +599,7 @@ folder_imap_list (folder_t folder, const char *ref, const char *name, for (i = 0; i < num; i++) { struct list_response *lr = f_imap->callback.flist.element[i]; - //printf ("%s --> %s\n", lr->name, name); + /* printf ("%s --> %s\n", lr->name, name); */ if (fnmatch (name, lr->name, 0) == 0) { plist[i] = calloc (1, sizeof (**plist)); @@ -672,7 +672,7 @@ folder_imap_lsub (folder_t folder, const char *ref, const char *name, for (i = 0; i < num; i++) { struct list_response *lr = f_imap->callback.flist.element[i]; - //printf ("%s --> %s\n", lr->name, name); + /* printf ("%s --> %s\n", lr->name, name); */ plist[i] = calloc (1, sizeof (**plist)); if (plist[i] == NULL || (plist[i]->name = strdup (lr->name)) == NULL) diff --git a/mailbox/mbx_imap.c b/mailbox/mbx_imap.c index 9f816c6c9..628bd4e91 100644 --- a/mailbox/mbx_imap.c +++ b/mailbox/mbx_imap.c @@ -1165,7 +1165,7 @@ imap_get_part (message_t msg, size_t partno, message_t *pmsg) message_get_header (message, &header); header_set_get_value (header, NULL, message); message_set_stream (message, NULL, msg_imap->parts[partno - 1]); - //message_set_size (message, NULL, msg_imap->parts[partno - 1]); + /* message_set_size (message, NULL, msg_imap->parts[partno - 1]); */ msg_imap->parts[partno - 1]->message = message; if (pmsg) *pmsg = message; diff --git a/mailbox/mbx_mbox.c b/mailbox/mbx_mbox.c index c3f6caabe..3e7afe0bb 100644 --- a/mailbox/mbx_mbox.c +++ b/mailbox/mbx_mbox.c @@ -167,7 +167,7 @@ extern char *base_name __P ((char const *)); static int mbox_open __P ((mailbox_t, int)); static int mbox_close __P ((mailbox_t)); static int mbox_get_message __P ((mailbox_t, size_t, message_t *)); -//static int mbox_get_message_by_uid __P ((mailbox_t, size_t, message_t *)); +/* static int mbox_get_message_by_uid __P ((mailbox_t, size_t, message_t *)); */ static int mbox_append_message __P ((mailbox_t, message_t)); static int mbox_messages_count __P ((mailbox_t, size_t *)); static int mbox_messages_recent __P ((mailbox_t, size_t *)); @@ -865,9 +865,11 @@ mbox_expunge (mailbox_t mailbox) part of mum will be at the right position. */ memmove (mud->umessages + j, mud->umessages + j + 1, (dlast - j) * sizeof (mum)); - //mum->header_from = mum->header_from_end = 0; - //mum->body = mum->body_end = 0; - //mum->header_lines = mum->body_lines = 0; +#if 0 + mum->header_from = mum->header_from_end = 0; + mum->body = mum->body_end = 0; + mum->header_lines = mum->body_lines = 0; +#endif for (i = 0; i < HDRSIZE; i++) if (mum->fhdr[i]) { diff --git a/mailbox/mbx_pop.c b/mailbox/mbx_pop.c index 710f2bf86..28e961948 100644 --- a/mailbox/mbx_pop.c +++ b/mailbox/mbx_pop.c @@ -416,13 +416,13 @@ pop_user (authority_t auth) CHECK_ERROR_CLOSE (mbox, mpd, EINVAL); } status = pop_writeline (mpd, "PASS %s\r\n", mpd->passwd); - MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, mpd->buffer); + /* MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, mpd->buffer); */ /* We have to nuke the passwd. */ memset (mpd->passwd, '\0', strlen (mpd->passwd)); free (mpd->passwd); mpd->passwd = NULL; CHECK_ERROR_CLOSE (mbox, mpd, status); - //MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, "PASS *\n"); + MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, "PASS *\n"); mpd->state = POP_AUTH_PASS; case POP_AUTH_PASS: diff --git a/mailbox/smtp.c b/mailbox/smtp.c index 94c85f110..aaa204ecb 100644 --- a/mailbox/smtp.c +++ b/mailbox/smtp.c @@ -273,7 +273,7 @@ smtp_open (mailer_t mailer, int flags) /* Don't flag it as an error some SMTP servers can get the FQDN by themselves even if the client is lying, probably with getpeername(). */ - // return EINVAL; + /* return EINVAL; */ } else { |