Edit

kc3-lang/freetype/src/type1/t1parse.h

Branch :

  • Show log

    Commit

  • Author : Werner Lemberg
    Date : 2015-03-01 19:27:09
    Hash : 851e8151
    Message : Various compiler warning fixes for `make multi'. * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, af_latin_hint_edges), src/autofit/aflatin2.c (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare as `static'. * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): Removed. Unused. * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. * src/cff/cf2intrp.c: Include `cf2intrp.h'. * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): Removed. Unused. * src/raster/ftraster.c (Render_Glyph): Declare as `static'. * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. * src/truetype/ttsubpix.c (is_member_of_family_class, is_member_of_style_class): Declare as `static'. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare as `static'. * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as `static'. (T1_FIELD_COUNT): Removed. Unused. * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. * src/type42/t42parse.c (T1_Done_Table): Removed. Unused.

  • src/type1/t1parse.h
  • /***************************************************************************/
    /*                                                                         */
    /*  t1parse.h                                                              */
    /*                                                                         */
    /*    Type 1 parser (specification).                                       */
    /*                                                                         */
    /*  Copyright 1996-2015 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 __T1PARSE_H__
    #define __T1PARSE_H__
    
    
    #include <ft2build.h>
    #include FT_INTERNAL_TYPE1_TYPES_H
    #include FT_INTERNAL_STREAM_H
    
    
    FT_BEGIN_HEADER
    
    
      /*************************************************************************/
      /*                                                                       */
      /* <Struct>                                                              */
      /*    T1_ParserRec                                                       */
      /*                                                                       */
      /* <Description>                                                         */
      /*    A PS_ParserRec is an object used to parse a Type 1 fonts very      */
      /*    quickly.                                                           */
      /*                                                                       */
      /* <Fields>                                                              */
      /*    root         :: The root parser.                                   */
      /*                                                                       */
      /*    stream       :: The current input stream.                          */
      /*                                                                       */
      /*    base_dict    :: A pointer to the top-level dictionary.             */
      /*                                                                       */
      /*    base_len     :: The length in bytes of the top dictionary.         */
      /*                                                                       */
      /*    private_dict :: A pointer to the private dictionary.               */
      /*                                                                       */
      /*    private_len  :: The length in bytes of the private dictionary.     */
      /*                                                                       */
      /*    in_pfb       :: A boolean.  Indicates that we are handling a PFB   */
      /*                    file.                                              */
      /*                                                                       */
      /*    in_memory    :: A boolean.  Indicates a memory-based stream.       */
      /*                                                                       */
      /*    single_block :: A boolean.  Indicates that the private dictionary  */
      /*                    is stored in lieu of the base dictionary.          */
      /*                                                                       */
      typedef struct  T1_ParserRec_
      {
        PS_ParserRec  root;
        FT_Stream     stream;
    
        FT_Byte*      base_dict;
        FT_ULong      base_len;
    
        FT_Byte*      private_dict;
        FT_ULong      private_len;
    
        FT_Bool       in_pfb;
        FT_Bool       in_memory;
        FT_Bool       single_block;
    
      } T1_ParserRec, *T1_Parser;
    
    
    #define T1_Add_Table( p, i, o, l )  (p)->funcs.add( (p), i, o, l )
    #define T1_Release_Table( p )          \
              do                           \
              {                            \
                if ( (p)->funcs.release )  \
                  (p)->funcs.release( p ); \
              } while ( 0 )
    
    
    #define T1_Skip_Spaces( p )    (p)->root.funcs.skip_spaces( &(p)->root )
    #define T1_Skip_PS_Token( p )  (p)->root.funcs.skip_PS_token( &(p)->root )
    
    #define T1_ToInt( p )       (p)->root.funcs.to_int( &(p)->root )
    #define T1_ToFixed( p, t )  (p)->root.funcs.to_fixed( &(p)->root, t )
    
    #define T1_ToCoordArray( p, m, c )                           \
              (p)->root.funcs.to_coord_array( &(p)->root, m, c )
    #define T1_ToFixedArray( p, m, f, t )                           \
              (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
    #define T1_ToToken( p, t )                          \
              (p)->root.funcs.to_token( &(p)->root, t )
    #define T1_ToTokenArray( p, t, m, c )                           \
              (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
    
    #define T1_Load_Field( p, f, o, m, pf )                         \
              (p)->root.funcs.load_field( &(p)->root, f, o, m, pf )
    
    #define T1_Load_Field_Table( p, f, o, m, pf )                         \
              (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )
    
    
      FT_LOCAL( FT_Error )
      T1_New_Parser( T1_Parser      parser,
                     FT_Stream      stream,
                     FT_Memory      memory,
                     PSAux_Service  psaux );
    
      FT_LOCAL( FT_Error )
      T1_Get_Private_Dict( T1_Parser      parser,
                           PSAux_Service  psaux );
    
      FT_LOCAL( void )
      T1_Finalize_Parser( T1_Parser  parser );
    
    
    FT_END_HEADER
    
    #endif /* __T1PARSE_H__ */
    
    
    /* END */