Even more cleanup and more type renames.
authorBehdad Esfahbod <behdad@gnome.org>
Thu, 25 Oct 2007 23:37:11 +0000 (23:37 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Thu, 25 Oct 2007 23:37:11 +0000 (23:37 +0000)
2007-10-25  Behdad Esfahbod  <behdad@gnome.org>

        * pango/opentype/*: Even more cleanup and more type renames.

src/harfbuzz-buffer.h
src/harfbuzz-global.h
src/harfbuzz-impl.c
src/harfbuzz-impl.h
src/harfbuzz-open.h

index 701d083..e659ce3 100644 (file)
@@ -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
 
index 9aed8ca..bb35db0 100644 (file)
@@ -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  }
 
 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 {
index 1d2b699..fcdbc33 100644 (file)
@@ -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 );
index 3e7ac1c..69c9ea9 100644 (file)
@@ -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 */
index d7cc9f0..46ea68f 100644 (file)
@@ -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