From 3abd5bd05eb6facd4222abd26c72db25b3a2563d Mon Sep 17 00:00:00 2001 From: mickey Date: Thu, 6 Feb 1997 06:19:58 +0000 Subject: [PATCH] make it work w/ old allocator no need for zmemcpy better use /sys/net/zlib.c, it's smaller and it's form kernel. --- sys/lib/libsa/cread.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/sys/lib/libsa/cread.c b/sys/lib/libsa/cread.c index 3ec595014c0..649d162187d 100644 --- a/sys/lib/libsa/cread.c +++ b/sys/lib/libsa/cread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cread.c,v 1.1 1997/02/06 02:56:45 downsj Exp $ */ +/* $OpenBSD: cread.c,v 1.2 1997/02/06 06:19:58 mickey Exp $ */ /* $NetBSD: cread.c,v 1.2 1997/02/04 18:38:20 thorpej Exp $ */ /* @@ -47,10 +47,12 @@ */ #include "stand.h" -#include "../libz/zlib.h" +#include "zlib.h" #define EOF (-1) /* needed by compression code */ +#define zmemcpy memcpy + #ifdef SAVE_MEMORY #define Z_BUFSIZE 1024 #else @@ -89,19 +91,12 @@ unsigned size; return(alloc(items * size)); } -void zcfree (opaque, ptr) +void zfree (opaque, ptr) void *opaque; void *ptr; +size_t size; { - free(ptr, 0); /* XXX works only with modified allocator */ -} - -void zmemcpy(dest, source, len) -unsigned char *dest; -unsigned char *source; -unsigned int len; -{ - bcopy(source, dest, len); + free(ptr, size); } static int get_byte(s) -- 2.20.1