#include "a.h" void main(int argc, char *argv[]) { char *f=nil; Mailbox *b; String *s; ARGBEGIN { case 'f': f=ARGF(); break; default: print(" badflag('%c')", ARGC()); } ARGEND if (f==nil) { print("Specify a file name with -f\n"); exits("error"); } b=mbox_new(f); b->fetch(b); s = b->ml[0].getheader(&b->ml[0],"Received"); print("Received: %s\n",s_to_c(s)); mbox_free(b); exits(nil); }