diff options
Diffstat (limited to 'src/3rdparty/freetype/src/bzip2')
-rw-r--r-- | src/3rdparty/freetype/src/bzip2/Jamfile | 5 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/bzip2/ftbzip2.c | 28 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/bzip2/rules.mk | 9 |
3 files changed, 24 insertions, 18 deletions
diff --git a/src/3rdparty/freetype/src/bzip2/Jamfile b/src/3rdparty/freetype/src/bzip2/Jamfile index 3da986dce6..53f850e6f2 100644 --- a/src/3rdparty/freetype/src/bzip2/Jamfile +++ b/src/3rdparty/freetype/src/bzip2/Jamfile @@ -1,10 +1,9 @@ # FreeType 2 src/bzip2 Jamfile # -# Copyright 2010 by +# Copyright 2010-2015 by # Joel Klinghed # -# Based on src/lzw/Jamfile, Copyright 2004, 2006 by -# David Turner, Robert Wilhelm, and Werner Lemberg. +# based on `src/lzw/Jamfile' # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, diff --git a/src/3rdparty/freetype/src/bzip2/ftbzip2.c b/src/3rdparty/freetype/src/bzip2/ftbzip2.c index 7e406b1612..cf94733762 100644 --- a/src/3rdparty/freetype/src/bzip2/ftbzip2.c +++ b/src/3rdparty/freetype/src/bzip2/ftbzip2.c @@ -8,11 +8,10 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2010, 2012-2014 by */ +/* Copyright 2010-2015 by */ /* Joel Klinghed. */ /* */ -/* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* based on `src/gzip/ftgzip.c' */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -71,7 +70,7 @@ int items, int size ) { - FT_ULong sz = (FT_ULong)size * items; + FT_ULong sz = (FT_ULong)size * (FT_ULong)items; FT_Error error; FT_Pointer p = NULL; @@ -255,7 +254,10 @@ size = stream->read( stream, stream->pos, zip->input, FT_BZIP2_BUFFER_SIZE ); if ( size == 0 ) + { + zip->limit = zip->cursor; return FT_THROW( Invalid_Stream_Operation ); + } } else { @@ -264,7 +266,10 @@ size = FT_BZIP2_BUFFER_SIZE; if ( size == 0 ) + { + zip->limit = zip->cursor; return FT_THROW( Invalid_Stream_Operation ); + } FT_MEM_COPY( zip->input, stream->base + stream->pos, size ); } @@ -311,7 +316,8 @@ } else if ( err != BZ_OK ) { - error = FT_THROW( Invalid_Stream_Operation ); + zip->limit = zip->cursor; + error = FT_THROW( Invalid_Stream_Operation ); break; } } @@ -438,16 +444,16 @@ } - static FT_ULong - ft_bzip2_stream_io( FT_Stream stream, - FT_ULong pos, - FT_Byte* buffer, - FT_ULong count ) + static unsigned long + ft_bzip2_stream_io( FT_Stream stream, + unsigned long offset, + unsigned char* buffer, + unsigned long count ) { FT_BZip2File zip = (FT_BZip2File)stream->descriptor.pointer; - return ft_bzip2_file_io( zip, pos, buffer, count ); + return ft_bzip2_file_io( zip, offset, buffer, count ); } diff --git a/src/3rdparty/freetype/src/bzip2/rules.mk b/src/3rdparty/freetype/src/bzip2/rules.mk index 0ff2628b4a..7040588c1b 100644 --- a/src/3rdparty/freetype/src/bzip2/rules.mk +++ b/src/3rdparty/freetype/src/bzip2/rules.mk @@ -2,11 +2,10 @@ # FreeType 2 BZIP2 support configuration rules # -# Copyright 2010 by +# Copyright 2010-2015 by # Joel Klinghed. # -# Based on src/lzw/rules.mk, Copyright 2004-2006 by -# Albert Chin-A-Young. +# based on `src/lzw/rules.mk' # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, @@ -22,7 +21,9 @@ BZIP2_DIR := $(SRC_DIR)/bzip2 # compilation flags for the driver # -BZIP2_COMPILE := $(FT_COMPILE) +BZIP2_COMPILE := $(CC) $(ANSIFLAGS) \ + $(INCLUDE_FLAGS) \ + $(FT_CFLAGS) # BZIP2 support sources (i.e., C files) |