提交 ef1f4817 编写于 作者: B Behdad Esfahbod 提交者: Behdad Esfahbod

Even more cleanup and more type renames.

2007-10-25  Behdad Esfahbod  <behdad@gnome.org>

        * pango/opentype/*: Even more cleanup and more type renames.
上级 282c60a0
......@@ -14,8 +14,7 @@
#ifndef HARFBUZZ_BUFFER_H
#define HARFBUZZ_BUFFER_H
#include <ft2build.h>
#include FT_FREETYPE_H
#include "harfbuzz-global.h"
HB_BEGIN_HEADER
......
......@@ -13,6 +13,9 @@
#ifndef HARFBUZZ_GLOBAL_H
#define HARFBUZZ_GLOBAL_H
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef __cplusplus
#define HB_BEGIN_HEADER extern "C" {
#define HB_END_HEADER }
......@@ -23,11 +26,14 @@
HB_BEGIN_HEADER
typedef unsigned char HB_Byte;
typedef signed char HB_Char;
typedef unsigned short HB_UShort;
typedef signed short HB_Short;
typedef unsigned int HB_UInt;
typedef signed int HB_Int;
typedef int HB_Bool;
typedef void *HB_Pointer;
typedef enum {
......
......@@ -25,12 +25,12 @@ _hb_log( const char* format, ... )
#endif
/* only used internally */
static FT_Pointer
static HB_Pointer
_hb_qalloc( HB_UInt size,
HB_Error *perror )
{
HB_Error error = 0;
FT_Pointer block = NULL;
HB_Pointer block = NULL;
if ( size > 0 )
{
......@@ -47,12 +47,12 @@ _hb_qalloc( HB_UInt size,
#define QALLOC(ptr,size) ( (ptr) = _hb_qalloc( (size), &error ), error != 0 )
HB_INTERNAL FT_Pointer
HB_INTERNAL HB_Pointer
_hb_alloc( HB_UInt size,
HB_Error *perror )
{
HB_Error error = 0;
FT_Pointer block = NULL;
HB_Pointer block = NULL;
if ( size > 0 )
{
......@@ -68,12 +68,12 @@ _hb_alloc( HB_UInt size,
}
HB_INTERNAL FT_Pointer
_hb_realloc( FT_Pointer block,
HB_INTERNAL HB_Pointer
_hb_realloc( HB_Pointer block,
HB_UInt new_size,
HB_Error *perror )
{
FT_Pointer block2 = NULL;
HB_Pointer block2 = NULL;
HB_Error error = 0;
block2 = realloc( block, new_size );
......@@ -89,7 +89,7 @@ _hb_realloc( FT_Pointer block,
HB_INTERNAL void
_hb_free( FT_Pointer block )
_hb_free( HB_Pointer block )
{
if ( block )
free( block );
......
......@@ -81,18 +81,18 @@ typedef FT_Stream HB_Stream;
#define GET_Byte() (*stream->cursor++)
#define GET_Short() (stream->cursor += 2, (HB_Short)( \
(*(((FT_Byte*)stream->cursor)-2) << 8) | \
*(((FT_Byte*)stream->cursor)-1) \
(*(((HB_Byte*)stream->cursor)-2) << 8) | \
*(((HB_Byte*)stream->cursor)-1) \
))
#define GET_Long() (stream->cursor += 4, (HB_Int)( \
(*(((FT_Byte*)stream->cursor)-4) << 24) | \
(*(((FT_Byte*)stream->cursor)-3) << 16) | \
(*(((FT_Byte*)stream->cursor)-2) << 8) | \
*(((FT_Byte*)stream->cursor)-1) \
(*(((HB_Byte*)stream->cursor)-4) << 24) | \
(*(((HB_Byte*)stream->cursor)-3) << 16) | \
(*(((HB_Byte*)stream->cursor)-2) << 8) | \
*(((HB_Byte*)stream->cursor)-1) \
))
#define GET_Char() ((FT_Char)GET_Byte())
#define GET_Char() ((HB_Char)GET_Byte())
#define GET_UShort() ((HB_UShort)GET_Short())
#define GET_ULong() ((HB_UInt)GET_Long())
#define GET_Tag4() GET_ULong()
......@@ -143,17 +143,17 @@ _hb_face_goto_table( FT_Face face,
#define ERR(err) _hb_err (err)
HB_INTERNAL FT_Pointer
HB_INTERNAL HB_Pointer
_hb_alloc( HB_UInt size,
HB_Error *perror_ );
HB_INTERNAL FT_Pointer
_hb_realloc( FT_Pointer block,
HB_INTERNAL HB_Pointer
_hb_realloc( HB_Pointer block,
HB_UInt new_size,
HB_Error *perror_ );
HB_INTERNAL void
_hb_free( FT_Pointer block );
_hb_free( HB_Pointer block );
/* helper func to set a breakpoint on */
......
......@@ -13,9 +13,6 @@
#ifndef HARFBUZZ_OPEN_H
#define HARFBUZZ_OPEN_H
#include <ft2build.h>
#include FT_FREETYPE_H
#include "harfbuzz-global.h"
HB_BEGIN_HEADER
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册