// file: pfil_init_1.cc
//

// system include files
//
#include <stdlib.h>
#include <string.h>

// isip include files
//
#include "param_file.h"
#include "param_file_constants.h"
#include <integral_constants.h>

// method: init_cc
//
// arguments:
//  char_1* filename_a: (input) parameter file
//
// return: a logical_1 indicating status
//
// this is the initializer for the Param_file class
//
logical_1 Param_file::init_cc(char_1* filename_a) {

  // check paramaters
  //
  if (filename_a == (char_1*)NULL) {
    error_handler_cc((char_1*)"init_cc",
		     (char_1*)"input filename is not valid");
  }

  FILE* fp_a = (FILE*)NULL;

  // open the file
  //
  fp_a = fopen ((char*)filename_a, "r");
  
  // load the parameter file
  //
  load_cc((FILE*)fp_a);

  // close the file
  //
  fclose (fp_a);
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
