warn about the GNU Make requirement at compile time.. * include/freetype/config/ftstdlib.h, include/freetype/config/ftconfig.h, include/freetype/config/ftheader.h, include/freetype/internal/ftmemory.h, include/freetype/internal/ftobjs.h, src/autohint/ahoptim.c, src/base/ftdbgmem.c, src/base/ftdebug.c, src/base/ftmac.c, src/base/ftobjs.c, src/base/ftsystem.c, src/cache/ftcimage.c, src/cache/ftcsbits.c, src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c, src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c, src/pcf/pcfdriver.c, src/pcf/pcfread.c, src/psaux/t1cmap.c, src/psaux/t1decode.c, src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c, src/pshinter/pshrec.c, src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfdriver.c, src/sfnt/ttload.c, src/sfnt/ttpost.c, src/smooth/ftgrays.c, src/type1/t1afm.c, src/type1/t1driver.c, src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1objs.c, src/type1/t1parse.c: added the new configuration file "ftstdlib.h" used to define aliases for all ISO C library functions used by the engine (e.g. strlen, qsort, setjmp, etc...) this eases the porting of FreeType 2 to exotic environments like XFree86 modules/extensions.. also removed many #include <string.h>, #include <stdlib.h>, etc... from the engine's sources where they're not needed..david-pic-changes
parent
0cc456aa1a
commit
d15bc0d13a
43 changed files with 372 additions and 185 deletions
@ -0,0 +1,116 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* ftstdlib.h */ |
||||
/* */ |
||||
/* ANSI-specific configuration file */ |
||||
/* */ |
||||
/* Copyright 1996-2001, 2002 by */ |
||||
/* 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. */ |
||||
/* */ |
||||
/* */ |
||||
/* This file is used to group all #includes to the ANSI C library */ |
||||
/* that FreeType normally requires. It also defines macros to rename */ |
||||
/* the standard functions within the FT source code */ |
||||
/* */ |
||||
/* (You're free to provide alternative when working in exotic */ |
||||
/* runtime environments :-) */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
#ifndef __FT_STANDARD_LIBRARY_H__ |
||||
#define __FT_STANDARD_LIBRARY_H__ |
||||
|
||||
|
||||
/************************************************************************/ |
||||
/* */ |
||||
/* integer limits */ |
||||
/* */ |
||||
/* UINT_MAX and ULONG_MAX are used to automatically compute the size */ |
||||
/* of 'int' and 'long' in bytes at compile-time. So far, this works */ |
||||
/* for all platforms the library has been tested on. */ |
||||
/* */ |
||||
/* Note that on the extremely rare platforms that do not provide */ |
||||
/* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ |
||||
/* old Crays where 'int' is 36 bits !!), we do not make any guarantee */ |
||||
/* about the correct behaviour of FT2 with all fonts.. */ |
||||
/* */ |
||||
/* in these case, "ftconfig.h" will refuse to compile anyway with a */ |
||||
/* message like "couldn't find 32-bit type" or something similar */ |
||||
/* anyway.. */ |
||||
/* */ |
||||
/* */ |
||||
/* IMPORTANT NOTE: We do not define aliases for heap management and */ |
||||
/* i/o routines (i.e. malloc/free/fopen/fread/...) */ |
||||
/* since these functions should all be encapsulated */ |
||||
/* by platform-specific implementations of */ |
||||
/* "ftsystem.c" anyway !! */ |
||||
/* */ |
||||
/************************************************************************/ |
||||
|
||||
#include <limits.h> |
||||
#define FT_UINT_MAX UINT_MAX |
||||
#define FT_ULONG_MAX ULONG_MAX |
||||
|
||||
|
||||
/************************************************************************/ |
||||
/* */ |
||||
/* character and string processing */ |
||||
/* */ |
||||
/************************************************************************/ |
||||
|
||||
#include <ctype.h> |
||||
#define ft_isalnum isalnum |
||||
#define ft_isupper isupper |
||||
#define ft_islower islower |
||||
|
||||
|
||||
#include <string.h> |
||||
#define ft_strlen strlen |
||||
#define ft_strcmp strcmp |
||||
#define ft_strncmp strncmp |
||||
#define ft_memcpy memcpy |
||||
#define ft_strcpy strcpy |
||||
#define ft_strncpy strncpy |
||||
#define ft_memset memset |
||||
#define ft_memmove memmove |
||||
|
||||
|
||||
/************************************************************************/ |
||||
/* */ |
||||
/* sorting */ |
||||
/* */ |
||||
/************************************************************************/ |
||||
|
||||
#include <stdlib.h> /* for qsort() */ |
||||
#define ft_qsort qsort |
||||
|
||||
|
||||
/************************************************************************/ |
||||
/* */ |
||||
/* execution control */ |
||||
/* */ |
||||
/************************************************************************/ |
||||
|
||||
#include <setjmp.h> |
||||
|
||||
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ |
||||
/* jmp_buf is defined as a macro */ |
||||
/* on certain platforms.. */ |
||||
|
||||
#define ft_setjmp setjmp /* same thing here */ |
||||
#define ft_longjmp longjmp /* " */ |
||||
|
||||
|
||||
/* the following is only used for debugging purposes, i.e. when */ |
||||
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ |
||||
/* */ |
||||
#include <stdarg.h> |
||||
|
||||
|
||||
#endif /* __FT_STANDARD_LIBRARY_H__ */ |
Loading…
Reference in new issue