Add XOVER support.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1586 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
36
appl/popper/pop_xover.c
Normal file
36
appl/popper/pop_xover.c
Normal file
@@ -0,0 +1,36 @@
|
||||
#include <popper.h>
|
||||
RCSID("$Id$");
|
||||
|
||||
int
|
||||
pop_xover (POP *p)
|
||||
{
|
||||
#ifdef XOVER
|
||||
MsgInfoList * mp; /* Pointer to message info list */
|
||||
int i;
|
||||
|
||||
pop_msg(p,POP_SUCCESS,
|
||||
"%u messages (%u octets)",
|
||||
p->msg_count-p->msgs_deleted,p->drop_size-p->bytes_deleted);
|
||||
|
||||
/* Loop through the message information list. Skip deleted messages */
|
||||
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
|
||||
if (!mp->del_flag)
|
||||
fprintf(p->output,"%u\t%s\t%s\t%s\t%s\t%lu\t%lu\r\n",
|
||||
mp->number,
|
||||
mp->subject,
|
||||
mp->from,
|
||||
mp->date,
|
||||
mp->msg_id,
|
||||
mp->length,
|
||||
mp->lines);
|
||||
}
|
||||
|
||||
/* "." signals the end of a multi-line transmission */
|
||||
fprintf(p->output,".\r\n");
|
||||
fflush(p->output);
|
||||
|
||||
return(POP_SUCCESS);
|
||||
#else
|
||||
return pop_msg(p, POP_FAILURE, "Command not implemented.");
|
||||
#endif
|
||||
}
|
Reference in New Issue
Block a user