summaryrefslogtreecommitdiff
path: root/src/freetype2/gzip
diff options
context:
space:
mode:
authorscuri <scuri>2009-10-20 17:20:18 +0000
committerscuri <scuri>2009-10-20 17:20:18 +0000
commit27a4f9c4ac45ff65f941964f7351b64b1e6a9f35 (patch)
tree2f68c5d9ce5bf6cbc320ac17aef0a65a3ceb99a1 /src/freetype2/gzip
parent2b70507615b2611fce4294c65bec7264644e2665 (diff)
*** empty log message ***
Diffstat (limited to 'src/freetype2/gzip')
-rw-r--r--src/freetype2/gzip/adler32.c2
-rw-r--r--src/freetype2/gzip/ftgzip.c18
-rw-r--r--src/freetype2/gzip/inftrees.c3
-rw-r--r--src/freetype2/gzip/zconf.h8
-rw-r--r--src/freetype2/gzip/zutil.c8
-rw-r--r--src/freetype2/gzip/zutil.h4
6 files changed, 29 insertions, 14 deletions
diff --git a/src/freetype2/gzip/adler32.c b/src/freetype2/gzip/adler32.c
index 312c2f9..b496ac4 100644
--- a/src/freetype2/gzip/adler32.c
+++ b/src/freetype2/gzip/adler32.c
@@ -3,7 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* @(#) $Id: adler32.c,v 1.1 2008/10/17 06:10:37 scuri Exp $ */
+/* @(#) $Id: adler32.c,v 1.2 2009/10/20 17:20:25 scuri Exp $ */
#include "zlib.h"
diff --git a/src/freetype2/gzip/ftgzip.c b/src/freetype2/gzip/ftgzip.c
index af2022d..6f0c515 100644
--- a/src/freetype2/gzip/ftgzip.c
+++ b/src/freetype2/gzip/ftgzip.c
@@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,7 +25,7 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_DEBUG_H
#include FT_GZIP_H
-#include <string.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H
#include FT_MODULE_ERRORS_H
@@ -40,6 +40,10 @@
#ifdef FT_CONFIG_OPTION_USE_ZLIB
+#ifdef FT_CONFIG_OPTION_PIC
+#error "gzip code does not support PIC yet"
+#endif
+
#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB
#include <zlib.h>
@@ -54,7 +58,9 @@
/* original ZLib. */
#define NO_DUMMY_DECL
-#define MY_ZCALLOC
+#ifndef USE_ZLIB_ZCALLOC
+#define MY_ZCALLOC /* prevent all zcalloc() & zfree() in zutils.c */
+#endif
#include "zlib.h"
@@ -117,7 +123,7 @@
}
-#ifndef FT_CONFIG_OPTION_SYSTEM_ZLIB
+#if !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB ) && !defined( USE_ZLIB_ZCALLOC )
local voidpf
zcalloc ( voidpf opaque,
@@ -134,7 +140,7 @@
ft_gzip_free( (FT_Memory)opaque, ptr );
}
-#endif /* !SYSTEM_ZLIB */
+#endif /* !SYSTEM_ZLIB && !USE_ZLIB_ZCALLOC */
/***************************************************************************/
@@ -569,7 +575,7 @@
if ( error )
result = 0;
- FT_Stream_Seek( stream, old_pos );
+ (void)FT_Stream_Seek( stream, old_pos );
}
return result;
diff --git a/src/freetype2/gzip/inftrees.c b/src/freetype2/gzip/inftrees.c
index 3c39aca..ef53652 100644
--- a/src/freetype2/gzip/inftrees.c
+++ b/src/freetype2/gzip/inftrees.c
@@ -366,6 +366,9 @@ z_streamp z /* for messages */
if (r == Z_DATA_ERROR)
z->msg = (char*)"oversubscribed distance tree";
else if (r == Z_BUF_ERROR) {
+#if 0
+ {
+#endif
#ifdef PKZIP_BUG_WORKAROUND
r = Z_OK;
}
diff --git a/src/freetype2/gzip/zconf.h b/src/freetype2/gzip/zconf.h
index fefdd86..56616c0 100644
--- a/src/freetype2/gzip/zconf.h
+++ b/src/freetype2/gzip/zconf.h
@@ -3,7 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* @(#) $Id: zconf.h,v 1.1 2008/10/17 06:10:37 scuri Exp $ */
+/* @(#) $Id: zconf.h,v 1.2 2009/10/20 17:20:25 scuri Exp $ */
#ifndef _ZCONF_H
#define _ZCONF_H
@@ -60,6 +60,12 @@
# define MSDOS
#endif
+/* WinCE doesn't have errno.h */
+#ifdef _WIN32_WCE
+# define NO_ERRNO_H
+#endif
+
+
/*
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
* than 64k bytes at a time (needed on systems with 16-bit int).
diff --git a/src/freetype2/gzip/zutil.c b/src/freetype2/gzip/zutil.c
index bbb9506..131d280 100644
--- a/src/freetype2/gzip/zutil.c
+++ b/src/freetype2/gzip/zutil.c
@@ -3,7 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* @(#) $Id: zutil.c,v 1.1 2008/10/17 06:10:37 scuri Exp $ */
+/* @(#) $Id: zutil.c,v 1.2 2009/10/20 17:20:25 scuri Exp $ */
#include "zutil.h"
@@ -49,7 +49,7 @@ void zmemzero(dest, len)
}
#endif
-#ifdef __TURBOC__
+#if defined( MSDOS ) && defined( __TURBOC__ ) && !defined( MY_ZCALLOC )
#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__)
/* Small and medium model in Turbo C are for now limited to near allocation
* with reduced MAX_WBITS and MAX_MEM_LEVEL
@@ -126,10 +126,10 @@ void zcfree (voidpf opaque, voidpf ptr)
Assert(0, "zcfree: ptr not found");
}
#endif
-#endif /* __TURBOC__ */
+#endif /* MSDOS && __TURBOC__ */
-#if defined(M_I86) && !defined(__32BIT__)
+#if defined(M_I86) && !defined(__32BIT__) && !defined( MY_ZCALLOC )
/* Microsoft C in 16-bit mode */
# define MY_ZCALLOC
diff --git a/src/freetype2/gzip/zutil.h b/src/freetype2/gzip/zutil.h
index 622c321..a359a9d 100644
--- a/src/freetype2/gzip/zutil.h
+++ b/src/freetype2/gzip/zutil.h
@@ -8,7 +8,7 @@
subject to change. Applications should only use zlib.h.
*/
-/* @(#) $Id: zutil.h,v 1.1 2008/10/17 06:10:37 scuri Exp $ */
+/* @(#) $Id: zutil.h,v 1.2 2009/10/20 17:20:25 scuri Exp $ */
#ifndef _Z_UTIL_H
#define _Z_UTIL_H
@@ -182,7 +182,7 @@ typedef unsigned long ulg;
#endif
/* Diagnostic functions */
-#ifdef Z_DEBUG
+#ifdef Z_DEBUG /* CDLIB */
# include <stdio.h>
extern int z_verbose;
extern void z_error OF((char *m));