227 #undef FT_NEED_EXTERN_C 228 #undef FT_ERR_BASE 229 230 /* FT_ERR_PREFIX is needed internally */ 231 #ifndef FT2_BUILD_LIBRARY 232 #undef FT_ERR_PREFIX 233 #endif 234 235 /* FT_INCLUDE_ERR_PROTOS: Control if function prototypes should be */ 236 /* included with `#include FT_ERRORS_H'. This is */ 237 /* only true where `FT_ERRORDEF` is undefined. */ 238 /* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of */ 239 /* `fterrors.h`. */ 240 #ifdef FT_INCLUDE_ERR_PROTOS 241 #undef FT_INCLUDE_ERR_PROTOS 242 243 #ifndef FT_ERR_PROTOS_DEFINED 244 #define FT_ERR_PROTOS_DEFINED 245 246 247 /************************************************************************** 248 * 249 * @function: 250 * FT_Error_String 251 * 252 * @description: 253 * Retrieve the description of a valid FreeType error code. 254 * 255 * @input: 256 * error_code :: 257 * A valid FreeType error code. 258 * 259 * @return: 260 * A C~string or `NULL`, if any error occurred. 261 * 262 * @note: 263 * FreeType has to be compiled with `FT_CONFIG_OPTION_ERROR_STRINGS` or 264 * `FT_DEBUG_LEVEL_ERROR` to get meaningful descriptions. 265 * 'error_string' will be `NULL` otherwise. 266 * 267 * Module identification will be ignored: 268 * 269 * ```c 270 * strcmp( FT_Error_String( FT_Err_Unknown_File_Format ), 271 * FT_Error_String( BDF_Err_Unknown_File_Format ) ) == 0; 272 * ``` 273 */ 274 FT_EXPORT( const char* ) 275 FT_Error_String( FT_Error error_code ); 276 277 278 #endif /* FT_ERR_PROTOS_DEFINED */ 279 280 #endif /* FT_INCLUDE_ERR_PROTOS */ 281 282 #endif /* !(FTERRORS_H_ && __FTERRORS_H__) */ 283 284 285 /* END */ | 227 #undef FT_NEED_EXTERN_C 228 #undef FT_ERR_BASE 229 230 /* FT_ERR_PREFIX is needed internally */ 231 #ifndef FT2_BUILD_LIBRARY 232 #undef FT_ERR_PREFIX 233 #endif 234 235 /* FT_INCLUDE_ERR_PROTOS: Control if function prototypes should be */ 236 /* included with `#include FT_ERRORS_H'. This is */ 237 /* only true where `FT_ERRORDEF` is undefined. */ 238 /* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of */ 239 /* `fterrors.h`. */ 240 #ifdef FT_INCLUDE_ERR_PROTOS 241 #undef FT_INCLUDE_ERR_PROTOS 242 243 #ifndef FT_ERR_PROTOS_DEFINED 244 #define FT_ERR_PROTOS_DEFINED 245 246 247 FT_BEGIN_HEADER 248 249 /************************************************************************** 250 * 251 * @function: 252 * FT_Error_String 253 * 254 * @description: 255 * Retrieve the description of a valid FreeType error code. 256 * 257 * @input: 258 * error_code :: 259 * A valid FreeType error code. 260 * 261 * @return: 262 * A C~string or `NULL`, if any error occurred. 263 * 264 * @note: 265 * FreeType has to be compiled with `FT_CONFIG_OPTION_ERROR_STRINGS` or 266 * `FT_DEBUG_LEVEL_ERROR` to get meaningful descriptions. 267 * 'error_string' will be `NULL` otherwise. 268 * 269 * Module identification will be ignored: 270 * 271 * ```c 272 * strcmp( FT_Error_String( FT_Err_Unknown_File_Format ), 273 * FT_Error_String( BDF_Err_Unknown_File_Format ) ) == 0; 274 * ``` 275 */ 276 FT_EXPORT( const char* ) 277 FT_Error_String( FT_Error error_code ); 278 279 FT_END_HEADER 280 281 282 #endif /* FT_ERR_PROTOS_DEFINED */ 283 284 #endif /* FT_INCLUDE_ERR_PROTOS */ 285 286 #endif /* !(FTERRORS_H_ && __FTERRORS_H__) */ 287 288 289 /* END */ |