// file: $USFS/class/polygon/v1.0/polygon_dbg_0.cc
//

// isip include files
//
#include "polygon.h"
#include "polygon_constants.h"

// method: debug_cc
//
// arguments:
//  FILE* fp: (input) a file pointer used for output 
//  char_1* message: (input) identification message
//
// return:
//  a logical_1 value indicating the status
//
logical_1 Polygon::debug_cc(FILE* fp_a, char_1* message_a) {

  // dump internal data
  //
  if (transcription_d == (char_1*)NULL) {
    fprintf(fp_a, "<%s::%s> transcription_d = NULL\n",
	    POLYGON_CLASS_NAME, message_a);
  }
  else {
    fprintf(fp_a, "<%s::%s> transcription_d = %s\n",
	    POLYGON_CLASS_NAME, message_a, transcription_d);
  }

  fprintf(fp_a, "<%s::%s> num_vertices_d = %ld\n",
	  POLYGON_CLASS_NAME, message_a, num_vertices_d);

  if (vertices_d == (int_4*)NULL) {
    fprintf(fp_a, "<%s::%s> vertices_d = NULL\n",
	    POLYGON_CLASS_NAME, message_a);
  }
  else {
    for (int_4 i = (int_4)0; i < num_vertices_d; i++) {
      fprintf(fp_a, "<%s::%s> %ld   %ld\n",
	      POLYGON_CLASS_NAME, message_a, vertices_d[2 * i],
	      vertices_d[2 * i + 1]);
    }
  }

  // exit gracefully
  //
  return ISIP_TRUE;
}
