(root)/
fribidi-1.0.13/
lib/
fribidi-common.h
       1  /* FriBidi
       2   * fribidi-common.h - common include for library headers
       3   *
       4   * Author:
       5   *   Behdad Esfahbod, 2004
       6   *
       7   * Copyright (C) 2004 Sharif FarsiWeb, Inc.
       8   * 
       9   * This library is free software; you can redistribute it and/or
      10   * modify it under the terms of the GNU Lesser General Public
      11   * License as published by the Free Software Foundation; either
      12   * version 2.1 of the License, or (at your option) any later version.
      13   * 
      14   * This library is distributed in the hope that it will be useful,
      15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17   * Lesser General Public License for more details.
      18   * 
      19   * You should have received a copy of the GNU Lesser General Public License
      20   * along with this library, in a file named COPYING; if not, write to the
      21   * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
      22   * Boston, MA 02110-1301, USA
      23   * 
      24   * For licensing issues, contact <fribidi.license@gmail.com>.
      25   */
      26  #ifndef _FRIBIDI_COMMON_H
      27  #define _FRIBIDI_COMMON_H
      28  
      29  #ifdef DONT_HAVE_FRIBIDI_CONFIG_H
      30  # define FRIBIDI "fribidi"
      31  # define FRIBIDI_NAME "fribidi"
      32  # define FRIBIDI_VERSION "unknown"
      33  # define FRIBIDI_BUGREPORT "unknown"
      34  # define FRIBIDI_INTERFACE_VERSION_STRING "unknown"
      35  #else /* !DONT_HAVE_FRIBIDI_CONFIG_H */
      36  # include "fribidi-config.h"
      37  #endif /* !DONT_HAVE_FRIBIDI_CONFIG_H */
      38  
      39  #ifdef HAVE_FRIBIDI_CUSTOM_H
      40  # include <fribidi-custom.h>
      41  #endif /* HAVE_FRIBIDI_CUSTOM_H */
      42  
      43  
      44  /* FRIBIDI_ENTRY is a macro used to declare library entry points. */
      45  #ifndef FRIBIDI_ENTRY
      46  # if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__ICC)
      47  #  define FRIBIDI_ENTRY __attribute__ ((visibility("default")))
      48  # elif (defined(__SUNPRO_C)  || defined(__SUNPRO_CC))
      49  #  define FRIBIDI_ENTRY __global
      50  /* Windows is special and you cannot just define entry points unconditionally. */
      51  # elif defined(_WIN32) && ! defined(FRIBIDI_LIB_STATIC)
      52  #  ifdef FRIBIDI_BUILD
      53  #   define FRIBIDI_ENTRY __declspec(dllexport)
      54  #  else
      55  #   define FRIBIDI_ENTRY __declspec(dllimport)
      56  #  endif
      57  # else
      58  /* nothing else worked, give up and do nothing */
      59  #  define FRIBIDI_ENTRY
      60  # endif
      61  #endif
      62  
      63  #define FRIBIDI_EXTERN extern
      64  
      65  #ifdef __ICC
      66  #define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS               \
      67    _Pragma ("warning (push)")                            \
      68    _Pragma ("warning (disable:1478)")
      69  #define FRIBIDI_END_IGNORE_DEPRECATIONS			\
      70    _Pragma ("warning (pop)")
      71  #elif    __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
      72  #define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS		\
      73    _Pragma ("GCC diagnostic push")			\
      74    _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
      75  #define FRIBIDI_END_IGNORE_DEPRECATIONS			\
      76    _Pragma ("GCC diagnostic pop")
      77  #elif defined (_MSC_VER) && (_MSC_VER >= 1500)
      78  #define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS		\
      79    __pragma (warning (push))                             \
      80    __pragma (warning (disable : 4996))
      81  #define FRIBIDI_END_IGNORE_DEPRECATIONS			\
      82    __pragma (warning (pop))
      83  #elif defined (__clang__)
      84  #define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS               \
      85    _Pragma("clang diagnostic push")                      \
      86    _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
      87  #define FRIBIDI_END_IGNORE_DEPRECATIONS \
      88    _Pragma("clang diagnostic pop")
      89  #else
      90  #define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS
      91  #define FRIBIDI_END_IGNORE_DEPRECATIONS
      92  #endif
      93  
      94  #if (defined(__GNUC__) && (__GNUC__ > 2)) && ! defined(_WIN32)
      95  # define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__))
      96  # define FRIBIDI_GNUC_MALLOC      __attribute__((__malloc__))
      97  # define FRIBIDI_GNUC_HIDDEN      __attribute__((__visibility__ ("hidden")))
      98  # define FRIBIDI_GNUC_CONST       __attribute__((__const__))
      99  # define FRIBIDI_GNUC_DEPRECATED  __attribute__((__unused__))
     100  #else /* __GNUC__ */
     101  # define FRIBIDI_GNUC_WARN_UNUSED
     102  # define FRIBIDI_GNUC_MALLOC
     103  # define FRIBIDI_GNUC_HIDDEN
     104  # define FRIBIDI_GNUC_CONST
     105  # define FRIBIDI_GNUC_DEPRECATED
     106  #endif	/* __GNUC__ */
     107  
     108  /* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations,
     109   * so that C++ compilers don't mangle their names.  Use FRIBIDI_END_DECLS at
     110   * the end of C declarations. */
     111  #ifndef FRIBIDI_BEGIN_DECLS
     112  # ifdef __cplusplus
     113  #  define FRIBIDI_BEGIN_DECLS extern "C" {
     114  #  define FRIBIDI_END_DECLS }
     115  # else /* !__cplusplus */
     116  #  define FRIBIDI_BEGIN_DECLS	/* empty */
     117  #  define FRIBIDI_END_DECLS	/* empty */
     118  # endif	/* !__cplusplus */
     119  #endif /* !FRIBIDI_BEGIN_DECLS */
     120  
     121  
     122  
     123  
     124  /* fribidi_debug_status - get current debug state
     125   *
     126   */
     127  FRIBIDI_ENTRY int fribidi_debug_status (
     128    void
     129  );
     130  
     131  /* fribidi_set_debug - set debug state
     132   *
     133   */
     134  FRIBIDI_ENTRY int
     135  fribidi_set_debug (
     136    int state		/* new state to set */
     137  );
     138  
     139  
     140  
     141  
     142  
     143  
     144  
     145  
     146  
     147  
     148  
     149  #endif /* !_FRIBIDI_COMMON_H */
     150  /* Editor directions:
     151   * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
     152   */