| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ftvalid.h */ | 3 /* ftvalid.h */ |
| 4 /* */ | 4 /* */ |
| 5 /* FreeType validation support (specification). */ | 5 /* FreeType validation support (specification). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 2004 by */ | 7 /* Copyright 2004, 2013 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 /* */ | 69 /* */ |
| 70 typedef enum FT_ValidationLevel_ | 70 typedef enum FT_ValidationLevel_ |
| 71 { | 71 { |
| 72 FT_VALIDATE_DEFAULT = 0, | 72 FT_VALIDATE_DEFAULT = 0, |
| 73 FT_VALIDATE_TIGHT, | 73 FT_VALIDATE_TIGHT, |
| 74 FT_VALIDATE_PARANOID | 74 FT_VALIDATE_PARANOID |
| 75 | 75 |
| 76 } FT_ValidationLevel; | 76 } FT_ValidationLevel; |
| 77 | 77 |
| 78 | 78 |
| 79 #if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ |
| 80 /* We disable the warning `structure was padded due to */ |
| 81 /* __declspec(align())' in order to compile cleanly with */ |
| 82 /* the maximum level of warnings. */ |
| 83 #pragma warning( push ) |
| 84 #pragma warning( disable : 4324 ) |
| 85 #endif /* _MSC_VER */ |
| 86 |
| 79 /* validator structure */ | 87 /* validator structure */ |
| 80 typedef struct FT_ValidatorRec_ | 88 typedef struct FT_ValidatorRec_ |
| 81 { | 89 { |
| 82 const FT_Byte* base; /* address of table in memory */ | 90 const FT_Byte* base; /* address of table in memory */ |
| 83 const FT_Byte* limit; /* `base' + sizeof(table) in memory */ | 91 const FT_Byte* limit; /* `base' + sizeof(table) in memory */ |
| 84 FT_ValidationLevel level; /* validation level */ | 92 FT_ValidationLevel level; /* validation level */ |
| 85 FT_Error error; /* error returned. 0 means success */ | 93 FT_Error error; /* error returned. 0 means success */ |
| 86 | 94 |
| 87 ft_jmp_buf jump_buffer; /* used for exception handling */ | 95 ft_jmp_buf jump_buffer; /* used for exception handling */ |
| 88 | 96 |
| 89 } FT_ValidatorRec; | 97 } FT_ValidatorRec; |
| 90 | 98 |
| 99 #if defined( _MSC_VER ) |
| 100 #pragma warning( pop ) |
| 101 #endif |
| 91 | 102 |
| 92 #define FT_VALIDATOR( x ) ((FT_Validator)( x )) | 103 #define FT_VALIDATOR( x ) ( (FT_Validator)( x ) ) |
| 93 | 104 |
| 94 | 105 |
| 95 FT_BASE( void ) | 106 FT_BASE( void ) |
| 96 ft_validator_init( FT_Validator valid, | 107 ft_validator_init( FT_Validator valid, |
| 97 const FT_Byte* base, | 108 const FT_Byte* base, |
| 98 const FT_Byte* limit, | 109 const FT_Byte* limit, |
| 99 FT_ValidationLevel level ); | 110 FT_ValidationLevel level ); |
| 100 | 111 |
| 101 /* Do not use this. It's broken and will cause your validator to crash */ | 112 /* Do not use this. It's broken and will cause your validator to crash */ |
| 102 /* if you run it on an invalid font. */ | 113 /* if you run it on an invalid font. */ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 #define FT_INVALID_DATA \ | 152 #define FT_INVALID_DATA \ |
| 142 FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) | 153 FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) |
| 143 | 154 |
| 144 | 155 |
| 145 FT_END_HEADER | 156 FT_END_HEADER |
| 146 | 157 |
| 147 #endif /* __FTVALID_H__ */ | 158 #endif /* __FTVALID_H__ */ |
| 148 | 159 |
| 149 | 160 |
| 150 /* END */ | 161 /* END */ |
| OLD | NEW |