亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ftgzip.c

?? 智能設備中PDF閱讀器的源碼!用于windows mobile2003或者WM5以上
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************/
/*                                                                         */
/*  ftgzip.c                                                               */
/*                                                                         */
/*    FreeType support for .gz compressed files.                           */
/*                                                                         */
/*  This optional component relies on zlib.  It should mainly be used to   */
/*  parse compressed PCF fonts, as found with many X11 server              */
/*  distributions.                                                         */
/*                                                                         */
/*  Copyright 2002, 2003, 2004, 2005, 2006 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 <ft2build.h>
#include FT_INTERNAL_MEMORY_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_DEBUG_H
#include FT_GZIP_H
#include <string.h>


#include FT_MODULE_ERRORS_H

#undef __FTERRORS_H__

#define FT_ERR_PREFIX  Gzip_Err_
#define FT_ERR_BASE    FT_Mod_Err_Gzip

#include FT_ERRORS_H


#ifdef FT_CONFIG_OPTION_USE_ZLIB

#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB

#include <zlib.h>

#else /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */

 /* In this case, we include our own modified sources of the ZLib    */
 /* within the "ftgzip" component.  The modifications were necessary */
 /* to #include all files without conflicts, as well as preventing   */
 /* the definition of "extern" functions that may cause linking      */
 /* conflicts when a program is linked with both FreeType and the    */
 /* original ZLib.                                                   */

#define NO_DUMMY_DECL
#define MY_ZCALLOC

#include "zlib.h"

#undef  SLOW
#define SLOW  1  /* we can't use asm-optimized sources here! */

  /* Urgh.  `inflate_mask' must not be declared twice -- C++ doesn't like
     this.  We temporarily disable it and load all necessary header files. */
#define NO_INFLATE_MASK
#include "zutil.h"
#include "inftrees.h"
#include "infblock.h"
#include "infcodes.h"
#include "infutil.h"
#undef  NO_INFLATE_MASK

  /* infutil.c must be included before infcodes.c */
#include "zutil.c"
#include "inftrees.c"
#include "infutil.c"
#include "infcodes.c"
#include "infblock.c"
#include "inflate.c"
#include "adler32.c"

#endif /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */


/***************************************************************************/
/***************************************************************************/
/*****                                                                 *****/
/*****            Z L I B   M E M O R Y   M A N A G E M E N T          *****/
/*****                                                                 *****/
/***************************************************************************/
/***************************************************************************/

  /* it is better to use FreeType memory routines instead of raw
     'malloc/free' */

  static voidpf
  ft_gzip_alloc( FT_Memory  memory,
                 uInt       items,
                 uInt       size )
  {
    FT_ULong    sz = (FT_ULong)size * items;
    FT_Error    error;
    FT_Pointer  p;


    (void)FT_ALLOC( p, sz );
    return p;
  }


  static void
  ft_gzip_free( FT_Memory  memory,
                voidpf     address )
  {
    FT_MEM_FREE( address );
  }


#ifndef FT_CONFIG_OPTION_SYSTEM_ZLIB

  local voidpf
  zcalloc ( voidpf    opaque,
            unsigned  items,
            unsigned  size )
  {
    return ft_gzip_alloc( (FT_Memory)opaque, items, size );
  }

  local void
  zcfree( voidpf  opaque,
          voidpf  ptr )
  {
    ft_gzip_free( (FT_Memory)opaque, ptr );
  }

#endif /* !SYSTEM_ZLIB */


/***************************************************************************/
/***************************************************************************/
/*****                                                                 *****/
/*****               Z L I B   F I L E   D E S C R I P T O R           *****/
/*****                                                                 *****/
/***************************************************************************/
/***************************************************************************/

#define FT_GZIP_BUFFER_SIZE  4096

  typedef struct  FT_GZipFileRec_
  {
    FT_Stream  source;         /* parent/source stream        */
    FT_Stream  stream;         /* embedding stream            */
    FT_Memory  memory;         /* memory allocator            */
    z_stream   zstream;        /* zlib input stream           */

    FT_ULong   start;          /* starting position, after .gz header */
    FT_Byte    input[FT_GZIP_BUFFER_SIZE];   /* input read buffer  */

    FT_Byte    buffer[FT_GZIP_BUFFER_SIZE];  /* output buffer      */
    FT_ULong   pos;                          /* position in output */
    FT_Byte*   cursor;
    FT_Byte*   limit;

  } FT_GZipFileRec, *FT_GZipFile;


  /* gzip flag byte */
#define FT_GZIP_ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */
#define FT_GZIP_HEAD_CRC     0x02 /* bit 1 set: header CRC present */
#define FT_GZIP_EXTRA_FIELD  0x04 /* bit 2 set: extra field present */
#define FT_GZIP_ORIG_NAME    0x08 /* bit 3 set: original file name present */
#define FT_GZIP_COMMENT      0x10 /* bit 4 set: file comment present */
#define FT_GZIP_RESERVED     0xE0 /* bits 5..7: reserved */


  /* check and skip .gz header - we don't support `transparent' compression */
  static FT_Error
  ft_gzip_check_header( FT_Stream  stream )
  {
    FT_Error  error;
    FT_Byte   head[4];


    if ( FT_STREAM_SEEK( 0 )       ||
         FT_STREAM_READ( head, 4 ) )
      goto Exit;

    /* head[0] && head[1] are the magic numbers;    */
    /* head[2] is the method, and head[3] the flags */
    if ( head[0] != 0x1f              ||
         head[1] != 0x8b              ||
         head[2] != Z_DEFLATED        ||
        (head[3] & FT_GZIP_RESERVED)  )
    {
      error = Gzip_Err_Invalid_File_Format;
      goto Exit;
    }

    /* skip time, xflags and os code */
    (void)FT_STREAM_SKIP( 6 );

    /* skip the extra field */
    if ( head[3] & FT_GZIP_EXTRA_FIELD )
    {
      FT_UInt  len;


      if ( FT_READ_USHORT_LE( len ) ||
           FT_STREAM_SKIP( len )    )
        goto Exit;
    }

    /* skip original file name */
    if ( head[3] & FT_GZIP_ORIG_NAME )
      for (;;)
      {
        FT_UInt  c;


        if ( FT_READ_BYTE( c ) )
          goto Exit;

        if ( c == 0 )
          break;
      }

    /* skip .gz comment */
    if ( head[3] & FT_GZIP_COMMENT )
      for (;;)
      {
        FT_UInt  c;


        if ( FT_READ_BYTE( c ) )
          goto Exit;

        if ( c == 0 )
          break;
      }

    /* skip CRC */
    if ( head[3] & FT_GZIP_HEAD_CRC )
      if ( FT_STREAM_SKIP( 2 ) )
        goto Exit;

  Exit:
    return error;
  }


  static FT_Error
  ft_gzip_file_init( FT_GZipFile  zip,
                     FT_Stream    stream,
                     FT_Stream    source )
  {
    z_stream*  zstream = &zip->zstream;
    FT_Error   error   = Gzip_Err_Ok;


    zip->stream = stream;
    zip->source = source;
    zip->memory = stream->memory;

    zip->limit  = zip->buffer + FT_GZIP_BUFFER_SIZE;
    zip->cursor = zip->limit;
    zip->pos    = 0;

    /* check and skip .gz header */
    {
      stream = source;

      error = ft_gzip_check_header( stream );
      if ( error )
        goto Exit;

      zip->start = FT_STREAM_POS();
    }

    /* initialize zlib -- there is no zlib header in the compressed stream */
    zstream->zalloc = (alloc_func)ft_gzip_alloc;
    zstream->zfree  = (free_func) ft_gzip_free;
    zstream->opaque = stream->memory;

    zstream->avail_in = 0;
    zstream->next_in  = zip->buffer;

    if ( inflateInit2( zstream, -MAX_WBITS ) != Z_OK ||
         zstream->next_in == NULL                     )
      error = Gzip_Err_Invalid_File_Format;

  Exit:
    return error;
  }


  static void
  ft_gzip_file_done( FT_GZipFile  zip )
  {
    z_stream*  zstream = &zip->zstream;


    inflateEnd( zstream );

    /* clear the rest */
    zstream->zalloc    = NULL;
    zstream->zfree     = NULL;
    zstream->opaque    = NULL;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99视频超级精品| 日韩精品一区二区三区中文不卡| 在线精品亚洲一区二区不卡| 在线播放91灌醉迷j高跟美女 | 91浏览器打开| 日韩一级大片在线| 亚洲另类在线视频| 国产精品一区二区视频| 欧美精品在线观看一区二区| 日韩毛片在线免费观看| 国产精品一区2区| 宅男在线国产精品| 一级日本不卡的影视| 国产成人精品免费网站| 日韩一级大片在线观看| 亚洲国产美国国产综合一区二区| 国产成a人亚洲精品| 日韩一区二区三区在线| 亚洲午夜一二三区视频| 99久久婷婷国产精品综合| 精品成人一区二区三区| 性做久久久久久久久| 色视频一区二区| 中文字幕亚洲在| eeuss国产一区二区三区| 久久综合九色综合97_久久久| 日日欢夜夜爽一区| 欧美日本乱大交xxxxx| 一区二区三区高清在线| 91在线丨porny丨国产| 国产精品欧美一级免费| 成人手机电影网| 中文av一区二区| 国产suv精品一区二区三区| 久久精品欧美一区二区三区麻豆| 极品少妇一区二区三区精品视频| 欧美一级片免费看| 蜜桃精品视频在线| 91精品国产麻豆| 日韩avvvv在线播放| 7777精品伊人久久久大香线蕉经典版下载 | 国产婷婷一区二区| 国产一区二区三区美女| 337p粉嫩大胆噜噜噜噜噜91av| 精品一区二区在线观看| 久久综合一区二区| 国产盗摄一区二区| 亚洲欧美激情在线| 欧美色精品在线视频| 奇米影视一区二区三区| 精品国产亚洲在线| 成人av电影在线网| 一区二区三区视频在线看| 欧美另类一区二区三区| 久久电影网电视剧免费观看| 日韩欧美一级特黄在线播放| 激情综合色综合久久| 欧美高清在线视频| 欧美在线你懂得| 一区二区欧美视频| 欧美日本在线观看| 亚洲精品五月天| 欧美浪妇xxxx高跟鞋交| 美国欧美日韩国产在线播放| 一区二区三区高清不卡| 欧美一卡2卡三卡4卡5免费| 亚洲成a人片在线观看中文| 56国语精品自产拍在线观看| 看电影不卡的网站| 国产清纯白嫩初高生在线观看91| 暴力调教一区二区三区| 亚洲午夜电影在线观看| 欧美tickling网站挠脚心| 99久久精品国产毛片| 偷拍日韩校园综合在线| 国产日韩成人精品| 欧美日韩精品欧美日韩精品| 韩国av一区二区三区四区| 一区二区中文视频| 欧美变态口味重另类| 99久久99久久精品国产片果冻| 日韩影视精彩在线| 综合激情网...| 日韩三级伦理片妻子的秘密按摩| av激情综合网| 国产乱一区二区| 午夜视频在线观看一区二区 | 国产成人在线色| 亚洲电影在线播放| 国产日韩精品视频一区| 在线91免费看| 91视频在线观看免费| 激情综合色播五月| 亚洲免费观看高清完整版在线观看 | 欧洲一区二区av| 福利一区在线观看| 久久se精品一区精品二区| 一区二区三区电影在线播| 国产精品成人免费精品自在线观看| 7777精品伊人久久久大香线蕉经典版下载| av一区二区三区在线| 国产精品伊人色| 激情亚洲综合在线| 天天影视色香欲综合网老头| 亚洲特黄一级片| 一区二区中文字幕在线| 亚洲国产高清不卡| 欧美激情一区二区三区全黄| 国产夜色精品一区二区av| 日韩午夜在线观看视频| 中文字幕第一区| 国产色综合一区| 国产日韩一级二级三级| 欧美va亚洲va国产综合| 日韩欧美一区二区不卡| 欧美一卡二卡三卡| 日韩写真欧美这视频| 欧美videossexotv100| 欧美成人bangbros| 亚洲精品在线免费播放| 精品人在线二区三区| 精品久久国产老人久久综合| 欧美成人伊人久久综合网| 日韩一级大片在线观看| 精品日韩av一区二区| 久久亚洲综合色| 国产片一区二区| 一区视频在线播放| 亚洲一区二区三区中文字幕 | 日韩美女一区二区三区四区| 日韩精品一区二区在线观看| 欧美刺激脚交jootjob| www激情久久| 中文子幕无线码一区tr| 中文字幕亚洲电影| 亚洲电影激情视频网站| 天堂va蜜桃一区二区三区漫画版| 日本中文在线一区| 国产最新精品免费| 不卡电影免费在线播放一区| 91精品1区2区| 制服丝袜亚洲网站| 久久免费国产精品| 亚洲欧美另类小说| 免费人成精品欧美精品| 国产成人在线视频网址| 91蜜桃在线免费视频| 欧美久久一二区| 国产日韩欧美a| 午夜视频一区二区| 国产精品一色哟哟哟| 欧美视频一区二区三区| 26uuu亚洲综合色| 亚洲一区二区偷拍精品| 狠狠狠色丁香婷婷综合久久五月| 99re热视频这里只精品| 欧美一区在线视频| 综合欧美一区二区三区| 日韩av在线发布| 成人黄色大片在线观看| 欧美精品高清视频| 国产精品素人一区二区| 午夜久久久久久久久久一区二区| 高清beeg欧美| 日韩一区二区免费在线观看| 日韩伦理免费电影| 狠狠色丁香久久婷婷综| 欧美日韩国产电影| 综合色天天鬼久久鬼色| 黄色精品一二区| 欧美蜜桃一区二区三区| 国产精品九色蝌蚪自拍| 久久成人18免费观看| 色激情天天射综合网| 国产日韩精品一区二区三区在线| 欧美a级一区二区| 色爱区综合激月婷婷| 国产精品午夜春色av| 日本aⅴ亚洲精品中文乱码| 一本一道波多野结衣一区二区| 久久综合九色综合97婷婷| 日本va欧美va欧美va精品| 欧美视频精品在线观看| 国产精品国产三级国产普通话蜜臀 | 成人免费福利片| 久久综合中文字幕| 麻豆精品视频在线| 欧美日韩精品电影| 亚洲一二三区不卡| 色综合视频一区二区三区高清| 国产欧美久久久精品影院| 精品一区二区在线免费观看| 91精品国产综合久久精品app| 亚洲男人天堂一区| 91片在线免费观看| 国产精品久久久久久久久动漫| 国产成人综合在线| 国产亚洲一二三区| 国产精品一区专区| 中文字幕乱码日本亚洲一区二区|