if (outfile == NULL) { fout = stdout; return; }  if (infile != NULL && streq(outfile, infile)) { f_print(stderr, "%s: output would overwrite %s\n", cmdname, infile); crash(); } fout = fopen(outfile, "w"); if (fout == NULL) { f_print(stderr, "%s: unable to open ", cmdname); perror(outfile); crash(); } record_open(outfile);
if (infile != NULL && streq (outfile, infile)) { fprintf (stderr, _ ("%s: output would overwrite %s\n"), cmdname, infile); crash (); } fout = fopen (outfile, "w"); if (fout == NULL) { fprintf (stderr, _ ("%s: unable to open "), cmdname); perror (outfile); crash (); } record_open (outfile);
open_output(const char *infile, const char *outfile){	if (outfile == NULL) {		fout = stdout;		return;	}	if (infile != NULL && streq(outfile, infile)) {		f_print(stderr, "%s: output would overwrite %s\n", cmdname,			infile);		crash();	}	fout = fopen(outfile, "w");	if (fout == NULL) {		f_print(stderr, "%s: unable to open ", cmdname);		perror(outfile);		crash();	}	record_open(outfile);}