misc/libfreetype/include/freetype/config/ftstdlib.h
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftstdlib.h                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    ANSI-specific library and header configuration file (specification   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*    only).                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
  /* This file is used to group all #includes to the ANSI C library that   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /* FreeType normally requires.  It also defines macros to rename the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
  /* standard functions within the FreeType source code.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
  /* Load a file which defines __FTSTDLIB_H__ before this one to override  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
  /* it.                                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
#ifndef __FTSTDLIB_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
#define __FTSTDLIB_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
#include <stddef.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
#define ft_ptrdiff_t  ptrdiff_t
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  /*                           integer limits                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  /* UINT_MAX and ULONG_MAX are used to automatically compute the size  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  /* of `int' and `long' in bytes at compile-time.  So far, this works  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  /* for all platforms the library has been tested on.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  /* Note that on the extremely rare platforms that do not provide      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  /* old Crays where `int' is 36 bits), we do not make any guarantee    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /* about the correct behaviour of FT2 with all fonts.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /* In these case, `ftconfig.h' will refuse to compile anyway with a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /* message like `couldn't find 32-bit type' or something similar.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
#include <limits.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
#define FT_CHAR_BIT   CHAR_BIT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
#define FT_INT_MAX    INT_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
#define FT_INT_MIN    INT_MIN
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
#define FT_UINT_MAX   UINT_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
#define FT_ULONG_MAX  ULONG_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
  /*                 character and string processing                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
#include <string.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
#define ft_memchr   memchr
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
#define ft_memcmp   memcmp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
#define ft_memcpy   memcpy
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
#define ft_memmove  memmove
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
#define ft_memset   memset
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
#define ft_strcat   strcat
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
#define ft_strcmp   strcmp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
#define ft_strcpy   strcpy
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
#define ft_strlen   strlen
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
#define ft_strncmp  strncmp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
#define ft_strncpy  strncpy
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
#define ft_strrchr  strrchr
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
#define ft_strstr   strstr
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  /*                           file handling                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
#include <stdio.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
#define FT_FILE     FILE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
#define ft_fclose   fclose
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
#define ft_fopen    fopen
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
#define ft_fread    fread
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
#define ft_fseek    fseek
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
#define ft_ftell    ftell
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
#define ft_sprintf  sprintf
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
  /*                             sorting                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
#include <stdlib.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
#define ft_qsort  qsort
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /*                        memory allocation                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
#define ft_scalloc   calloc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
#define ft_sfree     free
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
#define ft_smalloc   malloc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
#define ft_srealloc  realloc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  /*                          miscellaneous                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
#define ft_atol   atol
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
#define ft_labs   labs
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  /*                         execution control                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
  /*                                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  /**********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
#include <setjmp.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
#define ft_jmp_buf     jmp_buf  /* note: this cannot be a typedef since */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
                                /*       jmp_buf is defined as a macro  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
                                /*       on certain platforms           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
#define ft_longjmp     longjmp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) )    /* same thing here */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
  /* the following is only used for debugging purposes, i.e., if */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
  /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
#include <stdarg.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
#endif /* __FTSTDLIB_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
/* END */