if (cmd.cflag || cmd.hflag || cmd.lflag || cmd.tflag || cmd.sflag || cmd.mflag || cmd.nflag || cmd.Ssflag || cmd.Scflag ) { checkfiles(cmd.infile, cmd.outfile);
if (cmd.cflag || cmd.hflag || cmd.lflag || cmd.tflag || cmd.sflag || cmd.mflag || cmd.nflag || cmd.Ssflag || cmd.Scflag) { checkfiles (cmd.infile, cmd.outfile); } else checkfiles (cmd.infile, NULL);  if (cmd.cflag) c_output (cmd.infile, "-DRPC_XDR", DONT_EXTEND, cmd.outfile); else if (cmd.hflag) h_output (cmd.infile, "-DRPC_HDR", DONT_EXTEND, cmd.outfile); else if (cmd.lflag) l_output (cmd.infile, "-DRPC_CLNT", DONT_EXTEND, cmd.outfile); else if (cmd.sflag || cmd.mflag || (cmd.nflag)) s_output (argc, argv, cmd.infile, "-DRPC_SVC", DONT_EXTEND, cmd.outfile, cmd.mflag, cmd.nflag); else if (cmd.tflag) t_output (cmd.infile, "-DRPC_TBL", DONT_EXTEND, cmd.outfile); else if (cmd.Ssflag) svc_output (cmd.infile, "-DRPC_SERVER", DONT_EXTEND, cmd.outfile); else if (cmd.Scflag) clnt_output (cmd.infile, "-DRPC_CLIENT", DONT_EXTEND, cmd.outfile); else if (cmd.makefileflag) mkfile_output (&cmd); else {  c_output (cmd.infile, "-DRPC_XDR", EXTEND, "_xdr.c"); reinitialize (); h_output (cmd.infile, "-DRPC_HDR", EXTEND, ".h"); reinitialize (); l_output (cmd.infile, "-DRPC_CLNT", EXTEND, "_clnt.c"); reinitialize (); if (inetdflag || !tirpcflag) s_output (allc, allv, cmd.infile, "-DRPC_SVC", EXTEND, "_svc.c", cmd.mflag, cmd.nflag); else s_output (allnc, allnv, cmd.infile, "-DRPC_SVC", EXTEND, "_svc.c", cmd.mflag, cmd.nflag); if (tblflag) { reinitialize (); t_output (cmd.infile, "-DRPC_TBL", EXTEND, "_tbl.i");
main(int argc, const char *argv[]){	struct commandline cmd;	(void) memset((char *)&cmd, 0, sizeof (struct commandline));	clear_args();	if (!parseargs(argc, argv, &cmd))		usage();	if (cmd.cflag || cmd.hflag || cmd.lflag || cmd.tflag || cmd.sflag ||		cmd.mflag || cmd.nflag || cmd.Ssflag || cmd.Scflag ) {	  checkfiles(cmd.infile, cmd.outfile);	}	else	  checkfiles(cmd.infile,NULL);	if (cmd.cflag) {		c_output(cmd.infile, "-DRPC_XDR", DONT_EXTEND, cmd.outfile);	} else if (cmd.hflag) {		h_output(cmd.infile, "-DRPC_HDR", DONT_EXTEND, cmd.outfile);	} else if (cmd.lflag) {		l_output(cmd.infile, "-DRPC_CLNT", DONT_EXTEND, cmd.outfile);	} else if (cmd.sflag || cmd.mflag || (cmd.nflag)) {		s_output(argc, argv, cmd.infile, "-DRPC_SVC", DONT_EXTEND,			 cmd.outfile, cmd.mflag, cmd.nflag);	} else if (cmd.tflag) {		t_output(cmd.infile, "-DRPC_TBL", DONT_EXTEND, cmd.outfile);	} else if  (cmd.Ssflag) {		  svc_output(cmd.infile, "-DRPC_SERVER", DONT_EXTEND, cmd.outfile);	} else if (cmd.Scflag) {		  clnt_output(cmd.infile, "-DRPC_CLIENT", DONT_EXTEND, cmd.outfile);	} else {		/* the rescans are required, since cpp may effect input */		c_output(cmd.infile, "-DRPC_XDR", EXTEND, "_xdr.c");		reinitialize();		h_output(cmd.infile, "-DRPC_HDR", EXTEND, ".h");		reinitialize();		l_output(cmd.infile, "-DRPC_CLNT", EXTEND, "_clnt.c");		reinitialize();		if (inetdflag || !tirpcflag )			s_output(allc, allv, cmd.infile, "-DRPC_SVC", EXTEND,				 "_svc.c", cmd.mflag, cmd.nflag);		else			s_output(allnc, allnv, cmd.infile, "-DRPC_SVC",				 EXTEND, "_svc.c", cmd.mflag, cmd.nflag);		if (tblflag) {			reinitialize();			t_output(cmd.infile, "-DRPC_TBL", EXTEND, "_tbl.i");		}		if (allfiles) {		  reinitialize();		  svc_output(cmd.infile, "-DRPC_SERVER", EXTEND, "_server.c");		}		if (allfiles) {		  reinitialize();		  clnt_output(cmd.infile, "-DRPC_CLIENT", EXTEND, "_client.c");		}	}	exit(nonfatalerrors);	/* NOTREACHED */}