X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Ffastq-grep.c;h=3eaffb79c53b89512a4ffe73d295981c7af7566f;hb=281a4b6cc97b42185915491f2f661b33d8ccd461;hp=f7b3913beb4b2869a5fd3d4298c24aa1fd0387f7;hpb=48a5939e574874106f1450fd278f602b731d2a83;p=fastq-tools.git diff --git a/src/fastq-grep.c b/src/fastq-grep.c index f7b3913..3eaffb7 100644 --- a/src/fastq-grep.c +++ b/src/fastq-grep.c @@ -10,8 +10,8 @@ */ -#include "fastq-common.h" -#include "fastq-parse.h" +#include "common.h" +#include "parse.h" #include #include #include @@ -47,16 +47,6 @@ static int count_flag; -void print_fastq_entry(FILE* fout, seq_t* seq) -{ - fprintf(fout, "@%s\n%s\n+%s\n%s\n", - seq->id1.s, - seq->seq.s, - seq->id2.s, - seq->qual.s ); -} - - void fastq_grep(FILE* fin, FILE* fout, pcre* re) { int rc; @@ -78,7 +68,7 @@ void fastq_grep(FILE* fin, FILE* fout, pcre* re) if ((invert_flag && rc == PCRE_ERROR_NOMATCH) || rc >= 0) { if (count_flag) count++; - else print_fastq_entry(fout, seq); + else fastq_print(fout, seq); } }