summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/include/freetype/fttypes.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-08-14 11:13:36 +0200
committerLiang Qi <liang.qi@qt.io>2019-10-30 08:48:18 +0100
commit58f56950848bae9c90da3873090c7698e0128b12 (patch)
tree0b3127cd313aaf34d59355deed2e2acc5341eff3 /src/3rdparty/freetype/include/freetype/fttypes.h
parentc51ca1d1b232ce1d6eaa9c6dd85de127e825d3af (diff)
Update bundled Freetype to 2.10.1
[ChangeLog][Freetype] Upgraded bundled Freetype version to 2.10.1. Fixes: QTBUG-77466 Change-Id: I1de8b8b03e0ffd0b17eeafff1017df7c638c9279 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/3rdparty/freetype/include/freetype/fttypes.h')
-rw-r--r--src/3rdparty/freetype/include/freetype/fttypes.h851
1 files changed, 432 insertions, 419 deletions
diff --git a/src/3rdparty/freetype/include/freetype/fttypes.h b/src/3rdparty/freetype/include/freetype/fttypes.h
index f638c2e54f..10571505a5 100644
--- a/src/3rdparty/freetype/include/freetype/fttypes.h
+++ b/src/3rdparty/freetype/include/freetype/fttypes.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* fttypes.h */
-/* */
-/* FreeType simple types definitions (specification only). */
-/* */
-/* Copyright 1996-2018 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * fttypes.h
+ *
+ * FreeType simple types definitions (specification only).
+ *
+ * Copyright (C) 1996-2019 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.
+ *
+ */
#ifndef FTTYPES_H_
@@ -31,326 +31,327 @@
FT_BEGIN_HEADER
- /*************************************************************************/
- /* */
- /* <Section> */
- /* basic_types */
- /* */
- /* <Title> */
- /* Basic Data Types */
- /* */
- /* <Abstract> */
- /* The basic data types defined by the library. */
- /* */
- /* <Description> */
- /* This section contains the basic data types defined by FreeType~2, */
- /* ranging from simple scalar types to bitmap descriptors. More */
- /* font-specific structures are defined in a different section. */
- /* */
- /* <Order> */
- /* FT_Byte */
- /* FT_Bytes */
- /* FT_Char */
- /* FT_Int */
- /* FT_UInt */
- /* FT_Int16 */
- /* FT_UInt16 */
- /* FT_Int32 */
- /* FT_UInt32 */
- /* FT_Int64 */
- /* FT_UInt64 */
- /* FT_Short */
- /* FT_UShort */
- /* FT_Long */
- /* FT_ULong */
- /* FT_Bool */
- /* FT_Offset */
- /* FT_PtrDist */
- /* FT_String */
- /* FT_Tag */
- /* FT_Error */
- /* FT_Fixed */
- /* FT_Pointer */
- /* FT_Pos */
- /* FT_Vector */
- /* FT_BBox */
- /* FT_Matrix */
- /* FT_FWord */
- /* FT_UFWord */
- /* FT_F2Dot14 */
- /* FT_UnitVector */
- /* FT_F26Dot6 */
- /* FT_Data */
- /* */
- /* FT_MAKE_TAG */
- /* */
- /* FT_Generic */
- /* FT_Generic_Finalizer */
- /* */
- /* FT_Bitmap */
- /* FT_Pixel_Mode */
- /* FT_Palette_Mode */
- /* FT_Glyph_Format */
- /* FT_IMAGE_TAG */
- /* */
- /*************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Bool */
- /* */
- /* <Description> */
- /* A typedef of unsigned char, used for simple booleans. As usual, */
- /* values 1 and~0 represent true and false, respectively. */
- /* */
+ /**************************************************************************
+ *
+ * @section:
+ * basic_types
+ *
+ * @title:
+ * Basic Data Types
+ *
+ * @abstract:
+ * The basic data types defined by the library.
+ *
+ * @description:
+ * This section contains the basic data types defined by FreeType~2,
+ * ranging from simple scalar types to bitmap descriptors. More
+ * font-specific structures are defined in a different section.
+ *
+ * @order:
+ * FT_Byte
+ * FT_Bytes
+ * FT_Char
+ * FT_Int
+ * FT_UInt
+ * FT_Int16
+ * FT_UInt16
+ * FT_Int32
+ * FT_UInt32
+ * FT_Int64
+ * FT_UInt64
+ * FT_Short
+ * FT_UShort
+ * FT_Long
+ * FT_ULong
+ * FT_Bool
+ * FT_Offset
+ * FT_PtrDist
+ * FT_String
+ * FT_Tag
+ * FT_Error
+ * FT_Fixed
+ * FT_Pointer
+ * FT_Pos
+ * FT_Vector
+ * FT_BBox
+ * FT_Matrix
+ * FT_FWord
+ * FT_UFWord
+ * FT_F2Dot14
+ * FT_UnitVector
+ * FT_F26Dot6
+ * FT_Data
+ *
+ * FT_MAKE_TAG
+ *
+ * FT_Generic
+ * FT_Generic_Finalizer
+ *
+ * FT_Bitmap
+ * FT_Pixel_Mode
+ * FT_Palette_Mode
+ * FT_Glyph_Format
+ * FT_IMAGE_TAG
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Bool
+ *
+ * @description:
+ * A typedef of unsigned char, used for simple booleans. As usual,
+ * values 1 and~0 represent true and false, respectively.
+ */
typedef unsigned char FT_Bool;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_FWord */
- /* */
- /* <Description> */
- /* A signed 16-bit integer used to store a distance in original font */
- /* units. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_FWord
+ *
+ * @description:
+ * A signed 16-bit integer used to store a distance in original font
+ * units.
+ */
typedef signed short FT_FWord; /* distance in FUnits */
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_UFWord */
- /* */
- /* <Description> */
- /* An unsigned 16-bit integer used to store a distance in original */
- /* font units. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_UFWord
+ *
+ * @description:
+ * An unsigned 16-bit integer used to store a distance in original font
+ * units.
+ */
typedef unsigned short FT_UFWord; /* unsigned distance */
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Char */
- /* */
- /* <Description> */
- /* A simple typedef for the _signed_ char type. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Char
+ *
+ * @description:
+ * A simple typedef for the _signed_ char type.
+ */
typedef signed char FT_Char;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Byte */
- /* */
- /* <Description> */
- /* A simple typedef for the _unsigned_ char type. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Byte
+ *
+ * @description:
+ * A simple typedef for the _unsigned_ char type.
+ */
typedef unsigned char FT_Byte;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Bytes */
- /* */
- /* <Description> */
- /* A typedef for constant memory areas. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Bytes
+ *
+ * @description:
+ * A typedef for constant memory areas.
+ */
typedef const FT_Byte* FT_Bytes;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Tag */
- /* */
- /* <Description> */
- /* A typedef for 32-bit tags (as used in the SFNT format). */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Tag
+ *
+ * @description:
+ * A typedef for 32-bit tags (as used in the SFNT format).
+ */
typedef FT_UInt32 FT_Tag;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_String */
- /* */
- /* <Description> */
- /* A simple typedef for the char type, usually used for strings. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_String
+ *
+ * @description:
+ * A simple typedef for the char type, usually used for strings.
+ */
typedef char FT_String;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Short */
- /* */
- /* <Description> */
- /* A typedef for signed short. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Short
+ *
+ * @description:
+ * A typedef for signed short.
+ */
typedef signed short FT_Short;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_UShort */
- /* */
- /* <Description> */
- /* A typedef for unsigned short. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_UShort
+ *
+ * @description:
+ * A typedef for unsigned short.
+ */
typedef unsigned short FT_UShort;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Int */
- /* */
- /* <Description> */
- /* A typedef for the int type. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Int
+ *
+ * @description:
+ * A typedef for the int type.
+ */
typedef signed int FT_Int;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_UInt */
- /* */
- /* <Description> */
- /* A typedef for the unsigned int type. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_UInt
+ *
+ * @description:
+ * A typedef for the unsigned int type.
+ */
typedef unsigned int FT_UInt;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Long */
- /* */
- /* <Description> */
- /* A typedef for signed long. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Long
+ *
+ * @description:
+ * A typedef for signed long.
+ */
typedef signed long FT_Long;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_ULong */
- /* */
- /* <Description> */
- /* A typedef for unsigned long. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_ULong
+ *
+ * @description:
+ * A typedef for unsigned long.
+ */
typedef unsigned long FT_ULong;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_F2Dot14 */
- /* */
- /* <Description> */
- /* A signed 2.14 fixed-point type used for unit vectors. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_F2Dot14
+ *
+ * @description:
+ * A signed 2.14 fixed-point type used for unit vectors.
+ */
typedef signed short FT_F2Dot14;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_F26Dot6 */
- /* */
- /* <Description> */
- /* A signed 26.6 fixed-point type used for vectorial pixel */
- /* coordinates. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_F26Dot6
+ *
+ * @description:
+ * A signed 26.6 fixed-point type used for vectorial pixel coordinates.
+ */
typedef signed long FT_F26Dot6;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Fixed */
- /* */
- /* <Description> */
- /* This type is used to store 16.16 fixed-point values, like scaling */
- /* values or matrix coefficients. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Fixed
+ *
+ * @description:
+ * This type is used to store 16.16 fixed-point values, like scaling
+ * values or matrix coefficients.
+ */
typedef signed long FT_Fixed;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Error */
- /* */
- /* <Description> */
- /* The FreeType error code type. A value of~0 is always interpreted */
- /* as a successful operation. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Error
+ *
+ * @description:
+ * The FreeType error code type. A value of~0 is always interpreted as a
+ * successful operation.
+ */
typedef int FT_Error;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Pointer */
- /* */
- /* <Description> */
- /* A simple typedef for a typeless pointer. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Pointer
+ *
+ * @description:
+ * A simple typedef for a typeless pointer.
+ */
typedef void* FT_Pointer;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_Offset */
- /* */
- /* <Description> */
- /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */
- /* _unsigned_ integer type used to express a file size or position, */
- /* or a memory block size. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Offset
+ *
+ * @description:
+ * This is equivalent to the ANSI~C `size_t` type, i.e., the largest
+ * _unsigned_ integer type used to express a file size or position, or a
+ * memory block size.
+ */
typedef size_t FT_Offset;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_PtrDist */
- /* */
- /* <Description> */
- /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */
- /* largest _signed_ integer type used to express the distance */
- /* between two pointers. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_PtrDist
+ *
+ * @description:
+ * This is equivalent to the ANSI~C `ptrdiff_t` type, i.e., the largest
+ * _signed_ integer type used to express the distance between two
+ * pointers.
+ */
typedef ft_ptrdiff_t FT_PtrDist;
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_UnitVector */
- /* */
- /* <Description> */
- /* A simple structure used to store a 2D vector unit vector. Uses */
- /* FT_F2Dot14 types. */
- /* */
- /* <Fields> */
- /* x :: Horizontal coordinate. */
- /* */
- /* y :: Vertical coordinate. */
- /* */
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_UnitVector
+ *
+ * @description:
+ * A simple structure used to store a 2D vector unit vector. Uses
+ * FT_F2Dot14 types.
+ *
+ * @fields:
+ * x ::
+ * Horizontal coordinate.
+ *
+ * y ::
+ * Vertical coordinate.
+ */
typedef struct FT_UnitVector_
{
FT_F2Dot14 x;
@@ -359,29 +360,33 @@ FT_BEGIN_HEADER
} FT_UnitVector;
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_Matrix */
- /* */
- /* <Description> */
- /* A simple structure used to store a 2x2 matrix. Coefficients are */
- /* in 16.16 fixed-point format. The computation performed is: */
- /* */
- /* { */
- /* x' = x*xx + y*xy */
- /* y' = x*yx + y*yy */
- /* } */
- /* */
- /* <Fields> */
- /* xx :: Matrix coefficient. */
- /* */
- /* xy :: Matrix coefficient. */
- /* */
- /* yx :: Matrix coefficient. */
- /* */
- /* yy :: Matrix coefficient. */
- /* */
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Matrix
+ *
+ * @description:
+ * A simple structure used to store a 2x2 matrix. Coefficients are in
+ * 16.16 fixed-point format. The computation performed is:
+ *
+ * ```
+ * x' = x*xx + y*xy
+ * y' = x*yx + y*yy
+ * ```
+ *
+ * @fields:
+ * xx ::
+ * Matrix coefficient.
+ *
+ * xy ::
+ * Matrix coefficient.
+ *
+ * yx ::
+ * Matrix coefficient.
+ *
+ * yy ::
+ * Matrix coefficient.
+ */
typedef struct FT_Matrix_
{
FT_Fixed xx, xy;
@@ -390,19 +395,21 @@ FT_BEGIN_HEADER
} FT_Matrix;
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_Data */
- /* */
- /* <Description> */
- /* Read-only binary data represented as a pointer and a length. */
- /* */
- /* <Fields> */
- /* pointer :: The data. */
- /* */
- /* length :: The length of the data in bytes. */
- /* */
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Data
+ *
+ * @description:
+ * Read-only binary data represented as a pointer and a length.
+ *
+ * @fields:
+ * pointer ::
+ * The data.
+ *
+ * length ::
+ * The length of the data in bytes.
+ */
typedef struct FT_Data_
{
const FT_Byte* pointer;
@@ -411,51 +418,52 @@ FT_BEGIN_HEADER
} FT_Data;
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* FT_Generic_Finalizer */
- /* */
- /* <Description> */
- /* Describe a function used to destroy the `client' data of any */
- /* FreeType object. See the description of the @FT_Generic type for */
- /* details of usage. */
- /* */
- /* <Input> */
- /* The address of the FreeType object that is under finalization. */
- /* Its client data is accessed through its `generic' field. */
- /* */
+ /**************************************************************************
+ *
+ * @functype:
+ * FT_Generic_Finalizer
+ *
+ * @description:
+ * Describe a function used to destroy the 'client' data of any FreeType
+ * object. See the description of the @FT_Generic type for details of
+ * usage.
+ *
+ * @input:
+ * The address of the FreeType object that is under finalization. Its
+ * client data is accessed through its `generic` field.
+ */
typedef void (*FT_Generic_Finalizer)( void* object );
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_Generic */
- /* */
- /* <Description> */
- /* Client applications often need to associate their own data to a */
- /* variety of FreeType core objects. For example, a text layout API */
- /* might want to associate a glyph cache to a given size object. */
- /* */
- /* Some FreeType object contains a `generic' field, of type */
- /* FT_Generic, which usage is left to client applications and font */
- /* servers. */
- /* */
- /* It can be used to store a pointer to client-specific data, as well */
- /* as the address of a `finalizer' function, which will be called by */
- /* FreeType when the object is destroyed (for example, the previous */
- /* client example would put the address of the glyph cache destructor */
- /* in the `finalizer' field). */
- /* */
- /* <Fields> */
- /* data :: A typeless pointer to any client-specified data. This */
- /* field is completely ignored by the FreeType library. */
- /* */
- /* finalizer :: A pointer to a `generic finalizer' function, which */
- /* will be called when the object is destroyed. If this */
- /* field is set to NULL, no code will be called. */
- /* */
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Generic
+ *
+ * @description:
+ * Client applications often need to associate their own data to a
+ * variety of FreeType core objects. For example, a text layout API
+ * might want to associate a glyph cache to a given size object.
+ *
+ * Some FreeType object contains a `generic` field, of type `FT_Generic`,
+ * which usage is left to client applications and font servers.
+ *
+ * It can be used to store a pointer to client-specific data, as well as
+ * the address of a 'finalizer' function, which will be called by
+ * FreeType when the object is destroyed (for example, the previous
+ * client example would put the address of the glyph cache destructor in
+ * the `finalizer` field).
+ *
+ * @fields:
+ * data ::
+ * A typeless pointer to any client-specified data. This field is
+ * completely ignored by the FreeType library.
+ *
+ * finalizer ::
+ * A pointer to a 'generic finalizer' function, which will be called
+ * when the object is destroyed. If this field is set to `NULL`, no
+ * code will be called.
+ */
typedef struct FT_Generic_
{
void* data;
@@ -464,19 +472,19 @@ FT_BEGIN_HEADER
} FT_Generic;
- /*************************************************************************/
- /* */
- /* <Macro> */
- /* FT_MAKE_TAG */
- /* */
- /* <Description> */
- /* This macro converts four-letter tags that are used to label */
- /* TrueType tables into an unsigned long, to be used within FreeType. */
- /* */
- /* <Note> */
- /* The produced values *must* be 32-bit integers. Don't redefine */
- /* this macro. */
- /* */
+ /**************************************************************************
+ *
+ * @macro:
+ * FT_MAKE_TAG
+ *
+ * @description:
+ * This macro converts four-letter tags that are used to label TrueType
+ * tables into an unsigned long, to be used within FreeType.
+ *
+ * @note:
+ * The produced values **must** be 32-bit integers. Don't redefine this
+ * macro.
+ */
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
(FT_Tag) \
( ( (FT_ULong)_x1 << 24 ) | \
@@ -494,53 +502,56 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* <Section> */
- /* list_processing */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * @section:
+ * list_processing
+ *
+ */
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_ListNode */
- /* */
- /* <Description> */
- /* Many elements and objects in FreeType are listed through an */
- /* @FT_List record (see @FT_ListRec). As its name suggests, an */
- /* FT_ListNode is a handle to a single list element. */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_ListNode
+ *
+ * @description:
+ * Many elements and objects in FreeType are listed through an @FT_List
+ * record (see @FT_ListRec). As its name suggests, an FT_ListNode is a
+ * handle to a single list element.
+ */
typedef struct FT_ListNodeRec_* FT_ListNode;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FT_List */
- /* */
- /* <Description> */
- /* A handle to a list record (see @FT_ListRec). */
- /* */
+ /**************************************************************************
+ *
+ * @type:
+ * FT_List
+ *
+ * @description:
+ * A handle to a list record (see @FT_ListRec).
+ */
typedef struct FT_ListRec_* FT_List;
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_ListNodeRec */
- /* */
- /* <Description> */
- /* A structure used to hold a single list element. */
- /* */
- /* <Fields> */
- /* prev :: The previous element in the list. NULL if first. */
- /* */
- /* next :: The next element in the list. NULL if last. */
- /* */
- /* data :: A typeless pointer to the listed object. */
- /* */
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_ListNodeRec
+ *
+ * @description:
+ * A structure used to hold a single list element.
+ *
+ * @fields:
+ * prev ::
+ * The previous element in the list. `NULL` if first.
+ *
+ * next ::
+ * The next element in the list. `NULL` if last.
+ *
+ * data ::
+ * A typeless pointer to the listed object.
+ */
typedef struct FT_ListNodeRec_
{
FT_ListNode prev;
@@ -550,20 +561,22 @@ FT_BEGIN_HEADER
} FT_ListNodeRec;
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FT_ListRec */
- /* */
- /* <Description> */
- /* A structure used to hold a simple doubly-linked list. These are */
- /* used in many parts of FreeType. */
- /* */
- /* <Fields> */
- /* head :: The head (first element) of doubly-linked list. */
- /* */
- /* tail :: The tail (last element) of doubly-linked list. */
- /* */
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_ListRec
+ *
+ * @description:
+ * A structure used to hold a simple doubly-linked list. These are used
+ * in many parts of FreeType.
+ *
+ * @fields:
+ * head ::
+ * The head (first element) of doubly-linked list.
+ *
+ * tail ::
+ * The tail (last element) of doubly-linked list.
+ */
typedef struct FT_ListRec_
{
FT_ListNode head;
@@ -575,13 +588,13 @@ FT_BEGIN_HEADER
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
-#define FT_BOOL( x ) ( (FT_Bool)( x ) )
+#define FT_BOOL( x ) ( (FT_Bool)( (x) != 0 ) )
/* concatenate C tokens */
#define FT_ERR_XCAT( x, y ) x ## y
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
- /* see `ftmoderr.h' for descriptions of the following macros */
+ /* see `ftmoderr.h` for descriptions of the following macros */
#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )