From 17a64d466e42e436daf0ea24a340146fc3facfa5 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 27 Apr 2012 22:07:44 +0000 Subject: [PATCH] break dependence on zlib-dev for now --- src/prop/bvminisat/utils/ParseUtils.h | 9 +++++---- src/prop/minisat/utils/ParseUtils.h | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/prop/bvminisat/utils/ParseUtils.h b/src/prop/bvminisat/utils/ParseUtils.h index 920298abb..fc2ce9cbe 100644 --- a/src/prop/bvminisat/utils/ParseUtils.h +++ b/src/prop/bvminisat/utils/ParseUtils.h @@ -24,7 +24,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include #include -#include +//#include +#include namespace BVMinisat { @@ -35,7 +36,7 @@ static const int buffer_size = 1048576; class StreamBuffer { - gzFile in; + int in; unsigned char buf[buffer_size]; int pos; int size; @@ -43,10 +44,10 @@ class StreamBuffer { void assureLookahead() { if (pos >= size) { pos = 0; - size = gzread(in, buf, sizeof(buf)); } } + size = read(in, buf, sizeof(buf)); } } public: - explicit StreamBuffer(gzFile i) : in(i), pos(0), size(0) { assureLookahead(); } + explicit StreamBuffer(int i) : in(i), pos(0), size(0) { assureLookahead(); } int operator * () const { return (pos >= size) ? EOF : buf[pos]; } void operator ++ () { pos++; assureLookahead(); } diff --git a/src/prop/minisat/utils/ParseUtils.h b/src/prop/minisat/utils/ParseUtils.h index d3071649d..e9dc817c0 100644 --- a/src/prop/minisat/utils/ParseUtils.h +++ b/src/prop/minisat/utils/ParseUtils.h @@ -24,7 +24,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include #include -#include +//#include +#include namespace Minisat { @@ -35,7 +36,7 @@ static const int buffer_size = 1048576; class StreamBuffer { - gzFile in; + int in; unsigned char buf[buffer_size]; int pos; int size; @@ -43,10 +44,10 @@ class StreamBuffer { void assureLookahead() { if (pos >= size) { pos = 0; - size = gzread(in, buf, sizeof(buf)); } } + size = read(in, buf, sizeof(buf)); } } public: - explicit StreamBuffer(gzFile i) : in(i), pos(0), size(0) { assureLookahead(); } + explicit StreamBuffer(int i) : in(i), pos(0), size(0) { assureLookahead(); } int operator * () const { return (pos >= size) ? EOF : buf[pos]; } void operator ++ () { pos++; assureLookahead(); } -- 2.30.2