hmmer-3.3/easel/esl_sqio_ncbi.c
/* Function:  reset_db()
 * Synopsis:  Resets a sequence file.
 * Incept:    MSF, Wed Mar 17, 2010 [Janelia]
 *
 * Purpose:   Closes just the currently opened db and frees
 *            up the memory associated with that db.  This is
 *            used primarily with multi-volume databases where
 *            the current db is closed so the next one can be
 *            opened.
 *
 * Returns:   void.
 */
reset_db()
Synopsis:  Resets a sequence file.
Incept:    MSF, Wed Mar 17, 2010 [Janelia]

Closes just the currently opened db and frees
up the memory associated with that db.  This is
used primarily with multi-volume databases where
the current db is closed so the next one can be
opened.

void.
reset_db () Synopsis : Resets a sequence file . Incept : MSF Wed Mar 17 2010 [ Janelia ] Closes just the currently opened db and frees up the memory associated with that db . This is used primarily with multi - volume databases where the current db is closed so the next one can be opened . void .
static void
reset_db(ESL_SQNCBI_DATA *ncbi)
{
  if (ncbi->title     != NULL) free(ncbi->title);
  if (ncbi->timestamp != NULL) free(ncbi->timestamp);
  if (ncbi->fppin != NULL) fclose(ncbi->fppin);
  if (ncbi->fpphr != NULL) fclose(ncbi->fpphr);
  if (ncbi->fppsq != NULL) fclose(ncbi->fppsq);
  ncbi->fppin        = NULL;
  ncbi->fpphr        = NULL;
  ncbi->fppsq        = NULL;
  ncbi->title        = NULL;
  ncbi->timestamp    = NULL;
  return;
}
static void reset_db ( ESL_SQNCBI_DATA * ncbi ) { if ( ncbi -> title != NULL ) free ( ncbi -> title ) ; if ( ncbi -> timestamp != NULL ) free ( ncbi -> timestamp ) ; if ( ncbi -> fppin != NULL ) fclose ( ncbi -> fppin ) ; if ( ncbi -> fpphr != NULL ) fclose ( ncbi -> fpphr ) ; if ( ncbi -> fppsq != NULL ) fclose ( ncbi -> fppsq ) ; ncbi -> fppin = NULL ; ncbi -> fpphr = NULL ; ncbi -> fppsq = NULL ; ncbi -> title = NULL ; ncbi -> timestamp = NULL ; return ; }
Function:  reset_db()
 Synopsis:  Resets a sequence file.
Function : reset_db () Synopsis : Resets a sequence file .