Formatting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450
diff --git a/ChangeLog b/ChangeLog
index 810dda2..33565b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,20 +1,35 @@
2001-06-19 David Turner <david@freetype.org>
- * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
- updated the Visual C++ project (for the 2.0.4 release)
-
- * builds/unix/detect.mk: added rule for AIX detection (which uses
- /usr/sbin/init instead of /sbin/init, go figure..)
-
- * include/freetype/fterrors.h: updated some of the error macros to
- simplify Werner's latest tricks :o)
-
- * include/freetype/freetype.h (FT_New_Memory_Face): updated docs
-
- Removing _lots_ of compiler warnings when the most pedantic warning
- levels of Visual C++ and Borland C++ are used. Too many files to be
- listed here.., but FT2 now compiles without warnings with VC++ and
- the "/W4" warning level (lint-style)
+ * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
+ Updated the Visual C++ project (for the 2.0.4 release).
+
+ * builds/unix/detect.mk: Added rule for AIX detection (which uses
+ /usr/sbin/init instead of /sbin/init).
+
+ * include/freetype/fterrors.h, src/*/*err*.h: Updated some of the
+ error macros to simplify handling of new error scheme.
+
+2001-06-19 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/fttypes.h (FT_ERROR_MODULE): New macro.
+
+2001-06-19 David Turner <david@freetype.org>
+
+ Removing _lots_ of compiler warnings when the most pedantic warning
+ levels of Visual C++ and Borland C++ are used. Too many files to be
+ listed here, but FT2 now compiles without warnings with VC++ and the
+ "/W4" warning level (lint-style).
+
+ * include/freetype/freetype.h (FT_New_Memory_Face): Updated
+ documentation.
+ * include/freetype/fttypes.h (FT_BOOL): New macro.
+ * include/freetype/internal/ftdebug.h: Add #pragma for Visual C++
+ to suppress warning.
+ * include/freetype/internal/ftstream.h (FT_GET_SHORT_{BE,LE},
+ FT_GET_OFF3_{BE,LE}, FT_GET_LONG_{BE,LE}): New macros.
+ (NEXT_*): Use them.
+ * src/autohint/ahglobal.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_New_Memory_Face): Add `const' to function declaration.
2001-06-18 Werner Lemberg <wl@gnu.org>
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 29195ac..c03c89d 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1536,10 +1536,10 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* the font data bytes are used _directly_ by the @FT_Face object. */
- /* this means that they're not copied, and that the client is */
+ /* The font data bytes are used _directly_ by the @FT_Face object. */
+ /* This means that they are not copied, and that the client is */
/* responsible for releasing/destroying them _after_ the */
- /* corresponding call to @FT_Done_Face */
+ /* corresponding call to @FT_Done_Face . */
/* */
/* Unlike FreeType 1.x, this function automatically creates a glyph */
/* slot for the face object which can be accessed directly through */
diff --git a/include/freetype/fterrors.h b/include/freetype/fterrors.h
index 3228f91..df18c79 100644
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -13,81 +13,88 @@
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
-/* */
-/* This special header file is used to define the FT2 enumeration */
-/* constants. It can also be used to generate error message strings */
-/* with a small macro trick explained below. */
-/* */
-/* I - Error Formats: */
-/* ------------------ */
-/* */
-/* Since release 2.1, the error constants have changed. The lower byte */
-/* of the error value gives the "generic" error code, while the higher */
-/* bytes indicates in which module the error occured. */
-/* */
-/* You can use the macro FT_ERROR_BASE(x) macro to extract the */
-/* generic error code from a FT_Error */
-/* */
-/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can */
-/* be undefined in ftoption.h in order to make the higher byte always */
-/* zero, in case you'd need to be compatible with previous versions */
-/* of FT2. */
-/* */
-/* */
-/* II - Error Message strings: */
-/* --------------------------- */
-/* */
-/* The error definitions below are made through special macros that */
-/* allow client applications to build a table of error message strings */
-/* if they need it. The strings are not included in a normal build of */
-/* FT2 to save space (most client apps do not use them) */
-/* */
-/* To do so, you'll need to define the following macros before */
-/* including this file: */
-/* */
-/* FT_ERROR_START_LIST :: */
-/* this macro is called before anything else to define the */
-/* start of the error list. It is followed by several */
-/* FT_ERROR_DEF calls (see below) */
-/* */
-/* FT_ERROR_DEF( e, v, s ) :: */
-/* this macro is called to define one single error. */
-/* 'e' is the error code identifier (e.g. FT_Err_Invalid_Argument) */
-/* 'v' is the error numerical value */
-/* 's' is the corresponding error string */
-/* */
-/* FT_ERROR_END_LIST :: */
-/* this macro is used to end the list. */
-/* */
-/* Additionally, you'll need to undefine __FTERRORS_H__ before */
-/* #including this file. */
-/* */
-/* Here's a simple example: */
-/* */
-/* { */
-/* #undef __FTERRORS_H__ */
-/* #define FT_ERRORDEF( e, v, s ) { e, s }, */
-/* #define FT_ERROR_START_LIST { */
-/* #define FT_ERROR_END_LIST { 0, 0 } }; */
-/* */
-/* const struct */
-/* { */
-/* int err_code; */
-/* const char* err_msg */
-/* } ft_errors[] = */
-/* */
-/* #include FT_ERRORS_H */
-/* } */
-/* */
-/* */
/***************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* This special header file is used to define the FT2 enumeration */
+ /* constants. It can also be used to generate error message strings */
+ /* with a small macro trick explained below. */
+ /* */
+ /* I - Error Formats */
+ /* ----------------- */
+ /* */
+ /* Since release 2.1, the error constants have changed. The lower */
+ /* byte of the error value gives the "generic" error code, while the */
+ /* higher byte indicates in which module the error occured. */
+ /* */
+ /* You can use the macro FT_ERROR_BASE(x) macro to extract the generic */
+ /* error code from an FT_Error value. */
+ /* */
+ /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
+ /* undefined in ftoption.h in order to make the higher byte always */
+ /* zero, in case you need to be compatible with previous versions of */
+ /* FreeType 2. */
+ /* */
+ /* */
+ /* II - Error Message strings */
+ /* -------------------------- */
+ /* */
+ /* The error definitions below are made through special macros that */
+ /* allow client applications to build a table of error message strings */
+ /* if they need it. The strings are not included in a normal build of */
+ /* FreeType 2 to save space (most client applications do not use */
+ /* them). */
+ /* */
+ /* To do so, you have to define the following macros before including */
+ /* this file: */
+ /* */
+ /* FT_ERROR_START_LIST :: */
+ /* This macro is called before anything else to define the start of */
+ /* the error list. It is followed by several FT_ERROR_DEF calls */
+ /* (see below). */
+ /* */
+ /* FT_ERROR_DEF( e, v, s ) :: */
+ /* This macro is called to define one single error. */
+ /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */
+ /* `v' is the error numerical value. */
+ /* `s' is the corresponding error string. */
+ /* */
+ /* FT_ERROR_END_LIST :: */
+ /* This macro ends the list. */
+ /* */
+ /* Additionally, you have to undefine __FTERRORS_H__ before #including */
+ /* this file. */
+ /* */
+ /* Here is a simple example: */
+ /* */
+ /* { */
+ /* #undef __FTERRORS_H__ */
+ /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
+ /* #define FT_ERROR_START_LIST { */
+ /* #define FT_ERROR_END_LIST { 0, 0 } }; */
+ /* */
+ /* const struct */
+ /* { */
+ /* int err_code; */
+ /* const char* err_msg */
+ /* } ft_errors[] = */
+ /* */
+ /* #include FT_ERRORS_H */
+ /* } */
+ /* */
+ /*************************************************************************/
+
+
#ifndef __FTERRORS_H__
#define __FTERRORS_H__
-/* include module base error codes */
+
+ /* include module base error codes */
#include FT_MODULE_ERRORS_H
+
/*******************************************************************/
/*******************************************************************/
/***** *****/
@@ -95,73 +102,76 @@
/***** *****/
/*******************************************************************/
/*******************************************************************/
+
-#undef FT_NEED_EXTERN_C
-#define FT_ERR_XCAT(x,y) x ## y
-#define FT_ERR_CAT(x,y) FT_ERR_XCAT(x,y)
+#undef FT_NEED_EXTERN_C
+#define FT_ERR_XCAT( x, y ) x ## y
+#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
-/* FT_ERR_PREFIX is used as a prefix for error identifiers */
-/* by default, we use "FT_Err_" */
-/* */
-#ifndef FT_ERR_PREFIX
-# define FT_ERR_PREFIX FT_Err_
+ /* FT_ERR_PREFIX is used as a prefix for error identifiers. */
+ /* By default, we use `FT_Err_'. */
+ /* */
+#ifndef FT_ERR_PREFIX
+#define FT_ERR_PREFIX FT_Err_
#endif
-
-/* FT_ERR_BASE is used as the base for module-specific errors */
-/* */
+ /* FT_ERR_BASE is used as the base for module-specific errors. */
+ /* */
#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-# ifndef FT_ERR_BASE
-# define FT_ERR_BASE FT_Mod_Err_Base
-# endif
-#else
-# define FT_ERR_BASE 0
+
+#ifndef FT_ERR_BASE
+#define FT_ERR_BASE FT_Mod_Err_Base
#endif
+#else
+#define FT_ERR_BASE 0
-/* if FT_ERRORDEF is not defined, we need to define a simple enumeration */
-/* type.. */
-/* */
-#ifndef FT_ERRORDEF
+#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */
-# define FT_ERRORDEF( e, v, s ) e = v,
-# define FT_ERROR_START_LIST enum {
-# define FT_ERROR_END_LIST FT_ERR_CAT(FT_ERR_PREFIX,Max) };
-# ifdef __cplusplus
-# define FT_NEED_EXTERN_C
- extern "C" {
-# endif
+ /* If FT_ERRORDEF is not defined, we need to define a simple */
+ /* enumeration type. */
+ /* */
+#ifndef FT_ERRORDEF
-#endif /* !FT_ERRORDEF */
+#define FT_ERRORDEF( e, v, s ) e = v,
+#define FT_ERROR_START_LIST enum {
+#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) };
+#ifdef __cplusplus
+#define FT_NEED_EXTERN_C
+ extern "C" {
+#endif
-/* this macro is used to define an error */
-# define FT_ERRORDEF_( e, v, s ) \
- FT_ERRORDEF( FT_ERR_CAT(FT_ERR_PREFIX,e), v + FT_ERR_BASE, s )
+#endif /* !FT_ERRORDEF */
-/* this is only used for FT_Err_Ok, which must be 0 !! */
-# define FT_NOERRORDEF_( e, v, s ) \
- FT_ERRORDEF( FT_ERR_CAT(FT_ERR_PREFIX,e), v, s )
+ /* this macro is used to define an error */
+#define FT_ERRORDEF_( e, v, s ) \
+ FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
+ /* this is only used for FT_Err_Ok, which must be 0! */
+#define FT_NOERRORDEF_( e, v, s ) \
+ FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
/*******************************************************************/
/*******************************************************************/
/***** *****/
- /***** LIST ERROR CODES/MESSAGES *****/
+ /***** LIST OF ERROR CODES/MESSAGES *****/
/***** *****/
/*******************************************************************/
/*******************************************************************/
+
#ifdef FT_ERROR_START_LIST
FT_ERROR_START_LIST
#endif
+
/* generic errors */
FT_NOERRORDEF_( Ok, 0x00, \
@@ -342,10 +352,11 @@
FT_ERROR_END_LIST
#endif
+
/*******************************************************************/
/*******************************************************************/
/***** *****/
- /***** SIMPLE CLEANUPP *****/
+ /***** SIMPLE CLEANUP *****/
/***** *****/
/*******************************************************************/
/*******************************************************************/
diff --git a/include/freetype/ftmoderr.h b/include/freetype/ftmoderr.h
index 0ebbc69..94659a3 100644
--- a/include/freetype/ftmoderr.h
+++ b/include/freetype/ftmoderr.h
@@ -66,25 +66,28 @@
/*******************************************************************/
/*******************************************************************/
+
#undef FT_NEED_EXTERN_C
+
#ifndef FT_MODERRDEF
-# ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-# define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v,
-# else
-# define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0,
-# endif
+#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v,
+#else
+#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0,
+#endif
-# define FT_MODERR_START_LIST enum {
-# define FT_MODERR_END_LIST FT_Mod_Err_Max };
+#define FT_MODERR_START_LIST enum {
+#define FT_MODERR_END_LIST FT_Mod_Err_Max };
-# ifdef __cplusplus
-# define FT_NEED_EXTERN_C
+#ifdef __cplusplus
+#define FT_NEED_EXTERN_C
extern "C" {
-# endif
+#endif
#endif /* !FT_MODERRDEF */
+
/*******************************************************************/
/*******************************************************************/
/***** *****/
@@ -93,6 +96,7 @@
/*******************************************************************/
/*******************************************************************/
+
#ifdef FT_MODERR_START_LIST
FT_MODERR_START_LIST
#endif
@@ -118,6 +122,7 @@
FT_MODERR_END_LIST
#endif
+
/*******************************************************************/
/*******************************************************************/
/***** *****/
@@ -126,6 +131,7 @@
/*******************************************************************/
/*******************************************************************/
+
#ifdef FT_NEED_EXTERN_C
}
#endif
diff --git a/include/freetype/fttypes.h b/include/freetype/fttypes.h
index 4a7ce5c..46ce075 100644
--- a/include/freetype/fttypes.h
+++ b/include/freetype/fttypes.h
@@ -510,9 +510,12 @@ FT_BEGIN_HEADER
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
/* return base error code (without module-specific prefix) */
-#define FT_ERROR_BASE( x ) ( (x) & 255 )
+#define FT_ERROR_BASE( x ) ( (x) & 0xFF )
-#define FT_BOOL(x) ((FT_Bool)(x))
+ /* return module error code */
+#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U )
+
+#define FT_BOOL( x ) ( (FT_Bool)( x ) )
FT_END_HEADER
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index d49d163..9293640 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -221,10 +221,11 @@ FT_BEGIN_HEADER
#define FT_TRACE6( varformat ) FT_TRACE( 6, varformat )
#define FT_TRACE7( varformat ) FT_TRACE( 7, varformat )
+
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
-/* we disable the warnings "conditional expression is constant" here */
-/* in order to compile cleanly with the maximum level of warnings */
+ /* we disable the warning `conditional expression is constant' here */
+ /* in order to compile cleanly with the maximum level of warnings */
#pragma warning( disable : 4127 )
#endif /* _MSC_VER */
diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h
index 4789693..8e8bc32 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -144,35 +144,34 @@ FT_BEGIN_HEADER
/* type `char*' or equivalent (1-byte elements). */
/* */
-#define FT_GET_SHORT_BE(p) \
- ((short)( ((signed char)(p)[0] << 8) | \
- (p)[1] ))
-
-#define FT_GET_OFF3_BE(p) \
- ((long) ( ((signed char)(p)[0] << 16) | \
- ((p)[1] << 8) | \
- (p)[2] ))
-
-#define FT_GET_LONG_BE(p) \
- ((long) ( ((signed char)(p)[0] << 24) | \
- ((p)[1] << 16) | \
- ((p)[2] << 8) | \
- (p)[3] ))
-
-#define FT_GET_SHORT_LE(p) \
- ((short)( ((signed char)(p)[1] << 8) | \
- (p)[0] ))
-
-#define FT_GET_OFF3_LE(p) \
- ((long) ( ((signed char)(p)[2] << 16) | \
- ((p)[1] << 8) | \
- (p)[0] ))
-
-#define FT_GET_LONG_LE(p) \
- ((long) ( ((signed char)(p)[3] << 24) | \
- ((p)[2] << 16) | \
- ((p)[1] << 8) | \
- (p)[0] ))
+#define FT_GET_SHORT_BE( p ) \
+ ( (short)( ( (signed char)(p)[0] << 8 ) | \
+ (p)[1] ) )
+
+#define FT_GET_OFF3_BE( p ) \
+ ( (long) ( ( (signed char)(p)[0] << 16 ) | \
+ ( (p)[1] << 8 ) | \
+ (p)[2] ) )
+
+#define FT_GET_LONG_BE( p ) \
+ ( (long) ( ( (signed char)(p)[0] << 24 ) | \
+ ( (p)[1] << 16 ) | \
+ ( (p)[2] << 8 ) | \
+ (p)[3] ) )
+
+#define FT_GET_SHORT_LE( p ) \
+ ( (short)( ( (signed char)(p)[1] << 8 ) | \
+ (p)[0] ) )
+
+#define FT_GET_OFF3_LE( p ) \
+ ( (long) ( ( (signed char)(p)[2] << 16 ) | \
+ (p)[0] ) )
+
+#define FT_GET_LONG_LE( p ) \
+ ( (long) ( ( (signed char)(p)[3] << 24 ) | \
+ ( (p)[2] << 16 ) | \
+ ( (p)[1] << 8 ) | \
+ (p)[0] ) )
#define NEXT_Char( buffer ) \
( (signed char)*buffer++ )
@@ -180,42 +179,42 @@ FT_BEGIN_HEADER
#define NEXT_Byte( buffer ) \
( (unsigned char)*buffer++ )
-#define NEXT_Short( buffer ) \
- ( (short)( buffer += 2, FT_GET_SHORT_BE(buffer-2) ) )
+#define NEXT_Short( buffer ) \
+ ( (short)( buffer += 2, FT_GET_SHORT_BE( buffer - 2 ) ) )
-#define NEXT_UShort( buffer ) \
+#define NEXT_UShort( buffer ) \
( (unsigned short)NEXT_Short( buffer ) )
#define NEXT_Offset( buffer ) \
- ( (long)( buffer += 3, FT_GET_OFF3_BE(buffer-3) ) )
+ ( (long)( buffer += 3, FT_GET_OFF3_BE( buffer - 3 ) ) )
-#define NEXT_UOffset( buffer ) \
+#define NEXT_UOffset( buffer ) \
( (unsigned long)NEXT_Offset( buffer ) )
#define NEXT_Long( buffer ) \
- ( (long)( buffer += 4, FT_GET_LONG_BE(buffer-4) ) )
+ ( (long)( buffer += 4, FT_GET_LONG_BE( buffer - 4 ) ) )
-#define NEXT_ULong( buffer ) \
+#define NEXT_ULong( buffer ) \
( (unsigned long)NEXT_Long( buffer ) )
-#define NEXT_ShortLE( buffer ) \
- ( (short)( buffer += 2, FT_GET_SHORT_LE(buffer-2) ) )
+#define NEXT_ShortLE( buffer ) \
+ ( (short)( buffer += 2, FT_GET_SHORT_LE( buffer - 2 ) ) )
-#define NEXT_UShortLE( buffer ) \
+#define NEXT_UShortLE( buffer ) \
( (unsigned short)NEXT_ShortLE( buffer ) )
-#define NEXT_OffsetLE( buffer ) \
- ( (long)( buffer += 3, FT_GET_OFF3_LE(buffer-3) ) )
+#define NEXT_OffsetLE( buffer ) \
+ ( (long)( buffer += 3, FT_GET_OFF3_LE( buffer - 3 ) ) )
-#define NEXT_UOffsetLE( buffer ) \
+#define NEXT_UOffsetLE( buffer ) \
( (unsigned long)NEXT_OffsetLE( buffer ) )
-#define NEXT_LongLE( buffer ) \
- ( (long)( buffer += 4, FT_GET_LONG_LE(buffer-4) ) )
+#define NEXT_LongLE( buffer ) \
+ ( (long)( buffer += 4, FT_GET_LONG_LE( buffer - 4 ) ) )
-#define NEXT_ULongLE( buffer ) \
+#define NEXT_ULongLE( buffer ) \
( (unsigned long)NEXT_LongLE( buffer ) )
diff --git a/src/autohint/aherrors.h b/src/autohint/aherrors.h
index 0965d1f..bce6107 100644
--- a/src/autohint/aherrors.h
+++ b/src/autohint/aherrors.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX AH_Err_
-#define FT_ERR_BASE FT_Mod_Err_Autohint
+#define FT_ERR_PREFIX AH_Err_
+#define FT_ERR_BASE FT_Mod_Err_Autohint
#include FT_ERRORS_H
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index 688e782..be0d09b 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -558,7 +558,7 @@
for ( ; contour < contour_limit; contour++, end++ )
{
contour[0] = points + index;
- index = (short)(end[0] + 1);
+ index = (short)( end[0] + 1 );
}
}
@@ -961,7 +961,7 @@
is_dir = (FT_Bool)( seg1->dir == outline->horz_major_dir ||
seg1->dir == outline->vert_major_dir );
- is_pos = (FT_Bool)(pos1 > pos2);
+ is_pos = (FT_Bool)( pos1 > pos2 );
if ( pos1 == pos2 || !(is_dir ^ is_pos) )
continue;
@@ -1199,7 +1199,7 @@
/* check for links -- if seg->serif is set, then seg->link must */
/* be ignored */
- is_serif = (FT_Bool)(seg->serif && seg->serif->edge != edge);
+ is_serif = (FT_Bool)( seg->serif && seg->serif->edge != edge );
if ( seg->link || is_serif )
{
@@ -1371,8 +1371,10 @@
/* zone, check for left edges */
/* */
/* of course, that's for TrueType XXX */
- FT_Bool is_top_blue = FT_BOOL(AH_IS_TOP_BLUE( blue ));
- FT_Bool is_major_dir = FT_BOOL(edge->dir == outline->horz_major_dir);
+ FT_Bool is_top_blue =
+ FT_BOOL( AH_IS_TOP_BLUE( blue ) );
+ FT_Bool is_major_dir =
+ FT_BOOL( edge->dir == outline->horz_major_dir );
if ( !blue_active[blue] )
continue;
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 19ff545..01b07bf 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -529,13 +529,17 @@
FT_UInt n;
- base->outline.n_points = (short)( base->outline.n_points + current->outline.n_points );
- base->outline.n_contours = (short)( base->outline.n_contours + current->outline.n_contours );
- base->num_subglyphs += current->num_subglyphs;
+ base->outline.n_points =
+ (short)( base->outline.n_points + current->outline.n_points );
+ base->outline.n_contours =
+ (short)( base->outline.n_contours + current->outline.n_contours );
+
+ base->num_subglyphs += current->num_subglyphs;
/* adjust contours count in newest outline */
for ( n = 0; n < n_curr_contours; n++ )
- current->outline.contours[n] = (short)( current->outline.contours[n] + n_base_points );
+ current->outline.contours[n] =
+ (short)( current->outline.contours[n] + n_base_points );
/* prepare for another new glyph image */
FT_GlyphLoader_Prepare( loader );
@@ -844,10 +848,11 @@
/* do we need to load the glyph through the auto-hinter? */
library = driver->root.library;
hinter = library->auto_hinter;
- autohint = FT_BOOL( hinter &&
+ autohint =
+ FT_BOOL( hinter &&
!( load_flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING ) ) &&
- FT_DRIVER_IS_SCALABLE(driver) &&
- FT_DRIVER_USES_OUTLINES(driver) );
+ FT_DRIVER_IS_SCALABLE( driver ) &&
+ FT_DRIVER_USES_OUTLINES( driver ) );
if ( autohint )
{
if ( FT_DRIVER_HAS_HINTER( driver ) &&
@@ -1172,7 +1177,8 @@
*aface = 0;
- external_stream = FT_BOOL(( args->flags & ft_open_stream ) && args->stream);
+ external_stream = FT_BOOL( ( args->flags & ft_open_stream ) &&
+ args->stream );
/* create input stream */
error = ft_new_input_stream( library, args, &stream );
diff --git a/src/base/ftstream.c b/src/base/ftstream.c
index 3c18497..1ada68c 100644
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -31,10 +31,10 @@
#define FT_COMPONENT trace_stream
- FT_BASE_DEF( void ) FT_New_Memory_Stream( FT_Library library,
- FT_Byte* base,
- FT_ULong size,
- FT_Stream stream )
+ FT_BASE_DEF( void ) FT_New_Memory_Stream( FT_Library library,
+ FT_Byte* base,
+ FT_ULong size,
+ FT_Stream stream )
{
stream->memory = library->memory;
stream->base = base;
diff --git a/src/cache/ftcchunk.c b/src/cache/ftcchunk.c
index 316ffc3..980636b 100644
--- a/src/cache/ftcchunk.c
+++ b/src/cache/ftcchunk.c
@@ -50,9 +50,10 @@
data->ref_count = (FT_Short) 0;
node->cset = cset;
node->cset_index = (FT_UShort)index;
- node->num_elements = (unsigned short)(( index + 1 < cset->num_chunks )
- ? cset->element_count
- : cset->element_max - cset->element_count*index );
+ node->num_elements = (unsigned short)(
+ ( index + 1 < cset->num_chunks )
+ ? cset->element_count
+ : cset->element_max - cset->element_count*index );
if ( alloc )
{
/* allocate elements array */
diff --git a/src/cache/ftcerror.h b/src/cache/ftcerror.h
index dc0a5c6..5998d42 100644
--- a/src/cache/ftcerror.h
+++ b/src/cache/ftcerror.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX FTC_Err_
-#define FT_ERR_BASE FT_Mod_Err_Cache
+#define FT_ERR_PREFIX FTC_Err_
+#define FT_ERR_BASE FT_Mod_Err_Cache
#include FT_ERRORS_H
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 693403f..f76643d 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -225,7 +225,7 @@
FT_Bool ftc_image_set_compare( FTC_ImageSet iset,
FTC_Image_Desc* type )
{
- return FT_BOOL(!memcmp( &iset->description, type, sizeof ( *type ) ));
+ return FT_BOOL( !memcmp( &iset->description, type, sizeof ( *type ) ) );
}
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 76c02ce..78b1740 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -74,7 +74,7 @@
{
FT_UNUSED( lru );
- return FT_BOOL(((FT_Size)node->root.data)->face == (FT_Face)data);
+ return FT_BOOL( ((FT_Size)node->root.data)->face == (FT_Face)data );
}
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 4d236c6..934d3a9 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -317,7 +317,7 @@
FT_Bool ftc_sbit_chunk_set_compare( FTC_SBitSet sset,
FTC_Image_Desc* type )
{
- return FT_BOOL(!memcmp( &sset->desc, type, sizeof ( *type ) ));
+ return FT_BOOL( !memcmp( &sset->desc, type, sizeof ( *type ) ) );
}
diff --git a/src/cff/cfferrs.h b/src/cff/cfferrs.h
index 0eb704f..1b2a5c9 100644
--- a/src/cff/cfferrs.h
+++ b/src/cff/cfferrs.h
@@ -29,8 +29,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX CFF_Err_
-#define FT_ERR_BASE FT_Mod_Err_CFF
+#define FT_ERR_PREFIX CFF_Err_
+#define FT_ERR_BASE FT_Mod_Err_CFF
#include FT_ERRORS_H
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 048e5a2..8b25e7e 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -409,7 +409,7 @@
point->x = x >> 16;
point->y = y >> 16;
- *control = (FT_Byte)(flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic);
+ *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
builder->last = *point;
}
@@ -452,7 +452,8 @@
if ( !error )
{
if ( outline->n_contours > 0 )
- outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
outline->n_contours++;
}
@@ -512,7 +513,8 @@
}
if ( outline->n_contours > 0 )
- outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
}
@@ -655,7 +657,7 @@
FT_Outline dummy;
- dummy.n_points = (short)(base->n_points - n_base_points);
+ dummy.n_points = (short)( base->n_points - n_base_points );
dummy.points = base->points + n_base_points;
FT_Outline_Translate( &dummy, adx, ady );
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index d9f4e6d..ea8eee6 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -385,10 +385,11 @@
root->num_glyphs = cff->charstrings_index.count;
/* set global bbox, as well as EM size */
- root->bbox = dict->font_bbox;
- root->ascender = (FT_Short)( root->bbox.yMax >> 16 );
- root->descender = (FT_Short)( root->bbox.yMin >> 16 );
- root->height = (FT_Short)(( ( root->ascender - root->descender ) * 12 ) / 10);
+ root->bbox = dict->font_bbox;
+ root->ascender = (FT_Short)( root->bbox.yMax >> 16 );
+ root->descender = (FT_Short)( root->bbox.yMin >> 16 );
+ root->height = (FT_Short)(
+ ( ( root->ascender - root->descender ) * 12 ) / 10 );
if ( dict->units_per_em )
root->units_per_EM = dict->units_per_em;
diff --git a/src/cid/ciderrs.h b/src/cid/ciderrs.h
index c019e47..01813e1 100644
--- a/src/cid/ciderrs.h
+++ b/src/cid/ciderrs.h
@@ -29,8 +29,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX CID_Err_
-#define FT_ERR_BASE FT_Mod_Err_CID
+#define FT_ERR_PREFIX CID_Err_
+#define FT_ERR_BASE FT_Mod_Err_CID
#include FT_ERRORS_H
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index 8addfae..1f45fa2 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -71,7 +71,7 @@
plain = (FT_Byte)( *buffer ^ ( seed >> 8 ) );
- seed = (FT_UShort)(( *buffer + seed ) * 52845 + 22719);
+ seed = (FT_UShort)( ( *buffer + seed ) * 52845 + 22719 );
*buffer++ = plain;
length--;
}
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index f2c7377..efca5ec 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -223,14 +223,14 @@
root->num_fixed_sizes = 0;
root->available_sizes = 0;
- root->bbox = face->cid.font_bbox;
+ root->bbox = face->cid.font_bbox;
if ( !root->units_per_EM )
root->units_per_EM = 1000;
- root->ascender = (FT_Short)( face->cid.font_bbox.yMax >> 16 );
- root->descender = (FT_Short)( face->cid.font_bbox.yMin >> 16 );
- root->height = (FT_Short)( (( root->ascender + root->descender ) * 12 )
- / 10 );
+ root->ascender = (FT_Short)( face->cid.font_bbox.yMax >> 16 );
+ root->descender = (FT_Short)( face->cid.font_bbox.yMin >> 16 );
+ root->height = (FT_Short)(
+ ( ( root->ascender + root->descender ) * 12 ) / 10 );
#if 0
diff --git a/src/pcf/pcferror.h b/src/pcf/pcferror.h
index 6e0e8d9..d75c067 100644
--- a/src/pcf/pcferror.h
+++ b/src/pcf/pcferror.h
@@ -29,8 +29,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX PCF_Err_
-#define FT_ERR_BASE FT_Mod_Err_PCF
+#define FT_ERR_PREFIX PCF_Err_
+#define FT_ERR_BASE FT_Mod_Err_PCF
#include FT_ERRORS_H
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 1b1f4d2..5f8269d 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -224,12 +224,17 @@ THE SOFTWARE.
if ( READ_Fields( pcf_compressed_metric_header, &compr_metric ) )
return error;
- metric->leftSideBearing = (FT_Short)(compr_metric.leftSideBearing - 0x80);
- metric->rightSideBearing = (FT_Short)(compr_metric.rightSideBearing - 0x80);
- metric->characterWidth = (FT_Short)(compr_metric.characterWidth - 0x80);
- metric->ascent = (FT_Short)(compr_metric.ascent - 0x80);
- metric->descent = (FT_Short)(compr_metric.descent - 0x80);
- metric->attributes = 0;
+ metric->leftSideBearing =
+ (FT_Short)( compr_metric.leftSideBearing - 0x80 );
+ metric->rightSideBearing =
+ (FT_Short)( compr_metric.rightSideBearing - 0x80 );
+ metric->characterWidth =
+ (FT_Short)( compr_metric.characterWidth - 0x80 );
+ metric->ascent =
+ (FT_Short)( compr_metric.ascent - 0x80 );
+ metric->descent =
+ (FT_Short)( compr_metric.descent - 0x80 );
+ metric->attributes = 0;
return PCF_Err_Ok;
}
diff --git a/src/psaux/psauxerr.h b/src/psaux/psauxerr.h
index f763653..d0baa3c 100644
--- a/src/psaux/psauxerr.h
+++ b/src/psaux/psauxerr.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX PSaux_Err_
-#define FT_ERR_BASE FT_Mod_Err_PSaux
+#define FT_ERR_PREFIX PSaux_Err_
+#define FT_ERR_BASE FT_Mod_Err_PSaux
#include FT_ERRORS_H
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index c35c688..28306ee 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -925,7 +925,8 @@
old_limit = parser->limit;
/* we store the elements count */
- *(FT_Byte*)( (FT_Byte*)objects[0] + field->count_offset ) = (FT_Byte)num_elements;
+ *(FT_Byte*)( (FT_Byte*)objects[0] + field->count_offset ) =
+ (FT_Byte)num_elements;
/* we now load each element, adjusting the field.offset on each one */
token = elements;
@@ -1156,7 +1157,7 @@
}
point->x = x;
point->y = y;
- *control = (FT_Byte)(flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic);
+ *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
builder->last = *point;
}
@@ -1199,7 +1200,8 @@
if ( !error )
{
if ( outline->n_contours > 0 )
- outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
outline->n_contours++;
}
@@ -1260,7 +1262,8 @@
}
if ( outline->n_contours > 0 )
- outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+ outline->contours[outline->n_contours - 1] =
+ (short)( outline->n_points - 1 );
}
@@ -1282,8 +1285,8 @@
FT_Byte plain;
- plain = (FT_Byte) ( *buffer ^ ( seed >> 8 ) );
- seed = (FT_UShort)(( *buffer + seed ) * 52845 + 22719 );
+ plain = (FT_Byte)( *buffer ^ ( seed >> 8 ) );
+ seed = (FT_UShort)( ( *buffer + seed ) * 52845 + 22719 );
*buffer++ = plain;
length--;
}
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index dfd4b00..77bae29 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -284,8 +284,8 @@
FT_Outline dummy;
- dummy.n_points = (short)(base->n_points - n_base_points);
- dummy.points = base->points + n_base_points;
+ dummy.n_points = (short)( base->n_points - n_base_points );
+ dummy.points = base->points + n_base_points;
FT_Outline_Translate( &dummy, adx - asb, ady );
}
diff --git a/src/psnames/psnamerr.h b/src/psnames/psnamerr.h
index 134845a..ae1541d 100644
--- a/src/psnames/psnamerr.h
+++ b/src/psnames/psnamerr.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX PSnames_Err_
-#define FT_ERR_BASE FT_Mod_Err_PSnames
+#define FT_ERR_PREFIX PSnames_Err_
+#define FT_ERR_BASE FT_Mod_Err_PSnames
#include FT_ERRORS_H
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index c819622..fb2ab1d 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -1833,7 +1833,9 @@
ras.state = Unknown;
ras.gProfile = NULL;
- if ( Decompose_Curve( RAS_VARS (unsigned short)start, ras.outline.contours[i], flipped ) )
+ if ( Decompose_Curve( RAS_VARS (unsigned short)start,
+ ras.outline.contours[i],
+ flipped ) )
return FAILURE;
start = ras.outline.contours[i] + 1;
@@ -2755,7 +2757,7 @@
Sort( &draw_right );
y_change = (Short)ras.sizeBuff[-ras.numTurns--];
- y_height = (Short)(y_change - y);
+ y_height = (Short)( y_change - y );
while ( y < y_change )
{
@@ -2929,7 +2931,7 @@
i = ras.band_stack[ras.band_top].y_min;
j = ras.band_stack[ras.band_top].y_max;
- k = (Short)(( i + j ) / 2);
+ k = (Short)( ( i + j ) / 2 );
if ( ras.band_top >= 7 || k < i )
{
@@ -2942,7 +2944,7 @@
ras.band_stack[ras.band_top + 1].y_min = k;
ras.band_stack[ras.band_top + 1].y_max = j;
- ras.band_stack[ras.band_top].y_max = (Short)(k - 1);
+ ras.band_stack[ras.band_top].y_max = (Short)( k - 1 );
ras.band_top++;
}
@@ -2980,7 +2982,8 @@
ft_outline_high_precision );
ras.scale_shift = ras.precision_shift;
ras.dropOutControl = 2;
- ras.second_pass = (FT_Byte)(!( ras.outline.flags & ft_outline_single_pass ));
+ ras.second_pass = (FT_Byte)( !( ras.outline.flags &
+ ft_outline_single_pass ) );
/* Vertical Sweep */
ras.Proc_Sweep_Init = Vertical_Sweep_Init;
@@ -2990,7 +2993,7 @@
ras.band_top = 0;
ras.band_stack[0].y_min = 0;
- ras.band_stack[0].y_max = (short)(ras.target.rows - 1);
+ ras.band_stack[0].y_max = (short)( ras.target.rows - 1 );
ras.bWidth = (unsigned short)ras.target.width;
ras.bTarget = (Byte*)ras.target.buffer;
@@ -3008,7 +3011,7 @@
ras.band_top = 0;
ras.band_stack[0].y_min = 0;
- ras.band_stack[0].y_max = (short)(ras.target.width - 1);
+ ras.band_stack[0].y_max = (short)( ras.target.width - 1 );
if ( ( error = Render_Single_Pass( RAS_VARS 1 ) ) != 0 )
return error;
diff --git a/src/raster/rasterrs.h b/src/raster/rasterrs.h
index 3e4d5fe..5df9a7a 100644
--- a/src/raster/rasterrs.h
+++ b/src/raster/rasterrs.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX Raster_Err_
-#define FT_ERR_BASE FT_Mod_Err_Raster
+#define FT_ERR_PREFIX Raster_Err_
+#define FT_ERR_BASE FT_Mod_Err_Raster
#include FT_ERRORS_H
diff --git a/src/sfnt/sferrors.h b/src/sfnt/sferrors.h
index d9c4f76..fd2736b 100644
--- a/src/sfnt/sferrors.h
+++ b/src/sfnt/sferrors.h
@@ -29,8 +29,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX SFNT_Err_
-#define FT_ERR_BASE FT_Mod_Err_SFNT
+#define FT_ERR_PREFIX SFNT_Err_
+#define FT_ERR_BASE FT_Mod_Err_SFNT
#include FT_ERRORS_H
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 2392fd8..2ba73c5 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -286,7 +286,7 @@
/* if this font doesn't contain outlines, we try to load */
/* a `bhed' table */
if ( !has_outline )
- is_apple_sbit = FT_BOOL(!LOAD_( bitmap_header ));
+ is_apple_sbit = FT_BOOL( !LOAD_( bitmap_header ) );
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -544,7 +544,7 @@
/* if the line_gap is 0, we add an extra 15% to the text height -- */
/* this computation is based on various versions of Times New Roman */
if ( face->horizontal.Line_Gap == 0 )
- root->height = (FT_Short)(( root->height * 115 + 50 ) / 100 );
+ root->height = (FT_Short)( ( root->height * 115 + 50 ) / 100 );
#if 0
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index e2584f2..1c0b9f5 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -123,7 +123,7 @@
for ( i = 0; i < 256; i++ )
{
- u = (FT_UShort)(GET_UShort() / 8);
+ u = (FT_UShort)( GET_UShort() / 8 );
cmap2->subHeaderKeys[i] = u;
if ( num_SH < u )
@@ -151,7 +151,8 @@
cmap2sub->entryCount = GET_UShort();
cmap2sub->idDelta = GET_Short();
/* we apply the location offset immediately */
- cmap2sub->idRangeOffset = (FT_UShort)( GET_UShort() - ( num_SH - i ) * 8 - 2 );
+ cmap2sub->idRangeOffset = (FT_UShort)(
+ GET_UShort() - ( num_SH - i ) * 8 - 2 );
cmap2sub++;
}
@@ -185,7 +186,7 @@
cmap4->entrySelector = GET_UShort();
cmap4->rangeShift = GET_UShort();
- num_Seg = (FT_UShort)(cmap4->segCountX2 / 2);
+ num_Seg = (FT_UShort)( cmap4->segCountX2 / 2 );
FORGET_Frame();
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 7a7486c..8f4e366 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -604,11 +604,13 @@
face->root.num_glyphs = maxProfile->numGlyphs;
- face->root.internal->max_points = (FT_UShort)MAX( maxProfile->maxCompositePoints,
- maxProfile->maxPoints );
+ face->root.internal->max_points =
+ (FT_UShort)MAX( maxProfile->maxCompositePoints,
+ maxProfile->maxPoints );
- face->root.internal->max_contours = (FT_Short)MAX( maxProfile->maxCompositeContours,
- maxProfile->maxContours );
+ face->root.internal->max_contours =
+ (FT_Short)MAX( maxProfile->maxCompositeContours,
+ maxProfile->maxContours );
face->max_components = (FT_ULong)maxProfile->maxComponentElements +
maxProfile->maxComponentDepth;
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index f3b8eec..29dfe88 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -104,10 +104,10 @@
for ( height = target->rows; height > 0; height-- )
{
- FT_Byte* cur = line_buff; /* current write cursor */
- FT_Int count = line_bits; /* # of bits to extract per line */
- FT_Byte shift = (FT_Byte)(x_offset & 7); /* current write shift */
- FT_Byte space = (FT_Byte)(8 - shift);
+ FT_Byte* cur = line_buff; /* current write cursor */
+ FT_Int count = line_bits; /* # of bits to extract per line */
+ FT_Byte shift = (FT_Byte)( x_offset & 7 ); /* current write shift */
+ FT_Byte space = (FT_Byte)( 8 - shift );
/* first of all, read individual source bytes */
@@ -163,7 +163,7 @@
}
/* now write remaining bits */
- val = (FT_Byte)(( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count ));
+ val = (FT_Byte)( ( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count ) );
cur[0] |= val >> shift;
if ( count > space )
@@ -699,7 +699,7 @@
if ( glyph_index >= (FT_UInt)range->first_glyph &&
glyph_index <= (FT_UInt)range->last_glyph )
{
- FT_UShort delta = (FT_UShort)(glyph_index - range->first_glyph);
+ FT_UShort delta = (FT_UShort)( glyph_index - range->first_glyph );
switch ( range->index_format )
@@ -1068,8 +1068,8 @@
val = cur[1];
- cur[0] = (FT_Byte)(old | ( val >> 7 ));
- old = (FT_Byte)(val << 1);
+ cur[0] = (FT_Byte)( old | ( val >> 7 ) );
+ old = (FT_Byte)( val << 1 );
cur++;
}
cur[0] = old;
@@ -1098,7 +1098,7 @@
line = (FT_Byte*)map->buffer + ( right >> 3 );
limit = line + rows * line_len;
- mask = (FT_Byte)(0x80 >> ( right & 7 ));
+ mask = (FT_Byte)( 0x80 >> ( right & 7 ) );
for ( ; line < limit; line += line_len )
if ( line[0] & mask )
@@ -1452,7 +1452,7 @@
/* some heuristic values */
- metrics->vertBearingX = (FT_Char)(-metrics->width / 2);
+ metrics->vertBearingX = (FT_Char)(-metrics->width / 2 );
metrics->vertBearingY = (FT_Char)( advance / 10 );
metrics->vertAdvance = (FT_Char)( advance * 12 / 10 );
}
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 03205bb..a12a9ec 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1308,7 +1308,7 @@
(int)span->x + span->len == (int)x &&
span->coverage == coverage )
{
- span->len = (unsigned short)(span->len + acount);
+ span->len = (unsigned short)( span->len + acount );
return;
}
diff --git a/src/smooth/ftsmerrs.h b/src/smooth/ftsmerrs.h
index 9f06bbc..0c2a2ec 100644
--- a/src/smooth/ftsmerrs.h
+++ b/src/smooth/ftsmerrs.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX Smooth_Err_
-#define FT_ERR_BASE FT_Mod_Err_Smooth
+#define FT_ERR_PREFIX Smooth_Err_
+#define FT_ERR_BASE FT_Mod_Err_Smooth
#include FT_ERRORS_H
diff --git a/src/truetype/tterrors.h b/src/truetype/tterrors.h
index bf67190..d317c70 100644
--- a/src/truetype/tterrors.h
+++ b/src/truetype/tterrors.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX TT_Err_
-#define FT_ERR_BASE FT_Mod_Err_TrueType
+#define FT_ERR_PREFIX TT_Err_
+#define FT_ERR_BASE FT_Mod_Err_TrueType
#include FT_ERRORS_H
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index f2155c4..e64ab9f 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -180,8 +180,8 @@
FT_UInt start_point,
FT_UInt start_contour )
{
- zone->n_points = (FT_UShort)(load->outline.n_points - start_point);
- zone->n_contours = (FT_Short) (load->outline.n_contours - start_contour);
+ zone->n_points = (FT_UShort)( load->outline.n_points - start_point );
+ zone->n_contours = (FT_Short) ( load->outline.n_contours - start_contour );
zone->org = load->extra_points + start_point;
zone->cur = load->outline.points + start_point;
zone->tags = (FT_Byte*)load->outline.tags + start_point;
@@ -1215,14 +1215,14 @@
/* */
if ( face->os2.version != 0xFFFF )
{
- top_bearing = (FT_Short)(face->os2.sTypoLineGap / 2);
+ top_bearing = (FT_Short)( face->os2.sTypoLineGap / 2 );
advance_height = (FT_UShort)( face->os2.sTypoAscender -
face->os2.sTypoDescender +
face->os2.sTypoLineGap );
}
else
{
- top_bearing = (FT_Short)(face->horizontal.Line_Gap / 2);
+ top_bearing = (FT_Short)( face->horizontal.Line_Gap / 2 );
advance_height = (FT_UShort)( face->horizontal.Ascender +
face->horizontal.Descender +
face->horizontal.Line_Gap );
diff --git a/src/type1/t1errors.h b/src/type1/t1errors.h
index 90f65e6..81221c3 100644
--- a/src/type1/t1errors.h
+++ b/src/type1/t1errors.h
@@ -29,8 +29,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX T1_Err_
-#define FT_ERR_BASE FT_Mod_Err_Type1
+#define FT_ERR_PREFIX T1_Err_
+#define FT_ERR_BASE FT_Mod_Err_Type1
#include FT_ERRORS_H
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 01f82ea..f6a7c7c 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -176,7 +176,8 @@
if ( error )
goto Exit;
- decoder.builder.no_recurse = FT_BOOL( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );
+ decoder.builder.no_recurse = FT_BOOL(
+ ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );
decoder.num_subrs = type1->num_subrs;
decoder.subrs = type1->subrs;
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index c5d1cc7..1e07445 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -278,7 +278,8 @@
root->ascender = (FT_Short)( face->type1.font_bbox.yMax >> 16 );
root->descender = (FT_Short)( face->type1.font_bbox.yMin >> 16 );
- root->height = (FT_Short)(( ( root->ascender - root->descender ) * 12 ) / 10 );
+ root->height = (FT_Short)(
+ ( ( root->ascender - root->descender ) * 12 ) / 10 );
/* now compute the maximum advance width */
root->max_advance_width =
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index a31f248..78ab3a2 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -436,7 +436,7 @@
break;
/* otherwise, store byte */
- *write++ = (FT_Byte)(( hex1 << 4 ) | hexa_value( cur[1] ));
+ *write++ = (FT_Byte)( ( hex1 << 4 ) | hexa_value( cur[1] ) );
count++;
cur++;
}
diff --git a/src/winfonts/fnterrs.h b/src/winfonts/fnterrs.h
index a05a7e9..ea80909 100644
--- a/src/winfonts/fnterrs.h
+++ b/src/winfonts/fnterrs.h
@@ -30,8 +30,8 @@
#undef __FTERRORS_H__
-#define FT_ERR_PREFIX FNT_Err_
-#define FT_ERR_BASE FT_Mod_Err_Winfonts
+#define FT_ERR_PREFIX FNT_Err_
+#define FT_ERR_BASE FT_Mod_Err_Winfonts
#include FT_ERRORS_H