2018-06-03 22:00:42 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* fterrors.h
|
|
|
|
*
|
|
|
|
* FreeType error code handling (specification).
|
|
|
|
*
|
2021-01-17 07:18:48 +01:00
|
|
|
* Copyright (C) 1996-2021 by
|
2018-06-03 22:00:42 +02:00
|
|
|
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
*
|
|
|
|
* This file is part of the FreeType project, and may only be used,
|
|
|
|
* modified, and distributed under the terms of the FreeType project
|
|
|
|
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
|
|
|
* this file you indicate that you have read the license and
|
|
|
|
* understand and accept it fully.
|
|
|
|
*
|
|
|
|
*/
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @section:
|
2018-08-29 18:15:03 +02:00
|
|
|
* error_enumerations
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @title:
|
2018-08-29 18:15:03 +02:00
|
|
|
* Error Enumerations
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @abstract:
|
2018-08-29 18:15:03 +02:00
|
|
|
* How to handle errors and error strings.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-08-29 18:15:03 +02:00
|
|
|
* The header file `fterrors.h` (which is automatically included by
|
|
|
|
* `freetype.h` defines the handling of FreeType's enumeration
|
|
|
|
* constants. It can also be used to generate error message strings
|
|
|
|
* with a small macro trick explained below.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* **Error Formats**
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-09-04 10:37:44 +02:00
|
|
|
* The configuration macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` can be
|
2018-08-29 18:15:03 +02:00
|
|
|
* defined in `ftoption.h` in order to make the higher byte indicate the
|
|
|
|
* module where the error has happened (this is not compatible with
|
|
|
|
* standard builds of FreeType~2, however). See the file `ftmoderr.h`
|
|
|
|
* for more details.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* **Error Message Strings**
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* Error definitions are set up with special macros that allow client
|
|
|
|
* applications to build a table of error message strings. The strings
|
|
|
|
* are not included in a normal build of FreeType~2 to save space (most
|
|
|
|
* client applications do not use them).
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* To do so, you have to define the following macros before including
|
|
|
|
* this file.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* ```
|
|
|
|
* FT_ERROR_START_LIST
|
|
|
|
* ```
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* This macro is called before anything else to define the start of the
|
2018-09-04 10:37:44 +02:00
|
|
|
* error list. It is followed by several `FT_ERROR_DEF` calls.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* ```
|
|
|
|
* FT_ERROR_DEF( e, v, s )
|
|
|
|
* ```
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* This macro is called to define one single error. 'e' is the error
|
|
|
|
* code identifier (e.g., `Invalid_Argument`), 'v' is the error's
|
|
|
|
* numerical value, and 's' is the corresponding error string.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* ```
|
|
|
|
* FT_ERROR_END_LIST
|
|
|
|
* ```
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* This macro ends the list.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* Additionally, you have to undefine `FTERRORS_H_` before #including
|
|
|
|
* this file.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* Here is a simple example.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* ```
|
|
|
|
* #undef FTERRORS_H_
|
|
|
|
* #define FT_ERRORDEF( e, v, s ) { e, s },
|
|
|
|
* #define FT_ERROR_START_LIST {
|
|
|
|
* #define FT_ERROR_END_LIST { 0, NULL } };
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* const struct
|
|
|
|
* {
|
|
|
|
* int err_code;
|
|
|
|
* const char* err_msg;
|
|
|
|
* } ft_errors[] =
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2020-06-08 13:31:55 +02:00
|
|
|
* #include <freetype/fterrors.h>
|
2018-08-29 18:15:03 +02:00
|
|
|
* ```
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* An alternative to using an array is a switch statement.
|
2018-06-03 22:00:42 +02:00
|
|
|
*
|
2018-08-29 18:15:03 +02:00
|
|
|
* ```
|
|
|
|
* #undef FTERRORS_H_
|
|
|
|
* #define FT_ERROR_START_LIST switch ( error_code ) {
|
|
|
|
* #define FT_ERRORDEF( e, v, s ) case v: return s;
|
|
|
|
* #define FT_ERROR_END_LIST }
|
|
|
|
* ```
|
|
|
|
*
|
2018-09-04 10:37:44 +02:00
|
|
|
* If you use `FT_CONFIG_OPTION_USE_MODULE_ERRORS`, `error_code` should
|
|
|
|
* be replaced with `FT_ERROR_BASE(error_code)` in the last example.
|
2018-06-03 22:00:42 +02:00
|
|
|
*/
|
2001-06-20 01:03:41 +02:00
|
|
|
|
2015-07-23 13:35:07 +02:00
|
|
|
/* */
|
2001-06-20 01:03:41 +02:00
|
|
|
|
2018-09-04 10:37:44 +02:00
|
|
|
/* In previous FreeType versions we used `__FTERRORS_H__`. However, */
|
2016-01-20 21:10:41 +01:00
|
|
|
/* using two successive underscores in a non-system symbol name */
|
|
|
|
/* violates the C (and C++) standard, so it was changed to the */
|
|
|
|
/* current form. In spite of this, we have to make */
|
|
|
|
/* */
|
2018-09-04 10:37:44 +02:00
|
|
|
/* ``` */
|
2016-01-20 21:10:41 +01:00
|
|
|
/* #undefine __FTERRORS_H__ */
|
2018-09-04 10:37:44 +02:00
|
|
|
/* ``` */
|
2016-01-20 21:10:41 +01:00
|
|
|
/* */
|
2017-05-03 23:54:29 +02:00
|
|
|
/* work for backward compatibility. */
|
2016-01-20 21:10:41 +01:00
|
|
|
/* */
|
|
|
|
#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )
|
2016-01-12 21:37:13 +01:00
|
|
|
#define FTERRORS_H_
|
2016-01-20 21:10:41 +01:00
|
|
|
#define __FTERRORS_H__
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
|
|
|
|
/* include module base error codes */
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/ftmoderr.h>
|
2000-08-01 15:17:04 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
|
2001-06-19 10:28:24 +02:00
|
|
|
/*******************************************************************/
|
|
|
|
/*******************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** SETUP MACROS *****/
|
|
|
|
/***** *****/
|
|
|
|
/*******************************************************************/
|
|
|
|
/*******************************************************************/
|
2001-06-20 01:03:41 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
#undef FT_NEED_EXTERN_C
|
2002-02-21 12:48:48 +01:00
|
|
|
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
/* FT_ERR_PREFIX is used as a prefix for error identifiers. */
|
2018-09-04 10:37:44 +02:00
|
|
|
/* By default, we use `FT_Err_`. */
|
2001-06-20 01:03:41 +02:00
|
|
|
/* */
|
|
|
|
#ifndef FT_ERR_PREFIX
|
|
|
|
#define FT_ERR_PREFIX FT_Err_
|
2001-06-19 15:41:59 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
/* FT_ERR_BASE is used as the base for module-specific errors. */
|
|
|
|
/* */
|
2001-06-19 15:41:59 +02:00
|
|
|
#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
|
2001-06-20 01:03:41 +02:00
|
|
|
|
|
|
|
#ifndef FT_ERR_BASE
|
|
|
|
#define FT_ERR_BASE FT_Mod_Err_Base
|
2001-06-19 15:41:59 +02:00
|
|
|
#endif
|
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
#else
|
2001-06-19 15:41:59 +02:00
|
|
|
|
2001-08-25 01:11:34 +02:00
|
|
|
#undef FT_ERR_BASE
|
2001-06-20 01:03:41 +02:00
|
|
|
#define FT_ERR_BASE 0
|
2001-06-19 15:41:59 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */
|
Complete redesign of error codes. Please check ftmoderr.h for more
details.
* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed. Replaced with files
local to the module. All extra error codes have been moved to
`fterrors.h'.
* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.
* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.
* include/freetype/ftmoderr.h: New file, defining the module error
offsets. Its structure is similar to `fterrors.h'.
* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.
* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.
All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.
All make files have been updated to include the local error files.
* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.
* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 19:30:41 +02:00
|
|
|
|
2000-10-10 05:58:32 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
/* If FT_ERRORDEF is not defined, we need to define a simple */
|
|
|
|
/* enumeration type. */
|
|
|
|
/* */
|
|
|
|
#ifndef FT_ERRORDEF
|
2000-10-10 05:58:32 +02:00
|
|
|
|
2018-08-30 14:09:04 +02:00
|
|
|
#define FT_INCLUDE_ERR_PROTOS
|
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
#define FT_ERRORDEF( e, v, s ) e = v,
|
|
|
|
#define FT_ERROR_START_LIST enum {
|
|
|
|
#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) };
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#define FT_NEED_EXTERN_C
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
#endif /* !FT_ERRORDEF */
|
2001-06-18 12:35:00 +02:00
|
|
|
|
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
/* this macro is used to define an error */
|
2013-03-14 15:49:49 +01:00
|
|
|
#define FT_ERRORDEF_( e, v, s ) \
|
2001-06-20 01:03:41 +02:00
|
|
|
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
|
2001-06-18 12:35:00 +02:00
|
|
|
|
* 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.
2004-09-06 09:06:56 +02:00
|
|
|
/* this is only used for <module>_Err_Ok, which must be 0! */
|
2013-03-14 15:49:49 +01:00
|
|
|
#define FT_NOERRORDEF_( e, v, s ) \
|
2001-06-20 01:03:41 +02:00
|
|
|
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
|
2001-06-18 12:35:00 +02:00
|
|
|
|
|
|
|
|
2001-06-19 15:41:59 +02:00
|
|
|
#ifdef FT_ERROR_START_LIST
|
2000-07-09 21:15:30 +02:00
|
|
|
FT_ERROR_START_LIST
|
2001-06-19 15:41:59 +02:00
|
|
|
#endif
|
Complete redesign of error codes. Please check ftmoderr.h for more
details.
* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed. Replaced with files
local to the module. All extra error codes have been moved to
`fterrors.h'.
* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.
* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.
* include/freetype/ftmoderr.h: New file, defining the module error
offsets. Its structure is similar to `fterrors.h'.
* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.
* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.
All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.
All make files have been updated to include the local error files.
* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.
* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 19:30:41 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
|
* 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.
2004-09-06 09:06:56 +02:00
|
|
|
/* now include the error codes */
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/fterrdef.h>
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2001-06-19 15:41:59 +02:00
|
|
|
#ifdef FT_ERROR_END_LIST
|
2000-07-09 21:15:30 +02:00
|
|
|
FT_ERROR_END_LIST
|
2001-06-19 15:41:59 +02:00
|
|
|
#endif
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2001-06-20 01:03:41 +02:00
|
|
|
|
2001-06-19 10:28:24 +02:00
|
|
|
/*******************************************************************/
|
|
|
|
/*******************************************************************/
|
|
|
|
/***** *****/
|
2001-06-20 01:03:41 +02:00
|
|
|
/***** SIMPLE CLEANUP *****/
|
2001-06-19 10:28:24 +02:00
|
|
|
/***** *****/
|
|
|
|
/*******************************************************************/
|
|
|
|
/*******************************************************************/
|
|
|
|
|
2001-06-19 15:41:59 +02:00
|
|
|
#ifdef FT_NEED_EXTERN_C
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
#undef FT_ERROR_START_LIST
|
|
|
|
#undef FT_ERROR_END_LIST
|
2001-06-19 15:41:59 +02:00
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
#undef FT_ERRORDEF
|
2001-06-18 12:35:00 +02:00
|
|
|
#undef FT_ERRORDEF_
|
|
|
|
#undef FT_NOERRORDEF_
|
2000-05-11 20:23:52 +02:00
|
|
|
|
2001-06-19 15:41:59 +02:00
|
|
|
#undef FT_NEED_EXTERN_C
|
* 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.
2004-09-06 09:06:56 +02:00
|
|
|
#undef FT_ERR_BASE
|
|
|
|
|
2013-03-12 11:42:20 +01:00
|
|
|
/* FT_ERR_PREFIX is needed internally */
|
|
|
|
#ifndef FT2_BUILD_LIBRARY
|
* 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.
2004-09-06 09:06:56 +02:00
|
|
|
#undef FT_ERR_PREFIX
|
|
|
|
#endif
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2020-06-08 13:31:55 +02:00
|
|
|
/* FT_INCLUDE_ERR_PROTOS: Control whether function prototypes should be */
|
|
|
|
/* included with */
|
|
|
|
/* */
|
|
|
|
/* #include <freetype/fterrors.h> */
|
|
|
|
/* */
|
|
|
|
/* This is only true where `FT_ERRORDEF` is */
|
|
|
|
/* undefined. */
|
|
|
|
/* */
|
|
|
|
/* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of */
|
|
|
|
/* `fterrors.h`. */
|
2018-08-30 14:09:04 +02:00
|
|
|
#ifdef FT_INCLUDE_ERR_PROTOS
|
2018-08-31 21:26:46 +02:00
|
|
|
#undef FT_INCLUDE_ERR_PROTOS
|
|
|
|
|
|
|
|
#ifndef FT_ERR_PROTOS_DEFINED
|
|
|
|
#define FT_ERR_PROTOS_DEFINED
|
2018-08-30 14:09:04 +02:00
|
|
|
|
|
|
|
|
* Version 2.10.1 released.
==========================
Tag sources with `VER-2-10-1'.
* docs/VERSION.TXT: Add entry for version 2.10.1.
* README, Jamfile (RefDoc), src/base/ftver.rc,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 23:1:17.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
* include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
2019-07-01 13:54:54 +02:00
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2018-08-30 14:09:04 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
|
|
|
* @function:
|
|
|
|
* FT_Error_String
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* Retrieve the description of a valid FreeType error code.
|
|
|
|
*
|
|
|
|
* @input:
|
|
|
|
* error_code ::
|
|
|
|
* A valid FreeType error code.
|
|
|
|
*
|
|
|
|
* @return:
|
|
|
|
* A C~string or `NULL`, if any error occurred.
|
|
|
|
*
|
|
|
|
* @note:
|
|
|
|
* FreeType has to be compiled with `FT_CONFIG_OPTION_ERROR_STRINGS` or
|
|
|
|
* `FT_DEBUG_LEVEL_ERROR` to get meaningful descriptions.
|
|
|
|
* 'error_string' will be `NULL` otherwise.
|
|
|
|
*
|
|
|
|
* Module identification will be ignored:
|
|
|
|
*
|
|
|
|
* ```c
|
|
|
|
* strcmp( FT_Error_String( FT_Err_Unknown_File_Format ),
|
|
|
|
* FT_Error_String( BDF_Err_Unknown_File_Format ) ) == 0;
|
|
|
|
* ```
|
|
|
|
*/
|
|
|
|
FT_EXPORT( const char* )
|
|
|
|
FT_Error_String( FT_Error error_code );
|
|
|
|
|
* Version 2.10.1 released.
==========================
Tag sources with `VER-2-10-1'.
* docs/VERSION.TXT: Add entry for version 2.10.1.
* README, Jamfile (RefDoc), src/base/ftver.rc,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 23:1:17.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
* include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
2019-07-01 13:54:54 +02:00
|
|
|
FT_END_HEADER
|
|
|
|
|
2018-08-30 14:09:04 +02:00
|
|
|
|
2018-08-31 21:26:46 +02:00
|
|
|
#endif /* FT_ERR_PROTOS_DEFINED */
|
|
|
|
|
2018-08-30 14:09:04 +02:00
|
|
|
#endif /* FT_INCLUDE_ERR_PROTOS */
|
|
|
|
|
2016-01-20 21:10:41 +01:00
|
|
|
#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2002-03-29 08:43:04 +01:00
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
/* END */
|