// file: window/win_type_0.cc
//

// isip include files
//
#include "window.h"
#include "window_constants.h"

// method: type_cc
//
// arguments:
//  char_1* opt_a: (input) type of window to create
//
// return: a logical_1 indicating status
//
int_4 Window::type_cc(char_1* opt_a) {

  if (opt_a == (char_1*)NULL) {
    error_handler_cc((char_1*)"type_cc",
		     (char_1*)"NULL pointer");
    return WIN_TYPE_UNKNOWN;
  }

  if (strcmp((char*)opt_a, (char*)WIN_OPT_RECTANGLE) == 0) {
    return WIN_TYPE_RECTANGLE;
  }
  else if (strcmp((char*)opt_a, (char*)WIN_OPT_HAMMING) == 0) {
    return WIN_TYPE_HAMMING;
  }
  else if (strcmp((char*)opt_a, (char*)WIN_OPT_HANNING) == 0) {
    return WIN_TYPE_HANNING;
  }
  else {
    return WIN_TYPE_UNKNOWN;
  }
}
