~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/opentype/fterrcompat.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef FTERRCOMPAT_H
 
3
#define FTERRCOMPAT_H
 
4
 
 
5
#ifdef HAVE_FREETYPE_2_0_3
 
6
#include <freetype/internal/tterrors.h>
 
7
#else
 
8
#define TT_Err_Ok FT_Err_Ok
 
9
#define TT_Err_Invalid_Argument FT_Err_Invalid_Argument
 
10
#define TT_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle
 
11
#define TT_Err_Table_Missing FT_Err_Table_Missing
 
12
#endif /* HAVE_FREETYPE_2_0_3 */
 
13
 
 
14
/* Compat macros for name changes in FreeType 2.1.0
 
15
 */
 
16
#if (FREETYPE_MAJOR == 2) && (FREETYPE_MINOR >= 1)
 
17
 
 
18
#define FILE_Pos()             FT_STREAM_POS()
 
19
#define FILE_Seek( position ) FT_STREAM_SEEK( position)
 
20
 
 
21
#define ACCESS_Frame( size ) FT_FRAME_ENTER( size )
 
22
#define FORGET_Frame() FT_FRAME_EXIT()
 
23
 
 
24
#define GET_Char()      FT_GET_CHAR()
 
25
#define GET_Byte()      FT_GET_BYTE()
 
26
#define GET_Short()     FT_GET_SHORT()
 
27
#define GET_UShort()    FT_GET_USHORT()
 
28
#define GET_Offset()    FT_GET_OFF3()
 
29
#define GET_UOffset()   FT_GET_UOFF3()
 
30
#define GET_Long()      FT_GET_LONG()
 
31
#define GET_ULong()     FT_GET_ULONG()
 
32
#define GET_Tag4()      FT_GET_TAG4()
 
33
 
 
34
#define ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
 
35
  FT_SET_ERROR (FT_MEM_ALLOC_ARRAY( _pointer_, _count_, _type_))
 
36
 
 
37
/* FT_MEM_REALLOC macro broken in 2.1.0 */
 
38
#define REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ ) \
 
39
  FT_SET_ERROR ( FT_MEM_REALLOC( _pointer_, (_old_) * sizeof ( _type_ ),   \
 
40
                (_new_) * sizeof ( _type_ ) ) )
 
41
 
 
42
#define ALLOC( _pointer_, _size_ ) FT_ALLOC( _pointer_, _size_ )
 
43
#define FREE( _pointer_ )          FT_FREE( _pointer_ )
 
44
 
 
45
#define MEM_Copy( dest, source, count ) FT_MEM_COPY( dest, source, count )
 
46
 
 
47
#endif /* >= 2.1.0 */
 
48
 
 
49
#endif /* FTERRCOMPAT_H */