deps/kb_meme/meme-5.0.1/src/seq-reader-from-fasta.c
/******************************************************************************
 * This function closes a sequence FASTA reader UDT.
 *****************************************************************************/
This function closes a sequence FASTA reader UDT.
This function closes a sequence FASTA reader UDT .
bool close_seq_reader_from_fasta(DATA_BLOCK_READER_T *reader) {
  bool result = false;
  SEQ_READER_FROM_FASTA_T *fasta_reader 
    = (SEQ_READER_FROM_FASTA_T *) get_data_block_reader_data(reader);
  fasta_reader->current_position = 0;
  if (fasta_reader->fasta_file != NULL) {
    if (fclose(fasta_reader->fasta_file) == EOF) {
      die(
        "Error closing file: %s.\nError message: %s\n", 
        fasta_reader->filename, 
        strerror(errno)
      );
    }
    else {
      result = true;
    }
  }
  return result;
}
bool close_seq_reader_from_fasta ( DATA_BLOCK_READER_T * reader ) { bool result = false ; SEQ_READER_FROM_FASTA_T * fasta_reader = ( SEQ_READER_FROM_FASTA_T * ) get_data_block_reader_data ( reader ) ; fasta_reader -> current_position = 0 ; if ( fasta_reader -> fasta_file != NULL ) { if ( fclose ( fasta_reader -> fasta_file ) == EOF ) { die ( " \n \n " , fasta_reader -> filename , strerror ( errno ) ) ; } else { result = true ; } } return result ; }
This function closes a sequence FASTA reader UDT.
This function closes a sequence FASTA reader UDT .