|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T u
Length: 1136 (0x470)
Types: TextFile
Names: »umsift.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦3658e588a⟧ »EurOpenD3/mail/mh/mh-6.7.tar.Z«
└─⟦c75e36ecb⟧
└─⟦this⟧ »mh-6.7/zotnet/mf/umsift.c«
/* umsift.c - test out uumm */
#include "mf.h"
#include <stdio.h>
/* \f
*/
/* ARGSUSED */
main (argc, argv)
int argc;
char **argv;
{
int oops = 0;
char sobuf[BUFSIZ];
FILE * fp;
mts_init (*argv);
setbuf (stdout, sobuf);
if (argc < 2)
sift (stdin);
else
while (--argc) {
if ((fp = fopen (*++argv)) == NULL) {
perror (*argv);
oops++;
continue;
}
sift (fp);
fclose (fp);
}
exit (oops);
}
/* \f
*/
static sift (f)
FILE * f;
{
switch (uucp2mmdf (fileno (f), fileno (stdout), FALSE)) {
case MFOK:
break;
case MFPRM:
die ("internal error while filtering UUCP mail");
case MFSIO:
die ("no free file pointers -- you lose");
case MFERR:
die ("i/o error while filtering UUCP mail");
case MFROM:
case MFHDR:
case MFTXT:
fprintf (stderr, "UUCP mail was in bad format, patched...\n");
break;
}
}
/* \f
*/
/* VARARGS */
die (fmt, a, b, c, d)
char *fmt,
*a,
*b,
*c,
*d;
{
fflush (stdout);
fprintf (stderr, fmt, a, b, c, d);
putc ('\n', stderr);
exit (-1);
}