hmmer-3.3/src/p7_hmm.c
/* Function: p7_hmm_SetDescription()
 * Synopsis: Set or change the description line of an HMM.
 * 
 * Purpose:  Set or change the description line of a Plan7 HMM. 
 *           Trailing whitespace (including newline) is chopped.
 */
p7_hmm_SetDescription()
Synopsis: Set or change the description line of an HMM.

Set or change the description line of a Plan7 HMM.
Trailing whitespace (including newline) is chopped.
p7_hmm_SetDescription () Synopsis : Set or change the description line of an HMM . Set or change the description line of a Plan7 HMM . Trailing whitespace ( including newline ) is chopped .
int
p7_hmm_SetDescription(P7_HMM *hmm, char *desc)
{
  int   status;
  void *tmp;
  int   n;
  if (desc == NULL) 
    {
      if (hmm->desc != NULL) free(hmm->desc); 
      hmm->desc   = NULL;
      hmm->flags &= ~p7H_DESC;	
    }
  else
    {
      n = strlen(desc);
      ESL_RALLOC(hmm->desc, tmp, sizeof(char)*(n+1));
      strcpy(hmm->desc, desc);
      if ((status = esl_strchop(hmm->desc, n)) != eslOK) goto ERROR;
      hmm->flags |= p7H_DESC;	
    }
  return eslOK;
 ERROR:
  return status;
}
int p7_hmm_SetDescription ( P7_HMM * hmm , char * desc ) { int status ; void * tmp ; int n ; if ( desc == NULL ) { if ( hmm -> desc != NULL ) free ( hmm -> desc ) ; hmm -> desc = NULL ; hmm -> flags &= ~ p7H_DESC ; } else { n = strlen ( desc ) ; ESL_RALLOC ( hmm -> desc , tmp , sizeof ( char ) * ( n + 1 ) ) ; strcpy ( hmm -> desc , desc ) ; if ( ( status = esl_strchop ( hmm -> desc , n ) ) != eslOK ) goto ERROR ; hmm -> flags |= p7H_DESC ; } return eslOK ; ERROR : return status ; }
Function: p7_hmm_SetDescription()
 Synopsis: Set or change the description line of an HMM.
Function : p7_hmm_SetDescription () Synopsis : Set or change the description line of an HMM .
/* legacy */ /* legacy */