summaryrefslogtreecommitdiffstats
path: root/src/sfnt/sfobjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sfnt/sfobjs.c')
-rw-r--r--src/sfnt/sfobjs.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index a31c77c..44aa467 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2008, 2010-2013 by */
+/* Copyright 1996-2008, 2010-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -348,29 +348,22 @@
}
-#define WRITE_BYTE( p, v ) \
- do \
- { \
- *(p)++ = (v) >> 0; \
- \
+#define WRITE_USHORT( p, v ) \
+ do \
+ { \
+ *(p)++ = (FT_Byte)( (v) >> 8 ); \
+ *(p)++ = (FT_Byte)( (v) >> 0 ); \
+ \
} while ( 0 )
-#define WRITE_USHORT( p, v ) \
- do \
- { \
- *(p)++ = (v) >> 8; \
- *(p)++ = (v) >> 0; \
- \
- } while ( 0 )
-
-#define WRITE_ULONG( p, v ) \
- do \
- { \
- *(p)++ = (v) >> 24; \
- *(p)++ = (v) >> 16; \
- *(p)++ = (v) >> 8; \
- *(p)++ = (v) >> 0; \
- \
+#define WRITE_ULONG( p, v ) \
+ do \
+ { \
+ *(p)++ = (FT_Byte)( (v) >> 24 ); \
+ *(p)++ = (FT_Byte)( (v) >> 16 ); \
+ *(p)++ = (FT_Byte)( (v) >> 8 ); \
+ *(p)++ = (FT_Byte)( (v) >> 0 ); \
+ \
} while ( 0 )
@@ -661,6 +654,8 @@
}
else
{
+#ifdef FT_CONFIG_OPTION_USE_ZLIB
+
/* Uncompress with zlib. */
FT_ULong output_len = table->OrigLength;
@@ -675,6 +670,13 @@
error = FT_THROW( Invalid_Table );
goto Exit;
}
+
+#else /* !FT_CONFIG_OPTION_USE_ZLIB */
+
+ error = FT_THROW( Unimplemented_Feature );
+ goto Exit;
+
+#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
}
FT_FRAME_EXIT();
@@ -717,7 +719,6 @@
}
-#undef WRITE_BYTE
#undef WRITE_USHORT
#undef WRITE_ULONG