Commit e260d2538de295949e9975fa7f35d0ee7b19b9f9

Werner Lemberg 2004-05-17T09:25:04

* src/cache/ftcbasic.c (ftc_basic_family_compare, ftc_basic_family_init, ftc_basic_family_get_count, ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph, ftc_basic_gnode_compare_faceid): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class): Remove casts. * src/cache/ftccback.h: Adjust parameters and return types to prototypes given in header files from include/freetype/cache. * src/cache/ftcimage.c (ftc_inode_free, ftc_inode_new, ftc_inode_weight): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftcsbits.c (ftc_snode_free, ftc_snode_new, ftc_snode_weight, ftc_snode_compare): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftccmap.c (ftc_cmap_node_free, ftc_cmap_node_new, ftc_cmap_node_weight, ftc_cmap_node_compare, ftc_cmap_node_remove_faceid): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_cmap_cache_class): Remove casts. * src/cache/ftcglyph.c (ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftcmanag.c (ftc_size_node_done, ftc_size_node_compare, ftc_size_node_init, ftc_size_node_reset, ftc_size_node_compare_faceid, ftc_face_node_init, ftc_face_node_done, ftc_face_node_compare: Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_size_list_class, ftc_face_list_class): Remove casts. * src/autohint/ahmodule.c (ft_autohinter_init, ft_autohinter_done): Use FT_Module as parameter and do a cast to FT_AutoHinter locally. (autohint_module_class): Remove casts. * src/base/ftglyph.c (ft_bitmap_glyph_init, ft_bitmap_glyph_copy, ft_bitmap_glyph_done, ft_bitmap_glyph_bbox, ft_outline_glyph_init, ft_outline_glyph_done, ft_outline_glyph_copy, ft_outline_glyph_transform, ft_outline_glyph_bbox, ft_outline_glyph_prepare): Use FT_Glyph as parameter and do a cast to FT_XXXGlyph locally. Use FT_CALLBACK_DEF throughout. (ft_bitmap_glyph_class, ft_outline_glyph_class): Remove casts. * src/bdf/bdfdrivr.c (bdf_cmap_init, bdf_cmap_done, bdf_cmap_char_index, bdf_cmap_char_next): Use FT_CMap as parameter and do a cast to BDF_CMap locally. (bdf_cmap_class): Remove casts.

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
diff --git a/ChangeLog b/ChangeLog
index 02b6ac5..97e511e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,72 @@
+2004-05-14  Werner Lemberg  <wl@gnu.org>
+
+	* src/cache/ftcbasic.c (ftc_basic_family_compare,
+	ftc_basic_family_init, ftc_basic_family_get_count,
+	ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph,
+	ftc_basic_gnode_compare_faceid): Adjust parameters and return types
+	to prototypes given in header files from include/freetype/cache.
+	Use casts to proper types locally.
+	(ftc_basic_image_family_class, ftc_basic_image_cache_class,
+	ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class): Remove
+	casts.
+
+	* src/cache/ftccback.h: Adjust parameters and return types to
+	prototypes given in header files from include/freetype/cache.
+
+	* src/cache/ftcimage.c (ftc_inode_free, ftc_inode_new,
+	ftc_inode_weight): Adjust parameters and return types to prototypes
+	given in header files from include/freetype/cache.  Use casts to
+	proper types locally.
+
+	* src/cache/ftcsbits.c (ftc_snode_free, ftc_snode_new,
+	ftc_snode_weight, ftc_snode_compare): Adjust parameters and return
+	types to prototypes given in header files from
+	include/freetype/cache.  Use casts to proper types locally.
+
+	* src/cache/ftccmap.c (ftc_cmap_node_free, ftc_cmap_node_new,
+	ftc_cmap_node_weight, ftc_cmap_node_compare,
+	ftc_cmap_node_remove_faceid): Adjust parameters and return types to
+	prototypes given in header files from include/freetype/cache.  Use
+	casts to proper types locally.
+	(ftc_cmap_cache_class): Remove casts.
+
+	* src/cache/ftcglyph.c (ftc_gnode_compare, ftc_gcache_init,
+	ftc_gcache_done): Adjust parameters and return types to prototypes
+	given in header files from include/freetype/cache.  Use casts to
+	proper types locally.
+
+	* src/cache/ftcmanag.c (ftc_size_node_done, ftc_size_node_compare,
+	ftc_size_node_init, ftc_size_node_reset,
+	ftc_size_node_compare_faceid, ftc_face_node_init,
+	ftc_face_node_done, ftc_face_node_compare: Adjust parameters and
+	return types to prototypes given in header files from
+	include/freetype/cache.  Use casts to proper types locally.
+
+	(ftc_size_list_class, ftc_face_list_class): Remove casts.
+
+2004-05-13  Werner Lemberg  <wl@gnu.org>
+
+	* src/autohint/ahmodule.c (ft_autohinter_init, ft_autohinter_done):
+	Use FT_Module as parameter and do a cast to FT_AutoHinter locally.
+	(autohint_module_class): Remove casts.
+
+	* src/base/ftglyph.c (ft_bitmap_glyph_init, ft_bitmap_glyph_copy,
+	ft_bitmap_glyph_done, ft_bitmap_glyph_bbox, ft_outline_glyph_init,
+	ft_outline_glyph_done, ft_outline_glyph_copy,
+	ft_outline_glyph_transform, ft_outline_glyph_bbox,
+	ft_outline_glyph_prepare): Use FT_Glyph as parameter and do a cast
+	to FT_XXXGlyph locally.
+	Use FT_CALLBACK_DEF throughout.
+	(ft_bitmap_glyph_class, ft_outline_glyph_class): Remove casts.
+
+	* src/bdf/bdfdrivr.c (bdf_cmap_init, bdf_cmap_done,
+	bdf_cmap_char_index, bdf_cmap_char_next): Use FT_CMap as parameter
+	and do a cast to BDF_CMap locally.
+	(bdf_cmap_class): Remove casts.
+
 2004-05-12  Werner Lemberg  <wl@gnu.org>
 
-	* src/cff/cffgload.h (CFF_Builder): Remove `error'
+	* src/cff/cffgload.h (CFF_Builder): Remove `error'.
 	* src/cff/cffgload.c (cff_decoder_parse_charstrings): Replace
 	`Memory_Error' with `Fail' und update all users.
 
diff --git a/src/autohint/ahmodule.c b/src/autohint/ahmodule.c
index 8fce31d..03d067b 100644
--- a/src/autohint/ahmodule.c
+++ b/src/autohint/ahmodule.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-hinting module implementation (declaration).                    */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003 Catharon Productions Inc.              */
+/*  Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc.        */
 /*  Author: David Turner                                                   */
 /*                                                                         */
 /*  This file is part of the Catharon Typography Project and shall only    */
@@ -39,24 +39,30 @@
 
 
   FT_CALLBACK_DEF( FT_Error )
-  ft_autohinter_init( FT_AutoHinter  module )
+  ft_autohinter_init( FT_Module  module )       /* FT_AutoHinter */
   {
-    FT_Error  error;
+    FT_AutoHinter  autohinter = (FT_AutoHinter)module;
+    FT_Error       error;
 
 
-    error = ah_hinter_new( module->root.library, &module->hinter );
+    error = ah_hinter_new( module->library, &autohinter->hinter );
+
 #ifdef DEBUG_HINTER
     if ( !error )
-      ah_debug_hinter = module->hinter;
+      ah_debug_hinter = autohinter->hinter;
 #endif
+
     return error;
   }
 
 
   FT_CALLBACK_DEF( void )
-  ft_autohinter_done( FT_AutoHinter  module )
+  ft_autohinter_done( FT_Module  module )
   {
-    ah_hinter_done( module->hinter );
+    FT_AutoHinter  autohinter = (FT_AutoHinter)module;
+
+
+    ah_hinter_done( autohinter->hinter );
 
 #ifdef DEBUG_HINTER
     ah_debug_hinter = NULL;
@@ -128,9 +134,9 @@
 
     (const void*) &ft_autohinter_service,
 
-    (FT_Module_Constructor)ft_autohinter_init,
-    (FT_Module_Destructor) ft_autohinter_done,
-    (FT_Module_Requester)  0
+    ft_autohinter_init,
+    ft_autohinter_done,
+    0                       /* FT_Module_Requester */
   };
 
 
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index c6c458c..1b22ab6 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -138,13 +138,14 @@
   }
 
 
-  static FT_Error
-  ft_bitmap_glyph_init( FT_BitmapGlyph  glyph,
-                        FT_GlyphSlot    slot )
+  FT_CALLBACK_DEF( FT_Error )
+  ft_bitmap_glyph_init( FT_Glyph      bitmap_glyph,
+                        FT_GlyphSlot  slot )
   {
-    FT_Error    error   = FT_Err_Ok;
-    FT_Library  library = FT_GLYPH(glyph)->library;
-    FT_Memory   memory  = library->memory;
+    FT_BitmapGlyph  glyph   = (FT_BitmapGlyph)bitmap_glyph;
+    FT_Error        error   = FT_Err_Ok;
+    FT_Library      library = FT_GLYPH( glyph )->library;
+    FT_Memory       memory  = library->memory;
 
 
     if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
@@ -171,11 +172,13 @@
   }
 
 
-  static FT_Error
-  ft_bitmap_glyph_copy( FT_BitmapGlyph  source,
-                        FT_BitmapGlyph  target )
+  FT_CALLBACK_DEF( FT_Error )
+  ft_bitmap_glyph_copy( FT_Glyph  bitmap_source,
+                        FT_Glyph  bitmap_target )
   {
-    FT_Memory  memory = source->root.library->memory;
+    FT_BitmapGlyph  source = (FT_BitmapGlyph)bitmap_source;
+    FT_BitmapGlyph  target = (FT_BitmapGlyph)bitmap_target;
+    FT_Memory       memory = bitmap_source->library->memory;
 
 
     target->left = source->left;
@@ -185,20 +188,24 @@
   }
 
 
-  static void
-  ft_bitmap_glyph_done( FT_BitmapGlyph  glyph )
+  FT_CALLBACK_DEF( void )
+  ft_bitmap_glyph_done( FT_Glyph  bitmap_glyph )
   {
-    FT_Memory  memory = FT_GLYPH(glyph)->library->memory;
+    FT_BitmapGlyph  glyph  = (FT_BitmapGlyph)bitmap_glyph;
+    FT_Memory       memory = FT_GLYPH( glyph )->library->memory;
 
 
     FT_FREE( glyph->bitmap.buffer );
   }
 
 
-  static void
-  ft_bitmap_glyph_bbox( FT_BitmapGlyph  glyph,
-                        FT_BBox*        cbox )
+  FT_CALLBACK_DEF( void )
+  ft_bitmap_glyph_bbox( FT_Glyph  bitmap_glyph,
+                        FT_BBox*  cbox )
   {
+    FT_BitmapGlyph  glyph = (FT_BitmapGlyph)bitmap_glyph;
+
+
     cbox->xMin = glyph->left << 6;
     cbox->xMax = cbox->xMin + ( glyph->bitmap.width << 6 );
     cbox->yMax = glyph->top << 6;
@@ -209,15 +216,15 @@
   FT_CALLBACK_TABLE_DEF
   const FT_Glyph_Class  ft_bitmap_glyph_class =
   {
-    sizeof( FT_BitmapGlyphRec ),
+    sizeof ( FT_BitmapGlyphRec ),
     FT_GLYPH_FORMAT_BITMAP,
 
-    (FT_Glyph_InitFunc)     ft_bitmap_glyph_init,
-    (FT_Glyph_DoneFunc)     ft_bitmap_glyph_done,
-    (FT_Glyph_CopyFunc)     ft_bitmap_glyph_copy,
-    (FT_Glyph_TransformFunc)0,
-    (FT_Glyph_GetBBoxFunc)  ft_bitmap_glyph_bbox,
-    (FT_Glyph_PrepareFunc)  0
+    ft_bitmap_glyph_init,
+    ft_bitmap_glyph_done,
+    ft_bitmap_glyph_copy,
+    0,                          /* FT_Glyph_TransformFunc */
+    ft_bitmap_glyph_bbox,
+    0                           /* FT_Glyph_PrepareFunc   */
   };
 
 
@@ -230,14 +237,15 @@
   /*************************************************************************/
 
 
-  static FT_Error
-  ft_outline_glyph_init( FT_OutlineGlyph  glyph,
-                         FT_GlyphSlot     slot )
+  FT_CALLBACK_DEF( FT_Error )
+  ft_outline_glyph_init( FT_Glyph      outline_glyph,
+                         FT_GlyphSlot  slot )
   {
-    FT_Error     error   = FT_Err_Ok;
-    FT_Library   library = FT_GLYPH(glyph)->library;
-    FT_Outline*  source  = &slot->outline;
-    FT_Outline*  target  = &glyph->outline;
+    FT_OutlineGlyph  glyph   = (FT_OutlineGlyph)outline_glyph;
+    FT_Error         error   = FT_Err_Ok;
+    FT_Library       library = FT_GLYPH( glyph )->library;
+    FT_Outline*      source  = &slot->outline;
+    FT_Outline*      target  = &glyph->outline;
 
 
     /* check format in glyph slot */
@@ -268,19 +276,24 @@
   }
 
 
-  static void
-  ft_outline_glyph_done( FT_OutlineGlyph  glyph )
+  FT_CALLBACK_DEF( void )
+  ft_outline_glyph_done( FT_Glyph  outline_glyph )
   {
+    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;
+
+
     FT_Outline_Done( FT_GLYPH( glyph )->library, &glyph->outline );
   }
 
 
-  static FT_Error
-  ft_outline_glyph_copy( FT_OutlineGlyph  source,
-                         FT_OutlineGlyph  target )
+  FT_CALLBACK_DEF( FT_Error )
+  ft_outline_glyph_copy( FT_Glyph  outline_source,
+                         FT_Glyph  outline_target )
   {
-    FT_Error    error;
-    FT_Library  library = FT_GLYPH( source )->library;
+    FT_OutlineGlyph  source  = (FT_OutlineGlyph)outline_source;
+    FT_OutlineGlyph  target  = (FT_OutlineGlyph)outline_target;
+    FT_Error         error;
+    FT_Library       library = FT_GLYPH( source )->library;
 
 
     error = FT_Outline_New( library, source->outline.n_points,
@@ -292,11 +305,14 @@
   }
 
 
-  static void
-  ft_outline_glyph_transform( FT_OutlineGlyph  glyph,
-                              FT_Matrix*       matrix,
-                              FT_Vector*       delta )
+  FT_CALLBACK_DEF( void )
+  ft_outline_glyph_transform( FT_Glyph    outline_glyph,
+                              FT_Matrix*  matrix,
+                              FT_Vector*  delta )
   {
+    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;
+
+
     if ( matrix )
       FT_Outline_Transform( &glyph->outline, matrix );
 
@@ -305,18 +321,24 @@
   }
 
 
-  static void
-  ft_outline_glyph_bbox( FT_OutlineGlyph  glyph,
-                         FT_BBox*         bbox )
+  FT_CALLBACK_DEF( void )
+  ft_outline_glyph_bbox( FT_Glyph  outline_glyph,
+                         FT_BBox*  bbox )
   {
+    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;
+
+
     FT_Outline_Get_CBox( &glyph->outline, bbox );
   }
 
 
-  static FT_Error
-  ft_outline_glyph_prepare( FT_OutlineGlyph  glyph,
-                            FT_GlyphSlot     slot )
+  FT_CALLBACK_DEF( FT_Error )
+  ft_outline_glyph_prepare( FT_Glyph      outline_glyph,
+                            FT_GlyphSlot  slot )
   {
+    FT_OutlineGlyph  glyph = (FT_OutlineGlyph)outline_glyph;
+
+
     slot->format         = FT_GLYPH_FORMAT_OUTLINE;
     slot->outline        = glyph->outline;
     slot->outline.flags &= ~FT_OUTLINE_OWNER;
@@ -328,15 +350,15 @@
   FT_CALLBACK_TABLE_DEF
   const FT_Glyph_Class  ft_outline_glyph_class =
   {
-    sizeof( FT_OutlineGlyphRec ),
+    sizeof ( FT_OutlineGlyphRec ),
     FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Glyph_InitFunc)     ft_outline_glyph_init,
-    (FT_Glyph_DoneFunc)     ft_outline_glyph_done,
-    (FT_Glyph_CopyFunc)     ft_outline_glyph_copy,
-    (FT_Glyph_TransformFunc)ft_outline_glyph_transform,
-    (FT_Glyph_GetBBoxFunc)  ft_outline_glyph_bbox,
-    (FT_Glyph_PrepareFunc)  ft_outline_glyph_prepare
+    ft_outline_glyph_init,
+    ft_outline_glyph_done,
+    ft_outline_glyph_copy,
+    ft_outline_glyph_transform,
+    ft_outline_glyph_bbox,
+    ft_outline_glyph_prepare
   };
 
 
@@ -644,7 +666,7 @@
       goto Exit;
 
     /* in case of success, copy the bitmap to the glyph bitmap */
-    error = ft_bitmap_glyph_init( bitmap, &dummy );
+    error = ft_bitmap_glyph_init( (FT_Glyph)bitmap, &dummy );
     if ( error )
       goto Exit;
 
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index e02a571..a7c3eaf 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -60,9 +60,12 @@ THE SOFTWARE.
 
 
   FT_CALLBACK_DEF( FT_Error )
-  bdf_cmap_init( BDF_CMap  cmap )
+  bdf_cmap_init( FT_CMap     bdfcmap,
+                 FT_Pointer  init_data )
   {
+    BDF_CMap  cmap = (BDF_CMap)bdfcmap;
     BDF_Face  face = (BDF_Face)FT_CMAP_FACE( cmap );
+    FT_UNUSED( init_data );
 
 
     cmap->num_encodings = face->bdffont->glyphs_used;
@@ -73,20 +76,24 @@ THE SOFTWARE.
 
 
   FT_CALLBACK_DEF( void )
-  bdf_cmap_done( BDF_CMap  cmap )
+  bdf_cmap_done( FT_CMap  bdfcmap )
   {
+    BDF_CMap  cmap = (BDF_CMap)bdfcmap;
+
+
     cmap->encodings     = NULL;
     cmap->num_encodings = 0;
   }
 
 
   FT_CALLBACK_DEF( FT_UInt )
-  bdf_cmap_char_index( BDF_CMap   cmap,
+  bdf_cmap_char_index( FT_CMap    bdfcmap,
                        FT_UInt32  charcode )
   {
+    BDF_CMap          cmap      = (BDF_CMap)bdfcmap;
     BDF_encoding_el*  encodings = cmap->encodings;
     FT_UInt           min, max, mid;
-    FT_UInt           result = 0;
+    FT_UInt           result    = 0;
 
 
     min = 0;
@@ -117,9 +124,10 @@ THE SOFTWARE.
 
 
   FT_CALLBACK_DEF( FT_UInt )
-  bdf_cmap_char_next( BDF_CMap    cmap,
+  bdf_cmap_char_next( FT_CMap     bdfcmap,
                       FT_UInt32  *acharcode )
   {
+    BDF_CMap          cmap      = (BDF_CMap)bdfcmap;
     BDF_encoding_el*  encodings = cmap->encodings;
     FT_UInt           min, max, mid;
     FT_UInt32         charcode = *acharcode + 1;
@@ -162,13 +170,14 @@ THE SOFTWARE.
   }
 
 
-  FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec  bdf_cmap_class =
+  FT_CALLBACK_TABLE_DEF
+  const FT_CMap_ClassRec  bdf_cmap_class =
   {
-    sizeof( BDF_CMapRec ),
-    (FT_CMap_InitFunc)     bdf_cmap_init,
-    (FT_CMap_DoneFunc)     bdf_cmap_done,
-    (FT_CMap_CharIndexFunc)bdf_cmap_char_index,
-    (FT_CMap_CharNextFunc) bdf_cmap_char_next
+    sizeof ( BDF_CMapRec ),
+    bdf_cmap_init,
+    bdf_cmap_done,
+    bdf_cmap_char_index,
+    bdf_cmap_char_next
   };
 
 
diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index e144971..a9b66dc 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -62,19 +62,28 @@
   } FTC_BasicFamilyRec, *FTC_BasicFamily;
 
 
-  FT_CALLBACK_DEF( FT_Bool )
-  ftc_basic_family_compare( FTC_BasicFamily  family,
-                            FTC_BasicQuery   query )
+  FT_CALLBACK_DEF( FT_Int )
+  ftc_basic_family_compare( FTC_MruNode  ftcfamily,
+                            FT_Pointer   ftcquery )
   {
-    return FT_BOOL( FTC_BASIC_ATTR_COMPARE( &family->attrs, &query->attrs ) );
+    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;
+    FTC_BasicQuery   query  = (FTC_BasicQuery)ftcquery;
+
+
+    return FTC_BASIC_ATTR_COMPARE( &family->attrs, &query->attrs );
   }
 
 
   FT_CALLBACK_DEF( FT_Error )
-  ftc_basic_family_init( FTC_BasicFamily  family,
-                         FTC_BasicQuery   query,
-                         FTC_Cache        cache )
+  ftc_basic_family_init( FTC_MruNode  ftcfamily,
+                         FT_Pointer   ftcquery,
+                         FT_Pointer   ftccache )
   {
+    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;
+    FTC_BasicQuery   query  = (FTC_BasicQuery)ftcquery;
+    FTC_Cache        cache  = (FTC_Cache)ftccache;
+
+
     FTC_Family_Init( FTC_FAMILY( family ), cache );
     family->attrs = query->attrs;
     return 0;
@@ -82,12 +91,13 @@
 
 
   FT_CALLBACK_DEF( FT_UInt )
-  ftc_basic_family_get_count( FTC_BasicFamily  family,
-                              FTC_Manager      manager )
+  ftc_basic_family_get_count( FTC_Family   ftcfamily,
+                              FTC_Manager  manager )
   {
-    FT_Error  error;
-    FT_Face   face;
-    FT_UInt   result = 0;
+    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;
+    FT_Error         error;
+    FT_Face          face;
+    FT_UInt          result = 0;
 
 
     error = FTC_Manager_LookupFace( manager, family->attrs.scaler.face_id,
@@ -100,13 +110,14 @@
 
 
   FT_CALLBACK_DEF( FT_Error )
-  ftc_basic_family_load_bitmap( FTC_BasicFamily  family,
-                                FT_UInt          gindex,
-                                FTC_Manager      manager,
-                                FT_Face         *aface )
+  ftc_basic_family_load_bitmap( FTC_Family   ftcfamily,
+                                FT_UInt      gindex,
+                                FTC_Manager  manager,
+                                FT_Face     *aface )
   {
-    FT_Error  error;
-    FT_Size   size;
+    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;
+    FT_Error         error;
+    FT_Size          size;
 
 
     error = FTC_Manager_LookupSize( manager, &family->attrs.scaler, &size );
@@ -126,15 +137,16 @@
 
 
   FT_CALLBACK_DEF( FT_Error )
-  ftc_basic_family_load_glyph( FTC_BasicFamily  family,
-                               FT_UInt          gindex,
-                               FTC_Cache        cache,
-                               FT_Glyph        *aglyph )
+  ftc_basic_family_load_glyph( FTC_Family  ftcfamily,
+                               FT_UInt     gindex,
+                               FTC_Cache   cache,
+                               FT_Glyph   *aglyph )
   {
-    FT_Error    error;
-    FTC_Scaler  scaler = &family->attrs.scaler;
-    FT_Face     face;
-    FT_Size     size;
+    FTC_BasicFamily  family = (FTC_BasicFamily)ftcfamily;
+    FT_Error         error;
+    FTC_Scaler       scaler = &family->attrs.scaler;
+    FT_Face          face;
+    FT_Size          size;
 
 
     /* we will now load the glyph image */
@@ -173,11 +185,13 @@
 
 
   FT_CALLBACK_DEF( FT_Bool )
-  ftc_basic_gnode_compare_faceid( FTC_GNode   gnode,
-                                  FTC_FaceID  face_id,
+  ftc_basic_gnode_compare_faceid( FTC_Node    ftcgnode,
+                                  FT_Pointer  ftcface_id,
                                   FTC_Cache   cache )
   {
-    FTC_BasicFamily  family = (FTC_BasicFamily)gnode->family;
+    FTC_GNode        gnode   = (FTC_GNode)ftcgnode;
+    FTC_FaceID       face_id = (FTC_FaceID)ftcface_id;
+    FTC_BasicFamily  family  = (FTC_BasicFamily)gnode->family;
     FT_Bool          result;
 
 
@@ -203,13 +217,13 @@
   const FTC_IFamilyClassRec  ftc_basic_image_family_class =
   {
     {
-      sizeof( FTC_BasicFamilyRec ),
-      (FTC_MruNode_CompareFunc)ftc_basic_family_compare,
-      (FTC_MruNode_InitFunc)   ftc_basic_family_init,
-      (FTC_MruNode_ResetFunc)  NULL,
-      (FTC_MruNode_DoneFunc)   NULL
+      sizeof ( FTC_BasicFamilyRec ),
+      ftc_basic_family_compare,
+      ftc_basic_family_init,
+      0,                        /* FTC_MruNode_ResetFunc */
+      0                         /* FTC_MruNode_DoneFunc  */
     },
-    (FTC_IFamily_LoadGlyphFunc)ftc_basic_family_load_glyph
+    ftc_basic_family_load_glyph
   };
 
 
@@ -217,15 +231,15 @@
   const FTC_GCacheClassRec  ftc_basic_image_cache_class =
   {
     {
-      (FTC_Node_NewFunc)    ftc_inode_new,
-      (FTC_Node_WeightFunc) ftc_inode_weight,
-      (FTC_Node_CompareFunc)ftc_gnode_compare,
-      (FTC_Node_CompareFunc)ftc_basic_gnode_compare_faceid,
-      (FTC_Node_FreeFunc)   ftc_inode_free,
-
-      sizeof( FTC_GCacheRec ),
-      (FTC_Cache_InitFunc)  ftc_gcache_init,
-      (FTC_Cache_DoneFunc)  ftc_gcache_done
+      ftc_inode_new,
+      ftc_inode_weight,
+      ftc_gnode_compare,
+      ftc_basic_gnode_compare_faceid,
+      ftc_inode_free,
+
+      sizeof ( FTC_GCacheRec ),
+      ftc_gcache_init,
+      ftc_gcache_done
     },
     (FTC_MruListClass)&ftc_basic_image_family_class
   };
@@ -321,13 +335,13 @@
   {
     {
       sizeof( FTC_BasicFamilyRec ),
-      (FTC_MruNode_CompareFunc)ftc_basic_family_compare,
-      (FTC_MruNode_InitFunc)   ftc_basic_family_init,
-      (FTC_MruNode_ResetFunc)  NULL,
-      (FTC_MruNode_DoneFunc)   NULL
+      ftc_basic_family_compare,
+      ftc_basic_family_init,
+      0,                            /* FTC_MruNode_ResetFunc */
+      0                             /* FTC_MruNode_DoneFunc  */
     },
-    (FTC_SFamily_GetCountFunc) ftc_basic_family_get_count,
-    (FTC_SFamily_LoadGlyphFunc)ftc_basic_family_load_bitmap
+    ftc_basic_family_get_count,
+    ftc_basic_family_load_bitmap
   };
 
 
@@ -335,15 +349,15 @@
   const FTC_GCacheClassRec  ftc_basic_sbit_cache_class =
   {
     {
-      (FTC_Node_NewFunc)    ftc_snode_new,
-      (FTC_Node_WeightFunc) ftc_snode_weight,
-      (FTC_Node_CompareFunc)ftc_snode_compare,
-      (FTC_Node_CompareFunc)ftc_basic_gnode_compare_faceid,
-      (FTC_Node_FreeFunc)   ftc_snode_free,
-
-      sizeof( FTC_GCacheRec ),
-      (FTC_Cache_InitFunc)  ftc_gcache_init,
-      (FTC_Cache_DoneFunc)  ftc_gcache_done
+      ftc_snode_new,
+      ftc_snode_weight,
+      ftc_snode_compare,
+      ftc_basic_gnode_compare_faceid,
+      ftc_snode_free,
+
+      sizeof ( FTC_GCacheRec ),
+      ftc_gcache_init,
+      ftc_gcache_done
     },
     (FTC_MruListClass)&ftc_basic_sbit_family_class
   };
diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h
index 68be913..6b47e09 100644
--- a/src/cache/ftccback.h
+++ b/src/cache/ftccback.h
@@ -28,46 +28,49 @@
 
 
   FT_LOCAL( void )
-  ftc_inode_free( FTC_INode  inode,
+  ftc_inode_free( FTC_Node   inode,
                   FTC_Cache  cache );
 
   FT_LOCAL( FT_Error )
-  ftc_inode_new( FTC_INode   *pinode,
-                 FTC_GQuery   gquery,
-                 FTC_Cache    cache );
+  ftc_inode_new( FTC_Node   *pinode,
+                 FT_Pointer  gquery,
+                 FTC_Cache   cache );
 
   FT_LOCAL( FT_ULong )
-  ftc_inode_weight( FTC_INode  inode );
+  ftc_inode_weight( FTC_Node   inode,
+                    FTC_Cache  cache );
 
 
   FT_LOCAL( void )
-  ftc_snode_free( FTC_SNode  snode,
+  ftc_snode_free( FTC_Node   snode,
                   FTC_Cache  cache );
 
   FT_LOCAL( FT_Error )
-  ftc_snode_new( FTC_SNode  *psnode,
-                 FTC_GQuery  gquery,
+  ftc_snode_new( FTC_Node   *psnode,
+                 FT_Pointer  gquery,
                  FTC_Cache   cache );
 
   FT_LOCAL( FT_ULong )
-  ftc_snode_weight( FTC_SNode  snode );
+  ftc_snode_weight( FTC_Node   snode,
+                    FTC_Cache  cache );
 
   FT_LOCAL( FT_Bool )
-  ftc_snode_compare( FTC_SNode   snode,
-                     FTC_GQuery  gquery,
+  ftc_snode_compare( FTC_Node    snode,
+                     FT_Pointer  gquery,
                      FTC_Cache   cache );
 
 
   FT_LOCAL( FT_Bool )
-  ftc_gnode_compare( FTC_GNode   gnode,
-                     FTC_GQuery  gquery );
+  ftc_gnode_compare( FTC_Node    gnode,
+                     FT_Pointer  gquery,
+                     FTC_Cache   cache );
 
 
   FT_LOCAL( FT_Error )
-  ftc_gcache_init( FTC_GCache  cache );
+  ftc_gcache_init( FTC_Cache  cache );
 
   FT_LOCAL( void )
-  ftc_gcache_done( FTC_GCache  cache );
+  ftc_gcache_done( FTC_Cache  cache );
 
 
   FT_LOCAL( FT_Error )
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index 60f9953..b2812c9 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -98,10 +98,11 @@
   /* no need for specific finalizer; we use `ftc_node_done' directly */
 
   FT_CALLBACK_DEF( void )
-  ftc_cmap_node_free( FTC_CMapNode  node,
-                      FTC_Cache     cache )
+  ftc_cmap_node_free( FTC_Node   ftcnode,
+                      FTC_Cache  cache )
   {
-    FT_Memory  memory = cache->memory;
+    FTC_CMapNode  node   = (FTC_CMapNode)ftcnode;
+    FT_Memory     memory = cache->memory;
 
 
     FT_FREE( node );
@@ -110,14 +111,16 @@
 
   /* initialize a new cmap node */
   FT_CALLBACK_DEF( FT_Error )
-  ftc_cmap_node_new( FTC_CMapNode  *anode,
-                     FTC_CMapQuery  query,
-                     FTC_Cache      cache )
+  ftc_cmap_node_new( FTC_Node   *ftcanode,
+                     FT_Pointer  ftcquery,
+                     FTC_Cache   cache )
   {
-    FT_Error      error;
-    FT_Memory     memory  = cache->memory;
-    FTC_CMapNode  node;
-    FT_UInt       nn;
+    FTC_CMapNode  *anode  = (FTC_CMapNode*)ftcanode;
+    FTC_CMapQuery  query  = (FTC_CMapQuery)ftcquery;
+    FT_Error       error;
+    FT_Memory      memory = cache->memory;
+    FTC_CMapNode   node;
+    FT_UInt        nn;
 
 
     if ( !FT_NEW( node ) )
@@ -138,9 +141,11 @@
 
   /* compute the weight of a given cmap node */
   FT_CALLBACK_DEF( FT_ULong )
-  ftc_cmap_node_weight( FTC_CMapNode  cnode )
+  ftc_cmap_node_weight( FTC_Node   cnode,
+                        FTC_Cache  cache )
   {
     FT_UNUSED( cnode );
+    FT_UNUSED( cache );
 
     return sizeof ( *cnode );
   }
@@ -148,9 +153,15 @@
 
   /* compare a cmap node to a given query */
   FT_CALLBACK_DEF( FT_Bool )
-  ftc_cmap_node_compare( FTC_CMapNode   node,
-                         FTC_CMapQuery  query )
+  ftc_cmap_node_compare( FTC_Node    ftcnode,
+                         FT_Pointer  ftcquery,
+                         FTC_Cache   cache )
   {
+    FTC_CMapNode   node  = (FTC_CMapNode)ftcnode;
+    FTC_CMapQuery  query = (FTC_CMapQuery)ftcquery;
+    FT_UNUSED( cache );
+
+
     if ( node->face_id    == query->face_id    &&
          node->cmap_index == query->cmap_index )
     {
@@ -165,9 +176,14 @@
 
 
   FT_CALLBACK_DEF( FT_Bool )
-  ftc_cmap_node_remove_faceid( FTC_CMapNode  node,
-                               FTC_FaceID    face_id )
+  ftc_cmap_node_remove_faceid( FTC_Node    ftcnode,
+                               FT_Pointer  ftcface_id,
+                               FTC_Cache   cache )
   {
+    FTC_CMapNode  node    = (FTC_CMapNode)ftcnode;
+    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;
+    FT_UNUSED( cache );
+
     return FT_BOOL( node->face_id == face_id );
   }
 
@@ -184,15 +200,15 @@
   FT_CALLBACK_TABLE_DEF
   const FTC_CacheClassRec  ftc_cmap_cache_class =
   {
-    (FTC_Node_NewFunc)    ftc_cmap_node_new,
-    (FTC_Node_WeightFunc) ftc_cmap_node_weight,
-    (FTC_Node_CompareFunc)ftc_cmap_node_compare,
-    (FTC_Node_CompareFunc)ftc_cmap_node_remove_faceid,
-    (FTC_Node_FreeFunc)   ftc_cmap_node_free,
+    ftc_cmap_node_new,
+    ftc_cmap_node_weight,
+    ftc_cmap_node_compare,
+    ftc_cmap_node_remove_faceid,
+    ftc_cmap_node_free,
 
     sizeof ( FTC_CacheRec ),
-    (FTC_Cache_InitFunc)  ftc_cache_init,
-    (FTC_Cache_DoneFunc)  ftc_cache_done,
+    ftc_cache_init,
+    ftc_cache_done,
   };
 
 
diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c
index 5e6c977..edcd36d 100644
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -74,9 +74,15 @@
 
 
   FT_LOCAL_DEF( FT_Bool )
-  ftc_gnode_compare( FTC_GNode   gnode,
-                     FTC_GQuery  gquery )
+  ftc_gnode_compare( FTC_Node    ftcgnode,
+                     FT_Pointer  ftcgquery,
+                     FTC_Cache   cache )
   {
+    FTC_GNode   gnode  = (FTC_GNode)ftcgnode;
+    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;
+    FT_UNUSED( cache );
+
+
     return FTC_GNode_Compare( gnode, gquery );
   }
 
@@ -124,8 +130,11 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  ftc_gcache_init( FTC_GCache  cache )
+  ftc_gcache_init( FTC_Cache  ftccache )
   {
+    FTC_GCache  cache = (FTC_GCache)ftccache;
+
+
     return FTC_GCache_Init( cache );
   }
 
@@ -139,8 +148,11 @@
 
 
   FT_LOCAL_DEF( void )
-  ftc_gcache_done( FTC_GCache  cache )
+  ftc_gcache_done( FTC_Cache  ftccache )
   {
+    FTC_GCache  cache = (FTC_GCache)ftccache;
+
+
     FTC_GCache_Done( cache );
   }
 
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 22a26ac..29f3288 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -45,9 +45,12 @@
 
 
   FT_LOCAL_DEF( void )
-  ftc_inode_free( FTC_INode  inode,
+  ftc_inode_free( FTC_Node   ftcinode,
                   FTC_Cache  cache )
   {
+    FTC_INode  inode = (FTC_INode)ftcinode;
+
+
     FTC_INode_Free( inode, cache );
   }
 
@@ -85,10 +88,14 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  ftc_inode_new( FTC_INode   *pinode,
-                 FTC_GQuery   gquery,
-                 FTC_Cache    cache )
+  ftc_inode_new( FTC_Node   *ftcpinode,
+                 FT_Pointer  ftcgquery,
+                 FTC_Cache   cache )
   {
+    FTC_INode  *pinode = (FTC_INode*)ftcpinode;
+    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;
+
+
     return FTC_INode_New( pinode, gquery, cache );
   }
 
@@ -136,8 +143,13 @@
 
 
   FT_LOCAL_DEF( FT_ULong )
-  ftc_inode_weight( FTC_INode  inode )
+  ftc_inode_weight( FTC_Node   ftcinode,
+                    FTC_Cache  ftccache )
   {
+    FTC_INode  inode = (FTC_INode)ftcinode;
+    FT_UNUSED( ftccache );
+
+
     return FTC_INode_Weight( inode );
   }
 
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 04d064b..1f83a92 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -79,9 +79,12 @@
 
 
   FT_CALLBACK_DEF( void )
-  ftc_size_node_done( FTC_SizeNode  node )
+  ftc_size_node_done( FTC_MruNode  ftcnode,
+                      FT_Pointer   data )
   {
-    FT_Size  size = node->size;
+    FTC_SizeNode  node = (FTC_SizeNode)ftcnode;
+    FT_Size       size = node->size;
+    FT_UNUSED( data );
 
 
     if ( size )
@@ -89,11 +92,13 @@
   }
 
 
-  FT_CALLBACK_DEF( FT_Bool )
-  ftc_size_node_compare( FTC_SizeNode  node,
-                         FTC_Scaler    scaler )
+  FT_CALLBACK_DEF( FT_Int )
+  ftc_size_node_compare( FTC_MruNode  ftcnode,
+                         FT_Pointer   ftcscaler )
   {
-    FTC_Scaler  scaler0 = &node->scaler;
+    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;
+    FTC_Scaler    scaler  = (FTC_Scaler)ftcscaler;
+    FTC_Scaler    scaler0 = &node->scaler;
 
 
     if ( FTC_SCALER_COMPARE( scaler0, scaler ) )
@@ -106,10 +111,15 @@
 
 
   FT_CALLBACK_DEF( FT_Error )
-  ftc_size_node_init( FTC_SizeNode  node,
-                      FTC_Scaler    scaler,
-                      FTC_Manager   manager )
+  ftc_size_node_init( FTC_MruNode  ftcnode,
+                      FT_Pointer   ftcscaler,
+                      FT_Pointer   ftcmanager )
   {
+    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;
+    FTC_Scaler    scaler  = (FTC_Scaler)ftcscaler;
+    FTC_Manager   manager = (FTC_Manager)ftcmanager;
+
+
     node->scaler = scaler[0];
 
     return ftc_scaler_lookup_size( manager, scaler, &node->size );
@@ -117,10 +127,15 @@
 
 
   FT_CALLBACK_DEF( FT_Error )
-  ftc_size_node_reset( FTC_SizeNode  node,
-                       FTC_Scaler    scaler,
-                       FTC_Manager   manager )
+  ftc_size_node_reset( FTC_MruNode  ftcnode,
+                       FT_Pointer   ftcscaler,
+                       FT_Pointer   ftcmanager )
   {
+    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;
+    FTC_Scaler    scaler  = (FTC_Scaler)ftcscaler;
+    FTC_Manager   manager = (FTC_Manager)ftcmanager;
+
+
     FT_Done_Size( node->size );
 
     node->scaler = scaler[0];
@@ -132,20 +147,24 @@
   FT_CALLBACK_TABLE_DEF
   const FTC_MruListClassRec  ftc_size_list_class =
   {
-    sizeof( FTC_SizeNodeRec ),
-    (FTC_MruNode_CompareFunc)ftc_size_node_compare,
-    (FTC_MruNode_InitFunc)   ftc_size_node_init,
-    (FTC_MruNode_ResetFunc)  ftc_size_node_reset,
-    (FTC_MruNode_DoneFunc)   ftc_size_node_done
+    sizeof ( FTC_SizeNodeRec ),
+    ftc_size_node_compare,
+    ftc_size_node_init,
+    ftc_size_node_reset,
+    ftc_size_node_done
   };
 
 
   /* helper function used by ftc_face_node_done */
-  static FT_Bool
-  ftc_size_node_compare_faceid( FTC_SizeNode  node,
-                                FTC_FaceID    face_id )
+  static FT_Int
+  ftc_size_node_compare_faceid( FTC_MruNode  ftcnode,
+                                FT_Pointer   ftcface_id )
   {
-    return FT_BOOL( node->scaler.face_id == face_id );
+    FTC_SizeNode  node    = (FTC_SizeNode)ftcnode;
+    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;
+
+
+    return node->scaler.face_id == face_id;
   }
 
 
@@ -202,11 +221,14 @@
 
 
   FT_CALLBACK_DEF( FT_Error )
-  ftc_face_node_init( FTC_FaceNode  node,
-                      FTC_FaceID    face_id,
-                      FTC_Manager   manager )
+  ftc_face_node_init( FTC_MruNode  ftcnode,
+                      FT_Pointer   ftcface_id,
+                      FT_Pointer   ftcmanager )
   {
-    FT_Error  error;
+    FTC_FaceNode  node    = (FTC_FaceNode)ftcnode;
+    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;
+    FTC_Manager   manager = (FTC_Manager)ftcmanager;
+    FT_Error      error;
 
 
     node->face_id = face_id;
@@ -227,15 +249,18 @@
 
 
   FT_CALLBACK_DEF( void )
-  ftc_face_node_done( FTC_FaceNode  node,
-                      FTC_Manager   manager )
+  ftc_face_node_done( FTC_MruNode  ftcnode,
+                      FT_Pointer   ftcmanager )
   {
+    FTC_FaceNode  node    = (FTC_FaceNode)ftcnode;
+    FTC_Manager   manager = (FTC_Manager)ftcmanager;
+
+
     /* we must begin by removing all scalers for the target face */
     /* from the manager's list                                   */
-    FTC_MruList_RemoveSelection(
-      & manager->sizes,
-      (FTC_MruNode_CompareFunc)ftc_size_node_compare_faceid,
-      node->face_id );
+    FTC_MruList_RemoveSelection( &manager->sizes,
+                                 ftc_size_node_compare_faceid,
+                                 node->face_id );
 
     /* all right, we can discard the face now */
     FT_Done_Face( node->face );
@@ -244,10 +269,14 @@
   }
 
 
-  FT_CALLBACK_DEF( FT_Bool )
-  ftc_face_node_compare( FTC_FaceNode  node,
-                         FTC_FaceID    face_id )
+  FT_CALLBACK_DEF( FT_Int )
+  ftc_face_node_compare( FTC_MruNode  ftcnode,
+                         FT_Pointer   ftcface_id )
   {
+    FTC_FaceNode  node    = (FTC_FaceNode)ftcnode;
+    FTC_FaceID    face_id = (FTC_FaceID)ftcface_id;
+
+
     return FT_BOOL( node->face_id == face_id );
   }
 
@@ -255,12 +284,12 @@
   FT_CALLBACK_TABLE_DEF
   const FTC_MruListClassRec  ftc_face_list_class =
   {
-    sizeof( FTC_FaceNodeRec),
+    sizeof ( FTC_FaceNodeRec),
 
-    (FTC_MruNode_CompareFunc)ftc_face_node_compare,
-    (FTC_MruNode_InitFunc)   ftc_face_node_init,
-    (FTC_MruNode_ResetFunc)  NULL,
-    (FTC_MruNode_DoneFunc)   ftc_face_node_done
+    ftc_face_node_compare,
+    ftc_face_node_init,
+    0,                          /* FTC_MruNode_ResetFunc */
+    ftc_face_node_done
   };
 
 
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 6af5c7e..68bab08 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -77,9 +77,12 @@
 
 
   FT_LOCAL_DEF( void )
-  ftc_snode_free( FTC_SNode  snode,
+  ftc_snode_free( FTC_Node   ftcsnode,
                   FTC_Cache  cache )
   {
+    FTC_SNode  snode = (FTC_SNode)ftcsnode;
+
+
     FTC_SNode_Free( snode, cache );
   }
 
@@ -240,10 +243,14 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  ftc_snode_new( FTC_SNode  *psnode,
-                 FTC_GQuery  gquery,
+  ftc_snode_new( FTC_Node   *ftcpsnode,
+                 FT_Pointer  ftcgquery,
                  FTC_Cache   cache )
   {
+    FTC_SNode  *psnode = (FTC_SNode*)ftcpsnode;
+    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;
+
+
     return FTC_SNode_New( psnode, gquery, cache );
   }
 
@@ -280,8 +287,13 @@
 
 
   FT_LOCAL_DEF( FT_ULong )
-  ftc_snode_weight( FTC_SNode  snode )
+  ftc_snode_weight( FTC_Node   ftcsnode,
+                    FTC_Cache  cache )
   {
+    FTC_SNode  snode = (FTC_SNode)ftcsnode;
+    FT_UNUSED( cache );
+
+
     return FTC_SNode_Weight( snode );
   }
 
@@ -322,10 +334,14 @@
 
 
   FT_LOCAL_DEF( FT_Bool )
-  ftc_snode_compare( FTC_SNode   snode,
-                     FTC_GQuery  gquery,
+  ftc_snode_compare( FTC_Node    ftcsnode,
+                     FT_Pointer  ftcgquery,
                      FTC_Cache   cache )
   {
+    FTC_SNode   snode  = (FTC_SNode)ftcsnode;
+    FTC_GQuery  gquery = (FTC_GQuery)ftcgquery;
+
+
     return FTC_SNode_Compare( snode, gquery, cache );
   }