2018-08-30 14:09:04 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* fterrors.c
|
|
|
|
*
|
|
|
|
* FreeType API for error code handling.
|
|
|
|
*
|
2022-01-11 10:54:10 +01:00
|
|
|
* Copyright (C) 2018-2022 by
|
2018-08-30 14:09:04 +02:00
|
|
|
* Armin Hasitzka, 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/internal/ftdebug.h>
|
|
|
|
#include <freetype/fterrors.h>
|
2018-08-30 14:09:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* documentation is in fterrors.h */
|
|
|
|
|
|
|
|
FT_EXPORT_DEF( const char* )
|
|
|
|
FT_Error_String( FT_Error error_code )
|
|
|
|
{
|
|
|
|
if ( error_code < 0 ||
|
|
|
|
error_code >= FT_ERR_CAT( FT_ERR_PREFIX, Max ) )
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
#if defined( FT_CONFIG_OPTION_ERROR_STRINGS ) || \
|
|
|
|
defined( FT_DEBUG_LEVEL_ERROR )
|
|
|
|
|
|
|
|
#undef FTERRORS_H_
|
|
|
|
#define FT_ERROR_START_LIST switch ( FT_ERROR_BASE( error_code ) ) {
|
|
|
|
#define FT_ERRORDEF( e, v, s ) case v: return s;
|
|
|
|
#define FT_ERROR_END_LIST }
|
|
|
|
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/fterrors.h>
|
2018-08-30 14:09:04 +02:00
|
|
|
|
|
|
|
#endif /* defined( FT_CONFIG_OPTION_ERROR_STRINGS ) || ... */
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|