Commit c24f77ac766092b31617f030e08f5fcbeb08509b

suzuki toshiya 2012-01-16T21:13:05

Formatting PIC related sources. * src/autofit/afpic.c: Harmonize to FT2 coding conventions. * src/base/basepic.c: Ditto. * src/base/ftpic.c: Ditto. * src/cff/cffpic.c: Ditto. * src/pshinter/pshpic.c: Ditto. * src/psnames/pspic.c: Ditto. * src/raster/rastpic.c: Ditto. * src/sfnt/sfntpic.c: Ditto. * src/smooth/ftspic.c: Ditto. * src/truetype/ttpic.c: Ditto.

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
diff --git a/ChangeLog b/ChangeLog
index 67ccfb6..4433a09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2012-01-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
+	Formatting PIC related sources.
+
+	* src/autofit/afpic.c: Harmonize to FT2 coding conventions.
+	* src/base/basepic.c: Ditto.
+	* src/base/ftpic.c: Ditto.
+	* src/cff/cffpic.c: Ditto.
+	* src/pshinter/pshpic.c: Ditto.
+	* src/psnames/pspic.c: Ditto.
+	* src/raster/rastpic.c: Ditto.
+	* src/sfnt/sfntpic.c: Ditto.
+	* src/smooth/ftspic.c: Ditto.
+	* src/truetype/ttpic.c: Ditto.
+
+2012-01-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
 	[autofit] Fix the inclusion of "aflatin2.h" in PIC file.
 
 	* src/autofit/afpic.c: Include "aflatin2.h" when
diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c
index cd207c0..966fdd3 100644
--- a/src/autofit/afpic.c
+++ b/src/autofit/afpic.c
@@ -25,8 +25,9 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from afmodule.c */
-  void FT_Init_Class_af_autofitter_service( FT_Library,
-                                            FT_AutoHinter_ServiceRec* );
+  void FT_Init_Class_af_autofitter_service(
+    FT_Library                 library,
+    FT_AutoHinter_ServiceRec*  clazz );
 
   /* forward declaration of PIC init functions from script classes */
 #include "aflatin.h"
diff --git a/src/base/basepic.c b/src/base/basepic.c
index c0bccb6..cc5fbbd 100644
--- a/src/base/basepic.c
+++ b/src/base/basepic.c
@@ -24,18 +24,21 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from ftglyph.c */
-  void FT_Init_Class_ft_outline_glyph_class(FT_Glyph_Class*);
-  void FT_Init_Class_ft_bitmap_glyph_class(FT_Glyph_Class*);
+  void FT_Init_Class_ft_outline_glyph_class( FT_Glyph_Class*  clazz );
+  void FT_Init_Class_ft_bitmap_glyph_class( FT_Glyph_Class*  clazz );
 
   /* forward declaration of PIC init functions from ftinit.c */
-  FT_Error ft_create_default_module_classes(FT_Library);
-  void ft_destroy_default_module_classes(FT_Library);
+  FT_Error
+  ft_create_default_module_classes( FT_Library  library );
+
+  void
+  ft_destroy_default_module_classes( FT_Library  library );
 
   void
-  ft_base_pic_free( FT_Library library )
+  ft_base_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory    memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory          memory = library->memory;
     if ( pic_container->base )
     {
       /* Destroy default module classes (in case FT_Add_Default_Modules was used) */
@@ -48,17 +51,17 @@
 
 
   FT_Error
-  ft_base_pic_init( FT_Library library )
+  ft_base_pic_init( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Error        error = FT_Err_Ok;
-    BasePIC*     container;
-    FT_Memory    memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Error           error = FT_Err_Ok;
+    BasePIC*           container;
+    FT_Memory          memory = library->memory;
 
     /* allocate pointer, clear and set global container pointer */
     if ( FT_ALLOC ( container, sizeof ( *container ) ) )
       return error;
-    FT_MEM_SET( container, 0, sizeof(*container) );
+    FT_MEM_SET( container, 0, sizeof ( *container ) );
     pic_container->base = container;
 
     /* initialize default modules list and pointers */
@@ -67,12 +70,14 @@
       goto Exit;
 
     /* initialize pointer table - this is how the module usually expects this data */
-    FT_Init_Class_ft_outline_glyph_class(&container->ft_outline_glyph_class);
-    FT_Init_Class_ft_bitmap_glyph_class(&container->ft_bitmap_glyph_class);
+    FT_Init_Class_ft_outline_glyph_class(
+      &container->ft_outline_glyph_class );
+    FT_Init_Class_ft_bitmap_glyph_class(
+      &container->ft_bitmap_glyph_class );
 
 Exit:
-    if(error)
-      ft_base_pic_free(library);
+    if( error )
+      ft_base_pic_free( library );
     return error;
   }
 
diff --git a/src/base/ftpic.c b/src/base/ftpic.c
index d5271a9..b74e90d 100644
--- a/src/base/ftpic.c
+++ b/src/base/ftpic.c
@@ -26,15 +26,15 @@
   /* documentation is in ftpic.h */
 
   FT_BASE_DEF( FT_Error )
-  ft_pic_container_init( FT_Library library )
+  ft_pic_container_init( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Error error = FT_Err_Ok;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Error  error = FT_Err_Ok;
 
-    FT_MEM_SET( pic_container, 0, sizeof(*pic_container) );
+    FT_MEM_SET( pic_container, 0, sizeof ( *pic_container ) );
 
     error = ft_base_pic_init( library );
-    if(error)
+    if ( error )
       return error;
 
     return FT_Err_Ok;
@@ -43,7 +43,7 @@
 
   /* Destroy the contents of the container. */
   FT_BASE_DEF( void )
-  ft_pic_container_destroy( FT_Library library )
+  ft_pic_container_destroy( FT_Library  library )
   {
     ft_base_pic_free( library );
   }
diff --git a/src/cff/cffpic.c b/src/cff/cffpic.c
index d29cf90..1c19d58 100644
--- a/src/cff/cffpic.c
+++ b/src/cff/cffpic.c
@@ -26,31 +26,71 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from cffdrivr.c */
-  FT_Error FT_Create_Class_cff_services( FT_Library, FT_ServiceDescRec**);
-  void FT_Destroy_Class_cff_services( FT_Library, FT_ServiceDescRec*);
-  void FT_Init_Class_cff_service_ps_info( FT_Library, FT_Service_PsInfoRec*);
-  void FT_Init_Class_cff_service_glyph_dict( FT_Library, FT_Service_GlyphDictRec*);
-  void FT_Init_Class_cff_service_ps_name( FT_Library, FT_Service_PsFontNameRec*);
-  void FT_Init_Class_cff_service_get_cmap_info( FT_Library, FT_Service_TTCMapsRec*);
-  void FT_Init_Class_cff_service_cid_info( FT_Library, FT_Service_CIDRec*);
+  FT_Error
+  FT_Create_Class_cff_services(
+    FT_Library           library,
+    FT_ServiceDescRec**  output_class );
+
+  void
+  FT_Destroy_Class_cff_services(
+    FT_Library          library,
+    FT_ServiceDescRec*  clazz );
+
+  void
+  FT_Init_Class_cff_service_ps_info(
+    FT_Library             library,
+    FT_Service_PsInfoRec*  clazz );
+
+  void
+  FT_Init_Class_cff_service_glyph_dict(
+    FT_Library                library,
+    FT_Service_GlyphDictRec*  clazz );
+
+  void
+  FT_Init_Class_cff_service_ps_name(
+    FT_Library                 library,
+    FT_Service_PsFontNameRec*  clazz );
+
+  void
+  FT_Init_Class_cff_service_get_cmap_info(
+    FT_Library              library,
+    FT_Service_TTCMapsRec*  clazz );
+
+  void
+  FT_Init_Class_cff_service_cid_info(
+    FT_Library          library,
+    FT_Service_CIDRec*  clazz );
 
   /* forward declaration of PIC init functions from cffparse.c */
-  FT_Error FT_Create_Class_cff_field_handlers( FT_Library, CFF_Field_Handler**);
-  void FT_Destroy_Class_cff_field_handlers( FT_Library, CFF_Field_Handler*);
+  FT_Error
+  FT_Create_Class_cff_field_handlers(
+    FT_Library           library,
+    CFF_Field_Handler**  output_class );
+
+  void
+  FT_Destroy_Class_cff_field_handlers(
+    FT_Library          library,
+    CFF_Field_Handler*  clazz );
 
   void
-  cff_driver_class_pic_free(  FT_Library library )
+  cff_driver_class_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory  memory = library->memory;
+
+
     if ( pic_container->cff )
     {
-      CffModulePIC* container = (CffModulePIC*)pic_container->cff;
-      if(container->cff_services)
-        FT_Destroy_Class_cff_services(library, container->cff_services);
+      CffModulePIC*  container = ( CffModulePIC* )pic_container->cff;
+
+
+      if ( container->cff_services )
+        FT_Destroy_Class_cff_services( library,
+                                       container->cff_services );
       container->cff_services = NULL;
-      if(container->cff_field_handlers)
-        FT_Destroy_Class_cff_field_handlers(library, container->cff_field_handlers);
+      if ( container->cff_field_handlers )
+        FT_Destroy_Class_cff_field_handlers(
+          library, container->cff_field_handlers );
       container->cff_field_handlers = NULL;
       FT_FREE( container );
       pic_container->cff = NULL;
@@ -74,22 +114,31 @@
     pic_container->cff = container;
 
     /* initialize pointer table - this is how the module usually expects this data */
-    error = FT_Create_Class_cff_services(library, &container->cff_services);
-    if(error) 
+    error = FT_Create_Class_cff_services( library,
+                                          &container->cff_services );
+    if ( error )
       goto Exit;
-    error = FT_Create_Class_cff_field_handlers(library, &container->cff_field_handlers);
-    if(error) 
+    error = FT_Create_Class_cff_field_handlers(
+              library, &container->cff_field_handlers );
+    if ( error )
       goto Exit;
-    FT_Init_Class_cff_service_ps_info(library, &container->cff_service_ps_info);
-    FT_Init_Class_cff_service_glyph_dict(library, &container->cff_service_glyph_dict);
-    FT_Init_Class_cff_service_ps_name(library, &container->cff_service_ps_name);
-    FT_Init_Class_cff_service_get_cmap_info(library, &container->cff_service_get_cmap_info);
-    FT_Init_Class_cff_service_cid_info(library, &container->cff_service_cid_info);
-    FT_Init_Class_cff_cmap_encoding_class_rec(library, &container->cff_cmap_encoding_class_rec);
-    FT_Init_Class_cff_cmap_unicode_class_rec(library, &container->cff_cmap_unicode_class_rec);
+    FT_Init_Class_cff_service_ps_info(
+      library, &container->cff_service_ps_info );
+    FT_Init_Class_cff_service_glyph_dict(
+      library, &container->cff_service_glyph_dict );
+    FT_Init_Class_cff_service_ps_name(
+      library, &container->cff_service_ps_name );
+    FT_Init_Class_cff_service_get_cmap_info(
+      library, &container->cff_service_get_cmap_info );
+    FT_Init_Class_cff_service_cid_info(
+      library, &container->cff_service_cid_info );
+    FT_Init_Class_cff_cmap_encoding_class_rec(
+      library, &container->cff_cmap_encoding_class_rec );
+    FT_Init_Class_cff_cmap_unicode_class_rec(
+      library, &container->cff_cmap_unicode_class_rec );
 Exit:
-    if(error)
-      cff_driver_class_pic_free(library);
+    if ( error )
+      cff_driver_class_pic_free( library );
     return error;
   }
 
diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c
index 76db8fb..5ac5a83 100644
--- a/src/pshinter/pshpic.c
+++ b/src/pshinter/pshpic.c
@@ -25,13 +25,17 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from pshmod.c */
-  void FT_Init_Class_pshinter_interface( FT_Library, PSHinter_Interface*);
+  void
+  FT_Init_Class_pshinter_interface( FT_Library           library,
+                                    PSHinter_Interface*  clazz );
 
   void
-  pshinter_module_class_pic_free( FT_Library library )
+  pshinter_module_class_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory  memory = library->memory;
+
+
     if ( pic_container->pshinter )
     {
       FT_FREE( pic_container->pshinter );
@@ -56,11 +60,12 @@
     pic_container->pshinter = container;
     
     /* add call to initialization function when you add new scripts */
-    FT_Init_Class_pshinter_interface(library, &container->pshinter_interface);
+    FT_Init_Class_pshinter_interface(
+      library, &container->pshinter_interface );
 
 /*Exit:*/
-    if(error)
-      pshinter_module_class_pic_free(library);
+    if( error )
+      pshinter_module_class_pic_free( library );
     return error;
   }
 
diff --git a/src/psnames/pspic.c b/src/psnames/pspic.c
index f88d415..ae9175d 100644
--- a/src/psnames/pspic.c
+++ b/src/psnames/pspic.c
@@ -25,20 +25,32 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from psmodule.c */
-  FT_Error FT_Create_Class_pscmaps_services( FT_Library, FT_ServiceDescRec**);
-  void FT_Destroy_Class_pscmaps_services( FT_Library, FT_ServiceDescRec*);
-  void FT_Init_Class_pscmaps_interface( FT_Library, FT_Service_PsCMapsRec*);
+  FT_Error
+  FT_Create_Class_pscmaps_services( FT_Library           library,
+                                    FT_ServiceDescRec**  output_class );
+  void
+  FT_Destroy_Class_pscmaps_services( FT_Library          library,
+                                     FT_ServiceDescRec*  clazz );
 
   void
-  psnames_module_class_pic_free(  FT_Library library )
+  FT_Init_Class_pscmaps_interface( FT_Library              library,
+                                   FT_Service_PsCMapsRec*  clazz );
+
+  void
+  psnames_module_class_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory  memory = library->memory;
+
+
     if ( pic_container->psnames )
     {
-      PSModulePIC* container = (PSModulePIC*)pic_container->psnames;
+      PSModulePIC*  container = (PSModulePIC*)pic_container->psnames;
+
+
       if(container->pscmaps_services)
-        FT_Destroy_Class_pscmaps_services(library, container->pscmaps_services);
+        FT_Destroy_Class_pscmaps_services( library,
+                                           container->pscmaps_services );
       container->pscmaps_services = NULL;
       FT_FREE( container );
       pic_container->psnames = NULL;
@@ -58,18 +70,20 @@
     /* allocate pointer, clear and set global container pointer */
     if ( FT_ALLOC ( container, sizeof ( *container ) ) )
       return error;
-    FT_MEM_SET( container, 0, sizeof(*container) );
+    FT_MEM_SET( container, 0, sizeof ( *container ) );
     pic_container->psnames = container;
 
     /* initialize pointer table - this is how the module usually expects this data */
-    error = FT_Create_Class_pscmaps_services(library, &container->pscmaps_services);
-    if(error) 
+    error = FT_Create_Class_pscmaps_services(
+              library, &container->pscmaps_services );
+    if ( error )
       goto Exit;
-    FT_Init_Class_pscmaps_interface(library, &container->pscmaps_interface);
+    FT_Init_Class_pscmaps_interface( library,
+                                     &container->pscmaps_interface );
     
 Exit:
-    if(error)
-      psnames_module_class_pic_free(library);
+    if ( error )
+      psnames_module_class_pic_free( library );
     return error;
   }
 
diff --git a/src/raster/rastpic.c b/src/raster/rastpic.c
index d12294e..70398bf 100644
--- a/src/raster/rastpic.c
+++ b/src/raster/rastpic.c
@@ -25,17 +25,20 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from ftraster.c */
-  void FT_Init_Class_ft_standard_raster(FT_Raster_Funcs*);
+  void
+  FT_Init_Class_ft_standard_raster( FT_Raster_Funcs*  funcs );
 
   void
-  ft_raster1_renderer_class_pic_free(  FT_Library library )
+  ft_raster1_renderer_class_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory  memory = library->memory;
+
+
     if ( pic_container->raster )
     {
       RasterPIC* container = (RasterPIC*)pic_container->raster;
-      if(--container->ref_count)
+      if ( --container->ref_count )
         return;
       FT_FREE( container );
       pic_container->raster = NULL;
@@ -44,7 +47,7 @@
 
 
   FT_Error
-  ft_raster1_renderer_class_pic_init( FT_Library library )
+  ft_raster1_renderer_class_pic_init( FT_Library  library )
   {
     FT_PIC_Container* pic_container = &library->pic_container;
     FT_Error          error         = Raster_Err_Ok;
@@ -61,28 +64,31 @@
     }
 
     /* allocate pointer, clear and set global container pointer */
-    if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+    if ( FT_ALLOC( container, sizeof ( *container ) ) )
       return error;
-    FT_MEM_SET( container, 0, sizeof(*container) );
+    FT_MEM_SET( container, 0, sizeof ( *container ) );
     pic_container->raster = container;
     container->ref_count = 1;
 
     /* initialize pointer table - this is how the module usually expects this data */
-    FT_Init_Class_ft_standard_raster(&container->ft_standard_raster);
+    FT_Init_Class_ft_standard_raster( &container->ft_standard_raster );
 /*Exit:*/
-    if(error)
-      ft_raster1_renderer_class_pic_free(library);
+    if( error )
+      ft_raster1_renderer_class_pic_free( library );
     return error;
   }
 
   /* re-route these init and free functions to the above functions */
-  FT_Error ft_raster5_renderer_class_pic_init(FT_Library library)
+  FT_Error
+  ft_raster5_renderer_class_pic_init( FT_Library  library )
   {
-    return ft_raster1_renderer_class_pic_init(library);
+    return ft_raster1_renderer_class_pic_init( library );
   }
-  void ft_raster5_renderer_class_pic_free(FT_Library library)
+
+  void
+  ft_raster5_renderer_class_pic_free( FT_Library  library )
   {
-    ft_raster1_renderer_class_pic_free(library);
+    ft_raster1_renderer_class_pic_free( library );
   }
 
 #endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/sfnt/sfntpic.c b/src/sfnt/sfntpic.c
index b5e20d8..1372376 100644
--- a/src/sfnt/sfntpic.c
+++ b/src/sfnt/sfntpic.c
@@ -25,32 +25,68 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from sfdriver.c */
-  FT_Error FT_Create_Class_sfnt_services( FT_Library, FT_ServiceDescRec**);
-  void FT_Destroy_Class_sfnt_services( FT_Library, FT_ServiceDescRec*);
-  void FT_Init_Class_sfnt_service_bdf( FT_Service_BDFRec*);
-  void FT_Init_Class_sfnt_interface( FT_Library, SFNT_Interface*);
-  void FT_Init_Class_sfnt_service_glyph_dict( FT_Library, FT_Service_GlyphDictRec*);
-  void FT_Init_Class_sfnt_service_ps_name( FT_Library, FT_Service_PsFontNameRec*);
-  void FT_Init_Class_tt_service_get_cmap_info( FT_Library, FT_Service_TTCMapsRec*);
-  void FT_Init_Class_sfnt_service_sfnt_table( FT_Service_SFNT_TableRec*);
+  FT_Error
+  FT_Create_Class_sfnt_services( FT_Library           library,
+                                 FT_ServiceDescRec**  ouput_class );
+
+  void
+  FT_Destroy_Class_sfnt_services( FT_Library          library,
+                                  FT_ServiceDescRec*  clazz );
+
+  void
+  FT_Init_Class_sfnt_service_bdf( FT_Service_BDFRec*  clazz );
+
+  void
+  FT_Init_Class_sfnt_interface( FT_Library       library,
+                                SFNT_Interface*  clazz );
+
+  void
+  FT_Init_Class_sfnt_service_glyph_dict(
+    FT_Library                library,
+    FT_Service_GlyphDictRec*  clazz );
+
+  void
+  FT_Init_Class_sfnt_service_ps_name(
+    FT_Library                 library,
+    FT_Service_PsFontNameRec*  clazz );
+
+  void
+  FT_Init_Class_tt_service_get_cmap_info(
+    FT_Library              library,
+    FT_Service_TTCMapsRec*  clazz );
+
+  void
+  FT_Init_Class_sfnt_service_sfnt_table(
+    FT_Service_SFNT_TableRec*  clazz );
 
   /* forward declaration of PIC init functions from ttcmap.c */
-  FT_Error FT_Create_Class_tt_cmap_classes( FT_Library, TT_CMap_Class**);
-  void FT_Destroy_Class_tt_cmap_classes( FT_Library, TT_CMap_Class*);
+  FT_Error
+  FT_Create_Class_tt_cmap_classes( FT_Library       library,
+                                   TT_CMap_Class**  output_class );
+
+  void
+  FT_Destroy_Class_tt_cmap_classes( FT_Library      library,
+                                    TT_CMap_Class*  clazz );
 
   void
-  sfnt_module_class_pic_free(  FT_Library library )
+  sfnt_module_class_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory  memory = library->memory;
+
+
     if ( pic_container->sfnt )
     {
-      sfntModulePIC* container = (sfntModulePIC*)pic_container->sfnt;
-      if(container->sfnt_services)
-        FT_Destroy_Class_sfnt_services(library, container->sfnt_services);
+      sfntModulePIC*  container = (sfntModulePIC*)pic_container->sfnt;
+
+
+      if ( container->sfnt_services )
+        FT_Destroy_Class_sfnt_services( library,
+                                        container->sfnt_services );
       container->sfnt_services = NULL;
-      if(container->tt_cmap_classes)
-        FT_Destroy_Class_tt_cmap_classes(library, container->tt_cmap_classes);
+      if ( container->tt_cmap_classes )
+        FT_Destroy_Class_tt_cmap_classes( library,
+                                          container->tt_cmap_classes );
       container->tt_cmap_classes = NULL;
       FT_FREE( container );
       pic_container->sfnt = NULL;
@@ -74,24 +110,31 @@
     pic_container->sfnt = container;
 
     /* initialize pointer table - this is how the module usually expects this data */
-    error = FT_Create_Class_sfnt_services(library, &container->sfnt_services);
-    if(error) 
+    error = FT_Create_Class_sfnt_services( library,
+                                           &container->sfnt_services );
+    if ( error )
       goto Exit;
-    error = FT_Create_Class_tt_cmap_classes(library, &container->tt_cmap_classes);
-    if(error) 
+    error = FT_Create_Class_tt_cmap_classes( library,
+                                             &container->tt_cmap_classes );
+    if ( error )
       goto Exit;
-    FT_Init_Class_sfnt_service_glyph_dict(library, &container->sfnt_service_glyph_dict);
-    FT_Init_Class_sfnt_service_ps_name(library, &container->sfnt_service_ps_name);
-    FT_Init_Class_tt_service_get_cmap_info(library, &container->tt_service_get_cmap_info);
-    FT_Init_Class_sfnt_service_sfnt_table(&container->sfnt_service_sfnt_table);
+
+    FT_Init_Class_sfnt_service_glyph_dict(
+      library, &container->sfnt_service_glyph_dict );
+    FT_Init_Class_sfnt_service_ps_name(
+      library, &container->sfnt_service_ps_name );
+    FT_Init_Class_tt_service_get_cmap_info(
+      library, &container->tt_service_get_cmap_info );
+    FT_Init_Class_sfnt_service_sfnt_table(
+      &container->sfnt_service_sfnt_table );
 #ifdef TT_CONFIG_OPTION_BDF
-    FT_Init_Class_sfnt_service_bdf(&container->sfnt_service_bdf);
+    FT_Init_Class_sfnt_service_bdf( &container->sfnt_service_bdf );
 #endif
-    FT_Init_Class_sfnt_interface(library, &container->sfnt_interface);
+    FT_Init_Class_sfnt_interface( library, &container->sfnt_interface );
 
 Exit:
-    if(error)
-      sfnt_module_class_pic_free(library);
+    if ( error )
+      sfnt_module_class_pic_free( library );
     return error;
   }
 
diff --git a/src/smooth/ftspic.c b/src/smooth/ftspic.c
index c54ecd5..407749a 100644
--- a/src/smooth/ftspic.c
+++ b/src/smooth/ftspic.c
@@ -25,17 +25,22 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from ftgrays.c */
-  void FT_Init_Class_ft_grays_raster(FT_Raster_Funcs*);
+  void
+  FT_Init_Class_ft_grays_raster( FT_Raster_Funcs*  funcs );
 
   void
-  ft_smooth_renderer_class_pic_free(  FT_Library library )
+  ft_smooth_renderer_class_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory  memory = library->memory;
+
+
     if ( pic_container->smooth )
     {
-      SmoothPIC* container = (SmoothPIC*)pic_container->smooth;
-      if(--container->ref_count)
+      SmoothPIC*  container = (SmoothPIC*)pic_container->smooth;
+
+
+      if ( --container->ref_count )
         return;
       FT_FREE( container );
       pic_container->smooth = NULL;
@@ -54,7 +59,7 @@
 
     /* since this function also serve smooth_lcd and smooth_lcdv renderers, 
        it implements reference counting */
-    if(pic_container->smooth)
+    if ( pic_container->smooth )
     {
       ((SmoothPIC*)pic_container->smooth)->ref_count++;
       return error;
@@ -63,34 +68,37 @@
     /* allocate pointer, clear and set global container pointer */
     if ( FT_ALLOC ( container, sizeof ( *container ) ) )
       return error;
-    FT_MEM_SET( container, 0, sizeof(*container) );
+    FT_MEM_SET( container, 0, sizeof ( *container ) );
     pic_container->smooth = container;
     container->ref_count = 1;
 
     /* initialize pointer table - this is how the module usually expects this data */
-    FT_Init_Class_ft_grays_raster(&container->ft_grays_raster);
+    FT_Init_Class_ft_grays_raster( &container->ft_grays_raster );
 /*Exit:*/
-    if(error)
-      ft_smooth_renderer_class_pic_free(library);
+    if ( error )
+      ft_smooth_renderer_class_pic_free( library );
     return error;
   }
 
   /* re-route these init and free functions to the above functions */
-  FT_Error ft_smooth_lcd_renderer_class_pic_init(FT_Library library)
+  FT_Error ft_smooth_lcd_renderer_class_pic_init( FT_Library  library )
   {
-    return ft_smooth_renderer_class_pic_init(library);
+    return ft_smooth_renderer_class_pic_init( library );
   }
-  void ft_smooth_lcd_renderer_class_pic_free(FT_Library library)
+
+  void ft_smooth_lcd_renderer_class_pic_free( FT_Library  library )
   {
-    ft_smooth_renderer_class_pic_free(library);
+    ft_smooth_renderer_class_pic_free( library );
   }
-  FT_Error ft_smooth_lcdv_renderer_class_pic_init(FT_Library library)
+
+  FT_Error ft_smooth_lcdv_renderer_class_pic_init( FT_Library  library )
   {
-    return ft_smooth_renderer_class_pic_init(library);
+    return ft_smooth_renderer_class_pic_init( library );
   }
-  void ft_smooth_lcdv_renderer_class_pic_free(FT_Library library)
+
+  void ft_smooth_lcdv_renderer_class_pic_free( FT_Library  library )
   {
-    ft_smooth_renderer_class_pic_free(library);
+    ft_smooth_renderer_class_pic_free( library );
   }
 
 #endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/truetype/ttpic.c b/src/truetype/ttpic.c
index 700c57b..65ca845 100644
--- a/src/truetype/ttpic.c
+++ b/src/truetype/ttpic.c
@@ -25,21 +25,36 @@
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from ttdriver.c */
-  FT_Error FT_Create_Class_tt_services( FT_Library, FT_ServiceDescRec**);
-  void FT_Destroy_Class_tt_services( FT_Library, FT_ServiceDescRec*);
-  void FT_Init_Class_tt_service_gx_multi_masters(FT_Service_MultiMastersRec*);
-  void FT_Init_Class_tt_service_truetype_glyf(FT_Service_TTGlyfRec*);
+  FT_Error
+  FT_Create_Class_tt_services( FT_Library           library,
+                               FT_ServiceDescRec**  output_class );
+
+  void
+  FT_Destroy_Class_tt_services( FT_Library          library,
+                                FT_ServiceDescRec*  clazz );
+
+  void
+  FT_Init_Class_tt_service_gx_multi_masters(
+    FT_Service_MultiMastersRec*  sv_mm );
+
+  void
+  FT_Init_Class_tt_service_truetype_glyf(
+    FT_Service_TTGlyfRec*  sv_ttglyf );
 
   void
-  tt_driver_class_pic_free(  FT_Library library )
+  tt_driver_class_pic_free( FT_Library  library )
   {
-    FT_PIC_Container* pic_container = &library->pic_container;
-    FT_Memory memory = library->memory;
+    FT_PIC_Container*  pic_container = &library->pic_container;
+    FT_Memory  memory = library->memory;
+
+
     if ( pic_container->truetype )
     {
-      TTModulePIC* container = (TTModulePIC*)pic_container->truetype;
-      if(container->tt_services)
-        FT_Destroy_Class_tt_services(library, container->tt_services);
+      TTModulePIC*  container = (TTModulePIC*)pic_container->truetype;
+
+
+      if ( container->tt_services )
+        FT_Destroy_Class_tt_services( library, container->tt_services );
       container->tt_services = NULL;
       FT_FREE( container );
       pic_container->truetype = NULL;
@@ -59,20 +74,23 @@
     /* allocate pointer, clear and set global container pointer */
     if ( FT_ALLOC ( container, sizeof ( *container ) ) )
       return error;
-    FT_MEM_SET( container, 0, sizeof(*container) );
+    FT_MEM_SET( container, 0, sizeof ( *container ) );
     pic_container->truetype = container;
 
     /* initialize pointer table - this is how the module usually expects this data */
-    error = FT_Create_Class_tt_services(library, &container->tt_services);
-    if(error) 
+    error = FT_Create_Class_tt_services( library,
+                                         &container->tt_services );
+    if ( error )
       goto Exit;
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-    FT_Init_Class_tt_service_gx_multi_masters(&container->tt_service_gx_multi_masters);
+    FT_Init_Class_tt_service_gx_multi_masters(
+      &container->tt_service_gx_multi_masters );
 #endif
-    FT_Init_Class_tt_service_truetype_glyf(&container->tt_service_truetype_glyf);
+    FT_Init_Class_tt_service_truetype_glyf(
+      &container->tt_service_truetype_glyf );
 Exit:
-    if(error)
-      tt_driver_class_pic_free(library);
+    if ( error )
+      tt_driver_class_pic_free( library );
     return error;
   }