Displaying 14 results from an estimated 14 matches for "zfree".
Did you mean:
free
2002 Mar 21
1
[dillon@FreeBSD.org: cvs commit: src/sys/net zlib.c]
...output
*
- * $FreeBSD: /c/ncvs/src/sys/net/zlib.c,v 1.11 2002/02/17 17:35:18 jedgar Exp $
+ * $FreeBSD: /c/ncvs/src/sys/net/zlib.c,v 1.12 2002/03/20 04:05:26 dillon Exp $
*/
/*
@@ -3951,11 +3951,15 @@ int r;
r = Z_MEM_ERROR;
LEAVE
}
+ /*
+ * this ZFREE must occur *BEFORE* we mess with sub.decode, because
+ * sub.trees is union'd with sub.decode.
+ */
+ ZFREE(z, s->sub.trees.blens);
s->sub.decode.codes = c;
s->sub.decode.tl = tl;
s->sub.decode.td = td;
}
- ZFREE(z, s->s...
2007 Apr 22
0
libswfdec/swfdec_swf_decoder.c
...EC_DECODER (s);
z_stream *z;
int ret;
+ guint8 *data;
+ data = g_try_malloc (dec->bytes_total - 8);
+ if (data == NULL)
+ return FALSE;
+ s->uncompressed_buffer = swfdec_buffer_new_for_data (data, dec->bytes_total - 8);
z = &s->z;
z->zalloc = zalloc;
z->zfree = zfree;
ret = inflateInit (z);
SWFDEC_DEBUG ("inflateInit returned %d", ret);
- s->uncompressed_buffer = swfdec_buffer_new_and_alloc (dec->bytes_total - 8);
z->next_out = s->uncompressed_buffer->data;
z->avail_out = s->uncompressed_buffer->length;...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...wfdec_bits_skip_bytes (&bits, size) != size) {
SWFDEC_ERROR ("not enough bytes available");
return NULL;
diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 6c2dcae..c9df0de 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -99,46 +99,30 @@ zfree (void *opaque, void *addr)
g_free (addr);
}
-static void *
-lossless (void *zptr, int zlen, int *plen)
+static guint8 *
+lossless (const guint8 *zptr, int zlen, int len)
{
- void *data;
- int len;
- z_stream *z;
+ guint8 *data;
+ z_stream z = { NULL, };
int ret;
- z = g_new0 (z_st...
2007 Feb 13
0
9 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c
...ge.c
index ab62969..0dee685 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -89,47 +89,6 @@ swfdec_image_init (SwfdecImage * image)
{
}
-
-static void *
-zalloc (void *opaque, unsigned int items, unsigned int size)
-{
- return g_malloc (items * size);
-}
-
-static void
-zfree (void *opaque, void *addr)
-{
- g_free (addr);
-}
-
-static guint8 *
-lossless (const guint8 *zptr, int zlen, int len)
-{
- guint8 *data;
- z_stream z = { NULL, };
- int ret;
-
- z.zalloc = zalloc;
- z.zfree = zfree;
- z.opaque = NULL;
-
- data = g_malloc (len);
- z.next_in = (Bytef *) zpt...
2002 Jan 30
1
Patch: update zlib/* to 1.1.3
...13 @@
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works
with other compilers. Use "make test" to check your compiler.
-- For shared memory multiprocessors, the decompression code assumes that
- writes to pointers are atomic. Also the functions zalloc and zfree passed
- to deflateInit must be multi-threaded in this case.
-
- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
- For Turbo C the small model is supported only with reduced performance to
avoid any far allocation; it was tested with -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
+
+-...
2007 Jan 22
0
Branch 'interpreter' - 3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_swf_decoder.c test/Makefile.am test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_tag.c test/swfedit_tag.h test/swfedit_token.c test/swfedit_token.h
...unc) g_object_unref, NULL);
+ g_list_free (file->tags);
+ g_free (file->filename);
+
+ G_OBJECT_CLASS (swfedit_file_parent_class)->dispose (object);
+}
+
+static void *
+zalloc (void *opaque, unsigned int items, unsigned int size)
+{
+ return g_malloc (items * size);
+}
+
+static void
+zfree (void *opaque, void *addr)
+{
+ g_free (addr);
+}
+
+static SwfdecBuffer *
+swfenc_file_inflate (SwfdecBits *bits, guint size)
+{
+ SwfdecBuffer *decoded, *encoded;
+ z_stream z;
+ int ret;
+
+ encoded = swfdec_bits_get_buffer (bits, -1);
+ if (encoded == NULL)
+ return NULL;
+ decoded =...
2002 Apr 20
1
rsync breaks on FreeBSD without -O2?(fwd from grog@FreeBSD.org) PR 36998
...$2 = {dummy = 6}
(gdb) p z
$3 = 0x80777c0
(gdb) p *z
$4 = {next_in = 0x8091ff6 "!.?Y?????", avail_in = 9, total_in = 16374, next_out = 0x809a000 <Address 0x809a000 out of bounds>, avail_out = 0, total_out = 98304, msg = 0x0,
state = 0x8078100, zalloc = 0x8064f18 <zcalloc>, zfree = 0x8064f30 <zcfree>, opaque = 0x0, data_type = 0, adler = 0, reserved = 0}
>How-To-Repeat:
transfer a large (binary?) file with compression on. local to local transfers also fail.
rsync -azv / rsync://sunsite.dk/ftp//mirrors/mysql/Downloads/Contrib/MyAccess.mda .
rsync: connection...
2012 Aug 20
13
[PATCH 00/12] Multidisk support
Hello,
the following patches should get multidisk access working.
The syntax accepted is the following:
(hdx,y)/path/to/file
where x is the disk number and start at 0 and the y is the partition number starting at 1. So (hd0,1) is the first partition of the first disk.
the other accepted syntax is using MBR's 32 bits disk signature so for example:
(mbr:0x12345678,2)/foo/bar
would address
2003 Oct 08
2
2.5.6: a number of minor issues
...s=flags;
cursor = showHelpIntro(con, fp);
cursor += showShortOptions(con->options, fp, NULL);
(void) singleTableUsage(con, fp, cursor, con->options, NULL);
--- OLD/zlib/inftrees.c Thu Jan 1 00:00:00 1970
+++ NEW/zlib/inftrees.c Thu Jan 1 00:00:00 1970
@@ -445,6 +445,8 @@
ZFREE(z, c);
fixed_built = 1;
}
+#else
+ z=z;
#endif
*bl = fixed_bl;
*bd = fixed_bd;
With the above patches, I built it on a peecee (i386 architecture,
actually a K6-2 - still a 32-bit machine). No warnings.
Then I tried it on an alpha (LP64). With the above patches, I got
gcc -I. -I...
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch?
Thanks for the reminder.
I've just committed Jos's rsync+ patch onto the
"branch_mbp_rsyncplus_merge" branch. If it works OK and nobody
screams I will move it across onto the main tree tomorrow or
Wednesday.
I see the patch doesn't add documentation about the new options to the
man page, so we should fix that in the future.
2007 Mar 07
0
11 commits - libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h
...wfdecSwfDecoder *s = SWFDEC_SWF_DECODER (object);
- g_list_foreach (s->characters, (GFunc) g_object_unref, NULL);
- g_list_free (s->characters);
+ g_hash_table_destroy (s->characters);
g_object_unref (s->main_sprite);
g_hash_table_destroy (s->exports);
@@ -85,20 +84,6 @@ zfree (void *opaque, void *addr)
g_free (addr);
}
-#if 0
-static void
-dumpbits (SwfdecBits * b)
-{
- int i;
-
- printf (" ");
- for (i = 0; i < 16; i++) {
- printf ("%02x ", swfdec_bits_get_u8 (b));
- }
- printf ("\n");
-}
-#endif
-
static gboolean
swf...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...*object)
-{
- SwfeditFile *file = SWFEDIT_FILE (object);
-
- g_free (file->filename);
-
- G_OBJECT_CLASS (swfedit_file_parent_class)->dispose (object);
-}
-
-static void *
-zalloc (void *opaque, unsigned int items, unsigned int size)
-{
- return g_malloc (items * size);
-}
-
-static void
-zfree (void *opaque, void *addr)
-{
- g_free (addr);
-}
-
-static SwfdecBuffer *
-swfenc_file_inflate (SwfdecBits *bits, guint size)
-{
- SwfdecBuffer *decoded, *encoded;
- z_stream z;
- int ret;
-
- encoded = swfdec_bits_get_buffer (bits, -1);
- if (encoded == NULL)
- return NULL;
- decoded =...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...unc) g_object_unref, NULL);
+ g_list_free (file->tags);
+ g_free (file->filename);
+
+ G_OBJECT_CLASS (swfedit_file_parent_class)->dispose (object);
+}
+
+static void *
+zalloc (void *opaque, unsigned int items, unsigned int size)
+{
+ return g_malloc (items * size);
+}
+
+static void
+zfree (void *opaque, void *addr)
+{
+ g_free (addr);
+}
+
+static SwfdecBuffer *
+swfenc_file_inflate (SwfdecBits *bits, guint size)
+{
+ SwfdecBuffer *decoded, *encoded;
+ z_stream z;
+ int ret;
+
+ encoded = swfdec_bits_get_buffer (bits, -1);
+ if (encoded == NULL)
+ return NULL;
+ decoded =...
2007 Nov 07
0
36 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h
...0); /* FIXME */
swfdec_resource_emit_signal (instance, SWFDEC_AS_STR_onLoadComplete, vals, 1);
diff --git a/libswfdec/swfdec_swf_decoder.c b/libswfdec/swfdec_swf_decoder.c
index b186ed8..ee18f9a 100644
--- a/libswfdec/swfdec_swf_decoder.c
+++ b/libswfdec/swfdec_swf_decoder.c
@@ -87,35 +87,59 @@ zfree (void *opaque, void *addr)
g_free (addr);
}
+static SwfdecBuffer *
+swfdec_buffer_merge (const SwfdecBuffer *front, const SwfdecBuffer *end)
+{
+ SwfdecBuffer *new;
+
+ g_return_val_if_fail (front != NULL, NULL);
+ g_return_val_if_fail (end != NULL, NULL);
+
+ new = swfdec_buffer_new_and_...