deps/kb_meme/meme-5.0.1/src/alph-in.c
/*
 * Group the symbol by the comprising characters
 */
Group the symbol by the comprising characters
Group the symbol by the comprising characters
static void track_alias(ALPH_READER_T *reader, ALPH_SYM_T *sym) {
  RBNODE_T *aliases_node;
  bool created;
  ARRAYLST_T *aliases_list;
  char *comprise, buffer[2];
  if (sym->comprise) {
    comprise = sym->comprise;
  } else {
    buffer[0] = sym->symbol;
    buffer[1] = '\0';
    comprise = buffer;
  }
  aliases_node = rbtree_lookup(reader->aliases, comprise, true, &created);
  if (created) {
    aliases_list = arraylst_create();
    rbtree_set(reader->aliases, aliases_node, aliases_list);
  } else {
    aliases_list = (ARRAYLST_T*)rbtree_value(aliases_node);
  }
  arraylst_add(sym, aliases_list);
}
static void track_alias ( ALPH_READER_T * reader , ALPH_SYM_T * sym ) { RBNODE_T * aliases_node ; bool created ; ARRAYLST_T * aliases_list ; char * comprise , buffer [ 2 ] ; if ( sym -> comprise ) { comprise = sym -> comprise ; } else { buffer [ 0 ] = sym -> symbol ; buffer [ 1 ] = ' \0 ' ; comprise = buffer ; } aliases_node = rbtree_lookup ( reader -> aliases , comprise , true , & created ) ; if ( created ) { aliases_list = arraylst_create ( ) ; rbtree_set ( reader -> aliases , aliases_node , aliases_list ) ; } else { aliases_list = ( ARRAYLST_T * ) rbtree_value ( aliases_node ) ; } arraylst_add ( sym , aliases_list ) ; }
Group the symbol by the comprising characters
Group the symbol by the comprising characters