modules/freetype2/include/ftlzw.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /***************************************************************************/
     2 /*                                                                         */
     3 /*  ftlzw.h                                                                */
     4 /*                                                                         */
     5 /*    LZW-compressed stream support.                                       */
     6 /*                                                                         */
     7 /*  Copyright 2004, 2006 by                                                */
     8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
     9 /*                                                                         */
    10 /*  This file is part of the FreeType project, and may only be used,       */
    11 /*  modified, and distributed under the terms of the FreeType project      */
    12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    13 /*  this file you indicate that you have read the license and              */
    14 /*  understand and accept it fully.                                        */
    15 /*                                                                         */
    16 /***************************************************************************/
    19 #ifndef __FTLZW_H__
    20 #define __FTLZW_H__
    22 #include <ft2build.h>
    23 #include FT_FREETYPE_H
    25 #ifdef FREETYPE_H
    26 #error "freetype.h of FreeType 1 has been loaded!"
    27 #error "Please fix the directory search order for header files"
    28 #error "so that freetype.h of FreeType 2 is found first."
    29 #endif
    32 FT_BEGIN_HEADER
    34   /*************************************************************************/
    35   /*                                                                       */
    36   /* <Section>                                                             */
    37   /*    lzw                                                                */
    38   /*                                                                       */
    39   /* <Title>                                                               */
    40   /*    LZW Streams                                                        */
    41   /*                                                                       */
    42   /* <Abstract>                                                            */
    43   /*    Using LZW-compressed font files.                                   */
    44   /*                                                                       */
    45   /* <Description>                                                         */
    46   /*    This section contains the declaration of LZW-specific functions.   */
    47   /*                                                                       */
    48   /*************************************************************************/
    50  /************************************************************************
    51   *
    52   * @function:
    53   *   FT_Stream_OpenLZW
    54   *
    55   * @description:
    56   *   Open a new stream to parse LZW-compressed font files.  This is
    57   *   mainly used to support the compressed `*.pcf.Z' fonts that come
    58   *   with XFree86.
    59   *
    60   * @input:
    61   *   stream :: The target embedding stream.
    62   *
    63   *   source :: The source stream.
    64   *
    65   * @return:
    66   *   FreeType error code.  0~means success.
    67   *
    68   * @note:
    69   *   The source stream must be opened _before_ calling this function.
    70   *
    71   *   Calling the internal function `FT_Stream_Close' on the new stream will
    72   *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
    73   *   objects will be released to the heap.
    74   *
    75   *   The stream implementation is very basic and resets the decompression
    76   *   process each time seeking backwards is needed within the stream
    77   *
    78   *   In certain builds of the library, LZW compression recognition is
    79   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
    80   *   This means that if no font driver is capable of handling the raw
    81   *   compressed file, the library will try to open a LZW stream from it
    82   *   and re-open the face with it.
    83   *
    84   *   This function may return `FT_Err_Unimplemented_Feature' if your build
    85   *   of FreeType was not compiled with LZW support.
    86   */
    87   FT_EXPORT( FT_Error )
    88   FT_Stream_OpenLZW( FT_Stream  stream,
    89                      FT_Stream  source );
    91  /* */
    94 FT_END_HEADER
    96 #endif /* __FTLZW_H__ */
    99 /* END */

mercurial