| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ftconfig.h */ | 3 /* ftconfig.h */ |
| 4 /* */ | 4 /* */ |
| 5 /* ANSI-specific configuration file (specification only). */ | 5 /* ANSI-specific configuration file (specification only). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 1996-2004, 2006-2008, 2010-2011 by */ | 7 /* Copyright 1996-2004, 2006-2008, 2010-2011, 2013 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 /*************************************************************************/ | 193 /*************************************************************************/ |
| 194 /* */ | 194 /* */ |
| 195 /* <Type> */ | 195 /* <Type> */ |
| 196 /* FT_UInt32 */ | 196 /* FT_UInt32 */ |
| 197 /* */ | 197 /* */ |
| 198 /* A typedef for a 32bit unsigned integer type. The size depends on */ | 198 /* A typedef for a 32bit unsigned integer type. The size depends on */ |
| 199 /* the configuration. */ | 199 /* the configuration. */ |
| 200 /* */ | 200 /* */ |
| 201 typedef unsigned XXX FT_UInt32; | 201 typedef unsigned XXX FT_UInt32; |
| 202 | 202 |
| 203 |
| 204 /*************************************************************************/ |
| 205 /* */ |
| 206 /* <Type> */ |
| 207 /* FT_Int64 */ |
| 208 /* */ |
| 209 /* A typedef for a 64bit signed integer type. The size depends on */ |
| 210 /* the configuration. Only defined if there is real 64bit support; */ |
| 211 /* otherwise, it gets emulated with a structure (if necessary). */ |
| 212 /* */ |
| 213 typedef signed XXX FT_Int64; |
| 214 |
| 215 |
| 216 /*************************************************************************/ |
| 217 /* */ |
| 218 /* <Type> */ |
| 219 /* FT_UInt64 */ |
| 220 /* */ |
| 221 /* A typedef for a 64bit unsigned integer type. The size depends on */ |
| 222 /* the configuration. Only defined if there is real 64bit support; */ |
| 223 /* otherwise, it gets emulated with a structure (if necessary). */ |
| 224 /* */ |
| 225 typedef unsigned XXX FT_UInt64; |
| 226 |
| 203 /* */ | 227 /* */ |
| 204 | 228 |
| 205 #endif | 229 #endif |
| 206 | 230 |
| 207 #if FT_SIZEOF_INT == (32 / FT_CHAR_BIT) | 231 #if FT_SIZEOF_INT == (32 / FT_CHAR_BIT) |
| 208 | 232 |
| 209 typedef signed int FT_Int32; | 233 typedef signed int FT_Int32; |
| 210 typedef unsigned int FT_UInt32; | 234 typedef unsigned int FT_UInt32; |
| 211 | 235 |
| 212 #elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT) | 236 #elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 232 | 256 |
| 233 #endif | 257 #endif |
| 234 | 258 |
| 235 | 259 |
| 236 /* determine whether we have a 64-bit int type for platforms without */ | 260 /* determine whether we have a 64-bit int type for platforms without */ |
| 237 /* Autoconf */ | 261 /* Autoconf */ |
| 238 #if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) | 262 #if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) |
| 239 | 263 |
| 240 /* FT_LONG64 must be defined if a 64-bit type is available */ | 264 /* FT_LONG64 must be defined if a 64-bit type is available */ |
| 241 #define FT_LONG64 | 265 #define FT_LONG64 |
| 242 #define FT_INT64 long | 266 #define FT_INT64 long |
| 267 #define FT_UINT64 unsigned long |
| 243 | 268 |
| 244 #elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ | 269 #elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ |
| 245 | 270 |
| 246 /* this compiler provides the __int64 type */ | 271 /* this compiler provides the __int64 type */ |
| 247 #define FT_LONG64 | 272 #define FT_LONG64 |
| 248 #define FT_INT64 __int64 | 273 #define FT_INT64 __int64 |
| 274 #define FT_UINT64 unsigned __int64 |
| 249 | 275 |
| 250 #elif defined( __BORLANDC__ ) /* Borland C++ */ | 276 #elif defined( __BORLANDC__ ) /* Borland C++ */ |
| 251 | 277 |
| 252 /* XXXX: We should probably check the value of __BORLANDC__ in order */ | 278 /* XXXX: We should probably check the value of __BORLANDC__ in order */ |
| 253 /* to test the compiler version. */ | 279 /* to test the compiler version. */ |
| 254 | 280 |
| 255 /* this compiler provides the __int64 type */ | 281 /* this compiler provides the __int64 type */ |
| 256 #define FT_LONG64 | 282 #define FT_LONG64 |
| 257 #define FT_INT64 __int64 | 283 #define FT_INT64 __int64 |
| 284 #define FT_UINT64 unsigned __int64 |
| 258 | 285 |
| 259 #elif defined( __WATCOMC__ ) /* Watcom C++ */ | 286 #elif defined( __WATCOMC__ ) /* Watcom C++ */ |
| 260 | 287 |
| 261 /* Watcom doesn't provide 64-bit data types */ | 288 /* Watcom doesn't provide 64-bit data types */ |
| 262 | 289 |
| 263 #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ | 290 #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ |
| 264 | 291 |
| 265 #define FT_LONG64 | 292 #define FT_LONG64 |
| 266 #define FT_INT64 long long int | 293 #define FT_INT64 long long int |
| 294 #define FT_UINT64 unsigned long long int |
| 267 | 295 |
| 268 #elif defined( __GNUC__ ) | 296 #elif defined( __GNUC__ ) |
| 269 | 297 |
| 270 /* GCC provides the `long long' type */ | 298 /* GCC provides the `long long' type */ |
| 271 #define FT_LONG64 | 299 #define FT_LONG64 |
| 272 #define FT_INT64 long long int | 300 #define FT_INT64 long long int |
| 301 #define FT_UINT64 unsigned long long int |
| 273 | 302 |
| 274 #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ | 303 #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ |
| 275 | 304 |
| 276 | 305 |
| 277 /*************************************************************************/ | 306 /*************************************************************************/ |
| 278 /* */ | 307 /* */ |
| 279 /* A 64-bit data type will create compilation problems if you compile */ | 308 /* A 64-bit data type will create compilation problems if you compile */ |
| 280 /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ | 309 /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ |
| 281 /* is defined. You can however ignore this rule by defining the */ | 310 /* is defined. You can however ignore this rule by defining the */ |
| 282 /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ | 311 /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ |
| 283 /* */ | 312 /* */ |
| 284 #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) | 313 #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) |
| 285 | 314 |
| 286 #ifdef __STDC__ | 315 #ifdef __STDC__ |
| 287 | 316 |
| 288 /* undefine the 64-bit macros in strict ANSI compilation mode */ | 317 /* undefine the 64-bit macros in strict ANSI compilation mode */ |
| 289 #undef FT_LONG64 | 318 #undef FT_LONG64 |
| 290 #undef FT_INT64 | 319 #undef FT_INT64 |
| 291 | 320 |
| 292 #endif /* __STDC__ */ | 321 #endif /* __STDC__ */ |
| 293 | 322 |
| 294 #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ | 323 #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ |
| 295 | 324 |
| 325 #ifdef FT_LONG64 |
| 326 typedef FT_INT64 FT_Int64; |
| 327 typedef FT_UINT64 FT_UInt64; |
| 328 #endif |
| 329 |
| 296 | 330 |
| 297 #define FT_BEGIN_STMNT do { | 331 #define FT_BEGIN_STMNT do { |
| 298 #define FT_END_STMNT } while ( 0 ) | 332 #define FT_END_STMNT } while ( 0 ) |
| 299 #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT | 333 #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT |
| 300 | 334 |
| 301 | 335 |
| 302 #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER | 336 #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER |
| 303 /* Provide assembler fragments for performance-critical functions. */ | 337 /* Provide assembler fragments for performance-critical functions. */ |
| 304 /* These must be defined `static __inline__' with GCC. */ | 338 /* These must be defined `static __inline__' with GCC. */ |
| 305 | 339 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 | 382 |
| 349 __asm__ __volatile__ ( | 383 __asm__ __volatile__ ( |
| 350 "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ | 384 "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ |
| 351 "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ | 385 "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ |
| 352 "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ | 386 "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ |
| 353 "adds %1, %1, %0\n\t" /* %1 += %0 */ | 387 "adds %1, %1, %0\n\t" /* %1 += %0 */ |
| 354 "adc %2, %2, #0\n\t" /* %2 += carry */ | 388 "adc %2, %2, #0\n\t" /* %2 += carry */ |
| 355 "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ | 389 "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ |
| 356 "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ | 390 "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ |
| 357 : "=r"(a), "=&r"(t2), "=&r"(t) | 391 : "=r"(a), "=&r"(t2), "=&r"(t) |
| 358 : "r"(a), "r"(b) ); | 392 : "r"(a), "r"(b) |
| 393 : "cc" ); |
| 359 return a; | 394 return a; |
| 360 } | 395 } |
| 361 | 396 |
| 362 #endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ | 397 #endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ |
| 363 | 398 |
| 364 #if defined( __i386__ ) | 399 #if defined( __i386__ ) |
| 365 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386 | 400 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386 |
| 366 | 401 |
| 367 /* documentation is in freetype.h */ | 402 /* documentation is in freetype.h */ |
| 368 | 403 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 #endif /* FT_CALLBACK_TABLE */ | 589 #endif /* FT_CALLBACK_TABLE */ |
| 555 | 590 |
| 556 | 591 |
| 557 FT_END_HEADER | 592 FT_END_HEADER |
| 558 | 593 |
| 559 | 594 |
| 560 #endif /* __FTCONFIG_H__ */ | 595 #endif /* __FTCONFIG_H__ */ |
| 561 | 596 |
| 562 | 597 |
| 563 /* END */ | 598 /* END */ |
| OLD | NEW |