⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ftmemory.h

📁 附上freetype2.1.10的源代码,这个和上面传的是一起的
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************//*                                                                         *//*  ftmemory.h                                                             *//*                                                                         *//*    The FreeType memory management macros (specification).               *//*                                                                         *//*  Copyright 1996-2001, 2002, 2004, 2005 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 __FTMEMORY_H__#define __FTMEMORY_H__#include <ft2build.h>#include FT_CONFIG_CONFIG_H#include FT_TYPES_HFT_BEGIN_HEADER  /*************************************************************************/  /*                                                                       */  /* <Macro>                                                               */  /*    FT_SET_ERROR                                                       */  /*                                                                       */  /* <Description>                                                         */  /*    This macro is used to set an implicit `error' variable to a given  */  /*    expression's value (usually a function call), and convert it to a  */  /*    boolean which is set whenever the value is != 0.                   */  /*                                                                       */#undef  FT_SET_ERROR#define FT_SET_ERROR( expression ) \          ( ( error = (expression) ) != 0 )  /*************************************************************************/  /*************************************************************************/  /*************************************************************************/  /****                                                                 ****/  /****                                                                 ****/  /****                           M E M O R Y                           ****/  /****                                                                 ****/  /****                                                                 ****/  /*************************************************************************/  /*************************************************************************/  /*************************************************************************/#ifdef FT_DEBUG_MEMORY  FT_BASE( FT_Error )  FT_Alloc_Debug( FT_Memory    memory,                  FT_Long      size,                  void*       *P,                  const char*  file_name,                  FT_Long      line_no );  FT_BASE( FT_Error )  FT_QAlloc_Debug( FT_Memory    memory,                   FT_Long      size,                   void*       *P,                   const char*  file_name,                   FT_Long      line_no );  FT_BASE( FT_Error )  FT_Realloc_Debug( FT_Memory    memory,                    FT_Long      current,                    FT_Long      size,                    void*       *P,                    const char*  file_name,                    FT_Long      line_no );  FT_BASE( FT_Error )  FT_QRealloc_Debug( FT_Memory    memory,                     FT_Long      current,                     FT_Long      size,                     void*       *P,                     const char*  file_name,                     FT_Long      line_no );  FT_BASE( void )  FT_Free_Debug( FT_Memory    memory,                 FT_Pointer   block,                 const char*  file_name,                 FT_Long      line_no );#endif  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_Alloc                                                           */  /*                                                                       */  /* <Description>                                                         */  /*    Allocates a new block of memory.  The returned area is always      */  /*    zero-filled; this is a strong convention in many FreeType parts.   */  /*                                                                       */  /* <Input>                                                               */  /*    memory :: A handle to a given `memory object' which handles        */  /*              allocation.                                              */  /*                                                                       */  /*    size   :: The size in bytes of the block to allocate.              */  /*                                                                       */  /* <Output>                                                              */  /*    P      :: A pointer to the fresh new block.  It should be set to   */  /*              NULL if `size' is 0, or in case of error.                */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  FT_BASE( FT_Error )  FT_Alloc( FT_Memory  memory,            FT_Long    size,            void*     *P );  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_QAlloc                                                          */  /*                                                                       */  /* <Description>                                                         */  /*    Allocates a new block of memory.  The returned area is *not*       */  /*    zero-filled, making allocation quicker.                            */  /*                                                                       */  /* <Input>                                                               */  /*    memory :: A handle to a given `memory object' which handles        */  /*              allocation.                                              */  /*                                                                       */  /*    size   :: The size in bytes of the block to allocate.              */  /*                                                                       */  /* <Output>                                                              */  /*    P      :: A pointer to the fresh new block.  It should be set to   */  /*              NULL if `size' is 0, or in case of error.                */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  FT_BASE( FT_Error )  FT_QAlloc( FT_Memory  memory,             FT_Long    size,             void*     *p );  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_Realloc                                                         */  /*                                                                       */  /* <Description>                                                         */  /*    Reallocates a block of memory pointed to by `*P' to `Size' bytes   */  /*    from the heap, possibly changing `*P'.  The returned area is       */  /*    zero-filled.                                                       */  /*                                                                       */  /* <Input>                                                               */  /*    memory  :: A handle to a given `memory object' which handles       */  /*               reallocation.                                           */  /*                                                                       */  /*    current :: The current block size in bytes.                        */  /*                                                                       */  /*    size    :: The new block size in bytes.                            */  /*                                                                       */  /* <InOut>                                                               */  /*    P       :: A pointer to the fresh new block.  It should be set to  */  /*               NULL if `size' is 0, or in case of error.               */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  /* <Note>                                                                */  /*    All callers of FT_Realloc() _must_ provide the current block size  */  /*    as well as the new one.                                            */  /*                                                                       */  FT_BASE( FT_Error )  FT_Realloc( FT_Memory  memory,              FT_Long    current,              FT_Long    size,              void*     *P );  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FT_QRealloc                                                        */  /*                                                                       */  /* <Description>                                                         */  /*    Reallocates a block of memory pointed to by `*P' to `Size' bytes   */  /*    from the heap, possibly changing `*P'.  The returned area is *not* */  /*    zero-filled, making reallocation quicker.                          */  /*                                                                       */  /* <Input>                                                               */  /*    memory  :: A handle to a given `memory object' which handles       */  /*               reallocation.                                           */  /*                                                                       */  /*    current :: The current block size in bytes.                        */  /*                                                                       */  /*    size    :: The new block size in bytes.                            */  /*                                                                       */  /* <InOut>                                                               */  /*    P       :: A pointer to the fresh new block.  It should be set to  */  /*               NULL if `size' is 0, or in case of error.               */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  /* <Note>                                                                */  /*    All callers of FT_Realloc() _must_ provide the current block size  */  /*    as well as the new one.                                            */  /*                                                                       */  FT_BASE( FT_Error )  FT_QRealloc( FT_Memory  memory,               FT_Long    current,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -