From 0fa3447dee0319322cf5ebaa64e4321dd8887f92 Mon Sep 17 00:00:00 2001 From: Przemyslaw Skibinski Date: Mon, 28 Nov 2016 16:55:14 +0100 Subject: [PATCH] plainly marked altered files from zlib --- zlibWrapper/Makefile | 1 + zlibWrapper/examples/example.c | 11 +++++++---- zlibWrapper/examples/fitblk.c | 5 ++++- zlibWrapper/examples/minigzip.c | 3 +++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/zlibWrapper/Makefile b/zlibWrapper/Makefile index c6f06175..41b334d3 100644 --- a/zlibWrapper/Makefile +++ b/zlibWrapper/Makefile @@ -8,6 +8,7 @@ # Paths to static and dynamic zlib and zstd libraries # Use "make ZLIB_PATH=path/to/zlib ZLIB_LIBRARY=path/to/libz.a" to select a path to library ZLIB_LIBRARY ?= -lz +ZLIB_PATH ?= . ZSTDLIBDIR = ../lib ZSTDLIBRARY = $(ZSTDLIBDIR)/libzstd.a diff --git a/zlibWrapper/examples/example.c b/zlibWrapper/examples/example.c index 9483129d..9000f7a3 100644 --- a/zlibWrapper/examples/example.c +++ b/zlibWrapper/examples/example.c @@ -1,8 +1,11 @@ -/* example.c -- usage example of the zlib compression library - * the file contains minimal changes required to be compiled with zstd wrapper for zlib - */ +/* example.c contains minimal changes required to be compiled with zlibWrapper: + * - #include "zlib.h" was changed to #include "zstd_zlibwrapper.h" + * - test_flush() and test_sync() use functions not supported by zlibWrapper + therefore they are disabled while zstd compression is turned on */ - /* +/* example.c -- usage example of the zlib compression library + */ +/* Copyright (c) 1995-2006, 2011 Jean-loup Gailly This software is provided 'as-is', without any express or implied diff --git a/zlibWrapper/examples/fitblk.c b/zlibWrapper/examples/fitblk.c index e3fda3c8..760e338a 100644 --- a/zlibWrapper/examples/fitblk.c +++ b/zlibWrapper/examples/fitblk.c @@ -1,3 +1,7 @@ +/* fitblk.c contains minimal changes required to be compiled with zlibWrapper: + * - #include "zlib.h" was changed to #include "zstd_zlibwrapper.h" + * - writing block to stdout was disabled */ + /* fitblk.c: example of fitting compressed output to a specified size Not copyrighted -- provided to the public domain Version 1.1 25 November 2004 Mark Adler */ @@ -54,7 +58,6 @@ #include #include #include -//#include "zlib.h" #include "zstd_zlibwrapper.h" #define LOG_FITBLK(...) /*printf(__VA_ARGS__)*/ diff --git a/zlibWrapper/examples/minigzip.c b/zlibWrapper/examples/minigzip.c index e56d5e1d..0ddc93f2 100644 --- a/zlibWrapper/examples/minigzip.c +++ b/zlibWrapper/examples/minigzip.c @@ -1,3 +1,6 @@ +/* minigzip.c contains minimal changes required to be compiled with zlibWrapper: + * - #include "zlib.h" was changed to #include "zstd_zlibwrapper.h" */ + /* minigzip.c -- simulate gzip using the zlib compression library * Copyright (C) 1995-2006, 2010, 2011 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h