summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/include/freetype/internal/ftrfork.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/include/freetype/internal/ftrfork.h')
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftrfork.h305
1 files changed, 142 insertions, 163 deletions
diff --git a/src/3rdparty/freetype/include/freetype/internal/ftrfork.h b/src/3rdparty/freetype/include/freetype/internal/ftrfork.h
index 1aca48a0e7..75b3e531bb 100644
--- a/src/3rdparty/freetype/include/freetype/internal/ftrfork.h
+++ b/src/3rdparty/freetype/include/freetype/internal/ftrfork.h
@@ -1,24 +1,24 @@
-/***************************************************************************/
-/* */
-/* ftrfork.h */
-/* */
-/* Embedded resource forks accessor (specification). */
-/* */
-/* Copyright 2004-2018 by */
-/* Masatake YAMATO and Redhat K.K. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
-
-/***************************************************************************/
-/* Development of the code in this file is support of */
-/* Information-technology Promotion Agency, Japan. */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * ftrfork.h
+ *
+ * Embedded resource forks accessor (specification).
+ *
+ * Copyright (C) 2004-2019 by
+ * Masatake YAMATO and Redhat K.K.
+ *
+ * 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.
+ *
+ */
+
+/****************************************************************************
+ * Development of the code in this file is support of
+ * Information-technology Promotion Agency, Japan.
+ */
#ifndef FTRFORK_H_
@@ -72,85 +72,65 @@ FT_BEGIN_HEADER
} FT_RFork_Rule;
/* For fast translation between rule index and rule type,
- * the macros FT_RFORK_xxx should be kept consistent with
- * the raccess_guess_funcs table
+ * the macros FT_RFORK_xxx should be kept consistent with the
+ * raccess_guess_funcs table
*/
typedef struct ft_raccess_guess_rec_ {
ft_raccess_guess_func func;
FT_RFork_Rule type;
} ft_raccess_guess_rec;
-#ifndef FT_CONFIG_OPTION_PIC
- /* this array is a storage in non-PIC mode, so ; is needed in END */
#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
static const type name[] = {
#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
{ raccess_guess_ ## func_suffix, \
FT_RFork_Rule_ ## type_suffix },
+ /* this array is a storage, thus a final `;' is needed */
#define CONST_FT_RFORK_RULE_ARRAY_END };
-#else /* FT_CONFIG_OPTION_PIC */
-
- /* this array is a function in PIC mode, so no ; is needed in END */
-#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
- void \
- FT_Init_Table_ ## name( type* storage ) \
- { \
- type* local = storage; \
- \
- \
- int i = 0;
-#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
- local[i].func = raccess_guess_ ## func_suffix; \
- local[i].type = FT_RFork_Rule_ ## type_suffix; \
- i++;
-#define CONST_FT_RFORK_RULE_ARRAY_END }
-
-#endif /* FT_CONFIG_OPTION_PIC */
-
#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Raccess_Guess */
- /* */
- /* <Description> */
- /* Guess a file name and offset where the actual resource fork is */
- /* stored. The macro FT_RACCESS_N_RULES holds the number of */
- /* guessing rules; the guessed result for the Nth rule is */
- /* represented as a triplet: a new file name (new_names[N]), a file */
- /* offset (offsets[N]), and an error code (errors[N]). */
- /* */
- /* <Input> */
- /* library :: */
- /* A FreeType library instance. */
- /* */
- /* stream :: */
- /* A file stream containing the resource fork. */
- /* */
- /* base_name :: */
- /* The (base) file name of the resource fork used for some */
- /* guessing rules. */
- /* */
- /* <Output> */
- /* new_names :: */
- /* An array of guessed file names in which the resource forks may */
- /* exist. If `new_names[N]' is NULL, the guessed file name is */
- /* equal to `base_name'. */
- /* */
- /* offsets :: */
- /* An array of guessed file offsets. `offsets[N]' holds the file */
- /* offset of the possible start of the resource fork in file */
- /* `new_names[N]'. */
- /* */
- /* errors :: */
- /* An array of FreeType error codes. `errors[N]' is the error */
- /* code of Nth guessing rule function. If `errors[N]' is not */
- /* FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless. */
- /* */
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Raccess_Guess
+ *
+ * @description:
+ * Guess a file name and offset where the actual resource fork is stored.
+ * The macro FT_RACCESS_N_RULES holds the number of guessing rules; the
+ * guessed result for the Nth rule is represented as a triplet: a new
+ * file name (new_names[N]), a file offset (offsets[N]), and an error
+ * code (errors[N]).
+ *
+ * @input:
+ * library ::
+ * A FreeType library instance.
+ *
+ * stream ::
+ * A file stream containing the resource fork.
+ *
+ * base_name ::
+ * The (base) file name of the resource fork used for some guessing
+ * rules.
+ *
+ * @output:
+ * new_names ::
+ * An array of guessed file names in which the resource forks may
+ * exist. If 'new_names[N]' is `NULL`, the guessed file name is equal
+ * to `base_name`.
+ *
+ * offsets ::
+ * An array of guessed file offsets. 'offsets[N]' holds the file
+ * offset of the possible start of the resource fork in file
+ * 'new_names[N]'.
+ *
+ * errors ::
+ * An array of FreeType error codes. 'errors[N]' is the error code of
+ * Nth guessing rule function. If 'errors[N]' is not FT_Err_Ok,
+ * 'new_names[N]' and 'offsets[N]' are meaningless.
+ */
FT_BASE( void )
FT_Raccess_Guess( FT_Library library,
FT_Stream stream,
@@ -160,37 +140,37 @@ FT_BEGIN_HEADER
FT_Error* errors );
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Raccess_Get_HeaderInfo */
- /* */
- /* <Description> */
- /* Get the information from the header of resource fork. The */
- /* information includes the file offset where the resource map */
- /* starts, and the file offset where the resource data starts. */
- /* `FT_Raccess_Get_DataOffsets' requires these two data. */
- /* */
- /* <Input> */
- /* library :: */
- /* A FreeType library instance. */
- /* */
- /* stream :: */
- /* A file stream containing the resource fork. */
- /* */
- /* rfork_offset :: */
- /* The file offset where the resource fork starts. */
- /* */
- /* <Output> */
- /* map_offset :: */
- /* The file offset where the resource map starts. */
- /* */
- /* rdata_pos :: */
- /* The file offset where the resource data starts. */
- /* */
- /* <Return> */
- /* FreeType error code. FT_Err_Ok means success. */
- /* */
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Raccess_Get_HeaderInfo
+ *
+ * @description:
+ * Get the information from the header of resource fork. The information
+ * includes the file offset where the resource map starts, and the file
+ * offset where the resource data starts. `FT_Raccess_Get_DataOffsets`
+ * requires these two data.
+ *
+ * @input:
+ * library ::
+ * A FreeType library instance.
+ *
+ * stream ::
+ * A file stream containing the resource fork.
+ *
+ * rfork_offset ::
+ * The file offset where the resource fork starts.
+ *
+ * @output:
+ * map_offset ::
+ * The file offset where the resource map starts.
+ *
+ * rdata_pos ::
+ * The file offset where the resource data starts.
+ *
+ * @return:
+ * FreeType error code. FT_Err_Ok means success.
+ */
FT_BASE( FT_Error )
FT_Raccess_Get_HeaderInfo( FT_Library library,
FT_Stream stream,
@@ -199,55 +179,54 @@ FT_BEGIN_HEADER
FT_Long *rdata_pos );
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Raccess_Get_DataOffsets */
- /* */
- /* <Description> */
- /* Get the data offsets for a tag in a resource fork. Offsets are */
- /* stored in an array because, in some cases, resources in a resource */
- /* fork have the same tag. */
- /* */
- /* <Input> */
- /* library :: */
- /* A FreeType library instance. */
- /* */
- /* stream :: */
- /* A file stream containing the resource fork. */
- /* */
- /* map_offset :: */
- /* The file offset where the resource map starts. */
- /* */
- /* rdata_pos :: */
- /* The file offset where the resource data starts. */
- /* */
- /* tag :: */
- /* The resource tag. */
- /* */
- /* sort_by_res_id :: */
- /* A Boolean to sort the fragmented resource by their ids. */
- /* The fragmented resources for `POST' resource should be sorted */
- /* to restore Type1 font properly. For `sfnt' resources, sorting */
- /* may induce a different order of the faces in comparison to that */
- /* by QuickDraw API. */
- /* */
- /* <Output> */
- /* offsets :: */
- /* The stream offsets for the resource data specified by `tag'. */
- /* This array is allocated by the function, so you have to call */
- /* @ft_mem_free after use. */
- /* */
- /* count :: */
- /* The length of offsets array. */
- /* */
- /* <Return> */
- /* FreeType error code. FT_Err_Ok means success. */
- /* */
- /* <Note> */
- /* Normally you should use `FT_Raccess_Get_HeaderInfo' to get the */
- /* value for `map_offset' and `rdata_pos'. */
- /* */
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Raccess_Get_DataOffsets
+ *
+ * @description:
+ * Get the data offsets for a tag in a resource fork. Offsets are stored
+ * in an array because, in some cases, resources in a resource fork have
+ * the same tag.
+ *
+ * @input:
+ * library ::
+ * A FreeType library instance.
+ *
+ * stream ::
+ * A file stream containing the resource fork.
+ *
+ * map_offset ::
+ * The file offset where the resource map starts.
+ *
+ * rdata_pos ::
+ * The file offset where the resource data starts.
+ *
+ * tag ::
+ * The resource tag.
+ *
+ * sort_by_res_id ::
+ * A Boolean to sort the fragmented resource by their ids. The
+ * fragmented resources for 'POST' resource should be sorted to restore
+ * Type1 font properly. For 'sfnt' resources, sorting may induce a
+ * different order of the faces in comparison to that by QuickDraw API.
+ *
+ * @output:
+ * offsets ::
+ * The stream offsets for the resource data specified by 'tag'. This
+ * array is allocated by the function, so you have to call @ft_mem_free
+ * after use.
+ *
+ * count ::
+ * The length of offsets array.
+ *
+ * @return:
+ * FreeType error code. FT_Err_Ok means success.
+ *
+ * @note:
+ * Normally you should use `FT_Raccess_Get_HeaderInfo` to get the value
+ * for `map_offset` and `rdata_pos`.
+ */
FT_BASE( FT_Error )
FT_Raccess_Get_DataOffsets( FT_Library library,
FT_Stream stream,