summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-02-06 06:19:59 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-02-06 06:19:59 +0000
commit13bd346689e6502bb698ae6ad98612a19dd7e744 (patch)
tree5f5f3653c6ee04cda2bf1d9c7058764870045dde
parent63dbc737f0ac54f6db6a4e96544390e09de6757f (diff)
make it work w/ old allocator
no need for zmemcpy better use /sys/net/zlib.c, it's smaller and it's form kernel.
-rw-r--r--sys/lib/libsa/cread.c19
1 files 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)