/* @(#)close_files.c 2.1 93/05/18 */ /******************************************************************************/ /* function : close_files.c */ /* */ /* subsystem : chgen */ /* */ /* input : */ /* */ /* output : (closes all output files) */ /* */ /* returns : void */ /* */ /* author : Steve Smith / Craig Smith */ /* */ /* created : July, 1991 */ /* */ /* revisions : */ /* */ /* 11/30/00 kmiu Fixed bug: attempt to close log file that hadn't been */ /* opened. */ /* */ /* description : This routine simply closes all output files. */ /* */ /******************************************************************************/ #include #include #include "chgen_define.h" #include "chgen_externs.h" void close_files() { static char rcsid[] = "$Id: close_files.c,v 1.3.4.1 1999/05/04 16:59:39 jkarner Exp $"; int i; /* added by ntansala 042800 */ fclose(schh_fp); fclose(prload_fp); fclose(prdump_fp); fclose(prfree_fp); fclose(prdel_fp); fclose(prstats_fp); fclose(schtxt_fp); /* kmiu- if -log not specified then fclose cause unhandled exception--Add if (cli_log) */ if (cli_log == TRUE) fclose(prlog_fp); /*added by ntansala 2k0428 */ tt_curr = tt ; i = 0 ; while (tt_curr != NULL) { fclose(XXschh_fp[i]) ; fclose(XXops_fp[i]) ; tt_curr = tt_curr->next_ptr; i = i + 1 ; } return; }