From 56c389a48acf35ccbc58ca8db3c3abeb2c588e41 Mon Sep 17 00:00:00 2001 From: Josef Ezra Date: Tue, 17 Dec 2013 17:30:25 +0200 Subject: [PATCH] rec: use gaps in exceptions --- Makefile | 4 ++-- recs.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3e7d32e..f82abf5 100644 --- a/Makefile +++ b/Makefile @@ -90,8 +90,8 @@ test: all for f in $(TEST_FILES) ; do \ echo $$f $$l... ; \ rm /tmp/mytst.* || true; \ - ./slimfastq -u $$f -f /tmp/mytst -o -l $$l -q && \ - ./slimfastq -u /tmp/mytst.fastq -f /tmp/mytst -o -d && \ + ./slimfastq -u $$f -f /tmp/mytst -O -l $$l -q && \ + ./slimfastq -u /tmp/mytst.fastq -f /tmp/mytst -O -d && \ tools/mydiff.pl $$f /tmp/mytst.fastq || break ; \ done || break ; \ done diff --git a/recs.cpp b/recs.cpp index 0fa8688..129ae18 100644 --- a/recs.cpp +++ b/recs.cpp @@ -195,7 +195,8 @@ void RecSave::save_2(const UCHAR* buf, const UCHAR* end, const UCHAR* prev_buf, // put_type(0, ST_LINE); // put_str (0, buf, end-buf); // last_map = 0; - x_file->put(g_record_count); + x_file->put(g_record_count - m_last.index); + m_last.index = g_record_count; x_file->put_str(buf, end-buf); stats.new_n ++ ; @@ -255,7 +256,7 @@ size_t RecLoad::load_2(UCHAR* buf, const UCHAR* prev) { // last_map = 0; // UCHAR* b = get_str(0, buf); UCHAR* b = x_file->get_str(buf); - m_last.index = x_file->get(); + m_last.index += x_file->get(); return b - buf; }