#ident "%Z%%M% %I% %E% SMI"
#include "mail.h"
void dumpaff (type, htype, didafflines, suppress, f)
register int type;
register int htype;
register int *didafflines;
register int *suppress;
register FILE *f;
{
int affspot;
struct hdrs *hptr;
char *pn = "dumpaff";
Dout(pn, 15, "type=%d, htype=%d/%s, *didafflines=%d, *suppress=%d\n", type, htype, htype >= 0 ? header[htype].tag : "None", *didafflines, *suppress);
affspot = pckaffspot();
if (affspot == -1) {
Dout(pn, 15, "\taffspot==-1\n");
return;
}
switch (htype) {
case H_AFWDCNT:
*suppress = TRUE;
Dout(pn, 15, "\tAuto-Forward-Count found\n");
return;
case H_AFWDFROM:
*suppress = TRUE;
break;
}
if (*didafflines == TRUE) {
Dout(pn, 15, "\tdidafflines == TRUE\n");
return;
}
if ((htype >= 0) && (affspot != htype)) {
Dout(pn, 15, "\thtype < 0 || affspot != htype, *suppress=%d\n", *suppress);
return;
}
*didafflines = TRUE;
for (hptr = hdrlines[H_AFWDFROM].head;
hptr != (struct hdrs *)NULL;
hptr = hptr->next) {
printhdr(type, H_AFWDFROM, hptr, f);
}
fprintf(f,"%s %d\n", header[H_AFWDCNT].tag, affcnt);
Dout(pn, 15, "\t*didafflines=%d, *suppress=%d\n", *didafflines, *suppress);
}