close_input (); close_output (outfilename);
clnt_output (const char *infile, const char *define, int extend,	     const char *outfile){  definition *def;  char *include;  const char *outfilename;  long tell;  int has_program = 0;  open_input (infile, define);  outfilename = extend ? extendfile (infile, outfile) : outfile;  checkfiles (infile, outfilename);  /*check if outfile already exists.     if so, print an error message and exit */  open_output (infile, outfilename);  add_sample_msg ();  if (infile && (include = extendfile (infile, ".h")))    {      fprintf (fout, "#include \"%s\"\n", include);      free (include);    }  else    fprintf (fout, "#include <rpc/rpc.h>\n");  tell = ftell (fout);  while ((def = get_definition ()) != NULL)    {      has_program += write_sample_clnt (def);    }  if (has_program)    write_sample_clnt_main ();  if (extend && tell == ftell (fout))    {      unlink (outfilename);    }}