summaryrefslogtreecommitdiffstats
path: root/include/internal/ftvalid.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/internal/ftvalid.h')
-rw-r--r--include/internal/ftvalid.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/include/internal/ftvalid.h b/include/internal/ftvalid.h
index 12ad036..9cda6ee 100644
--- a/include/internal/ftvalid.h
+++ b/include/internal/ftvalid.h
@@ -4,7 +4,7 @@
/* */
/* FreeType validation support (specification). */
/* */
-/* Copyright 2004, 2013 by */
+/* Copyright 2004-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -87,13 +87,13 @@ FT_BEGIN_HEADER
/* validator structure */
typedef struct FT_ValidatorRec_
{
+ ft_jmp_buf jump_buffer; /* used for exception handling */
+
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;
#if defined( _MSC_VER )
@@ -126,31 +126,29 @@ FT_BEGIN_HEADER
/* Calls ft_validate_error. Assumes that the `valid' local variable */
/* holds a pointer to the current validator object. */
/* */
- /* Use preprocessor prescan to pass FT_ERR_PREFIX. */
- /* */
-#define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error )
-#define FT_INVALID_( _prefix, _error ) \
- ft_validator_error( valid, _prefix ## _error )
+#define FT_INVALID( _error ) FT_INVALID_( _error )
+#define FT_INVALID_( _error ) \
+ ft_validator_error( valid, FT_THROW( _error ) )
/* called when a broken table is detected */
#define FT_INVALID_TOO_SHORT \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+ FT_INVALID( Invalid_Table )
/* called when an invalid offset is detected */
#define FT_INVALID_OFFSET \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Offset )
+ FT_INVALID( Invalid_Offset )
/* called when an invalid format/value is detected */
#define FT_INVALID_FORMAT \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+ FT_INVALID( Invalid_Table )
/* called when an invalid glyph index is detected */
#define FT_INVALID_GLYPH_ID \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index )
+ FT_INVALID( Invalid_Glyph_Index )
/* called when an invalid field value is detected */
#define FT_INVALID_DATA \
- FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+ FT_INVALID( Invalid_Table )
FT_END_HEADER