src/base/p7_trace.c
/* Function:  p7_trace_GrowTo()
 * Synopsis:  Reallocates trace to a given minimum size.
 *
 * Purpose:   Reallocates a trace structure <tr> to hold a trace
 *            of at least length <N> states.
 *
 * Returns:   <eslOK> on success.
 *
 * Throws:    <eslEMEM> on allocation failure; the data in <tr>
 *            are unaffected by failure.
 */
p7_trace_GrowTo()
Synopsis:  Reallocates trace to a given minimum size.

Reallocates a trace structure  to hold a trace
of at least length  states.

 on success.

 on allocation failure; the data in 
are unaffected by failure.
p7_trace_GrowTo () Synopsis : Reallocates trace to a given minimum size . Reallocates a trace structure to hold a trace of at least length states . on success . on allocation failure ; the data in are unaffected by failure .
int
p7_trace_GrowTo(P7_TRACE *tr, int N)
{
  int status;
  void *tmp;
  if (N < tr->nalloc) return eslOK; 
  ESL_RALLOC(tr->st, tmp, sizeof(char) *N);
  ESL_RALLOC(tr->k,  tmp, sizeof(int)  *N);
  ESL_RALLOC(tr->i,  tmp, sizeof(int)  *N);
  if (tr->pp != NULL) ESL_RALLOC(tr->pp,  tmp, sizeof(float) *N);
  tr->nalloc = N;
  return eslOK;
 ERROR:
  return status;
}
int p7_trace_GrowTo ( P7_TRACE * tr , int N ) { int status ; void * tmp ; if ( N < tr -> nalloc ) return eslOK ; ESL_RALLOC ( tr -> st , tmp , sizeof ( char ) * N ) ; ESL_RALLOC ( tr -> k , tmp , sizeof ( int ) * N ) ; ESL_RALLOC ( tr -> i , tmp , sizeof ( int ) * N ) ; if ( tr -> pp != NULL ) ESL_RALLOC ( tr -> pp , tmp , sizeof ( float ) * N ) ; tr -> nalloc = N ; return eslOK ; ERROR : return status ; }
Function:  p7_trace_GrowTo()
 Synopsis:  Reallocates trace to a given minimum size.
Function : p7_trace_GrowTo () Synopsis : Reallocates trace to a given minimum size .
/* no-op */