bed_entry *bed_entry_new( const int cols );
/* Free memory for a BED entry. */
-void bed_entry_destroy( bed_entry *entry );
+void bed_entry_destroy( bed_entry *entry );
-/* Get next BED entry of a given number of columns from a file pointer. */
-bed_entry *bed_entry_get( FILE *fp, const int cols );
+/* Get next BED entry from a file stream. */
+bool bed_entry_get( FILE *fp, bed_entry **entry_ppt );
/* Get a singly linked list with all BED entries (of a given number of coluns */
/* from a specified file. */
-list_sl *bed_entries_get( char *path, const int cols );
+list_sl *bed_entries_get( char *path, const int cols );
/* Output a given number of columns from a BED entry to stdout. */
-void bed_entry_put( bed_entry *entry, int cols );
+void bed_entry_put( bed_entry *entry, int cols );
/* Output a given number of columns from all BED entries */
/* in a singly linked list. */
-void bed_entries_put( list_sl *entries, int cols );
+void bed_entries_put( list_sl *entries, int cols );
/* Free memory for all BED entries and list nodes. */
-void bed_entries_destroy( list_sl **entries_ppt );
+void bed_entries_destroy( list_sl **entries_ppt );
/* Given a path to a BED file, read the given number of cols */
/* according to the begin position. The result is written to stdout. */
-void bed_file_sort_beg( char *path, int cols );
+void bed_file_sort_beg( char *path, int cols );
/* Given a path to a BED file, read the given number of cols */
/* according to the strand AND begin position. The result is written to stdout. */
-void bed_file_sort_strand_beg( char *path, int cols );
+void bed_file_sort_strand_beg( char *path, int cols );
/* Given a path to a BED file, read the given number of cols */
/* according to the chromosome AND begin position. The result is written to stdout. */
-void bed_file_sort_chr_beg( char *path, int cols );
+void bed_file_sort_chr_beg( char *path, int cols );
/* Given a path to a BED file, read the given number of cols */
/* according to the chromosome AND strand AND begin position. The result is written to stdout. */
-void bed_file_sort_chr_strand_beg( char *path, int cols );
+void bed_file_sort_chr_strand_beg( char *path, int cols );
/* Compare function for sorting a singly linked list of BED entries */
/* according to begin position. */
-int cmp_bed_sort_beg( const void *a, const void *b );
+int cmp_bed_sort_beg( const void *a, const void *b );
/* Compare function for sorting a singly linked list of BED entries */
/* according to strand AND begin position. */
-int cmp_bed_sort_strand_beg( const void *a, const void *b );
+int cmp_bed_sort_strand_beg( const void *a, const void *b );
/* Compare function for sorting a singly linked list of BED entries */
/* according to chromosome name AND begin position. */
-int cmp_bed_sort_chr_beg( const void *a, const void *b );
+int cmp_bed_sort_chr_beg( const void *a, const void *b );
/* Compare function for sorting a singly linked list of BED entries */
/* according to chromosome name AND strand AND begin position. */
-int cmp_bed_sort_chr_strand_beg( const void *a, const void *b );
+int cmp_bed_sort_chr_strand_beg( const void *a, const void *b );