hmmer-3.3/easel/esl_msafile_stockholm.c
/* The auxiliary parse data is sufficient to validate each line as we
 * see it. Our design requires that we immediately report any errors
 * and the line number they occur on. We do not want to detect errors
 * in some later validation step, after we've lost track of original
 * line numbers of the input. 
 */
The auxiliary parse data is sufficient to validate each line as we
see it. Our design requires that we immediately report any errors
and the line number they occur on. We do not want to detect errors
in some later validation step, after we've lost track of original
line numbers of the input.
The auxiliary parse data is sufficient to validate each line as we see it . Our design requires that we immediately report any errors and the line number they occur on . We do not want to detect errors in some later validation step after we ' ve lost track of original line numbers of the input .
static ESL_STOCKHOLM_PARSEDATA *
stockholm_parsedata_Create(ESL_MSA *msa)
{
  ESL_STOCKHOLM_PARSEDATA *pd = NULL;
  int z;
  int status;
  ESL_ALLOC(pd, sizeof(ESL_STOCKHOLM_PARSEDATA));
  pd->nseq          = 0;
  pd->alen          = 0;
  pd->in_block      = FALSE;
  pd->blinetype     = NULL;
  pd->bidx          = NULL;
  pd->npb           = 0;
  pd->bi            = 0;
  pd->si            = 0;
  pd->balloc        = 0;
  pd->nblock        = 0;
  pd->nseq_b        = 0;
  pd->alen_b        = 0;
  pd->ssconslen     = 0;
  pd->saconslen     = 0;
  pd->ppconslen     = 0;
  pd->rflen         = 0;
  pd->mmasklen      = 0;
  pd->sqlen         = NULL;
  pd->sslen         = NULL;
  pd->salen         = NULL;
  pd->pplen         = NULL;
  pd->ogc_len       = NULL;
  pd->ogr_len       = NULL;
  pd->salloc        = 0;
  ESL_ALLOC(pd->blinetype, sizeof(char) * 16);
  ESL_ALLOC(pd->bidx,      sizeof(int)  * 16);
  pd->balloc = 16;
  ESL_ALLOC(pd->sqlen,     sizeof(int64_t) * msa->sqalloc);
  for (z = 0; z < msa->sqalloc; z++) 
    pd->sqlen[z] = 0;
  pd->salloc = msa->sqalloc;
  return pd;
 ERROR:
  stockholm_parsedata_Destroy(pd, msa);
  return NULL;
}
static ESL_STOCKHOLM_PARSEDATA * stockholm_parsedata_Create ( ESL_MSA * msa ) { ESL_STOCKHOLM_PARSEDATA * pd = NULL ; int z ; int status ; ESL_ALLOC ( pd , sizeof ( ESL_STOCKHOLM_PARSEDATA ) ) ; pd -> nseq = 0 ; pd -> alen = 0 ; pd -> in_block = FALSE ; pd -> blinetype = NULL ; pd -> bidx = NULL ; pd -> npb = 0 ; pd -> bi = 0 ; pd -> si = 0 ; pd -> balloc = 0 ; pd -> nblock = 0 ; pd -> nseq_b = 0 ; pd -> alen_b = 0 ; pd -> ssconslen = 0 ; pd -> saconslen = 0 ; pd -> ppconslen = 0 ; pd -> rflen = 0 ; pd -> mmasklen = 0 ; pd -> sqlen = NULL ; pd -> sslen = NULL ; pd -> salen = NULL ; pd -> pplen = NULL ; pd -> ogc_len = NULL ; pd -> ogr_len = NULL ; pd -> salloc = 0 ; ESL_ALLOC ( pd -> blinetype , sizeof ( char ) * 16 ) ; ESL_ALLOC ( pd -> bidx , sizeof ( int ) * 16 ) ; pd -> balloc = 16 ; ESL_ALLOC ( pd -> sqlen , sizeof ( int64_t ) * msa -> sqalloc ) ; for ( z = 0 ; z < msa -> sqalloc ; z ++ ) pd -> sqlen [ z ] = 0 ; pd -> salloc = msa -> sqalloc ; return pd ; ERROR : stockholm_parsedata_Destroy ( pd , msa ) ; return NULL ; }
The auxiliary parse data is sufficient to validate each line as we
 see it.
The auxiliary parse data is sufficient to validate each line as we see it .