1
0
Fork 0
qmail/ipmeprint.c
D. J. Bernstein af9625ddf9 qmail 1.01
2009-12-18 13:07:04 +01:00

24 lines
475 B
C

#include "subfd.h"
#include "substdio.h"
#include "ip.h"
#include "ipme.h"
#include "exit.h"
char temp[IPFMT];
void main()
{
int j;
switch(ipme_init())
{
case 0: substdio_putsflush(subfderr,"out of memory\n"); _exit(111);
case -1: substdio_putsflush(subfderr,"hard error\n"); _exit(100);
}
for (j = 0;j < ipme.len;++j)
{
substdio_put(subfdout,temp,ip_fmt(temp,&ipme.ix[j].ip));
substdio_puts(subfdout,"\n");
}
substdio_flush(subfdout);
_exit(0);
}