diff options
| author | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
| commit | 69aec538b456402170dc723af417ba5c05389c32 (patch) | |
| tree | e6f34c543f17c6392447ea337b2e2868212424d1 /ipmeprint.c | |
| download | qmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2 qmail-69aec538b456402170dc723af417ba5c05389c32.zip | |
qmail 1.03 import
Diffstat (limited to 'ipmeprint.c')
| -rw-r--r-- | ipmeprint.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ipmeprint.c b/ipmeprint.c new file mode 100644 index 0000000..1ef56e3 --- /dev/null +++ b/ipmeprint.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #include "subfd.h" | ||
| 2 | #include "substdio.h" | ||
| 3 | #include "ip.h" | ||
| 4 | #include "ipme.h" | ||
| 5 | #include "exit.h" | ||
| 6 | |||
| 7 | char temp[IPFMT]; | ||
| 8 | |||
| 9 | void main() | ||
| 10 | { | ||
| 11 | int j; | ||
| 12 | switch(ipme_init()) | ||
| 13 | { | ||
| 14 | case 0: substdio_putsflush(subfderr,"out of memory\n"); _exit(111); | ||
| 15 | case -1: substdio_putsflush(subfderr,"hard error\n"); _exit(100); | ||
| 16 | } | ||
| 17 | for (j = 0;j < ipme.len;++j) | ||
| 18 | { | ||
| 19 | substdio_put(subfdout,temp,ip_fmt(temp,&ipme.ix[j].ip)); | ||
| 20 | substdio_puts(subfdout,"\n"); | ||
| 21 | } | ||
| 22 | substdio_flush(subfdout); | ||
| 23 | _exit(0); | ||
| 24 | } | ||
