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

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

?? ftsystem.c

?? 智能設備中PDF閱讀器的源碼!用于windows mobile2003或者WM5以上
?? C
字號:
/***************************************************************************/
/*                                                                         */
/*  ftsystem.c                                                             */
/*                                                                         */
/*    ANSI-specific FreeType low-level system interface (body).            */
/*                                                                         */
/*  Copyright 1996-2001, 2002, 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.                                        */
/*                                                                         */
/***************************************************************************/

  /*************************************************************************/
  /*                                                                       */
  /* This file contains the default interface used by FreeType to access   */
  /* low-level, i.e. memory management, i/o access as well as thread       */
  /* synchronisation.  It can be replaced by user-specific routines if     */
  /* necessary.                                                            */
  /*                                                                       */
  /*************************************************************************/


#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H

#include <windows.h> //EIFERT
  /*************************************************************************/
  /*                                                                       */
  /*                       MEMORY MANAGEMENT INTERFACE                     */
  /*                                                                       */
  /*************************************************************************/

  /*************************************************************************/
  /*                                                                       */
  /* It is not necessary to do any error checking for the                  */
  /* allocation-related functions.  This will be done by the higher level  */
  /* routines like ft_mem_alloc() or ft_mem_realloc().                     */
  /*                                                                       */
  /*************************************************************************/


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    ft_alloc                                                           */
  /*                                                                       */
  /* <Description>                                                         */
  /*    The memory allocation function.                                    */
  /*                                                                       */
  /* <Input>                                                               */
  /*    memory :: A pointer to the memory object.                          */
  /*                                                                       */
  /*    size   :: The requested size in bytes.                             */
  /*                                                                       */
  /* <Return>                                                              */
  /*    The address of newly allocated block.                              */
  /*                                                                       */
  FT_CALLBACK_DEF( void* )
  ft_alloc( FT_Memory  memory,
            long       size )
  {
    FT_UNUSED( memory );

    return ft_smalloc( size );
  }


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    ft_realloc                                                         */
  /*                                                                       */
  /* <Description>                                                         */
  /*    The memory reallocation function.                                  */
  /*                                                                       */
  /* <Input>                                                               */
  /*    memory   :: A pointer to the memory object.                        */
  /*                                                                       */
  /*    cur_size :: The current size of the allocated memory block.        */
  /*                                                                       */
  /*    new_size :: The newly requested size in bytes.                     */
  /*                                                                       */
  /*    block    :: The current address of the block in memory.            */
  /*                                                                       */
  /* <Return>                                                              */
  /*    The address of the reallocated memory block.                       */
  /*                                                                       */
  FT_CALLBACK_DEF( void* )
  ft_realloc( FT_Memory  memory,
              long       cur_size,
              long       new_size,
              void*      block )
  {
    FT_UNUSED( memory );
    FT_UNUSED( cur_size );

    return ft_srealloc( block, new_size );
  }


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    ft_free                                                            */
  /*                                                                       */
  /* <Description>                                                         */
  /*    The memory release function.                                       */
  /*                                                                       */
  /* <Input>                                                               */
  /*    memory  :: A pointer to the memory object.                         */
  /*                                                                       */
  /*    block   :: The address of block in memory to be freed.             */
  /*                                                                       */
  FT_CALLBACK_DEF( void )
  ft_free( FT_Memory  memory,
           void*      block )
  {
    FT_UNUSED( memory );

    ft_sfree( block );
  }


  /*************************************************************************/
  /*                                                                       */
  /*                     RESOURCE MANAGEMENT INTERFACE                     */
  /*                                                                       */
  /*************************************************************************/


  /*************************************************************************/
  /*                                                                       */
  /* 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  trace_io

  /* We use the macro STREAM_FILE for convenience to extract the       */
  /* system-specific stream handle from a given FreeType stream object */
#define STREAM_FILE( stream )  ( (FT_FILE*)stream->descriptor.pointer )


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    ft_ansi_stream_close                                               */
  /*                                                                       */
  /* <Description>                                                         */
  /*    The function to close a stream.                                    */
  /*                                                                       */
  /* <Input>                                                               */
  /*    stream :: A pointer to the stream object.                          */
  /*                                                                       */
  FT_CALLBACK_DEF( void )
  ft_ansi_stream_close( FT_Stream  stream )
  {
    ft_fclose( STREAM_FILE( stream ) );

    stream->descriptor.pointer = NULL;
    stream->size               = 0;
    stream->base               = 0;
  }


  /*************************************************************************/
  /*                                                                       */
  /* <Function>                                                            */
  /*    ft_ansi_stream_io                                                  */
  /*                                                                       */
  /* <Description>                                                         */
  /*    The function to open a stream.                                     */
  /*                                                                       */
  /* <Input>                                                               */
  /*    stream :: A pointer to the stream object.                          */
  /*                                                                       */
  /*    offset :: The position in the data stream to start reading.        */
  /*                                                                       */
  /*    buffer :: The address of buffer to store the read data.            */
  /*                                                                       */
  /*    count  :: The number of bytes to read from the stream.             */
  /*                                                                       */
  /* <Return>                                                              */
  /*    The number of bytes actually read.                                 */
  /*                                                                       */
  FT_CALLBACK_DEF( unsigned long )
  ft_ansi_stream_io( FT_Stream       stream,
                     unsigned long   offset,
                     unsigned char*  buffer,
                     unsigned long   count )
  {
    FT_FILE*  file;
	long retval;


    file = STREAM_FILE( stream );

    ft_fseek( file, offset, SEEK_SET );

    //return (unsigned long)ft_fread( buffer, 1, count, file );
	//EIFERT restore handle lost during suspend
	retval = ft_fread( buffer, 1, count, file);
	if (ferror(file)!=0){
	  //Handle lost (storage card removed, suspend etc.), so retry
	  //MessageBoxW(NULL,L"File Handle lost, retrying... (freetype)",L"Error",MB_ICONERROR);
	  fclose(file);
	  file = fopen(stream->pathname.pointer,"rb");
	  stream->descriptor.pointer=file;
	  ft_fseek( file, offset, SEEK_SET );
	  retval = ft_fread( buffer, 1, count, file);
	  if (ferror(file)!=0){
		  MessageBoxW(NULL,L"Read Error (freetype)",L"Error",MB_ICONERROR);
	  }
  }

	return retval;
  }


  /* documentation is in ftstream.h */

  FT_BASE_DEF( FT_Error )
  FT_Stream_Open( FT_Stream    stream,
                  const char*  filepathname )
  {
    FT_FILE*  file;


    if ( !stream )
      return FT_Err_Invalid_Stream_Handle;

    file = ft_fopen( filepathname, "rb" );
    if ( !file )
    {
      FT_ERROR(( "FT_Stream_Open:" ));
      FT_ERROR(( " could not open `%s'\n", filepathname ));

      return FT_Err_Cannot_Open_Resource;
    }

    ft_fseek( file, 0, SEEK_END );
    stream->size = ft_ftell( file );
    ft_fseek( file, 0, SEEK_SET );

    stream->descriptor.pointer = file;
    stream->pathname.pointer   = (char*)filepathname;
    stream->pos                = 0;

    stream->read  = ft_ansi_stream_io;
    stream->close = ft_ansi_stream_close;

    FT_TRACE1(( "FT_Stream_Open:" ));
    FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
                filepathname, stream->size ));

    return FT_Err_Ok;
  }


#ifdef FT_DEBUG_MEMORY

  extern FT_Int
  ft_mem_debug_init( FT_Memory  memory );

  extern void
  ft_mem_debug_done( FT_Memory  memory );

#endif


  /* documentation is in ftobjs.h */

  FT_BASE_DEF( FT_Memory )
  FT_New_Memory( void )
  {
    FT_Memory  memory;


    memory = (FT_Memory)ft_smalloc( sizeof ( *memory ) );
    if ( memory )
    {
      memory->user    = 0;
      memory->alloc   = ft_alloc;
      memory->realloc = ft_realloc;
      memory->free    = ft_free;
#ifdef FT_DEBUG_MEMORY
      ft_mem_debug_init( memory );
#endif
    }

    return memory;
  }


  /* documentation is in ftobjs.h */

  FT_BASE_DEF( void )
  FT_Done_Memory( FT_Memory  memory )
  {
#ifdef FT_DEBUG_MEMORY
    ft_mem_debug_done( memory );
#endif
    memory->free( memory, memory );
  }


/* END */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线影院| 国产亚洲视频系列| 综合中文字幕亚洲| 精品一区二区在线免费观看| 91美女精品福利| 久久久久久综合| 日韩成人av影视| 在线精品观看国产| 中文字幕制服丝袜成人av | 中文字幕精品三区| 精品中文字幕一区二区小辣椒| 欧美三级午夜理伦三级中视频| 国产精品国产三级国产三级人妇| 精品中文字幕一区二区| 3d成人动漫网站| 亚洲成a人片在线观看中文| 91免费精品国自产拍在线不卡| 精品欧美黑人一区二区三区| 午夜日韩在线电影| 色94色欧美sute亚洲线路二| 中文字幕av资源一区| 国产盗摄女厕一区二区三区 | 99视频精品在线| 国产校园另类小说区| 久久99精品一区二区三区三区| 欧美日韩一区二区三区四区五区| 亚洲色图色小说| av男人天堂一区| 日本一区二区三区视频视频| 国产一区二区成人久久免费影院| 日韩免费电影网站| 麻豆91小视频| 亚洲精品一区二区三区影院| 日产精品久久久久久久性色| 7777精品久久久大香线蕉| 亚洲成人tv网| 欧美蜜桃一区二区三区| 五月开心婷婷久久| 欧美日韩精品二区第二页| 亚洲大片精品永久免费| 欧美精品粉嫩高潮一区二区| 婷婷夜色潮精品综合在线| 精品视频1区2区| 日韩精品成人一区二区三区| 91精品中文字幕一区二区三区| 午夜精品久久久久久久| 欧美精品九九99久久| 日韩激情av在线| 欧美一区永久视频免费观看| 强制捆绑调教一区二区| 欧美成人a∨高清免费观看| 激情文学综合网| 中文字幕av一区二区三区高 | 蜜臀va亚洲va欧美va天堂| 日韩一区二区三区电影在线观看 | 亚洲精品久久久久久国产精华液| 91美女片黄在线观看91美女| 亚洲影院在线观看| 欧美精品一二三| 免费视频最近日韩| 久久久噜噜噜久久中文字幕色伊伊| 国产精品综合一区二区三区| 中文字幕免费一区| 99精品桃花视频在线观看| 亚洲在线观看免费视频| 日韩欧美国产一区二区三区| 国产综合成人久久大片91| 国产欧美日韩精品在线| 一本久道久久综合中文字幕| 日韩精品视频网站| 久久久99免费| 91国内精品野花午夜精品| 天天免费综合色| 久久久久9999亚洲精品| 色婷婷综合激情| 六月婷婷色综合| 国产精品美女视频| 欧美区在线观看| 国产一区二区看久久| 亚洲精品videosex极品| 日韩一区二区三区免费看| 波多野结衣91| 婷婷综合久久一区二区三区| 国产三级精品三级在线专区| 色狠狠色狠狠综合| 久久精品99久久久| 成人免费小视频| 欧美一区二区视频在线观看2022| 国产成人av一区二区三区在线观看| 1区2区3区国产精品| 91精品国产欧美一区二区| 春色校园综合激情亚洲| 午夜精品久久久久久久| 国产女主播在线一区二区| 欧美日韩久久久一区| 国产福利一区二区三区| 亚洲国产人成综合网站| 国产欧美日韩综合| 欧美日韩久久一区二区| 成人97人人超碰人人99| 免费观看一级特黄欧美大片| 亚洲欧美乱综合| 精品国产百合女同互慰| 欧美自拍偷拍一区| 成人一道本在线| 日本欧美韩国一区三区| 亚洲欧美一区二区三区孕妇| 精品久久久久香蕉网| 欧美综合视频在线观看| 成人免费看视频| 麻豆91在线观看| 亚洲超碰97人人做人人爱| 国产精品入口麻豆九色| 日韩免费视频一区二区| 欧美亚洲高清一区| 成人av资源站| 国产乱码精品一区二区三区忘忧草| 天堂一区二区在线免费观看| 亚洲欧洲另类国产综合| 久久综合色鬼综合色| 欧美日韩精品一区视频| 99久久精品情趣| 国产在线观看一区二区| 奇米777欧美一区二区| 激情久久五月天| 一本到三区不卡视频| 国产精品你懂的在线欣赏| 国内精品伊人久久久久影院对白| 99久久精品免费看国产| 精品久久五月天| 日韩成人精品视频| 91亚洲资源网| 精品一区二区影视| 91在线porny国产在线看| 久久久久久久久久久电影| 无码av免费一区二区三区试看 | 韩国理伦片一区二区三区在线播放 | 国产高清不卡一区| 美腿丝袜在线亚洲一区| 亚洲一级电影视频| 亚洲乱码精品一二三四区日韩在线| 国产日韩一级二级三级| 26uuu国产一区二区三区| 日韩欧美一二区| 日韩免费观看高清完整版| 91精品国产综合久久蜜臀| 欧美日韩精品一区二区在线播放 | 国产精品12区| 国产精品一区二区在线播放 | 青青草伊人久久| 日本不卡免费在线视频| 日韩二区三区四区| 石原莉奈在线亚洲二区| 亚洲成av人影院| 日韩中文字幕av电影| 日韩精品一二三| 美女在线一区二区| 久久国产婷婷国产香蕉| 极品销魂美女一区二区三区| 久久国产生活片100| 狠狠色综合日日| 国产成人午夜精品5599| 粉嫩一区二区三区性色av| 成人精品gif动图一区| 91丨九色丨蝌蚪丨老版| 日本乱人伦aⅴ精品| 欧美最猛性xxxxx直播| 欧美军同video69gay| 欧美一区二区在线视频| 欧美大片在线观看一区二区| 久久久久99精品一区| 国产精品区一区二区三区| 亚洲免费观看视频| 亚洲制服欧美中文字幕中文字幕| 亚洲第一福利一区| 蜜臀av一级做a爰片久久| 国内精品久久久久影院色 | 午夜亚洲国产au精品一区二区| 午夜精品一区二区三区免费视频| 亚洲成人三级小说| 美女任你摸久久| 成人性生交大片免费看中文| 91国产免费观看| 91精品中文字幕一区二区三区| 精品国产91久久久久久久妲己| 欧美国产一区二区在线观看| 亚洲女人****多毛耸耸8| 亚洲不卡在线观看| 国产一区二区不卡在线| 99久久免费精品| 91麻豆精品国产91久久久久久久久 | 免费欧美日韩国产三级电影| 国产欧美va欧美不卡在线| 在线视频一区二区三| 不卡影院免费观看| 国产在线精品视频| av一区二区久久| 免费观看久久久4p| 丝袜国产日韩另类美女| 一区二区在线观看视频|