// file: window/win_set_0.cc
//

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

// method: set_cc
//
// arguments:
//  int_4 type_d: (input) type of window to create
//  int_4 width_d: (input) length of window to create
//
// return: a logical_1 indicating status
//
logical_1 Window::set_cc(int_4 type_a, int_4 width_a) {

  // set the window type * width
  //
  type_d = type_a;

  // allocate space for the window
  //
  allocate_cc(width_a);

  // create the window
  //
  if (create_cc() != ISIP_TRUE) {
    error_handler_cc((char_1*)"set_cc",
		     (char_1*)"could not create window");
    return ISIP_FALSE;
  }
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
