summaryrefslogtreecommitdiff
path: root/include/freetype/internal/ftobjs.h
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2004-09-06 07:06:56 +0000
committerWerner Lemberg <wl@gnu.org>2004-09-06 07:06:56 +0000
commit645af08157345524dae6e7df4cb75f5514f52f0b (patch)
treed315e2a7fafba9812789aaa11ab5799b189b0a3d /include/freetype/internal/ftobjs.h
parent1357c19b65242a682bca485344a95077073f305c (diff)
downloadfreetype2-645af08157345524dae6e7df4cb75f5514f52f0b.tar.gz
* include/freetype/internal/ftobjs.h: Don't include
FT_CONFIG_STANDARD_LIBRARY_H. (FT_Validator, FT_VAlidationLevel, FT_ValidatorRec, FT_VALIDATOR, ft_validator_init, ft_validator_run, ft_validator_error, FT_INVALID, FT_INVALID_TOO_SHORT, FT_INVALID_OFFSET, FT_INVALID_FORMAT, FT_INVALID_GLYPH_ID, FT_INVALID_DATA): Move to... * include/freetype/internal/ftvalid.h: New file. Make FT_INVALID return module-specific error codes. * include/freetype/internal/internal.h (FT_INTERNAL_VALIDATE_H): New macro. * include/freetype/fterrors.h: Undefine FT_ERR_PREFIX only if FT_KEEP_ERR_PREFIX isn't defined. * src/base/ftobjs.c: Include FT_INTERNAL_VALIDATE_H. * src/sfnt/ttcmap.h: Don't include FT_INTERNAL_OBJECTS_H but FT_INTERNAL_VALIDATE_H. * src/sfnt/ttcmap.c: Don't include FT_INTERNAL_OBJECTS_H but FT_INTERNAL_VALIDATE_H. Include sferrors.h before FT_INTERNAL_VALIDATE_H. s/FT_Err_Ok/SFNT_Err_Ok/. * src/sfnt/sferrors.h: Define FT_KEEP_ERR_PREFIX. * src/type1/t1afm.c: Include t1errors.h.
Diffstat (limited to 'include/freetype/internal/ftobjs.h')
-rw-r--r--include/freetype/internal/ftobjs.h106
1 files changed, 0 insertions, 106 deletions
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 3a28119af..805c3aeb2 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -27,7 +27,6 @@
#define __FTOBJS_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
@@ -86,111 +85,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/**** ****/
/**** ****/
- /**** V A L I D A T I O N ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
- /* handle to a validation object */
- typedef struct FT_ValidatorRec_* FT_Validator;
-
-
- /*************************************************************************/
- /* */
- /* There are three distinct validation levels defined here: */
- /* */
- /* FT_VALIDATE_DEFAULT :: */
- /* A table that passes this validation level can be used reliably by */
- /* FreeType. It generally means that all offsets have been checked to */
- /* prevent out-of-bound reads, array counts are correct, etc. */
- /* */
- /* FT_VALIDATE_TIGHT :: */
- /* A table that passes this validation level can be used reliably and */
- /* doesn't contain invalid data. For example, a charmap table that */
- /* returns invalid glyph indices will not pass, even though it can */
- /* be used with FreeType in default mode (the library will simply */
- /* return an error later when trying to load the glyph). */
- /* */
- /* It also check that fields that must be a multiple of 2, 4, or 8 */
- /* don't have incorrect values, etc. */
- /* */
- /* FT_VALIDATE_PARANOID :: */
- /* Only for font debugging. Checks that a table follows the */
- /* specification by 100%. Very few fonts will be able to pass this */
- /* level anyway but it can be useful for certain tools like font */
- /* editors/converters. */
- /* */
- typedef enum FT_ValidationLevel_
- {
- FT_VALIDATE_DEFAULT = 0,
- FT_VALIDATE_TIGHT,
- FT_VALIDATE_PARANOID
-
- } FT_ValidationLevel;
-
-
- /* validator structure */
- typedef struct FT_ValidatorRec_
- {
- const FT_Byte* base; /* address of table in memory */
- const FT_Byte* limit; /* `base' + sizeof(table) in memory */
- FT_ValidationLevel level; /* validation level */
- FT_Error error; /* error returned. 0 means success */
-
- ft_jmp_buf jump_buffer; /* used for exception handling */
-
- } FT_ValidatorRec;
-
-
-#define FT_VALIDATOR( x ) ((FT_Validator)( x ))
-
-
- FT_BASE( void )
- ft_validator_init( FT_Validator valid,
- const FT_Byte* base,
- const FT_Byte* limit,
- FT_ValidationLevel level );
-
- FT_BASE( FT_Int )
- ft_validator_run( FT_Validator valid );
-
- /* Sets the error field in a validator, then calls `longjmp' to return */
- /* to high-level caller. Using `setjmp/longjmp' avoids many stupid */
- /* error checks within the validation routines. */
- /* */
- FT_BASE( void )
- ft_validator_error( FT_Validator valid,
- FT_Error error );
-
-
- /* Calls ft_validate_error. Assumes that the `valid' local variable */
- /* holds a pointer to the current validator object. */
- /* */
-#define FT_INVALID( _error ) ft_validator_error( valid, _error )
-
- /* called when a broken table is detected */
-#define FT_INVALID_TOO_SHORT FT_INVALID( FT_Err_Invalid_Table )
-
- /* called when an invalid offset is detected */
-#define FT_INVALID_OFFSET FT_INVALID( FT_Err_Invalid_Offset )
-
- /* called when an invalid format/value is detected */
-#define FT_INVALID_FORMAT FT_INVALID( FT_Err_Invalid_Table )
-
- /* called when an invalid glyph index is detected */
-#define FT_INVALID_GLYPH_ID FT_INVALID( FT_Err_Invalid_Glyph_Index )
-
- /* called when an invalid field value is detected */
-#define FT_INVALID_DATA FT_INVALID( FT_Err_Invalid_Table )
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
/**** C H A R M A P S ****/
/**** ****/
/**** ****/