]> git.donarmstrong.com Git - fastq-tools.git/blobdiff - src/parse.c
Fix the weird output behavior of fastq-sample.
[fastq-tools.git] / src / parse.c
index e27a3859ebdb24a6a9b7406fa0f9218d64b40e99..8a6123e9b97f14e6818421e8d2a9f06303fad78c 100644 (file)
@@ -166,6 +166,14 @@ bool fastq_read(fastq_t* f, seq_t* seq)
 }
 
 
+void fastq_rewind(fastq_t* f)
+{
+    rewind(f->file);
+    f->next = f->buf;
+    f->readlen = 0;
+}
+
+
 void fastq_print(FILE* fout, const seq_t* seq)
 {
     fprintf(fout, "@%s\n%s\n+%s\n%s\n",