From fa791414601df61d20d860299dba80fdb62565df Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 21 Jun 2013 10:45:51 +0200 Subject: Upgraded freetype to 2.5.0.1 --- freetype/src/bzip2/ftbzip2.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'freetype/src/bzip2/ftbzip2.c') diff --git a/freetype/src/bzip2/ftbzip2.c b/freetype/src/bzip2/ftbzip2.c index d60ee3ea0..749413027 100644 --- a/freetype/src/bzip2/ftbzip2.c +++ b/freetype/src/bzip2/ftbzip2.c @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2010, 2012 by */ +/* Copyright 2010, 2012, 2013 by */ /* Joel Klinghed. */ /* */ /* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by */ @@ -120,7 +120,7 @@ static FT_Error ft_bzip2_check_header( FT_Stream stream ) { - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte head[4]; @@ -134,7 +134,7 @@ head[1] != 0x5a || head[2] != 0x68 ) /* only support bzip2 (huffman) */ { - error = Bzip2_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -149,7 +149,7 @@ FT_Stream source ) { bz_stream* bzstream = &zip->bzstream; - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; zip->stream = stream; @@ -182,7 +182,7 @@ if ( BZ2_bzDecompressInit( bzstream, 0, 0 ) != BZ_OK || bzstream->next_in == NULL ) - error = Bzip2_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); Exit: return error; @@ -255,7 +255,7 @@ size = stream->read( stream, stream->pos, zip->input, FT_BZIP2_BUFFER_SIZE ); if ( size == 0 ) - return Bzip2_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); } else { @@ -264,7 +264,7 @@ size = FT_BZIP2_BUFFER_SIZE; if ( size == 0 ) - return Bzip2_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); FT_MEM_COPY( zip->input, stream->base + stream->pos, size ); } @@ -273,7 +273,7 @@ bzstream->next_in = (char*)zip->input; bzstream->avail_in = size; - return Bzip2_Err_Ok; + return FT_Err_Ok; } @@ -281,7 +281,7 @@ ft_bzip2_file_fill_output( FT_BZip2File zip ) { bz_stream* bzstream = &zip->bzstream; - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; zip->cursor = zip->buffer; @@ -306,12 +306,12 @@ { zip->limit = (FT_Byte*)bzstream->next_out; if ( zip->limit == zip->cursor ) - error = Bzip2_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); break; } else if ( err != BZ_OK ) { - error = Bzip2_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); break; } } @@ -325,7 +325,7 @@ ft_bzip2_file_skip_output( FT_BZip2File zip, FT_ULong count ) { - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ULong delta; @@ -502,7 +502,7 @@ FT_UNUSED( stream ); FT_UNUSED( source ); - return Bzip2_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } #endif /* !FT_CONFIG_OPTION_USE_BZIP2 */ -- cgit v1.2.3