vrshoot
diff libs/ft2static/freetype/config/ftstdlib.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/ft2static/freetype/config/ftstdlib.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,173 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* ftstdlib.h */ 1.7 +/* */ 1.8 +/* ANSI-specific library and header configuration file (specification */ 1.9 +/* only). */ 1.10 +/* */ 1.11 +/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */ 1.12 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.13 +/* */ 1.14 +/* This file is part of the FreeType project, and may only be used, */ 1.15 +/* modified, and distributed under the terms of the FreeType project */ 1.16 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.17 +/* this file you indicate that you have read the license and */ 1.18 +/* understand and accept it fully. */ 1.19 +/* */ 1.20 +/***************************************************************************/ 1.21 + 1.22 + 1.23 + /*************************************************************************/ 1.24 + /* */ 1.25 + /* This file is used to group all #includes to the ANSI C library that */ 1.26 + /* FreeType normally requires. It also defines macros to rename the */ 1.27 + /* standard functions within the FreeType source code. */ 1.28 + /* */ 1.29 + /* Load a file which defines __FTSTDLIB_H__ before this one to override */ 1.30 + /* it. */ 1.31 + /* */ 1.32 + /*************************************************************************/ 1.33 + 1.34 + 1.35 +#ifndef __FTSTDLIB_H__ 1.36 +#define __FTSTDLIB_H__ 1.37 + 1.38 + 1.39 +#include <stddef.h> 1.40 + 1.41 +#define ft_ptrdiff_t ptrdiff_t 1.42 + 1.43 + 1.44 + /**********************************************************************/ 1.45 + /* */ 1.46 + /* integer limits */ 1.47 + /* */ 1.48 + /* UINT_MAX and ULONG_MAX are used to automatically compute the size */ 1.49 + /* of `int' and `long' in bytes at compile-time. So far, this works */ 1.50 + /* for all platforms the library has been tested on. */ 1.51 + /* */ 1.52 + /* Note that on the extremely rare platforms that do not provide */ 1.53 + /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ 1.54 + /* old Crays where `int' is 36 bits), we do not make any guarantee */ 1.55 + /* about the correct behaviour of FT2 with all fonts. */ 1.56 + /* */ 1.57 + /* In these case, `ftconfig.h' will refuse to compile anyway with a */ 1.58 + /* message like `couldn't find 32-bit type' or something similar. */ 1.59 + /* */ 1.60 + /**********************************************************************/ 1.61 + 1.62 + 1.63 +#include <limits.h> 1.64 + 1.65 +#define FT_CHAR_BIT CHAR_BIT 1.66 +#define FT_INT_MAX INT_MAX 1.67 +#define FT_INT_MIN INT_MIN 1.68 +#define FT_UINT_MAX UINT_MAX 1.69 +#define FT_ULONG_MAX ULONG_MAX 1.70 + 1.71 + 1.72 + /**********************************************************************/ 1.73 + /* */ 1.74 + /* character and string processing */ 1.75 + /* */ 1.76 + /**********************************************************************/ 1.77 + 1.78 + 1.79 +#include <string.h> 1.80 + 1.81 +#define ft_memchr memchr 1.82 +#define ft_memcmp memcmp 1.83 +#define ft_memcpy memcpy 1.84 +#define ft_memmove memmove 1.85 +#define ft_memset memset 1.86 +#define ft_strcat strcat 1.87 +#define ft_strcmp strcmp 1.88 +#define ft_strcpy strcpy 1.89 +#define ft_strlen strlen 1.90 +#define ft_strncmp strncmp 1.91 +#define ft_strncpy strncpy 1.92 +#define ft_strrchr strrchr 1.93 +#define ft_strstr strstr 1.94 + 1.95 + 1.96 + /**********************************************************************/ 1.97 + /* */ 1.98 + /* file handling */ 1.99 + /* */ 1.100 + /**********************************************************************/ 1.101 + 1.102 + 1.103 +#include <stdio.h> 1.104 + 1.105 +#define FT_FILE FILE 1.106 +#define ft_fclose fclose 1.107 +#define ft_fopen fopen 1.108 +#define ft_fread fread 1.109 +#define ft_fseek fseek 1.110 +#define ft_ftell ftell 1.111 +#define ft_sprintf sprintf 1.112 + 1.113 + 1.114 + /**********************************************************************/ 1.115 + /* */ 1.116 + /* sorting */ 1.117 + /* */ 1.118 + /**********************************************************************/ 1.119 + 1.120 + 1.121 +#include <stdlib.h> 1.122 + 1.123 +#define ft_qsort qsort 1.124 + 1.125 + 1.126 + /**********************************************************************/ 1.127 + /* */ 1.128 + /* memory allocation */ 1.129 + /* */ 1.130 + /**********************************************************************/ 1.131 + 1.132 + 1.133 +#define ft_scalloc calloc 1.134 +#define ft_sfree free 1.135 +#define ft_smalloc malloc 1.136 +#define ft_srealloc realloc 1.137 + 1.138 + 1.139 + /**********************************************************************/ 1.140 + /* */ 1.141 + /* miscellaneous */ 1.142 + /* */ 1.143 + /**********************************************************************/ 1.144 + 1.145 + 1.146 +#define ft_atol atol 1.147 +#define ft_labs labs 1.148 + 1.149 + 1.150 + /**********************************************************************/ 1.151 + /* */ 1.152 + /* execution control */ 1.153 + /* */ 1.154 + /**********************************************************************/ 1.155 + 1.156 + 1.157 +#include <setjmp.h> 1.158 + 1.159 +#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ 1.160 + /* jmp_buf is defined as a macro */ 1.161 + /* on certain platforms */ 1.162 + 1.163 +#define ft_longjmp longjmp 1.164 +#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */ 1.165 + 1.166 + 1.167 + /* the following is only used for debugging purposes, i.e., if */ 1.168 + /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ 1.169 + 1.170 +#include <stdarg.h> 1.171 + 1.172 + 1.173 +#endif /* __FTSTDLIB_H__ */ 1.174 + 1.175 + 1.176 +/* END */