]> git.donarmstrong.com Git - fastq-tools.git/blobdiff - src/fastq-uniq.c
Rename hash to hash_table.
[fastq-tools.git] / src / fastq-uniq.c
index 2e507622ddb38ebb0bcc97bd9b9a7c403d9ddf2e..f77a10ce95cebe9ac0b6be27ba5e5ac40a4ed492 100644 (file)
@@ -10,7 +10,7 @@
 
 
 #include "common.h"
-#include "hash.h"
+#include "hash_table.h"
 #include "parse.h"
 #include <string.h>
 #include <inttypes.h>
@@ -49,10 +49,10 @@ static size_t total_reads;
 
 void fastq_hash(FILE* fin, hash_table* T)
 {
-    fastq_t* fqf = fastq_open(fin);
-    seq_t* seq = fastq_alloc_seq();
+    fastq_t* fqf = fastq_create(fin);
+    seq_t* seq = seq_create();
 
-    while (fastq_next(fqf, seq)) {
+    while (fastq_read(fqf, seq)) {
         inc_hash_table(T, seq->seq.s, seq->seq.n);
 
         total_reads++;
@@ -61,8 +61,8 @@ void fastq_hash(FILE* fin, hash_table* T)
         }
     }
 
-    fastq_free_seq(seq);
-    fastq_close(fqf);
+    seq_free(seq);
+    fastq_free(fqf);
 }