spelling
[heimdal.git] / appl / popper / pop_xover.c
blobceab60cc8dc07bac3a2e80bfc3fef01b4293046b
1 #include <popper.h>
2 RCSID("$Id$");
4 int
5 pop_xover (POP *p)
7 #ifdef XOVER
8 MsgInfoList * mp; /* Pointer to message info list */
9 int i;
11 pop_msg(p,POP_SUCCESS,
12 "%d messages (%ld octets)",
13 p->msg_count-p->msgs_deleted,
14 p->drop_size-p->bytes_deleted);
16 /* Loop through the message information list. Skip deleted messages */
17 for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) {
18 if (!(mp->flags & DEL_FLAG))
19 fprintf(p->output,"%u\t%s\t%s\t%s\t%s\t%lu\t%u\r\n",
20 mp->number,
21 mp->subject,
22 mp->from,
23 mp->date,
24 mp->msg_id,
25 mp->length,
26 mp->lines);
29 /* "." signals the end of a multi-line transmission */
30 fprintf(p->output,".\r\n");
31 fflush(p->output);
33 return(POP_SUCCESS);
34 #else
35 return pop_msg(p, POP_FAILURE, "Command not implemented.");
36 #endif