hmmer-3.3/easel/esl_sq.c
/* Create an <ESL_SQ_BLOCK> object and its list of <ESL_SQ> objects */
Create an  object and its list of  objects
Create an object and its list of objects
static ESL_SQ_BLOCK *
sq_createblock(int count, int do_digital)
{
  int i = 0;
  ESL_SQ_BLOCK *block = NULL;
  int status = eslOK;
  ESL_ALLOC(block, sizeof(ESL_SQ_BLOCK));
  block->count = 0;
  block->first_seqidx = -1;
  block->list  = NULL;
  block->complete = TRUE;
  ESL_ALLOC(block->list, sizeof(ESL_SQ) * count);
  block->listSize = count;
  for (i = 0; i < count; ++i)
    {
      if (sq_init(block->list + i, do_digital) != eslOK) goto ERROR;
    }
  return block;
 ERROR:
  esl_sq_DestroyBlock(block);
  return NULL;
}
static ESL_SQ_BLOCK * sq_createblock ( int count , int do_digital ) { int i = 0 ; ESL_SQ_BLOCK * block = NULL ; int status = eslOK ; ESL_ALLOC ( block , sizeof ( ESL_SQ_BLOCK ) ) ; block -> count = 0 ; block -> first_seqidx = -1 ; block -> list = NULL ; block -> complete = TRUE ; ESL_ALLOC ( block -> list , sizeof ( ESL_SQ ) * count ) ; block -> listSize = count ; for ( i = 0 ; i < count ; ++ i ) { if ( sq_init ( block -> list + i , do_digital ) != eslOK ) goto ERROR ; } return block ; ERROR : esl_sq_DestroyBlock ( block ) ; return NULL ; }
Create an <ESL_SQ_BLOCK> object and its list of <ESL_SQ> objects
Create an <ESL_SQ_BLOCK > object and its list of <ESL_SQ > objects