23709: Use ALLOC to allocate memory, from harald barth.
[heimdal.git] / appl / popper / pop_xover.c
blobbebb7f6191c37d93feafe7684324637afa9ddffa
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