ipmeprint.c (460B)
1 #include "subfd.h" 2 #include "substdio.h" 3 #include "ip.h" 4 #include "ipme.h" 5 6 char temp[IPFMT]; 7 8 int main(void) 9 { 10 int j; 11 switch(ipme_init()) 12 { 13 case 0: substdio_putsflush(subfderr,"out of memory\n"); return 111; 14 case -1: substdio_putsflush(subfderr,"hard error\n"); return 100; 15 } 16 for (j = 0;j < ipme.len;++j) 17 { 18 substdio_put(subfdout,temp,ip_fmt(temp,&ipme.ix[j].ip)); 19 substdio_puts(subfdout,"\n"); 20 } 21 substdio_flush(subfdout); 22 return 0; 23 }