// file: ngrn_debug_0.cc
//

// isip include files
//
#include "ngram_list.h"
#include "ngram_list_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 flag indicating success
//
logical_1 Ngram_list::debug_cc(FILE* fp_a, char_1* message_a) {
  
  // dump the contents of the class to the file
  //
  fprintf(fp_a, "%s::%s num_d = %ld\n", NGRAM_LIST_CLASS_NAME,
	  message_a, num_d);
  
  fprintf(fp_a, "%s::%s nodes_d = %p\n", NGRAM_LIST_CLASS_NAME,
	  message_a, nodes_d);

  // print contents of the array
  //
  if (nodes_d != (Ngram_node**)NULL) {
    for (int_4 i = 0; i < num_d; i++) {
      fprintf(fp_a, "%s::%s nodes_d[%ld] = %p\n", NGRAM_LIST_CLASS_NAME,
	      message_a, i, nodes_d[i]);
    }
  }

  // exit gracefully
  //
  return ISIP_TRUE;
}
