Commit efa996155e80366bec17421d8777a2564db97d0e

Werner Lemberg 2002-04-01T22:01:46

* src/type1/t1driver.c, src/type1/t1parse.c: 16bit fixes. formatting, copyright updates

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
diff --git a/ChangeLog b/ChangeLog
index b83770b..8f7cb69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-04-02  Werner Lemberg  <wl@gnu.org>
+
+	* src/type1/t1driver.c, src/type1/t1parse.c: 16bit fixes.
+
 2002-04-01  Werner Lemberg  <wl@gnu.org>
 
 	* src/truetype/ttgload.c: 16bit fixes.
diff --git a/src/type1/descrip.mms b/src/type1/descrip.mms
index 03ebb11..8f028f6 100644
--- a/src/type1/descrip.mms
+++ b/src/type1/descrip.mms
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2002 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
diff --git a/src/type1/rules.mk b/src/type1/rules.mk
index 5f4ce9f..49a4e4a 100644
--- a/src/type1/rules.mk
+++ b/src/type1/rules.mk
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2001 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 4fd7b52..df78088 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    AFM support for Type 1 fonts (body).                                 */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -167,7 +167,7 @@
     FT_Byte*       p;
     FT_Int         count = 0;
     T1_Kern_Pair*  pair;
-    T1_Font       type1 = &((T1_Face)t1_face)->type1;
+    T1_Font        type1 = &((T1_Face)t1_face)->type1;
     T1_AFM*        afm   = 0;
 
 
diff --git a/src/type1/t1afm.h b/src/type1/t1afm.h
index c1788f5..77cc6a6 100644
--- a/src/type1/t1afm.h
+++ b/src/type1/t1afm.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    AFM support for Type 1 fonts (specification).                        */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index bae9104..1951891 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 driver interface (body).                                      */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -109,7 +109,7 @@
 
 
   static const char*
-  t1_get_ps_name( T1_Face    face )
+  t1_get_ps_name( T1_Face  face )
   {
     return (const char*) face->type1.font_name;
   }
@@ -239,6 +239,7 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    charmap  :: A handle to the source charmap object.                 */
+  /*                                                                       */
   /*    charcode :: The character code.                                    */
   /*                                                                       */
   /* <Return>                                                              */
@@ -248,8 +249,8 @@
   Get_Char_Index( FT_CharMap  charmap,
                   FT_Long     charcode )
   {
-    T1_Face             face;
-    FT_UInt             result = 0;
+    T1_Face          face;
+    FT_UInt          result = 0;
     PSNames_Service  psnames;
 
 
@@ -269,7 +270,7 @@
 
         /* the function returns 0xFFFF if the Unicode charcode has */
         /* no corresponding glyph                                  */
-        if ( result == 0xFFFF )
+        if ( result == 0xFFFFU )
           result = 0;
         goto Exit;
 
@@ -286,7 +287,7 @@
 
           /* the function returns 0xFFFF if the Unicode charcode has */
           /* no corresponding glyph                                  */
-          if ( result == 0xFFFF )
+          if ( result == 0xFFFFU )
             result = 0;
         }
         goto Exit;
@@ -355,6 +356,7 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    charmap  :: A handle to the source charmap object.                 */
+  /*                                                                       */
   /*    charcode :: The character code.                                    */
   /*                                                                       */
   /* <Return>                                                              */
@@ -364,7 +366,7 @@
   Get_Next_Char( FT_CharMap  charmap,
                  FT_Long     charcode )
   {
-    T1_Face             face;
+    T1_Face          face;
     PSNames_Service  psnames;
 
 
@@ -389,7 +391,7 @@
         /*                                                                 */
       case ft_encoding_latin_1:
         {
-          FT_Long code;
+          FT_Long  code;
 
 
           /* use the `PSNames' module to synthetize the Unicode charmap */
@@ -481,28 +483,28 @@
     sizeof( T1_SizeRec ),
     sizeof( T1_GlyphSlotRec ),
 
-    (FT_Face_InitFunc)     T1_Face_Init,
-    (FT_Face_DoneFunc)     T1_Face_Done,
-    (FT_Size_InitFunc)     T1_Size_Init,
-    (FT_Size_DoneFunc)     T1_Size_Done,
-    (FT_Slot_InitFunc)T1_GlyphSlot_Init,
-    (FT_Slot_DoneFunc)T1_GlyphSlot_Done,
+    (FT_Face_InitFunc)        T1_Face_Init,
+    (FT_Face_DoneFunc)        T1_Face_Done,
+    (FT_Size_InitFunc)        T1_Size_Init,
+    (FT_Size_DoneFunc)        T1_Size_Done,
+    (FT_Slot_InitFunc)        T1_GlyphSlot_Init,
+    (FT_Slot_DoneFunc)        T1_GlyphSlot_Done,
 
     (FT_Size_ResetPointsFunc) T1_Size_Reset,
-    (FT_Size_ResetPixelsFunc)T1_Size_Reset,
-    (FT_Slot_LoadFunc)    T1_Load_Glyph,
-    (FT_CharMap_CharIndexFunc) Get_Char_Index,
+    (FT_Size_ResetPixelsFunc) T1_Size_Reset,
+    (FT_Slot_LoadFunc)        T1_Load_Glyph,
+    (FT_CharMap_CharIndexFunc)Get_Char_Index,
 
 #ifdef T1_CONFIG_OPTION_NO_AFM
-    (FT_Face_GetKerningFunc)   0,
-    (FT_Face_AttachFunc)   0,
+    (FT_Face_GetKerningFunc)  0,
+    (FT_Face_AttachFunc)      0,
 #else
-    (FT_Face_GetKerningFunc)   Get_Kerning,
-    (FT_Face_AttachFunc)   T1_Read_AFM,
+    (FT_Face_GetKerningFunc)  Get_Kerning,
+    (FT_Face_AttachFunc)      T1_Read_AFM,
 #endif
-    (FT_Face_GetAdvancesFunc)  0,
+    (FT_Face_GetAdvancesFunc) 0,
 
-    (FT_CharMap_CharNextFunc)  Get_Next_Char
+    (FT_CharMap_CharNextFunc) Get_Next_Char
   };
 
 
diff --git a/src/type1/t1driver.h b/src/type1/t1driver.h
index 518a94c..ad42944 100644
--- a/src/type1/t1driver.h
+++ b/src/type1/t1driver.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level Type 1 driver interface (specification).                  */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index a4e2f53..4ee9beb 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 Glyph Loader (body).                                          */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -57,9 +57,9 @@
 
   FT_CALLBACK_DEF( FT_Error )
   T1_Parse_Glyph( T1_Decoder  decoder,
-                  FT_UInt      glyph_index )
+                  FT_UInt     glyph_index )
   {
-    T1_Face   face  = (T1_Face)decoder->builder.face;
+    T1_Face  face  = (T1_Face)decoder->builder.face;
     T1_Font  type1 = &face->type1;
 
 
@@ -77,10 +77,10 @@
   T1_Compute_Max_Advance( T1_Face  face,
                           FT_Int*  max_advance )
   {
-    FT_Error          error;
-    T1_DecoderRec        decoder;
-    FT_Int            glyph_index;
-    T1_Font          type1 = &face->type1;
+    FT_Error       error;
+    T1_DecoderRec  decoder;
+    FT_Int         glyph_index;
+    T1_Font        type1 = &face->type1;
     PSAux_Service  psaux = (PSAux_Service)face->psaux;
 
 
@@ -146,13 +146,14 @@
     T1_DecoderRec           decoder;
     T1_Face                 face = (T1_Face)glyph->root.face;
     FT_Bool                 hinting;
-    T1_Font                type1         = &face->type1;
+    T1_Font                 type1         = &face->type1;
     PSAux_Service           psaux         = (PSAux_Service)face->psaux;
     const T1_Decoder_Funcs  decoder_funcs = psaux->t1_decoder_funcs;
 
     FT_Matrix               font_matrix;
     FT_Vector               font_offset;
 
+
     if ( load_flags & FT_LOAD_NO_RECURSE )
       load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
 
diff --git a/src/type1/t1gload.h b/src/type1/t1gload.h
index 962af59..9f79f5b 100644
--- a/src/type1/t1gload.h
+++ b/src/type1/t1gload.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 Glyph Loader (specification).                                 */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 40d8c57..2b87e51 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 font loader (body).                                           */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -101,7 +101,7 @@
                      FT_UInt  num_designs,
                      FT_UInt  num_axis )
   {
-    PS_Blend  blend;
+    PS_Blend   blend;
     FT_Memory  memory = face->root.memory;
     FT_Error   error  = 0;
 
@@ -184,8 +184,8 @@
                        FT_Multi_Master*  master )
   {
     PS_Blend  blend = face->blend;
-    FT_UInt    n;
-    FT_Error   error;
+    FT_UInt   n;
+    FT_Error  error;
 
 
     error = T1_Err_Invalid_Argument;
@@ -217,8 +217,8 @@
                    FT_Fixed*  coords )
   {
     PS_Blend  blend = face->blend;
-    FT_Error   error;
-    FT_UInt    n, m;
+    FT_Error  error;
+    FT_UInt   n, m;
 
 
     error = T1_Err_Invalid_Argument;
@@ -263,8 +263,8 @@
                     FT_Long*  coords )
   {
     PS_Blend  blend = face->blend;
-    FT_Error   error;
-    FT_UInt    n, p;
+    FT_Error  error;
+    FT_UInt   n, p;
 
 
     error = T1_Err_Invalid_Argument;
@@ -276,12 +276,13 @@
 
       for ( n = 0; n < blend->num_axis; n++ )
       {
-        FT_Long        design  = coords[n];
-        FT_Fixed       the_blend;
+        FT_Long       design  = coords[n];
+        FT_Fixed      the_blend;
         PS_DesignMap  map     = blend->design_map + n;
-        FT_Fixed*      designs = map->design_points;
-        FT_Fixed*      blends  = map->blend_points;
-        FT_Int         before  = -1, after = -1;
+        FT_Fixed*     designs = map->design_points;
+        FT_Fixed*     blends  = map->blend_points;
+        FT_Int        before  = -1, after = -1;
+
 
         for ( p = 0; p < (FT_UInt)map->num_points; p++ )
         {
@@ -331,7 +332,7 @@
   T1_Done_Blend( T1_Face  face )
   {
     FT_Memory  memory = face->root.memory;
-    PS_Blend  blend  = face->blend;
+    PS_Blend   blend  = face->blend;
 
 
     if ( blend )
@@ -383,11 +384,11 @@
   parse_blend_axis_types( T1_Face     face,
                           T1_Loader*  loader )
   {
-    T1_TokenRec   axis_tokens[ T1_MAX_MM_AXIS ];
-    FT_Int        n, num_axis;
-    FT_Error      error = 0;
+    T1_TokenRec  axis_tokens[ T1_MAX_MM_AXIS ];
+    FT_Int       n, num_axis;
+    FT_Error     error = 0;
     PS_Blend     blend;
-    FT_Memory     memory;
+    FT_Memory    memory;
 
 
     /* take an array of objects */
@@ -413,11 +414,12 @@
     for ( n = 0; n < num_axis; n++ )
     {
       T1_Token  token = axis_tokens + n;
-      FT_Byte*   name;
-      FT_Int     len;
+      FT_Byte*  name;
+      FT_Int    len;
+
 
       /* skip first slash, if any */
-      if (token->start[0] == '/')
+      if ( token->start[0] == '/' )
         token->start++;
 
       len = (FT_Int)( token->limit - token->start );
@@ -444,13 +446,13 @@
   parse_blend_design_positions( T1_Face     face,
                                 T1_Loader*  loader )
   {
-    T1_TokenRec       design_tokens[ T1_MAX_MM_DESIGNS ];
-    FT_Int         num_designs;
-    FT_Int         num_axis;
-    T1_Parser  parser = &loader->parser;
+    T1_TokenRec  design_tokens[ T1_MAX_MM_DESIGNS ];
+    FT_Int       num_designs;
+    FT_Int       num_axis;
+    T1_Parser    parser = &loader->parser;
 
-    FT_Error       error = 0;
-    PS_Blend      blend;
+    FT_Error     error = 0;
+    PS_Blend     blend;
 
 
     /* get the array of design tokens - compute number of designs */
@@ -475,9 +477,9 @@
 
       for ( n = 0; n < (FT_UInt)num_designs; n++ )
       {
-        T1_TokenRec   axis_tokens[ T1_MAX_MM_DESIGNS ];
-        T1_Token  token;
-        FT_Int     axis, n_axis;
+        T1_TokenRec  axis_tokens[ T1_MAX_MM_DESIGNS ];
+        T1_Token     token;
+        FT_Int       axis, n_axis;
 
 
         /* read axis/coordinates tokens */
@@ -526,14 +528,14 @@
   parse_blend_design_map( T1_Face     face,
                           T1_Loader*  loader )
   {
-    FT_Error       error  = 0;
-    T1_Parser  parser = &loader->parser;
-    PS_Blend      blend;
-    T1_TokenRec       axis_tokens[ T1_MAX_MM_AXIS ];
-    FT_Int         n, num_axis;
-    FT_Byte*       old_cursor;
-    FT_Byte*       old_limit;
-    FT_Memory      memory = face->root.memory;
+    FT_Error     error  = 0;
+    T1_Parser    parser = &loader->parser;
+    PS_Blend     blend;
+    T1_TokenRec  axis_tokens[T1_MAX_MM_AXIS];
+    FT_Int       n, num_axis;
+    FT_Byte*     old_cursor;
+    FT_Byte*     old_limit;
+    FT_Memory    memory = face->root.memory;
 
 
     T1_ToTokenArray( parser, axis_tokens, T1_MAX_MM_AXIS, &num_axis );
@@ -555,8 +557,8 @@
     /* now, read each axis design map */
     for ( n = 0; n < num_axis; n++ )
     {
-      PS_DesignMap map = blend->design_map + n;
-      T1_Token     token;
+      PS_DesignMap  map = blend->design_map + n;
+      T1_Token      token;
       FT_Int        p, num_points;
 
 
@@ -607,13 +609,13 @@
   parse_weight_vector( T1_Face     face,
                        T1_Loader*  loader )
   {
-    FT_Error       error  = 0;
-    T1_Parser  parser = &loader->parser;
-    PS_Blend      blend  = face->blend;
-    T1_TokenRec       master;
-    FT_UInt        n;
-    FT_Byte*       old_cursor;
-    FT_Byte*       old_limit;
+    FT_Error     error  = 0;
+    T1_Parser    parser = &loader->parser;
+    PS_Blend     blend  = face->blend;
+    T1_TokenRec  master;
+    FT_UInt      n;
+    FT_Byte*     old_cursor;
+    FT_Byte*     old_limit;
 
 
     if ( !blend || blend->num_designs == 0 )
@@ -683,7 +685,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* First of all, define the token field static variables.  This is a set */
-  /* of T1_FieldRec variables used later.                                     */
+  /* of T1_FieldRec variables used later.                                  */
   /*                                                                       */
   /*************************************************************************/
 
@@ -691,13 +693,13 @@
   static FT_Error
   t1_load_keyword( T1_Face     face,
                    T1_Loader*  loader,
-                   T1_Field   field )
+                   T1_Field    field )
   {
     FT_Error   error;
     void*      dummy_object;
     void**     objects;
     FT_UInt    max_objects;
-    PS_Blend  blend = face->blend;
+    PS_Blend   blend = face->blend;
 
 
     /* if the keyword has a dedicated callback, call it */
@@ -774,8 +776,8 @@
 
   static int
   read_binary_data( T1_Parser  parser,
-                    FT_Int*        size,
-                    FT_Byte**      base )
+                    FT_Int*    size,
+                    FT_Byte**  base )
   {
     FT_Byte*  cur;
     FT_Byte*  limit = parser->root.limit;
@@ -819,12 +821,12 @@
                    T1_Loader*  loader )
   {
     T1_Parser  parser = &loader->parser;
-    FT_Error       error;
-    FT_Memory      memory = parser->root.memory;
-    FT_Int         len;
-    FT_Byte*       cur;
-    FT_Byte*       cur2;
-    FT_Byte*       limit;
+    FT_Error   error;
+    FT_Memory  memory = parser->root.memory;
+    FT_Int     len;
+    FT_Byte*   cur;
+    FT_Byte*   cur2;
+    FT_Byte*   limit;
 
 
     if ( face->type1.font_name )
@@ -865,8 +867,8 @@
                    T1_Loader*  loader )
   {
     T1_Parser  parser = &loader->parser;
-    FT_Fixed       temp[4];
-    FT_BBox*       bbox   = &face->type1.font_bbox;
+    FT_Fixed   temp[4];
+    FT_BBox*   bbox   = &face->type1.font_bbox;
 
 
     (void)T1_ToFixedArray( parser, 4, temp, 0 );
@@ -881,12 +883,12 @@
   parse_font_matrix( T1_Face     face,
                      T1_Loader*  loader )
   {
-    T1_Parser  parser = &loader->parser;
-    FT_Matrix*     matrix = &face->type1.font_matrix;
-    FT_Vector*     offset = &face->type1.font_offset;
-    FT_Face        root   = (FT_Face)&face->root;
-    FT_Fixed       temp[6];
-    FT_Fixed       temp_scale;
+    T1_Parser   parser = &loader->parser;
+    FT_Matrix*  matrix = &face->type1.font_matrix;
+    FT_Vector*  offset = &face->type1.font_offset;
+    FT_Face     root   = (FT_Face)&face->root;
+    FT_Fixed    temp[6];
+    FT_Fixed    temp_scale;
 
 
     if ( matrix->xx || matrix->yx )
@@ -930,11 +932,11 @@
   parse_encoding( T1_Face     face,
                   T1_Loader*  loader )
   {
-    T1_Parser  parser = &loader->parser;
+    T1_Parser      parser = &loader->parser;
     FT_Byte*       cur    = parser->root.cursor;
     FT_Byte*       limit  = parser->root.limit;
 
-    PSAux_Service  psaux = (PSAux_Service)face->psaux;
+    PSAux_Service  psaux  = (PSAux_Service)face->psaux;
 
 
     /* skip whitespace */
@@ -954,10 +956,10 @@
     if ( (FT_Byte)( *cur - '0' ) < 10 )
     {
       T1_Encoding  encode     = &face->type1.encoding;
-      FT_Int        count, n;
-      PS_Table      char_table = &loader->encoding_table;
-      FT_Memory     memory     = parser->root.memory;
-      FT_Error      error;
+      FT_Int       count, n;
+      PS_Table     char_table = &loader->encoding_table;
+      FT_Memory    memory     = parser->root.memory;
+      FT_Error     error;
 
 
       if ( encode->char_index )
@@ -1104,7 +1106,7 @@
     FT_Error       error;
     FT_Int         n;
 
-    PSAux_Service  psaux = (PSAux_Service)face->psaux;
+    PSAux_Service  psaux  = (PSAux_Service)face->psaux;
 
 
     if ( loader->num_subrs )
@@ -1129,7 +1131,6 @@
     /*                                                       */
     /*   `index' + binary data                               */
     /*                                                       */
-
     for ( n = 0; n < loader->num_subrs; n++ )
     {
       FT_Int    idx, size;
@@ -1196,20 +1197,20 @@
   parse_charstrings( T1_Face     face,
                      T1_Loader*  loader )
   {
-    T1_Parser  parser     = &loader->parser;
-    PS_Table      code_table = &loader->charstrings;
-    PS_Table      name_table = &loader->glyph_names;
-    PS_Table      swap_table = &loader->swap_table;
-    FT_Memory      memory     = parser->root.memory;
+    T1_Parser      parser       = &loader->parser;
+    PS_Table       code_table   = &loader->charstrings;
+    PS_Table       name_table   = &loader->glyph_names;
+    PS_Table       swap_table   = &loader->swap_table;
+    FT_Memory      memory       = parser->root.memory;
     FT_Error       error;
 
-    PSAux_Service  psaux = (PSAux_Service)face->psaux;
+    PSAux_Service  psaux        = (PSAux_Service)face->psaux;
 
-    FT_Byte*    cur;
-    FT_Byte*    limit = parser->root.limit;
-    FT_Int      n;
-    FT_UInt     notdef_index = 0;
-    FT_Byte     notdef_found = 0;
+    FT_Byte*       cur;
+    FT_Byte*       limit        = parser->root.limit;
+    FT_Int         n;
+    FT_UInt        notdef_index = 0;
+    FT_Byte        notdef_found = 0;
 
 
     if ( loader->num_glyphs )
@@ -1400,11 +1401,10 @@
     }
     else if ( !notdef_found )
     {
-
-      /* notdef_index is already 0, or /.notdef is undefined in  */
-      /* charstrings dictionary. Worry about /.notdef undefined. */
-      /* We take index 0 and add it to the end of the table(s)   */
-      /* and add our own /.notdef glyph to index 0.              */
+      /* notdef_index is already 0, or /.notdef is undefined in   */
+      /* charstrings dictionary.  Worry about /.notdef undefined. */
+      /* We take index 0 and add it to the end of the table(s)    */
+      /* and add our own /.notdef glyph to index 0.               */
 
       /* 0 333 hsbw endchar                                      */
       FT_Byte  notdef_glyph[] = {0x8B, 0xF7, 0xE1, 0x0D, 0x0E};
@@ -1639,10 +1639,10 @@
   FT_LOCAL_DEF( FT_Error )
   T1_Open_Face( T1_Face  face )
   {
-    T1_Loader  loader;
-    T1_Parser  parser;
-    T1_Font   type1 = &face->type1;
-    FT_Error   error;
+    T1_Loader      loader;
+    T1_Parser      parser;
+    T1_Font        type1 = &face->type1;
+    FT_Error       error;
 
     PSAux_Service  psaux = (PSAux_Service)face->psaux;
 
@@ -1653,10 +1653,10 @@
     type1->private_dict.lenIV = 4;
 
     parser = &loader.parser;
-    error = T1_New_Parser( parser,
-                           face->root.stream,
-                           face->root.memory,
-                           psaux );
+    error  = T1_New_Parser( parser,
+                            face->root.stream,
+                            face->root.memory,
+                            psaux );
     if ( error )
       goto Exit;
 
diff --git a/src/type1/t1load.h b/src/type1/t1load.h
index 26f01cc..865d62c 100644
--- a/src/type1/t1load.h
+++ b/src/type1/t1load.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 font loader (specification).                                  */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index bb74ef4..36e3fda 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 objects manager (body).                                       */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -141,7 +141,7 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  T1_GlyphSlot_Init( T1_GlyphSlot   slot )
+  T1_GlyphSlot_Init( T1_GlyphSlot  slot )
   {
     T1_Face           face;
     PSHinter_Service  pshinter;
@@ -190,7 +190,7 @@
   T1_Face_Done( T1_Face  face )
   {
     FT_Memory  memory;
-    T1_Font   type1 = &face->type1;
+    T1_Font    type1 = &face->type1;
 
 
     if ( face )
@@ -205,7 +205,7 @@
 
       /* release font info strings */
       {
-        PS_FontInfo   info = &type1->font_info;
+        PS_FontInfo  info = &type1->font_info;
 
 
         FT_FREE( info->version );
@@ -351,6 +351,7 @@
         char*  full   = face->type1.font_info.full_name;
         char*  family = root->family_name;
 
+
         if ( full )
         {
           while ( *family && *full == *family )
@@ -390,10 +391,10 @@
       root->num_fixed_sizes = 0;
       root->available_sizes = 0;
 
-      root->bbox.xMin =  face->type1.font_bbox.xMin >> 16;
-      root->bbox.yMin =  face->type1.font_bbox.yMin >> 16;
-      root->bbox.xMax = (face->type1.font_bbox.xMax + 0xFFFFU) >> 16;
-      root->bbox.yMax = (face->type1.font_bbox.yMax + 0xFFFFU) >> 16;
+      root->bbox.xMin =   face->type1.font_bbox.xMin >> 16;
+      root->bbox.yMin =   face->type1.font_bbox.yMin >> 16;
+      root->bbox.xMax = ( face->type1.font_bbox.xMax + 0xFFFFU ) >> 16;
+      root->bbox.yMax = ( face->type1.font_bbox.yMax + 0xFFFFU ) >> 16;
 
       /* Set units_per_EM if we didn't set it in parse_font_matrix. */
       if ( !root->units_per_EM )
@@ -432,14 +433,16 @@
 #ifdef FT_CONFIG_OPTION_USE_CMAPS
 
     {
-      FT_Face          root = &face->root;
+      FT_Face  root = &face->root;
       
+
       if ( psnames && psaux )
       {
         FT_CharMapRec    charmap;
         T1_CMap_Classes  cmap_classes = psaux->t1_cmap_classes;
         FT_CMap_Class    clazz;
         
+
         charmap.face = root;
         
         /* first of all, try to synthetize a Unicode charmap */
@@ -455,32 +458,32 @@
         
         switch ( face->type1.encoding_type )
         {
-          case T1_ENCODING_TYPE_STANDARD:
-            charmap.encoding    = ft_encoding_adobe_standard;
-            charmap.encoding_id = 0;
-            clazz               = cmap_classes->standard;
-            break;
+        case T1_ENCODING_TYPE_STANDARD:
+          charmap.encoding    = ft_encoding_adobe_standard;
+          charmap.encoding_id = 0;
+          clazz               = cmap_classes->standard;
+          break;
           
-          case T1_ENCODING_TYPE_EXPORT:
-            charmap.encoding    = ft_encoding_adobe_expert;
-            charmap.encoding_id = 1;
-            clazz               = cmap_classes->expert;
-            break;
+        case T1_ENCODING_TYPE_EXPORT:
+          charmap.encoding    = ft_encoding_adobe_expert;
+          charmap.encoding_id = 1;
+          clazz               = cmap_classes->expert;
+          break;
             
-          case T1_ENCODING_TYPE_ARRAY:
-            charmap.encoding    = ft_encoding_adobe_custom;
-            charmap.encoding_id = 2;
-            clazz               = cmap_classes->custom;
-            break;
+        case T1_ENCODING_TYPE_ARRAY:
+          charmap.encoding    = ft_encoding_adobe_custom;
+          charmap.encoding_id = 2;
+          clazz               = cmap_classes->custom;
+          break;
             
-          case T1_ENCODING_TYPE_ISOLATIN1:
-            charmap.encoding    = ft_encoding_latin_1;
-            charmap.encoding_id = 3;
-            clazz               = cmap_classes->unicode;
-            break;
+        case T1_ENCODING_TYPE_ISOLATIN1:
+          charmap.encoding    = ft_encoding_latin_1;
+          charmap.encoding_id = 3;
+          clazz               = cmap_classes->unicode;
+          break;
             
-          default:
-            ;
+        default:
+          ;
         }
         
         if ( clazz )
@@ -600,7 +603,7 @@
   /*    Finalizes a given Type 1 driver.                                   */
   /*                                                                       */
   /* <Input>                                                               */
-  /*    driver  :: A handle to the target Type 1 driver.                   */
+  /*    driver :: A handle to the target Type 1 driver.                    */
   /*                                                                       */
   FT_LOCAL_DEF( void )
   T1_Driver_Done( T1_Driver  driver )
diff --git a/src/type1/t1objs.h b/src/type1/t1objs.h
index 43dddaa..9aeb10d 100644
--- a/src/type1/t1objs.h
+++ b/src/type1/t1objs.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 objects manager (specification).                              */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index 02df703..7a366ee 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 parser (body).                                                */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -108,7 +108,7 @@
     *size = 0;
     if ( !FT_STREAM_READ_FIELDS( pfb_tag_fields, &head ) )
     {
-      if ( head.tag == 0x8001 || head.tag == 0x8002 )
+      if ( head.tag == 0x8001U || head.tag == 0x8002U )
       {
         *tag  = head.tag;
         *size = head.size;
@@ -165,7 +165,7 @@
     if ( error )
       goto Exit;
 
-    if ( tag != 0x8001 )
+    if ( tag != 0x8001U )
     {
       /* assume that this is a PFA file for now; an error will */
       /* be produced later when more things are checked        */
@@ -230,7 +230,7 @@
   FT_LOCAL_DEF( void )
   T1_Finalize_Parser( T1_Parser  parser )
   {
-    FT_Memory   memory = parser->root.memory;
+    FT_Memory  memory = parser->root.memory;
 
 
     /* always free the private dictionary */
@@ -294,7 +294,7 @@
         if ( error )
           goto Fail;
 
-        if ( tag != 0x8002 )
+        if ( tag != 0x8002U )
           break;
 
         parser->private_len += size;
@@ -321,7 +321,7 @@
       for (;;)
       {
         error = read_pfb_tag( stream, &tag, &size );
-        if ( error || tag != 0x8002 )
+        if ( error || tag != 0x8002U )
         {
           error = T1_Err_Ok;
           break;
diff --git a/src/type1/t1parse.h b/src/type1/t1parse.h
index 1747998..1341493 100644
--- a/src/type1/t1parse.h
+++ b/src/type1/t1parse.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 parser (specification).                                       */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -97,19 +97,19 @@ FT_BEGIN_HEADER
 #define T1_ToInt( p )       (p)->root.funcs.to_int( &(p)->root )
 #define T1_ToFixed( p, t )  (p)->root.funcs.to_fixed( &(p)->root, t )
 
-#define T1_ToCoordArray( p, m, c )    \
+#define T1_ToCoordArray( p, m, c )                           \
           (p)->root.funcs.to_coord_array( &(p)->root, m, c )
-#define T1_ToFixedArray( p, m, f, t ) \
+#define T1_ToFixedArray( p, m, f, t )                           \
           (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
-#define T1_ToToken( p, t )            \
+#define T1_ToToken( p, t )                          \
           (p)->root.funcs.to_token( &(p)->root, t )
-#define T1_ToTokenArray( p, t, m, c ) \
+#define T1_ToTokenArray( p, t, m, c )                           \
           (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
 
-#define T1_Load_Field( p, f, o, m, pf )       \
+#define T1_Load_Field( p, f, o, m, pf )                         \
           (p)->root.funcs.load_field( &(p)->root, f, o, m, pf )
 
-#define T1_Load_Field_Table( p, f, o, m, pf ) \
+#define T1_Load_Field_Table( p, f, o, m, pf )                         \
           (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )
 
 
diff --git a/src/type1/t1tokens.h b/src/type1/t1tokens.h
index 3888534..5f5d8ce 100644
--- a/src/type1/t1tokens.h
+++ b/src/type1/t1tokens.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 tokenizer (specification).                                    */
 /*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
+/*  Copyright 1996-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -21,16 +21,16 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_FONT_INFO
 
-  T1_FIELD_STRING( "version", version )
-  T1_FIELD_STRING( "Notice", notice )
-  T1_FIELD_STRING( "FullName", full_name )
-  T1_FIELD_STRING( "FamilyName", family_name )
-  T1_FIELD_STRING( "Weight", weight )
+  T1_FIELD_STRING   ( "version", version )
+  T1_FIELD_STRING   ( "Notice", notice )
+  T1_FIELD_STRING   ( "FullName", full_name )
+  T1_FIELD_STRING   ( "FamilyName", family_name )
+  T1_FIELD_STRING   ( "Weight", weight )
 
-  T1_FIELD_NUM   ( "ItalicAngle", italic_angle )
-  T1_FIELD_TYPE_BOOL  ( "isFixedPitch", is_fixed_pitch )
-  T1_FIELD_NUM   ( "UnderlinePosition", underline_position )
-  T1_FIELD_NUM   ( "UnderlineThickness", underline_thickness )
+  T1_FIELD_NUM      ( "ItalicAngle", italic_angle )
+  T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
+  T1_FIELD_NUM      ( "UnderlinePosition", underline_position )
+  T1_FIELD_NUM      ( "UnderlineThickness", underline_thickness )
 
 
 #undef  FT_STRUCTURE