summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
commit0de5be92a3a0fe27e8521fc4de67e19b1057842e (patch)
treee93a390fe965486cca19498840cb8d7904252fec /Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c
parent27ce96eea3f1190bd744448cfa149e8d767af95a (diff)
revert freetype to 2.10.4
git-svn-id: svn://tug.org/texlive/trunk@60360 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c')
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c b/Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c
index 788a37b3171..de7d0fdd5b6 100644
--- a/Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c
+++ b/Build/source/libs/freetype2/freetype-src/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
* parse compressed PCF fonts, as found with many X11 server
* distributions.
*
- * Copyright (C) 2002-2021 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -121,29 +121,24 @@
'malloc/free' */
static voidpf
- ft_gzip_alloc( voidpf opaque,
- uInt items,
- uInt size )
+ ft_gzip_alloc( FT_Memory memory,
+ uInt items,
+ uInt size )
{
- FT_Memory memory = (FT_Memory)opaque;
- FT_ULong sz = (FT_ULong)size * items;
+ FT_ULong sz = (FT_ULong)size * items;
FT_Error error;
- FT_Pointer p = NULL;
+ FT_Pointer p = NULL;
- /* allocate and zero out */
(void)FT_ALLOC( p, sz );
return p;
}
static void
- ft_gzip_free( voidpf opaque,
- voidpf address )
+ ft_gzip_free( FT_Memory memory,
+ voidpf address )
{
- FT_Memory memory = (FT_Memory)opaque;
-
-
FT_MEM_FREE( address );
}
@@ -155,14 +150,14 @@
unsigned items,
unsigned size )
{
- return ft_gzip_alloc( opaque, items, size );
+ return ft_gzip_alloc( (FT_Memory)opaque, items, size );
}
local void
zcfree( voidpf opaque,
voidpf ptr )
{
- ft_gzip_free( opaque, ptr );
+ ft_gzip_free( (FT_Memory)opaque, ptr );
}
#endif /* !SYSTEM_ZLIB && !USE_ZLIB_ZCALLOC */
@@ -309,8 +304,8 @@
}
/* initialize zlib -- there is no zlib header in the compressed stream */
- zstream->zalloc = ft_gzip_alloc;
- zstream->zfree = ft_gzip_free;
+ zstream->zalloc = (alloc_func)ft_gzip_alloc;
+ zstream->zfree = (free_func) ft_gzip_free;
zstream->opaque = stream->memory;
zstream->avail_in = 0;
@@ -676,7 +671,7 @@
FT_Byte* zip_buff = NULL;
- if ( !FT_QALLOC( zip_buff, zip_size ) )
+ if ( !FT_ALLOC( zip_buff, zip_size ) )
{
FT_ULong count;
@@ -746,8 +741,8 @@
stream.next_out = output;
stream.avail_out = (uInt)*output_len;
- stream.zalloc = ft_gzip_alloc;
- stream.zfree = ft_gzip_free;
+ stream.zalloc = (alloc_func)ft_gzip_alloc;
+ stream.zfree = (free_func) ft_gzip_free;
stream.opaque = memory;
/* This is a temporary fix and will be removed once the internal