summaryrefslogtreecommitdiffstats
path: root/src/kernel/qfontdatabase_x11.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-17 17:28:28 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-17 17:28:28 -0500
commit6dec101d43dcbd4195c47d54bd388db1a8d7230e (patch)
tree7c336cbed3a93807a34cd4df39b2f92a7d48a141 /src/kernel/qfontdatabase_x11.cpp
parentf27c2533f735d53c6b555f387c6390c0690cc246 (diff)
downloadtqt3-6dec101d43dcbd4195c47d54bd388db1a8d7230e.tar.gz
tqt3-6dec101d43dcbd4195c47d54bd388db1a8d7230e.zip
Automated update from Qt3
Diffstat (limited to 'src/kernel/qfontdatabase_x11.cpp')
-rw-r--r--src/kernel/qfontdatabase_x11.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/kernel/qfontdatabase_x11.cpp b/src/kernel/qfontdatabase_x11.cpp
index ba768d811..286bd08ee 100644
--- a/src/kernel/qfontdatabase_x11.cpp
+++ b/src/kernel/qfontdatabase_x11.cpp
@@ -1054,15 +1054,15 @@ static bool loadXftFont( FcPattern* font )
#ifndef QT_XFT2
#define MAKE_TAG( _x1, _x2, _x3, _x4 ) \
- ( ( (Q_UINT32)_x1 << 24 ) | \
- ( (Q_UINT32)_x2 << 16 ) | \
- ( (Q_UINT32)_x3 << 8 ) | \
- (Q_UINT32)_x4 )
+ ( ( (TQ_UINT32)_x1 << 24 ) | \
+ ( (TQ_UINT32)_x2 << 16 ) | \
+ ( (TQ_UINT32)_x3 << 8 ) | \
+ (TQ_UINT32)_x4 )
#ifdef _POSIX_MAPPED_FILES
-static inline Q_UINT32 getUInt(unsigned char *p)
+static inline TQ_UINT32 getUInt(unsigned char *p)
{
- Q_UINT32 val;
+ TQ_UINT32 val;
val = *p++ << 24;
val |= *p++ << 16;
val |= *p++ << 8;
@@ -1071,16 +1071,16 @@ static inline Q_UINT32 getUInt(unsigned char *p)
return val;
}
-static inline Q_UINT16 getUShort(unsigned char *p)
+static inline TQ_UINT16 getUShort(unsigned char *p)
{
- Q_UINT16 val;
+ TQ_UINT16 val;
val = *p++ << 8;
val |= *p;
return val;
}
-static inline void tag_to_string( char *string, Q_UINT32 tag )
+static inline void tag_to_string( char *string, TQ_UINT32 tag )
{
string[0] = (tag >> 24)&0xff;
string[1] = (tag >> 16)&0xff;
@@ -1089,7 +1089,7 @@ static inline void tag_to_string( char *string, Q_UINT32 tag )
string[4] = 0;
}
-static Q_UINT16 getGlyphIndex( unsigned char *table, Q_UINT16 format, unsigned short unicode )
+static TQ_UINT16 getGlyphIndex( unsigned char *table, TQ_UINT16 format, unsigned short unicode )
{
if ( format == 0 ) {
if ( unicode < 256 )
@@ -1097,26 +1097,26 @@ static Q_UINT16 getGlyphIndex( unsigned char *table, Q_UINT16 format, unsigned s
} else if ( format == 2 ) {
tqWarning("format 2 encoding table for Unicode, not implemented!");
} else if ( format == 4 ) {
- Q_UINT16 segCountX2 = getUShort( table + 6 );
+ TQ_UINT16 segCountX2 = getUShort( table + 6 );
unsigned char *ends = table + 14;
- Q_UINT16 endIndex = 0;
+ TQ_UINT16 endIndex = 0;
int i = 0;
for ( ; i < segCountX2/2 && (endIndex = getUShort( ends + 2*i )) < unicode; i++ );
unsigned char *idx = ends + segCountX2 + 2 + 2*i;
- Q_UINT16 startIndex = getUShort( idx );
+ TQ_UINT16 startIndex = getUShort( idx );
if ( startIndex > unicode )
return 0;
idx += segCountX2;
- Q_INT16 idDelta = (Q_INT16)getUShort( idx );
+ TQ_INT16 idDelta = (TQ_INT16)getUShort( idx );
idx += segCountX2;
- Q_UINT16 idRangeoffset_t = (Q_UINT16)getUShort( idx );
+ TQ_UINT16 idRangeoffset_t = (TQ_UINT16)getUShort( idx );
- Q_UINT16 glyphIndex;
+ TQ_UINT16 glyphIndex;
if ( idRangeoffset_t ) {
- Q_UINT16 id = getUShort( idRangeoffset_t + 2*(unicode - startIndex) + idx);
+ TQ_UINT16 id = getUShort( idRangeoffset_t + 2*(unicode - startIndex) + idx);
if ( id )
glyphIndex = ( idDelta + id ) % 0x10000;
else
@@ -1150,18 +1150,18 @@ static inline void checkXftCoverage( TQtFontFamily *family )
goto error;
unsigned char *ttf = (unsigned char *)map;
- Q_UINT32 version = getUInt( ttf );
+ TQ_UINT32 version = getUInt( ttf );
if ( version != 0x00010000 ) {
// tqDebug("file has wrong version %x", version );
goto error1;
}
- Q_UINT16 numTables = getUShort( ttf+4 );
+ TQ_UINT16 numTables = getUShort( ttf+4 );
unsigned char *table_dir = ttf + 12;
- Q_UINT32 cmap_offset = 0;
- Q_UINT32 cmap_length = 0;
+ TQ_UINT32 cmap_offset = 0;
+ TQ_UINT32 cmap_length = 0;
for ( int n = 0; n < numTables; n++ ) {
- Q_UINT32 tag = getUInt( table_dir + 16*n );
+ TQ_UINT32 tag = getUInt( table_dir + 16*n );
if ( tag == MAKE_TAG( 'c', 'm', 'a', 'p' ) ) {
cmap_offset = getUInt( table_dir + 16*n + 8 );
cmap_length = getUInt( table_dir + 16*n + 12 );
@@ -1193,7 +1193,7 @@ static inline void checkXftCoverage( TQtFontFamily *family )
unsigned char *unicode_table = 0;
bool symbol_table = TRUE;
for ( int n = 0; n < numTables; n++ ) {
- Q_UINT32 version = getUInt( cmap + 4 + 8*n );
+ TQ_UINT32 version = getUInt( cmap + 4 + 8*n );
// accept both symbol and Unicode encodings. prefer unicode.
if ( version == 0x00030001 || version == 0x00030000 ) {
unicode_table = cmap + getUInt( cmap + 4 + 8*n + 4 );
@@ -1209,7 +1209,7 @@ static inline void checkXftCoverage( TQtFontFamily *family )
goto error1;
}
- Q_UINT16 format = getUShort( unicode_table );
+ TQ_UINT16 format = getUShort( unicode_table );
if ( format != 4 )
goto error1;