// file: hist_word_2.cc
//

// isip include files
//
#include "history.h"
#include "history_constants.h"

// method: set_histwords_cc
//
// arguments:
//  void_p* histword_a: (input) the word to set into this history
//  int_4 index: (input) the position of this word in this history
//
// return: a logical_1 indicating status
//
// this method sets one of the history words
//
logical_1 History::set_histwords_cc(void_p histword_a, int_4 index_a) {

  // make sure the memory has been allocated
  //
  if (index_a > hist_len_d - 1) {
    error_handler_cc((char_1*)"set_histwords_cc", (char_1*)"invalid index");
    
    return ISIP_FALSE;
  }
  
  // set the word history
  //
  histwords_d[index_a] = histword_a;
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
