* fontconfig/fontconfig/fcprivate.h
* Copyright © 2001 Keith Packard
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of the author(s) not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. The authors make no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
* I tried this with functions that took va_list* arguments
* but portability concerns made me change these functions
#define FcPatternVapBuild(result, orig, va) \
FcPattern *__p__ = (orig); \
__p__ = FcPatternCreate (); \
goto _FcPatternVapBuild_bail0; \
__o__ = va_arg (va, const char *); \
__v__.type = va_arg (va, int); \
goto _FcPatternVapBuild_bail1; \
__v__.u.i = va_arg (va, int); \
__v__.u.d = va_arg (va, double); \
__v__.u.s = va_arg (va, const FcChar8 *); \
__v__.u.b = va_arg (va, FcBool); \
__v__.u.m = va_arg (va, const FcMatrix *); \
__v__.u.c = va_arg (va, const FcCharSet *); \
__v__.u.f = va_arg (va, FT_Face); \
__v__.u.l = va_arg (va, const FcLangSet *); \
__v__.u.r = va_arg (va, const FcRange *); \
if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \
goto _FcPatternVapBuild_bail1; \
goto _FcPatternVapBuild_return; \
_FcPatternVapBuild_bail1: \
FcPatternDestroy (__p__); \
_FcPatternVapBuild_bail0: \
_FcPatternVapBuild_return: \
#define FcObjectSetVapBuild(__ret__, __first__, __va__) \
__os__ = FcObjectSetCreate (); \
goto _FcObjectSetVapBuild_bail0; \
if (!FcObjectSetAdd (__os__, __ob__)) \
goto _FcObjectSetVapBuild_bail1; \
__ob__ = va_arg (__va__, const char *); \
_FcObjectSetVapBuild_bail1: \
if (!__ret__ && __os__) \
FcObjectSetDestroy (__os__); \
_FcObjectSetVapBuild_bail0: \
#ifndef FC_ATTRIBUTE_VISIBILITY_HIDDEN
#define FC_ATTRIBUTE_VISIBILITY_HIDDEN __attribute((visibility("hidden")))
#ifndef FC_ATTRIBUTE_VISIBILITY_EXPORT
#define FC_ATTRIBUTE_VISIBILITY_EXPORT __attribute((visibility("default")))
#endif /* _FCPRIVATE_H_ */