]> git.ozlabs.org Git - ppp.git/blobdiff - common/zlib.c
add %P and %B formats, fixed %I
[ppp.git] / common / zlib.c
index 8ec7a9b992e80eaf031c9914108693f1fe227f40..2c4834bce42689246490924b129d8fa1a41cc91f 100644 (file)
@@ -10,7 +10,7 @@
  * - added inflateIncomp and deflateOutputPending
  * - allow strm->next_out to be NULL, meaning discard the output
  *
- * $Id: zlib.c,v 1.9 1998/02/04 01:36:09 paulus Exp $
+ * $Id: zlib.c,v 1.11 1998/09/13 23:37:12 paulus Exp $
  */
 
 /* 
@@ -52,6 +52,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/systm.h>
+#undef u
 #  define HAVE_MEMCPY
 #  define memcpy(d, s, n)      bcopy((s), (d), (n))
 #  define memset(d, v, n)      bzero((d), (n))
@@ -1147,12 +1148,12 @@ int deflateCopy (dest, source)
         return Z_STREAM_ERROR;
     ss = (deflate_state *) source->state;
 
-    *dest = *source;
+    zmemcpy(dest, source, sizeof(*dest));
 
     ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
     if (ds == Z_NULL) return Z_MEM_ERROR;
     dest->state = (struct internal_state FAR *) ds;
-    *ds = *ss;
+    zmemcpy(ds, ss, sizeof(*ds));
     ds->strm = dest;
 
     ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));