godot/thirdparty/freetype/src/psaux/afmparse.c

/****************************************************************************
 *
 * afmparse.c
 *
 *   AFM parser (body).
 *
 * Copyright (C) 2006-2023 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.
 *
 */

#include <freetype/freetype.h>
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/psaux.h>

#ifndef T1_CONFIG_OPTION_NO_AFM

#include "afmparse.h"
#include "psconv.h"

#include "psauxerr.h"


  /**************************************************************************
   *
   * The macro FT_COMPONENT is used in trace mode.  It is an implicit
   * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
   * messages during execution.
   */
#undef  FT_COMPONENT
#define FT_COMPONENT


  /**************************************************************************
   *
   * AFM_Stream
   *
   * The use of AFM_Stream is largely inspired by parseAFM.[ch] from t1lib.
   *
   */

  enum
  {};


  AFM_StreamRec;


#ifndef EOF
#define EOF
#endif


  /* this works because empty lines are ignored */
#define AFM_IS_NEWLINE( ch )

#define AFM_IS_EOF( ch )
#define AFM_IS_SPACE( ch )

  /* column separator; there is no `column' in the spec actually */
#define AFM_IS_SEP( ch )

#define AFM_GETC()

#define AFM_STREAM_KEY_BEGIN( stream )

#define AFM_STREAM_KEY_LEN( stream, key )

#define AFM_STATUS_EOC( stream )

#define AFM_STATUS_EOL( stream )

#define AFM_STATUS_EOF( stream )


  static int
  afm_stream_skip_spaces( AFM_Stream  stream )
  {}


  /* read a key or value in current column */
  static char*
  afm_stream_read_one( AFM_Stream  stream )
  {}


  /* read a string (i.e., read to EOL) */
  static char*
  afm_stream_read_string( AFM_Stream  stream )
  {}


  /**************************************************************************
   *
   * AFM_Parser
   *
   */

  /* all keys defined in Ch. 7-10 of 5004.AFM_Spec.pdf */
  AFM_Token;


  static const char*  const afm_key_table[N_AFM_TOKENS] =;


  /*
   * `afm_parser_read_vals' and `afm_parser_next_key' provide
   * high-level operations to an AFM_Stream.  The rest of the
   * parser functions should use them without accessing the
   * AFM_Stream directly.
   */

  FT_LOCAL_DEF( FT_Int )
  afm_parser_read_vals( AFM_Parser  parser,
                        AFM_Value   vals,
                        FT_Int      n )
  {}


  FT_LOCAL_DEF( char* )
  afm_parser_next_key( AFM_Parser  parser,
                       FT_Bool     line,
                       FT_Offset*  len )
  {}


  static AFM_Token
  afm_tokenize( const char*  key,
                FT_Offset    len )
  {}


  FT_LOCAL_DEF( FT_Error )
  afm_parser_init( AFM_Parser  parser,
                   FT_Memory   memory,
                   FT_Byte*    base,
                   FT_Byte*    limit )
  {}


  FT_LOCAL_DEF( void )
  afm_parser_done( AFM_Parser  parser )
  {}


  static FT_Error
  afm_parser_read_int( AFM_Parser  parser,
                       FT_Int*     aint )
  {}


  static FT_Error
  afm_parse_track_kern( AFM_Parser  parser )
  {}


#undef  KERN_INDEX
#define KERN_INDEX( g1, g2 )


  /* compare two kerning pairs */
  FT_COMPARE_DEF( int )
  afm_compare_kern_pairs( const void*  a,
                          const void*  b )
  {}


  static FT_Error
  afm_parse_kern_pairs( AFM_Parser  parser )
  {}


  static FT_Error
  afm_parse_kern_data( AFM_Parser  parser )
  {}


  static FT_Error
  afm_parser_skip_section( AFM_Parser  parser,
                           FT_Int      n,
                           AFM_Token   end_section )
  {}


  FT_LOCAL_DEF( FT_Error )
  afm_parser_parse( AFM_Parser  parser )
  {}

#else /* T1_CONFIG_OPTION_NO_AFM */

  /* ANSI C doesn't like empty source files */
  typedef int  afm_parse_dummy_;

#endif /* T1_CONFIG_OPTION_NO_AFM */


/* END */