// file: sig_close_0.cc
//

// isip include files
//
#include "Signal.h"
#include "signal_constants.h"

// method: close_cc
//
// arguments: none
//
// return: a logical_1 value indicating the status
//
logical_1 Signal::close_cc() {

  // close the file
  //
  if (fp_d != (FILE*)NULL) {

    if (fclose(fp_d) != (int)0) {
      return ISIP_FALSE;
    }

    // reset the file pointer
    //
    fp_d = (FILE*)NULL;

    // clear the space allocated for the filename
    //
    if (fname_d != (char_1*)NULL) {
      delete [] fname_d;
      fname_d = (char_1*)NULL;
    }
  }

  // else, an error
  //
  else {
    error_handler_cc((char_1*)"close_cc",
		     (char_1*)"no open file");
    return ISIP_FALSE;
  }

  // exit gracefully
  //
  return ISIP_TRUE;
}
