deps/kb_meme/meme-5.0.1/src/mhmm.c
/*************************************************************************
 * store a motif number in a passed set with the strands of it that
 * have been requested.
 * Returns true on success.
 *************************************************************************/
store a motif number in a passed set with the strands of it that
have been requested.
Returns true on success.
store a motif number in a passed set with the strands of it that have been requested . Returns true on success .
bool store_requested_num(RBTREE_T *request_nums, const char *value) {
  int strands, motif_i;
  char *end;
  RBNODE_T *node;
  bool created;
  strands = MOTIF_PLUS;
  motif_i = strtol(value, &end, 10);
  if (*end != '\0' || motif_i == 0) {
    return false;
  }
  if (motif_i < 0) {
    strands = MOTIF_MINUS;
    motif_i = -motif_i;
  }
  node = rbtree_lookup(request_nums, &motif_i, true, &created);
  if (!created) strands |= *((int*)rbtree_value(node));
  rbtree_set(request_nums, node, &strands);
  return true;
}
bool store_requested_num ( RBTREE_T * request_nums , const char * value ) { int strands , motif_i ; char * end ; RBNODE_T * node ; bool created ; strands = MOTIF_PLUS ; motif_i = strtol ( value , & end , 10 ) ; if ( * end != ' \0 ' || motif_i == 0 ) { return false ; } if ( motif_i < 0 ) { strands = MOTIF_MINUS ; motif_i = - motif_i ; } node = rbtree_lookup ( request_nums , & motif_i , true , & created ) ; if ( ! created ) strands |= * ( ( int * ) rbtree_value ( node ) ) ; rbtree_set ( request_nums , node , & strands ) ; return true ; }
store a motif number in a passed set with the strands of it that
 have been requested.
store a motif number in a passed set with the strands of it that have been requested .