/***************************************************************** * uunet2fbm.c: FBM Release 1.0 25-Feb-90 Michael Mauldin * * uunet2fbm.c: convert a bitmap to Targa format * * USAGE * % uunet2fbm [ image ] > image.fbm * * HISTORY * 05-July-89 Dan Sahlin (dan@sics.se) at SICS * Created from a copy of pic2fbm *****************************************************************/ # include # include # include "fbm.h" # define USAGE\ "Usage: uunet2fbm [ image ] > image.fbm" #ifndef lint static char *fbmid = "$FBM uunet2fbm.c <1.0> written by Dan Sahlin, source code available \ free from MLM@CS.CMU.EDU and from UUNET archives$"; #endif main(argc,argv) int argc; char *argv[]; { FBM image; /* Clear pointers */ image.cm = image.bm = (unsigned char *) NULL; /* Open input if given */ if (argc > 1) { if (freopen (argv[1], "r", stdin) != stdin) { perror (argv[1]); exit(1); } } if (read_uunet (&image, stdin, "", 0) && write_fbm (&image, stdout)) { exit(0); } else { exit (1); } }