// file: pfil_dbg_0.cc
//

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

// method: debug_cc
//
// arguments:
//  FILE* fp: (input) a open file pointer
//  char_1* message: (input) a message to be displayed
//
// return: a logical_1 indicating status
//
// this is the debugging routine for the Param_file_class
//
logical_1 Param_file::debug_cc(FILE* fp_a ,char_1* message_a) {

  int_4 i;

  // dump all the class data
  //

  // output the parameter file
  //
  if (param_file_d != (char_1*)NULL) {
    fprintf(fp_a,"<%s::%s> param_file_d :%s\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a, 
	    param_file_d);
  }
  else {
    fprintf(fp_a,"<%s::%s> param_file_d: NULL\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a);
  }
	    

  // output the magic_string
  //
  if (magic_string_d != (char_1*) NULL) {
    fprintf(fp_a,"<%s::%s> magic_string_d :%s\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a, magic_string_d);
  }
  else {
    fprintf(fp_a,"<%s::%s> magic_string_d = NULL\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a);
  }

  // output the num_params_d
  //
  fprintf(fp_a,"<%s::%s> num_params_d = %ld\n",
          PARAM_FILE_CLASS_NAME, (char*)message_a, num_params_d);

  // output parameters
  //
  if (params_d != (char_1**)NULL) {
    for (i=0;i<num_params_d;i++) {
      fprintf(fp_a,"<%s::%s> params[%ld]: %s = %s\n",
	      PARAM_FILE_CLASS_NAME, (char*)message_a,
	      i, params_d[i], values_d[i]);
    }
  }
  else {
    fprintf(fp_a,"<%s::%s> params_d = NULL, values_d = NULL\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a);
  }
   
  // output terminator_char_d
  //
  fprintf(fp_a,"<%s::%s> terminator_char_d = >%c<\n",
	  PARAM_FILE_CLASS_NAME, (char*)message_a, terminator_char_d);

  // output assignment_char_d
  //
  fprintf(fp_a,"<%s::%s> assignment_char_d = >%c<\n",
	  PARAM_FILE_CLASS_NAME, (char*)message_a, assignment_char_d);

  // output comment_char_d
  //
  fprintf(fp_a,"<%s::%s> comment_char_d = >%c<\n",
	  PARAM_FILE_CLASS_NAME, (char*)message_a, comment_char_d);

  // output parse_statement_format_d
  //
  if (parse_statement_format_d != (char_1*)NULL) {
    fprintf(fp_a,"<%s::%s> parse_statement_format_d = %s\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a, parse_statement_format_d);
  }
  else {
    fprintf(fp_a,"<%s::%s> parse_statement_format_d = NULL\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a);
  }

  // output load_statement_format_d
  //
  if (load_statement_format_d != (char_1*)NULL) {
    fprintf(fp_a,"<%s::%s> load_statement_format_d = %s\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a, load_statement_format_d);
  }
  else {
    fprintf(fp_a,"<%s::%s> load_statement_format_d = NULL\n",
	    PARAM_FILE_CLASS_NAME, (char*)message_a);
  }

  // exit gracefully
  //
  return ISIP_TRUE;
}
  
