Commit 5ea06ce0174a95f48b28efdba297672ae5d89981

Werner Lemberg 2013-03-17T08:14:46

Whitespace.

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
diff --git a/src/base/basepic.c b/src/base/basepic.c
index 5268e7c..0af770e 100644
--- a/src/base/basepic.c
+++ b/src/base/basepic.c
@@ -75,7 +75,7 @@
 
 
     /* 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 ) );
     pic_container->base = container;
@@ -96,13 +96,12 @@
       (ft_raccess_guess_rec*)&container->ft_raccess_guess_table );
 #endif
 
-Exit:
-    if( error )
+  Exit:
+    if ( error )
       ft_base_pic_free( library );
     return error;
   }
 
-
 #endif /* FT_CONFIG_OPTION_PIC */
 
 
diff --git a/src/base/basepic.h b/src/base/basepic.h
index bf90bef..329d7c8 100644
--- a/src/base/basepic.h
+++ b/src/base/basepic.h
@@ -25,11 +25,13 @@ FT_BEGIN_HEADER
 #include FT_INTERNAL_PIC_H
 
 #ifndef FT_CONFIG_OPTION_PIC
-#define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class
-#define FT_BITMAP_GLYPH_CLASS_GET  &ft_bitmap_glyph_class
-#define FT_DEFAULT_MODULES_GET     ft_default_modules
+
+#define FT_OUTLINE_GLYPH_CLASS_GET  &ft_outline_glyph_class
+#define FT_BITMAP_GLYPH_CLASS_GET   &ft_bitmap_glyph_class
+#define FT_DEFAULT_MODULES_GET      ft_default_modules
+
 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
-#define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table
+#define FT_RACCESS_GUESS_TABLE_GET  ft_raccess_guess_table
 #endif
 
 #else /* FT_CONFIG_OPTION_PIC */
@@ -41,25 +43,35 @@ FT_BEGIN_HEADER
 #endif
 
 
-  typedef struct BasePIC_
+  typedef struct  BasePIC_
   {
-    FT_Module_Class** default_module_classes;
-    FT_Glyph_Class ft_outline_glyph_class;
-    FT_Glyph_Class ft_bitmap_glyph_class;
+    FT_Module_Class**  default_module_classes;
+    FT_Glyph_Class     ft_outline_glyph_class;
+    FT_Glyph_Class     ft_bitmap_glyph_class;
+
 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
-    ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES];
+    ft_raccess_guess_rec  ft_raccess_guess_table[FT_RACCESS_N_RULES];
 #endif
+
   } BasePIC;
 
-#define GET_PIC(lib)                  ((BasePIC*)((lib)->pic_container.base))
-#define FT_OUTLINE_GLYPH_CLASS_GET    (&GET_PIC(library)->ft_outline_glyph_class)
-#define FT_BITMAP_GLYPH_CLASS_GET     (&GET_PIC(library)->ft_bitmap_glyph_class)
-#define FT_DEFAULT_MODULES_GET        (GET_PIC(library)->default_module_classes)
+
+#define GET_PIC( lib )  ( (BasePIC*)( (lib)->pic_container.base ) )
+
+#define FT_OUTLINE_GLYPH_CLASS_GET                      \
+          ( &GET_PIC( library )->ft_outline_glyph_class )
+#define FT_BITMAP_GLYPH_CLASS_GET                        \
+          ( &GET_PIC( library )->ft_bitmap_glyph_class )
+#define FT_DEFAULT_MODULES_GET                           \
+          ( GET_PIC( library )->default_module_classes )
+
 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
-#define FT_RACCESS_GUESS_TABLE_GET    (GET_PIC(library)->ft_raccess_guess_table)
+#define FT_RACCESS_GUESS_TABLE_GET                       \
+          ( GET_PIC( library )->ft_raccess_guess_table )
 #endif
 
-  /* see basepic.c for the implementation. */
+
+  /* see basepic.c for the implementation */
   void
   ft_base_pic_free( FT_Library  library );
 
@@ -67,7 +79,8 @@ FT_BEGIN_HEADER
   ft_base_pic_init( FT_Library  library );
 
 #endif /* FT_CONFIG_OPTION_PIC */
- /* */
+
+  /* */
 
 FT_END_HEADER
 
diff --git a/src/cff/cffpic.c b/src/cff/cffpic.c
index e2c52cd..f22e4f0 100644
--- a/src/cff/cffpic.c
+++ b/src/cff/cffpic.c
@@ -23,65 +23,51 @@
 #include "cffpic.h"
 #include "cfferrs.h"
 
+
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from cffdrivr.c */
   FT_Error
-  FT_Create_Class_cff_services(
-    FT_Library           library,
-    FT_ServiceDescRec**  output_class );
-
+  FT_Create_Class_cff_services( FT_Library           library,
+                                FT_ServiceDescRec**  output_class );
   void
-  FT_Destroy_Class_cff_services(
-    FT_Library          library,
-    FT_ServiceDescRec*  clazz );
-
+  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 );
-
+  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 );
-
+  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 );
-
+  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 );
-
+  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 );
+  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           library,
-    CFF_Field_Handler**  output_class );
-
+  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 );
+  FT_Destroy_Class_cff_field_handlers( FT_Library          library,
+                                       CFF_Field_Handler*  clazz );
+
 
   void
   cff_driver_class_pic_free( FT_Library  library )
   {
     FT_PIC_Container*  pic_container = &library->pic_container;
-    FT_Memory  memory = library->memory;
+    FT_Memory          memory        = library->memory;
 
 
     if ( pic_container->cff )
     {
-      CffModulePIC*  container = ( CffModulePIC* )pic_container->cff;
+      CffModulePIC*  container = (CffModulePIC*)pic_container->cff;
 
 
       if ( container->cff_services )
@@ -113,15 +99,18 @@
     FT_MEM_SET( container, 0, sizeof ( *container ) );
     pic_container->cff = container;
 
-    /* initialize pointer table - this is how the module usually expects this data */
+    /* initialize pointer table -                       */
+    /* this is how the module usually expects this data */
     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 )
       goto Exit;
+
     FT_Init_Class_cff_service_ps_info(
       library, &container->cff_service_ps_info );
     FT_Init_Class_cff_service_glyph_dict(
@@ -136,7 +125,8 @@
       library, &container->cff_cmap_encoding_class_rec );
     FT_Init_Class_cff_cmap_unicode_class_rec(
       library, &container->cff_cmap_unicode_class_rec );
-Exit:
+
+  Exit:
     if ( error )
       cff_driver_class_pic_free( library );
     return error;
diff --git a/src/cff/cffpic.h b/src/cff/cffpic.h
index b27f093..cfb27c7 100644
--- a/src/cff/cffpic.h
+++ b/src/cff/cffpic.h
@@ -62,26 +62,26 @@ FT_BEGIN_HEADER
   } CffModulePIC;
 
 
-#define GET_PIC( lib )  \
-          ( (CffModulePIC*)((lib)->pic_container.cff) )
+#define GET_PIC( lib )                                    \
+          ( (CffModulePIC*)( (lib)->pic_container.cff ) )
 
-#define CFF_SERVICE_PS_INFO_GET  \
+#define CFF_SERVICE_PS_INFO_GET                       \
           ( GET_PIC( library )->cff_service_ps_info )
-#define CFF_SERVICE_GLYPH_DICT_GET  \
+#define CFF_SERVICE_GLYPH_DICT_GET                       \
           ( GET_PIC( library )->cff_service_glyph_dict )
-#define CFF_SERVICE_PS_NAME_GET  \
+#define CFF_SERVICE_PS_NAME_GET                       \
           ( GET_PIC( library )->cff_service_ps_name )
-#define CFF_SERVICE_GET_CMAP_INFO_GET  \
+#define CFF_SERVICE_GET_CMAP_INFO_GET                       \
           ( GET_PIC( library )->cff_service_get_cmap_info )
-#define CFF_SERVICE_CID_INFO_GET  \
+#define CFF_SERVICE_CID_INFO_GET                       \
           ( GET_PIC( library )->cff_service_cid_info )
-#define CFF_SERVICES_GET  \
+#define CFF_SERVICES_GET                       \
           ( GET_PIC( library )->cff_services )
-#define CFF_CMAP_ENCODING_CLASS_REC_GET  \
+#define CFF_CMAP_ENCODING_CLASS_REC_GET                       \
           ( GET_PIC( library )->cff_cmap_encoding_class_rec )
-#define CFF_CMAP_UNICODE_CLASS_REC_GET  \
+#define CFF_CMAP_UNICODE_CLASS_REC_GET                       \
           ( GET_PIC( library )->cff_cmap_unicode_class_rec )
-#define CFF_FIELD_HANDLERS_GET  \
+#define CFF_FIELD_HANDLERS_GET                       \
           ( GET_PIC( library )->cff_field_handlers )
 
   /* see cffpic.c for the implementation */
diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c
index a18d21f..568f4ac 100644
--- a/src/pshinter/pshpic.c
+++ b/src/pshinter/pshpic.c
@@ -55,7 +55,7 @@
 
 
     /* 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 ) );
     pic_container->pshinter = container;
@@ -64,8 +64,9 @@
     FT_Init_Class_pshinter_interface(
       library, &container->pshinter_interface );
 
-    if( error )
+    if ( error )
       pshinter_module_class_pic_free( library );
+
     return error;
   }
 
diff --git a/src/psnames/pspic.c b/src/psnames/pspic.c
index 0c7b37a..3820f65 100644
--- a/src/psnames/pspic.c
+++ b/src/psnames/pspic.c
@@ -70,7 +70,7 @@
 
 
     /* 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 ) );
     pic_container->psnames = container;
diff --git a/src/raster/rastpic.h b/src/raster/rastpic.h
index 7822a24..e0ddba6 100644
--- a/src/raster/rastpic.h
+++ b/src/raster/rastpic.h
@@ -24,19 +24,25 @@ FT_BEGIN_HEADER
 
 #include FT_INTERNAL_PIC_H
 
+
 #ifndef FT_CONFIG_OPTION_PIC
-#define FT_STANDARD_RASTER_GET     ft_standard_raster
+
+#define FT_STANDARD_RASTER_GET  ft_standard_raster
 
 #else /* FT_CONFIG_OPTION_PIC */
 
-  typedef struct RasterPIC_
+  typedef struct  RasterPIC_
   {
-    int ref_count;
-    FT_Raster_Funcs ft_standard_raster;
+    int              ref_count;
+    FT_Raster_Funcs  ft_standard_raster;
+
   } RasterPIC;
 
-#define GET_PIC(lib)               ((RasterPIC*)((lib)->pic_container.raster))
-#define FT_STANDARD_RASTER_GET     (GET_PIC(library)->ft_standard_raster)
+
+#define GET_PIC( lib )                                    \
+          ( (RasterPIC*)( (lib)->pic_container.raster ) )
+#define FT_STANDARD_RASTER_GET  ( GET_PIC( library )->ft_standard_raster )
+
 
   /* see rastpic.c for the implementation */
   void
diff --git a/src/sfnt/sfntpic.c b/src/sfnt/sfntpic.c
index 75bac9d..b3fb24b 100644
--- a/src/sfnt/sfntpic.c
+++ b/src/sfnt/sfntpic.c
@@ -29,42 +29,35 @@
   FT_Error
   FT_Create_Class_sfnt_services( FT_Library           library,
                                  FT_ServiceDescRec**  output_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       library,
                                    TT_CMap_Class**  output_class );
-
   void
   FT_Destroy_Class_tt_cmap_classes( FT_Library      library,
                                     TT_CMap_Class*  clazz );
@@ -99,7 +92,7 @@
 
 
   FT_Error
-  sfnt_module_class_pic_init( FT_Library library )
+  sfnt_module_class_pic_init( FT_Library  library )
   {
     FT_PIC_Container*  pic_container = &library->pic_container;
     FT_Error           error         = FT_Err_Ok;
@@ -108,7 +101,7 @@
 
 
     /* 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 ) );
     pic_container->sfnt = container;
diff --git a/src/sfnt/sfntpic.h b/src/sfnt/sfntpic.h
index 35d0f44..b09a914 100644
--- a/src/sfnt/sfntpic.h
+++ b/src/sfnt/sfntpic.h
@@ -72,26 +72,26 @@ FT_BEGIN_HEADER
   } sfntModulePIC;
 
 
-#define GET_PIC( lib )  \
-          ( (sfntModulePIC*)((lib)->pic_container.sfnt) )
+#define GET_PIC( lib )                                      \
+          ( (sfntModulePIC*)( (lib)->pic_container.sfnt ) )
 
-#define SFNT_SERVICES_GET  \
+#define SFNT_SERVICES_GET                       \
           ( GET_PIC( library )->sfnt_services )
-#define SFNT_SERVICE_GLYPH_DICT_GET  \
+#define SFNT_SERVICE_GLYPH_DICT_GET                       \
           ( GET_PIC( library )->sfnt_service_glyph_dict )
-#define SFNT_SERVICE_PS_NAME_GET  \
+#define SFNT_SERVICE_PS_NAME_GET                       \
           ( GET_PIC( library )->sfnt_service_ps_name )
-#define TT_SERVICE_CMAP_INFO_GET  \
+#define TT_SERVICE_CMAP_INFO_GET                           \
           ( GET_PIC( library )->tt_service_get_cmap_info )
-#define SFNT_SERVICES_GET  \
+#define SFNT_SERVICES_GET                       \
           ( GET_PIC( library )->sfnt_services )
-#define TT_CMAP_CLASSES_GET  \
+#define TT_CMAP_CLASSES_GET                       \
           ( GET_PIC( library )->tt_cmap_classes )
-#define SFNT_SERVICE_SFNT_TABLE_GET  \
+#define SFNT_SERVICE_SFNT_TABLE_GET                       \
           ( GET_PIC( library )->sfnt_service_sfnt_table )
-#define SFNT_SERVICE_BDF_GET  \
+#define SFNT_SERVICE_BDF_GET                       \
           ( GET_PIC( library )->sfnt_service_bdf )
-#define SFNT_INTERFACE_GET  \
+#define SFNT_INTERFACE_GET                       \
           ( GET_PIC( library )->sfnt_interface )
 
 
diff --git a/src/smooth/ftspic.h b/src/smooth/ftspic.h
index 4686f5e..334b51c 100644
--- a/src/smooth/ftspic.h
+++ b/src/smooth/ftspic.h
@@ -25,18 +25,23 @@ FT_BEGIN_HEADER
 #include FT_INTERNAL_PIC_H
 
 #ifndef FT_CONFIG_OPTION_PIC
-#define FT_GRAYS_RASTER_GET        ft_grays_raster
+
+#define FT_GRAYS_RASTER_GET  ft_grays_raster
 
 #else /* FT_CONFIG_OPTION_PIC */
 
-  typedef struct SmoothPIC_
+  typedef struct  SmoothPIC_
   {
-    int ref_count;
-    FT_Raster_Funcs ft_grays_raster;
+    int              ref_count;
+    FT_Raster_Funcs  ft_grays_raster;
+
   } SmoothPIC;
 
-#define GET_PIC(lib)               ((SmoothPIC*)((lib)->pic_container.smooth))
-#define FT_GRAYS_RASTER_GET        (GET_PIC(library)->ft_grays_raster)
+
+#define GET_PIC( lib ) \
+          ( (SmoothPIC*)( (lib)->pic_container.smooth ) )
+#define FT_GRAYS_RASTER_GET  ( GET_PIC( library )->ft_grays_raster )
+
 
   /* see ftspic.c for the implementation */
   void
diff --git a/src/truetype/ttpic.c b/src/truetype/ttpic.c
index ca6d11c..edefae7 100644
--- a/src/truetype/ttpic.c
+++ b/src/truetype/ttpic.c
@@ -22,21 +22,19 @@
 #include "ttpic.h"
 #include "tterrors.h"
 
+
 #ifdef FT_CONFIG_OPTION_PIC
 
   /* forward declaration of PIC init functions from ttdriver.c */
   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 );
@@ -73,7 +71,7 @@
 
 
     /* 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 ) );
     pic_container->truetype = container;
@@ -91,7 +89,7 @@
     FT_Init_Class_tt_service_truetype_glyf(
       &container->tt_service_truetype_glyf );
 
-Exit:
+  Exit:
     if ( error )
       tt_driver_class_pic_free( library );
     return error;