deps/kb_meme/meme-5.0.1/src/alph-in.c
/*
 * process_core
 * check that a core symbol is new and add it to the set of core symbols along
 * with all its data.
 */
process_core
check that a core symbol is new and add it to the set of core symbols along
with all its data.
process_core check that a core symbol is new and add it to the set of core symbols along with all its data .
static void process_core(ALPH_READER_T *reader, const int64_t line_num,
    char symbol, char* name, int colour, char complement) {
  ALPH_SYM_T *sym;
  char sym_str[2];
  if (symbol == '?') {
    add_msg(reader, parmsg_create(SEVERITY_ERROR, -1, line_num, -1,
          "symbol '?' is reserved as a wildcard and cannot be defined to have any other meaning"));
  }
  sym = alph_sym_create(symbol, name, colour, complement, NULL);
  sym_str[0] = symbol;
  sym_str[1] = '\0';
  if (!rbtree_make(reader->all, sym_str, NULL)) {
    alph_sym_destroy(sym);
    add_msg(reader, parmsg_create(SEVERITY_ERROR, -1, line_num, -1,
          "core symbol %c is already defined", symbol));
    return;
  }
  track_alias(reader, sym);
  rbtree_make(reader->core, sym_str, sym); 
  if (symbol >= 'A' && symbol <= 'Z') reader->seen_upper_case = true;
  else if (symbol >= 'a' && symbol <= 'z') reader->seen_lower_case = true;
}
static void process_core ( ALPH_READER_T * reader , const int64_t line_num , char symbol , char * name , int colour , char complement ) { ALPH_SYM_T * sym ; char sym_str [ 2 ] ; if ( symbol == ' ' ) { add_msg ( reader , parmsg_create ( SEVERITY_ERROR , -1 , line_num , -1 , " " ) ) ; } sym = alph_sym_create ( symbol , name , colour , complement , NULL ) ; sym_str [ 0 ] = symbol ; sym_str [ 1 ] = ' \0 ' ; if ( ! rbtree_make ( reader -> all , sym_str , NULL ) ) { alph_sym_destroy ( sym ) ; add_msg ( reader , parmsg_create ( SEVERITY_ERROR , -1 , line_num , -1 , " " , symbol ) ) ; return ; } track_alias ( reader , sym ) ; rbtree_make ( reader -> core , sym_str , sym ) ; if ( symbol >= ' ' && symbol <= ' ' ) reader -> seen_upper_case = true ; else if ( symbol >= ' ' && symbol <= ' ' ) reader -> seen_lower_case = true ; }
process_core
 check that a core symbol is new and add it to the set of core symbols along
 with all its data.
process_core check that a core symbol is new and add it to the set of core symbols along with all its data .
// track the set of core symbols