* include/freetype/internal/ftobjs.h, src/autohint/ahglyph.c,

src/base/ftobjs.c, src/objs/fttype1.c, src/sfnt/ttcmap0.c,
    src/smooth/ftgrays.c: changed uses of "setjmp" and "longjmp"
    to "ft_setjmp" and "ft_lonjmp". Removed direct references to
    <stdio.h> and <setjmp.h> when appropriate, to eventually replace
    them with a FT_CONFIG_STANDARD_LIBRARY_H. Useful for the XFree86
    Font Server backend based on FT2.
This commit is contained in:
David Turner 2002-06-10 23:03:35 +00:00
parent b1d8f73df6
commit 25a6e3a167
7 changed files with 61 additions and 46 deletions

View File

@ -1,3 +1,13 @@
2002-06-08 Juliusz Chroboczek <jch@pps.jussieu.fr>
* include/freetype/internal/ftobjs.h, src/autohint/ahglyph.c,
src/base/ftobjs.c, src/objs/fttype1.c, src/sfnt/ttcmap0.c,
src/smooth/ftgrays.c: changed uses of "setjmp" and "longjmp"
to "ft_setjmp" and "ft_lonjmp". Removed direct references to
<stdio.h> and <setjmp.h> when appropriate, to eventually replace
them with a FT_CONFIG_STANDARD_LIBRARY_H. Useful for the XFree86
Font Server backend based on FT2.
2002-06-08 David Turner <david@freetype.org>
* src/pcf/pcfdriver.c (pcf_cmap_char_next): fixed a bug that caused

View File

@ -26,8 +26,8 @@
#ifndef __FTOBJS_H__
#define __FTOBJS_H__
#include <setjmp.h>
#include <ft2build.h>
#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */
#include FT_RENDER_H
#include FT_SIZES_H
#include FT_INTERNAL_MEMORY_H

View File

@ -26,11 +26,11 @@
#include "ahglobal.h"
#include "aherrors.h"
#include <stdio.h>
#ifdef AH_DEBUG
#include <stdio.h>
void
ah_dump_edges( AH_Outline* outline )
{

View File

@ -45,7 +45,7 @@
int result;
result = setjmp( valid->jump_buffer );
result = ft_setjmp( valid->jump_buffer );
return result;
}
@ -55,7 +55,7 @@
FT_Error error )
{
valid->error = error;
longjmp( valid->jump_buffer, 1 );
ft_longjmp( valid->jump_buffer, 1 );
}

View File

@ -89,8 +89,8 @@
/* this will probably happen later... */
driver_name = face->driver->root.clazz->module_name;
result = ( ft_strcmp( driver_name, "type1" ) ||
ft_strcmp( driver_name, "cff" ) );
result = ( ft_strcmp( driver_name, "type1" ) == 0 ||
ft_strcmp( driver_name, "cff" ) == 0 );
}
return result;

View File

@ -1723,7 +1723,7 @@
valid.num_glyphs = face->root.num_glyphs;
if ( setjmp( FT_VALIDATOR( &valid )->jump_buffer ) == 0 )
if ( ft_setjmp( FT_VALIDATOR( &valid )->jump_buffer ) == 0 )
{
/* validate this cmap sub-table */
clazz->validate( cmap, FT_VALIDATOR( &valid ) );

View File

@ -106,6 +106,11 @@
#include <limits.h>
#define FT_UINT_MAX UINT_MAX
#define ft_setjmp setjmp
#define ft_longjmp longjmp
#define ft_jmp_buf jmp_buf
#define ErrRaster_Invalid_Mode -2
#define ErrRaster_Invalid_Outline -1
@ -391,7 +396,7 @@
if ( !ras.invalid && ( ras.area | ras.cover ) )
{
if ( ras.num_cells >= ras.max_cells )
longjmp( ras.jump_buffer, 1 );
ft_longjmp( ras.jump_buffer, 1 );
cell = ras.cells + ras.num_cells++;
cell->x = ras.ex - ras.min_ex;
@ -1791,7 +1796,7 @@
volatile int error = 0;
if ( setjmp( ras.jump_buffer ) == 0 )
if ( ft_setjmp( ras.jump_buffer ) == 0 )
{
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );
gray_record_cell( RAS_VAR );