1 /***************************************************************************/
5 /* ANSI-specific library and header configuration file (specification */
8 /* Copyright 2002 by */
9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
11 /* This file is part of the FreeType project, and may only be used, */
12 /* modified, and distributed under the terms of the FreeType project */
13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
14 /* this file you indicate that you have read the license and */
15 /* understand and accept it fully. */
17 /***************************************************************************/
20 /*************************************************************************/
22 /* This file is used to group all #includes to the ANSI C library that */
23 /* FreeType normally requires. It also defines macros to rename the */
24 /* standard functions within the FreeType source code. */
26 /* Load a file which defines __FTSTDLIB_H__ before this one to override */
29 /*************************************************************************/
32 #ifndef __FTSTDLIB_H__
33 #define __FTSTDLIB_H__
36 /**********************************************************************/
40 /* UINT_MAX and ULONG_MAX are used to automatically compute the size */
41 /* of `int' and `long' in bytes at compile-time. So far, this works */
42 /* for all platforms the library has been tested on. */
44 /* Note that on the extremely rare platforms that do not provide */
45 /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */
46 /* old Crays where `int' is 36 bits), we do not make any guarantee */
47 /* about the correct behaviour of FT2 with all fonts. */
49 /* In these case, "ftconfig.h" will refuse to compile anyway with a */
50 /* message like "couldn't find 32-bit type" or something similar. */
52 /* IMPORTANT NOTE: We do not define aliases for heap management and */
53 /* i/o routines (i.e. malloc/free/fopen/fread/...) */
54 /* since these functions should all be encapsulated */
55 /* by platform-specific implementations of */
58 /**********************************************************************/
63 #define FT_UINT_MAX UINT_MAX
64 #define FT_ULONG_MAX ULONG_MAX
67 /**********************************************************************/
69 /* character and string processing */
71 /**********************************************************************/
76 #define ft_isalnum isalnum
77 #define ft_isupper isupper
78 #define ft_islower islower
79 #define ft_xdigit isxdigit
84 #define ft_strlen strlen
85 #define ft_strcmp strcmp
86 #define ft_strncmp strncmp
87 #define ft_memcpy memcpy
88 #define ft_strcpy strcpy
89 #define ft_strncpy strncpy
90 #define ft_memset memset
91 #define ft_memmove memmove
92 #define ft_memcmp memcmp
96 #define ft_sprintf sprintf
99 /**********************************************************************/
103 /**********************************************************************/
108 #define ft_qsort qsort
109 #define ft_exit exit /* only used to exit from unhandled exceptions */
114 /**********************************************************************/
116 /* execution control */
118 /**********************************************************************/
123 #define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
124 /* jmp_buf is defined as a macro */
125 /* on certain platforms */
127 #define ft_setjmp setjmp /* same thing here */
128 #define ft_longjmp longjmp /* " */
131 /* the following is only used for debugging purposes, i.e. when */
132 /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
137 #endif /* __FTSTDLIB_H__ */