hmmer-3.3/src/p7_trace.c
/* Function:  p7_trace_GrowIndexTo()
 * Synopsis:  Reallocates domain index for a given minimum number.
 * Incept:    SRE, Fri Jan  4 10:47:43 2008 [Janelia]
 *
 * Purpose:   Reallocates the domain index in <tr> to index
 *            at least <ndom> domains.
 *
 * Returns:   <eslOK> on success.
 *
 * Throws:    <eslEMEM> on allocation failure, in which case
 *            the data in <tr> are unaffected.
 */
p7_trace_GrowIndexTo()
Synopsis:  Reallocates domain index for a given minimum number.

Reallocates the domain index in  to index
at least  domains.

 on success.

 on allocation failure, in which case
the data in  are unaffected.
p7_trace_GrowIndexTo () Synopsis : Reallocates domain index for a given minimum number . Reallocates the domain index in to index at least domains . on success . on allocation failure in which case the data in are unaffected .
int
p7_trace_GrowIndexTo(P7_TRACE *tr, int ndom)
{
  void *p;
  int   status;
  if (ndom < tr->ndomalloc) return eslOK;
  ESL_RALLOC(tr->tfrom,   p, sizeof(int)*ndom);
  ESL_RALLOC(tr->tto,     p, sizeof(int)*ndom);
  ESL_RALLOC(tr->sqfrom,  p, sizeof(int)*ndom);
  ESL_RALLOC(tr->sqto,    p, sizeof(int)*ndom);
  ESL_RALLOC(tr->hmmfrom, p, sizeof(int)*ndom);
  ESL_RALLOC(tr->hmmto,   p, sizeof(int)*ndom);
  tr->ndomalloc = ndom;
  return eslOK;
 ERROR:
  return status;
}
int p7_trace_GrowIndexTo ( P7_TRACE * tr , int ndom ) { void * p ; int status ; if ( ndom < tr -> ndomalloc ) return eslOK ; ESL_RALLOC ( tr -> tfrom , p , sizeof ( int ) * ndom ) ; ESL_RALLOC ( tr -> tto , p , sizeof ( int ) * ndom ) ; ESL_RALLOC ( tr -> sqfrom , p , sizeof ( int ) * ndom ) ; ESL_RALLOC ( tr -> sqto , p , sizeof ( int ) * ndom ) ; ESL_RALLOC ( tr -> hmmfrom , p , sizeof ( int ) * ndom ) ; ESL_RALLOC ( tr -> hmmto , p , sizeof ( int ) * ndom ) ; tr -> ndomalloc = ndom ; return eslOK ; ERROR : return status ; }
Function:  p7_trace_GrowIndexTo()
 Synopsis:  Reallocates domain index for a given minimum number.
Function : p7_trace_GrowIndexTo () Synopsis : Reallocates domain index for a given minimum number .