Commit 545a75fdd76cb9f3ae4d4ea3dca4c0b578ea7aee

Werner Lemberg 2002-03-31T11:18:15

* src/psaux/t1cmap.c: s/index/idx/. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix debug messages.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
diff --git a/ChangeLog b/ChangeLog
index d45e549..05c5f8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,13 @@
 2002-03-31  Werner Lemberg  <wl@gnu.org>
 
 	* src/otlayout/otlcommn.c, src/otlayout/otlcommn.h: s/index/idx/.
+	* src/psaux/t1cmap.c: Ditto.
+
+	* include/freetype/internal/tttypes.h,
+	include/freetype/internal/sfnt.h (TT_Goto_Table_Func): Renamed to ...
+	(TT_Loader_GotoTableFunc): This.
+	* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix debug
+	messages.
 
 2002-03-30  David Turner  <david@freetype.org>
 
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index a9c043d..04ce97f 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -471,7 +471,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   typedef struct  SFNT_Interface_
   {
-    TT_Goto_Table_Func           goto_table;
+    TT_Loader_GotoTableFunc      goto_table;
 
     TT_Init_Face_Func            init_face;
     TT_Load_Face_Func            load_face;
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index bdd888b..7021786 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1165,7 +1165,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <FuncType>                                                            */
-  /*    TT_Goto_Table_Func                                                 */
+  /*    TT_Loader_GotoTableFunc                                            */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Seeks a stream to the start of a given TrueType table.             */
@@ -1188,10 +1188,10 @@ FT_BEGIN_HEADER
   /*    The stream cursor must be at the font file's origin.               */
   /*                                                                       */
   typedef FT_Error
-  (*TT_Goto_Table_Func)( TT_Face    face,
-                         FT_ULong   tag,
-                         FT_Stream  stream,
-                         FT_ULong*  length );
+  (*TT_Loader_GotoTableFunc)( TT_Face    face,
+                              FT_ULong   tag,
+                              FT_Stream  stream,
+                              FT_ULong*  length );
 
 
   /*************************************************************************/
@@ -1493,7 +1493,7 @@ FT_BEGIN_HEADER
 
 #endif /* !FT_CONFIG_OPTION_USE_CMAPS */
 
-    TT_Goto_Table_Func        goto_table;
+    TT_Loader_GotoTableFunc   goto_table;
 
     TT_Loader_StartGlyphFunc  access_glyph_frame;
     TT_Loader_EndGlyphFunc    forget_glyph_frame;
diff --git a/src/psaux/Jamfile b/src/psaux/Jamfile
index 9481ac3..e316069 100644
--- a/src/psaux/Jamfile
+++ b/src/psaux/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/psaux Jamfile (c) 2001 David Turner
+# FreeType 2 src/psaux Jamfile (c) 2001, 2002 David Turner
 #
 
 SubDir  FT2_TOP src psaux ;
diff --git a/src/psaux/descrip.mms b/src/psaux/descrip.mms
index 6ecd8ad..bff0192 100644
--- a/src/psaux/descrip.mms
+++ b/src/psaux/descrip.mms
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2001 by
+# Copyright 2001, 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/psaux/psaux.c b/src/psaux/psaux.c
index 875744f..9928184 100644
--- a/src/psaux/psaux.c
+++ b/src/psaux/psaux.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType auxiliary PostScript driver component (body only).          */
 /*                                                                         */
-/*  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/psaux/psauxmod.c b/src/psaux/psauxmod.c
index 1171f0e..f2f935a 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType auxiliary PostScript module implementation (body).          */
 /*                                                                         */
-/*  Copyright 2000-2001 by                                                 */
+/*  Copyright 2000-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/psaux/psobjs.c b/src/psaux/psobjs.c
index 6b32eef..b463959 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auxiliary functions for PostScript 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,       */
@@ -54,7 +54,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  PS_Table_New( PS_Table  table,
+  PS_Table_New( PS_Table   table,
                 FT_Int     count,
                 FT_Memory  memory )
   {
@@ -85,7 +85,7 @@
 
   static void
   shift_elements( PS_Table  table,
-                  FT_Byte*   old_base )
+                  FT_Byte*  old_base )
   {
     FT_Long    delta  = (FT_Long)( table->block - old_base );
     FT_Byte**  offset = table->elements;
@@ -102,7 +102,7 @@
 
   static FT_Error
   reallocate_t1_table( PS_Table  table,
-                       FT_Int     new_size )
+                       FT_Int    new_size )
   {
     FT_Memory  memory   = table->memory;
     FT_Byte*   old_base = table->block;
@@ -200,7 +200,8 @@
   /*    PS_Table_Done                                                      */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Finalizes a PS_TableRec (i.e., reallocate it to its current cursor).  */
+  /*    Finalizes a PS_TableRec (i.e., reallocate it to its current        */
+  /*    cursor).                                                           */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    table :: The target table.                                         */
@@ -306,7 +307,7 @@
 
   FT_LOCAL_DEF( void )
   PS_Parser_ToToken( PS_Parser  parser,
-              T1_Token   token )
+                     T1_Token   token )
   {
     FT_Byte*  cur;
     FT_Byte*  limit;
@@ -389,9 +390,9 @@
 
   FT_LOCAL_DEF( void )
   PS_Parser_ToTokenArray( PS_Parser  parser,
-                   T1_Token   tokens,
-                   FT_UInt     max_tokens,
-                   FT_Int*     pnum_tokens )
+                          T1_Token   tokens,
+                          FT_UInt    max_tokens,
+                          FT_Int*    pnum_tokens )
   {
     T1_TokenRec  master;
 
@@ -401,8 +402,8 @@
     PS_Parser_ToToken( parser, &master );
     if ( master.type == T1_TOKEN_TYPE_ARRAY )
     {
-      FT_Byte*   old_cursor = parser->cursor;
-      FT_Byte*   old_limit  = parser->limit;
+      FT_Byte*  old_cursor = parser->cursor;
+      FT_Byte*  old_limit  = parser->limit;
       T1_Token  cur        = tokens;
       T1_Token  limit      = cur + max_tokens;
 
@@ -785,17 +786,17 @@
   /* Load a simple field (i.e. non-table) into the current list of objects */
   FT_LOCAL_DEF( FT_Error )
   PS_Parser_LoadField( PS_Parser       parser,
-                 const T1_Field  field,
-                 void**           objects,
-                 FT_UInt          max_objects,
-                 FT_ULong*        pflags )
+                       const T1_Field  field,
+                       void**          objects,
+                       FT_UInt         max_objects,
+                       FT_ULong*       pflags )
   {
     T1_TokenRec  token;
-    FT_Byte*  cur;
-    FT_Byte*  limit;
-    FT_UInt   count;
-    FT_UInt   idx;
-    FT_Error  error;
+    FT_Byte*     cur;
+    FT_Byte*     limit;
+    FT_UInt      count;
+    FT_UInt      idx;
+    FT_Error     error;
 
 
     PS_Parser_ToToken( parser, &token );
@@ -852,7 +853,7 @@
           *(FT_UInt32*)q = (FT_UInt32)val;
           break;
 
-        default:  /* for 64-bit systems */
+        default:                /* for 64-bit systems */
           *(FT_Long*)q = val;
         }
         break;
@@ -906,18 +907,19 @@
 
   FT_LOCAL_DEF( FT_Error )
   PS_Parser_LoadFieldTable( PS_Parser       parser,
-                       const T1_Field  field,
-                       void**           objects,
-                       FT_UInt          max_objects,
-                       FT_ULong*        pflags )
+                            const T1_Field  field,
+                            void**          objects,
+                            FT_UInt         max_objects,
+                            FT_ULong*       pflags )
   {
-    T1_TokenRec   elements[T1_MAX_TABLE_ELEMENTS];
-    T1_Token  token;
-    FT_Int     num_elements;
-    FT_Error   error = 0;
-    FT_Byte*   old_cursor;
-    FT_Byte*   old_limit;
-    T1_FieldRec   fieldrec = *(T1_Field)field;
+    T1_TokenRec  elements[T1_MAX_TABLE_ELEMENTS];
+    T1_Token     token;
+    FT_Int       num_elements;
+    FT_Error     error = 0;
+    FT_Byte*     old_cursor;
+    FT_Byte*     old_limit;
+    T1_FieldRec  fieldrec = *(T1_Field)field;
+
 
 #if 1
     fieldrec.type = T1_FIELD_TYPE_INTEGER;
@@ -977,7 +979,7 @@
 
   FT_LOCAL_DEF( FT_Fixed )
   PS_Parser_ToFixed( PS_Parser  parser,
-              FT_Int      power_ten )
+                     FT_Int     power_ten )
   {
     return t1_tofixed( &parser->cursor, parser->limit, power_ten );
   }
@@ -985,8 +987,8 @@
 
   FT_LOCAL_DEF( FT_Int )
   PS_Parser_ToCoordArray( PS_Parser  parser,
-                   FT_Int      max_coords,
-                   FT_Short*   coords )
+                          FT_Int     max_coords,
+                          FT_Short*  coords )
   {
     return t1_tocoordarray( &parser->cursor, parser->limit,
                             max_coords, coords );
@@ -995,9 +997,9 @@
 
   FT_LOCAL_DEF( FT_Int )
   PS_Parser_ToFixedArray( PS_Parser  parser,
-                   FT_Int      max_values,
-                   FT_Fixed*   values,
-                   FT_Int      power_ten )
+                          FT_Int     max_values,
+                          FT_Fixed*  values,
+                          FT_Int     power_ten )
   {
     return t1_tofixedarray( &parser->cursor, parser->limit,
                             max_values, values, power_ten );
@@ -1024,9 +1026,9 @@
 
   FT_LOCAL_DEF( void )
   PS_Parser_Init( PS_Parser  parser,
-                  FT_Byte*    base,
-                  FT_Byte*    limit,
-                  FT_Memory   memory )
+                  FT_Byte*   base,
+                  FT_Byte*   limit,
+                  FT_Memory  memory )
   {
     parser->error  = 0;
     parser->base   = base;
@@ -1070,8 +1072,10 @@
   /*                                                                       */
   /*    glyph   :: The current glyph object.                               */
   /*                                                                       */
+  /*    hinting :: Whether hinting should be applied.                      */
+  /*                                                                       */
   FT_LOCAL_DEF( void )
-  T1_Builder_Init( T1_Builder   builder,
+  T1_Builder_Init( T1_Builder    builder,
                    FT_Face       face,
                    FT_Size       size,
                    FT_GlyphSlot  glyph,
@@ -1143,10 +1147,10 @@
   }
 
 
-  /* check that there is enough room for `count' more points */
+  /* check that there is enough space for `count' more points */
   FT_LOCAL_DEF( FT_Error )
   T1_Builder_Check_Points( T1_Builder  builder,
-                           FT_Int       count )
+                           FT_Int      count )
   {
     return FT_GlyphLoader_CheckPoints( builder->loader, count, 0 );
   }
@@ -1155,9 +1159,9 @@
   /* add a new point, do not check space */
   FT_LOCAL_DEF( void )
   T1_Builder_Add_Point( T1_Builder  builder,
-                        FT_Pos       x,
-                        FT_Pos       y,
-                        FT_Byte      flag )
+                        FT_Pos      x,
+                        FT_Pos      y,
+                        FT_Byte     flag )
   {
     FT_Outline*  outline = builder->current;
 
@@ -1186,8 +1190,8 @@
   /* check space for a new on-curve point, then add it */
   FT_LOCAL_DEF( FT_Error )
   T1_Builder_Add_Point1( T1_Builder  builder,
-                         FT_Pos       x,
-                         FT_Pos       y )
+                         FT_Pos      x,
+                         FT_Pos      y )
   {
     FT_Error  error;
 
@@ -1231,8 +1235,8 @@
   /* if a path was begun, add its first on-curve point */
   FT_LOCAL_DEF( FT_Error )
   T1_Builder_Start_Point( T1_Builder  builder,
-                          FT_Pos       x,
-                          FT_Pos       y )
+                          FT_Pos      x,
+                          FT_Pos      y )
   {
     FT_Error  error = 0;
 
diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h
index 38e25d5..712def6 100644
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auxiliary functions for PostScript 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,       */
@@ -47,15 +47,15 @@ FT_BEGIN_HEADER
 
 
   FT_LOCAL( FT_Error )
-  PS_Table_New( PS_Table  table,
+  PS_Table_New( PS_Table   table,
                 FT_Int     count,
                 FT_Memory  memory );
 
   FT_LOCAL( FT_Error )
   PS_Table_Add( PS_Table  table,
-                FT_Int     index,
-                void*      object,
-                FT_Int     length );
+                FT_Int    index,
+                void*     object,
+                FT_Int    length );
 
   FT_LOCAL( void )
   PS_Table_Done( PS_Table  table );
@@ -110,7 +110,7 @@ FT_BEGIN_HEADER
 
   FT_LOCAL( FT_Fixed )
   PS_Parser_ToFixed( PS_Parser  parser,
-              FT_Int      power_ten );
+                     FT_Int     power_ten );
 
 
   FT_LOCAL( FT_Int )
@@ -127,9 +127,9 @@ FT_BEGIN_HEADER
 
   FT_LOCAL( void )
   PS_Parser_Init( PS_Parser  parser,
-                  FT_Byte*    base,
-                  FT_Byte*    limit,
-                  FT_Memory   memory );
+                  FT_Byte*   base,
+                  FT_Byte*   limit,
+                  FT_Memory  memory );
 
   FT_LOCAL( void )
   PS_Parser_Done( PS_Parser  parser );
@@ -155,18 +155,18 @@ FT_BEGIN_HEADER
 
   FT_LOCAL( FT_Error )
   T1_Builder_Check_Points( T1_Builder  builder,
-                           FT_Int       count );
+                           FT_Int      count );
 
   FT_LOCAL( void )
   T1_Builder_Add_Point( T1_Builder  builder,
-                        FT_Pos       x,
-                        FT_Pos       y,
-                        FT_Byte      flag );
+                        FT_Pos      x,
+                        FT_Pos      y,
+                        FT_Byte     flag );
 
   FT_LOCAL( FT_Error )
   T1_Builder_Add_Point1( T1_Builder  builder,
-                         FT_Pos       x,
-                         FT_Pos       y );
+                         FT_Pos      x,
+                         FT_Pos      y );
 
   FT_LOCAL( FT_Error )
   T1_Builder_Add_Contour( T1_Builder  builder );
@@ -174,8 +174,8 @@ FT_BEGIN_HEADER
 
   FT_LOCAL( FT_Error )
   T1_Builder_Start_Point( T1_Builder  builder,
-                          FT_Pos       x,
-                          FT_Pos       y );
+                          FT_Pos      x,
+                          FT_Pos      y );
 
 
   FT_LOCAL( void )
diff --git a/src/psaux/rules.mk b/src/psaux/rules.mk
index 87556d5..0473085 100644
--- a/src/psaux/rules.mk
+++ b/src/psaux/rules.mk
@@ -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/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 2ec9d9e..5fd8b9f 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -1,15 +1,34 @@
+/***************************************************************************/
+/*                                                                         */
+/*  t1cmap.c                                                               */
+/*                                                                         */
+/*    Type 1 character map support (body).                                 */
+/*                                                                         */
+/*  Copyright 2002 by                                                      */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
 #include "t1cmap.h"
-#include <stdlib.h>
+#include <stdlib.h>     /* for qsort() */
 
 #include FT_INTERNAL_DEBUG_H
 
- /***************************************************************************/
- /***************************************************************************/
- /*****                                                                 *****/
- /*****           TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS            *****/
- /*****                                                                 *****/
- /***************************************************************************/
- /***************************************************************************/
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****          TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS           *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
 
   static void
   t1_cmap_std_init( T1_CMapStd  cmap,
@@ -18,6 +37,7 @@
     T1_Face          face    = (T1_Face)FT_CMAP_FACE( cmap );
     PSNames_Service  psnames = (PSNames_Service)face->psnames;
 
+
     cmap->num_glyphs    = face->type1.num_glyphs;
     cmap->glyph_names   = (const char* const*)face->type1.glyph_names;
     cmap->sid_to_string = psnames->adobe_std_strings;
@@ -39,18 +59,20 @@
 
 
   FT_CALLBACK_DEF( FT_UInt )
-  t1_cmap_std_char_index( T1_CMapStd   cmap,
-                          FT_UInt32    char_code )
+  t1_cmap_std_char_index( T1_CMapStd  cmap,
+                          FT_UInt32   char_code )
   {
     FT_UInt  result = 0;
 
+
     if ( char_code < 256 )
     {
       FT_UInt      code, n;
       const char*  glyph_name;
 
-      /* conver character code to Adobe SID string */
-      code       = cmap->code_to_sid[ char_code ];
+
+      /* convert character code to Adobe SID string */
+      code       = cmap->code_to_sid[char_code];
       glyph_name = cmap->sid_to_string( code );
 
       /* look for the corresponding glyph name */
@@ -58,6 +80,7 @@
       {
         const char* gname = cmap->glyph_names[n];
 
+
         if ( gname && gname[0] == glyph_name[0] &&
              strcmp( gname, glyph_name ) == 0   )
         {
@@ -66,6 +89,7 @@
         }
       }
     }
+
     return result;
   }
 
@@ -74,8 +98,9 @@
   t1_cmap_std_char_next( T1_CMapStd   cmap,
                          FT_UInt32   *pchar_code )
   {
-    FT_UInt   result    = 0;
-    FT_UInt32 char_code = *pchar_code + 1;
+    FT_UInt    result    = 0;
+    FT_UInt32  char_code = *pchar_code + 1;
+
 
     while ( char_code < 256 )
     {
@@ -104,17 +129,15 @@
   FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec
   t1_cmap_standard_class_rec =
   {
-    sizeof( T1_CMapStdRec ),
+    sizeof ( T1_CMapStdRec ),
 
-    (FT_CMap_InitFunc)      t1_cmap_standard_init,
-    (FT_CMap_DoneFunc)      t1_cmap_std_done,
-    (FT_CMap_CharIndexFunc) t1_cmap_std_char_index,
-    (FT_CMap_CharNextFunc)  t1_cmap_std_char_next
+    (FT_CMap_InitFunc)     t1_cmap_standard_init,
+    (FT_CMap_DoneFunc)     t1_cmap_std_done,
+    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
+    (FT_CMap_CharNextFunc) t1_cmap_std_char_next
   };
 
 
-
-
   FT_CALLBACK_DEF( FT_Error )
   t1_cmap_expert_init( T1_CMapStd  cmap )
   {
@@ -125,34 +148,33 @@
   FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec
   t1_cmap_expert_class_rec =
   {
-    sizeof( T1_CMapStdRec ),
+    sizeof ( T1_CMapStdRec ),
 
-    (FT_CMap_InitFunc)      t1_cmap_expert_init,
-    (FT_CMap_DoneFunc)      t1_cmap_std_done,
-    (FT_CMap_CharIndexFunc) t1_cmap_std_char_index,
-    (FT_CMap_CharNextFunc)  t1_cmap_std_char_next
+    (FT_CMap_InitFunc)     t1_cmap_expert_init,
+    (FT_CMap_DoneFunc)     t1_cmap_std_done,
+    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
+    (FT_CMap_CharNextFunc) t1_cmap_std_char_next
   };
 
 
-
-
- /***************************************************************************/
- /***************************************************************************/
- /*****                                                                 *****/
- /*****                    TYPE1 CUSTOM ENCODING CMAP                   *****/
- /*****                                                                 *****/
- /***************************************************************************/
- /***************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                    TYPE1 CUSTOM ENCODING CMAP                 *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
 
 
   FT_CALLBACK_DEF( FT_Error )
   t1_cmap_custom_init( T1_CMapCustom  cmap )
   {
-    T1_Face      face     = (T1_Face) FT_CMAP_FACE(cmap);
+    T1_Face      face     = (T1_Face)FT_CMAP_FACE( cmap );
     T1_Encoding  encoding = &face->type1.encoding;
 
+
     cmap->first   = encoding->code_first;
-    cmap->count   = (FT_UInt)(encoding->code_last - cmap->first + 1);
+    cmap->count   = (FT_UInt)( encoding->code_last - cmap->first + 1 );
     cmap->indices = encoding->char_index;
 
     FT_ASSERT( cmap->indices != NULL );
@@ -176,11 +198,12 @@
                              FT_UInt32      char_code )
   {
     FT_UInt    result = 0;
-    FT_UInt32  index;
+    FT_UInt32  idx;
+
 
-    index = (FT_UInt32)( char_code - cmap->first );
-    if ( index < cmap->count )
-      result = cmap->indices[ index ];
+    idx = (FT_UInt32)( char_code - cmap->first );
+    if ( idx < cmap->count )
+      result = cmap->indices[idx];
 
     return result;
   }
@@ -190,19 +213,20 @@
   t1_cmap_custom_char_next( T1_CMapCustom  cmap,
                             FT_UInt32     *pchar_code )
   {
-    FT_UInt   result = 0;
-    FT_UInt32 char_code = *pchar_code;
-    FT_UInt32 index;
+    FT_UInt    result = 0;
+    FT_UInt32  char_code = *pchar_code;
+    FT_UInt32  idx;
+
 
     ++char_code;
 
     if ( char_code < cmap->first )
       char_code = cmap->first;
 
-    index = (FT_UInt32)( char_code - cmap->first );
-    for ( ; index < cmap->count; index++, char_code++ )
+    idx = (FT_UInt32)( char_code - cmap->first );
+    for ( ; idx < cmap->count; idx++, char_code++ )
     {
-      result = cmap->indices[index];
+      result = cmap->indices[idx];
       if ( result != 0 )
         goto Exit;
     }
@@ -218,23 +242,22 @@
   FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec
   t1_cmap_custom_class_rec =
   {
-    sizeof( T1_CMapCustomRec ),
-    (FT_CMap_InitFunc)      t1_cmap_custom_init,
-    (FT_CMap_DoneFunc)      t1_cmap_custom_done,
-    (FT_CMap_CharIndexFunc) t1_cmap_custom_char_index,
-    (FT_CMap_CharNextFunc)  t1_cmap_custom_char_next
-  };
-
+    sizeof ( T1_CMapCustomRec ),
 
+    (FT_CMap_InitFunc)     t1_cmap_custom_init,
+    (FT_CMap_DoneFunc)     t1_cmap_custom_done,
+    (FT_CMap_CharIndexFunc)t1_cmap_custom_char_index,
+    (FT_CMap_CharNextFunc) t1_cmap_custom_char_next
+  };
 
 
- /***************************************************************************/
- /***************************************************************************/
- /*****                                                                 *****/
- /*****             TYPE1 SYNTHETIC UNICODE ENCODING CMAP               *****/
- /*****                                                                 *****/
- /***************************************************************************/
- /***************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****            TYPE1 SYNTHETIC UNICODE ENCODING CMAP              *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
 
   FT_CALLBACK_DEF( FT_Int )
   t1_cmap_uni_pair_compare( const void*  pair1,
@@ -243,6 +266,7 @@
     FT_UInt32  u1 = ((T1_CMapUniPair)pair1)->unicode;
     FT_UInt32  u2 = ((T1_CMapUniPair)pair2)->unicode;
     
+
     if ( u1 < u2 )
       return -1;
       
@@ -253,7 +277,6 @@
   }                            
 
 
-
   FT_CALLBACK_DEF( FT_Error )
   t1_cmap_unicode_init( T1_CMapUnicode  cmap )
   {
@@ -281,6 +304,7 @@
       {
         const char*  gname = face->type1.glyph_names[n];
 
+
         /* build unsorted pair table by matching glyph names */
         if ( gname )
         {
@@ -298,15 +322,15 @@
       new_count = (FT_UInt)( pair - cmap->pairs );
       if ( new_count == 0 )
       {
-        /* there are no unicode characters in here !! */
+        /* there are no unicode characters in here! */
         FT_FREE( cmap->pairs );
         error = FT_Err_Invalid_Argument;
       }
       else
       {
         /* re-allocate if the new array is much smaller than the original */
-        /* one..                                                          */
-        if ( new_count != count && new_count < count/2 )
+        /* one                                                            */
+        if ( new_count != count && new_count < count / 2 )
         {
           (void)FT_RENEW_ARRAY( cmap->pairs, count, new_count );
           error = 0;
@@ -315,7 +339,7 @@
         /* sort the pairs table to allow efficient binary searches */
         qsort( cmap->pairs,
                new_count,
-               sizeof(T1_CMapUniPairRec),
+               sizeof ( T1_CMapUniPairRec ),
                t1_cmap_uni_pair_compare );
 
         cmap->num_pairs = new_count;
@@ -337,7 +361,6 @@
   }
 
 
-
   FT_CALLBACK_DEF( FT_UInt )
   t1_cmap_unicode_char_index( T1_CMapUnicode  cmap,
                               FT_UInt32       char_code )
@@ -347,16 +370,17 @@
     FT_UInt         mid;
     T1_CMapUniPair  pair;
 
+
     while ( min < max )
     {
-      mid  = min + (max - min)/2;
+      mid  = min + ( max - min ) / 2;
       pair = cmap->pairs + mid;
 
       if ( pair->unicode == char_code )
         return pair->gindex;
 
       if ( pair->unicode < char_code )
-        min = mid+1;
+        min = mid + 1;
       else
         max = mid;
     }
@@ -368,8 +392,9 @@
   t1_cmap_unicode_char_next( T1_CMapUnicode  cmap,
                              FT_UInt32      *pchar_code )
   {
-    FT_UInt      result    = 0;
-    FT_UInt32    char_code = *pchar_code + 1;
+    FT_UInt    result    = 0;
+    FT_UInt32  char_code = *pchar_code + 1;
+
 
   Restart:
     {
@@ -378,9 +403,10 @@
       FT_UInt         mid;
       T1_CMapUniPair  pair;
 
+
       while ( min < max )
       {
-        mid  = min + ((max - min) >> 1);
+        mid  = min + ( ( max - min ) >> 1 );
         pair = cmap->pairs + mid;
 
         if ( pair->unicode == char_code )
@@ -420,12 +446,13 @@
   FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec
   t1_cmap_unicode_class_rec =
   {
-    sizeof( T1_CMapUnicodeRec ),
-    (FT_CMap_InitFunc)      t1_cmap_unicode_init,
-    (FT_CMap_DoneFunc)      t1_cmap_unicode_done,
-    (FT_CMap_CharIndexFunc) t1_cmap_unicode_char_index,
-    (FT_CMap_CharNextFunc)  t1_cmap_unicode_char_next
-  };
+    sizeof ( T1_CMapUnicodeRec ),
 
+    (FT_CMap_InitFunc)     t1_cmap_unicode_init,
+    (FT_CMap_DoneFunc)     t1_cmap_unicode_done,
+    (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index,
+    (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next
+  };
 
 
+/* END */
diff --git a/src/psaux/t1cmap.h b/src/psaux/t1cmap.h
index f864aef..0d68c99 100644
--- a/src/psaux/t1cmap.h
+++ b/src/psaux/t1cmap.h
@@ -1,5 +1,23 @@
-#ifndef __FT_TYPE1_CMAP_H__
-#define __FT_TYPE1_CMAP_H__
+/***************************************************************************/
+/*                                                                         */
+/*  t1cmap.h                                                               */
+/*                                                                         */
+/*    Type 1 character map support (specification).                        */
+/*                                                                         */
+/*  Copyright 2002 by                                                      */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __T1CMAP_H__
+#define __T1CMAP_H__
 
 #include <ft2build.h>
 #include FT_INTERNAL_OBJECTS_H
@@ -8,18 +26,19 @@
 
 FT_BEGIN_HEADER
 
- /***************************************************************************/
- /***************************************************************************/
- /*****                                                                 *****/
- /*****           TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS            *****/
- /*****                                                                 *****/
- /***************************************************************************/
- /***************************************************************************/
 
- /* standard (and expert) encoding cmaps */
-  typedef struct T1_CMapStdRec_*       T1_CMapStd;
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****          TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS           *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
 
-  typedef struct T1_CMapStdRec_
+  /* standard (and expert) encoding cmaps */
+  typedef struct T1_CMapStdRec_*  T1_CMapStd;
+
+  typedef struct  T1_CMapStdRec_
   {
     FT_CMapRec                 cmap;
 
@@ -38,40 +57,43 @@ FT_BEGIN_HEADER
   FT_CALLBACK_TABLE const FT_CMap_ClassRec
   t1_cmap_expert_class_rec;
   
- /***************************************************************************/
- /***************************************************************************/
- /*****                                                                 *****/
- /*****                    TYPE1 CUSTOM ENCODING CMAP                   *****/
- /*****                                                                 *****/
- /***************************************************************************/
- /***************************************************************************/
-
-  typedef struct T1_CMapCustomRec_*    T1_CMapCustom;
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                  TYPE1 CUSTOM ENCODING CMAP                   *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef struct T1_CMapCustomRec_*  T1_CMapCustom;
   
-  typedef struct T1_CMapCustomRec_
+  typedef struct  T1_CMapCustomRec_
   {
-    FT_CMapRec    cmap;
-    FT_UInt       first;
-    FT_UInt       count;
-    FT_UShort*    indices;
+    FT_CMapRec  cmap;
+    FT_UInt     first;
+    FT_UInt     count;
+    FT_UShort*  indices;
   
   } T1_CMapCustomRec;
 
+
   FT_CALLBACK_TABLE const FT_CMap_ClassRec
   t1_cmap_custom_class_rec;
   
- /***************************************************************************/
- /***************************************************************************/
- /*****                                                                 *****/
- /*****             TYPE1 SYNTHETIC UNICODE ENCODING CMAP               *****/
- /*****                                                                 *****/
- /***************************************************************************/
- /***************************************************************************/
-
- /* unicode (syntehtic) cmaps */
-  typedef struct T1_CMapUnicodeRec_*   T1_CMapUnicode;
-
-  typedef struct T1_CMapUniPairRec_
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****             TYPE1 SYNTHETIC UNICODE ENCODING CMAP             *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /* unicode (syntehtic) cmaps */
+  typedef struct T1_CMapUnicodeRec_*  T1_CMapUnicode;
+
+  typedef struct  T1_CMapUniPairRec_
   {
     FT_UInt32  unicode;
     FT_UInt    gindex;
@@ -79,7 +101,7 @@ FT_BEGIN_HEADER
   } T1_CMapUniPairRec, *T1_CMapUniPair;
 
 
-  typedef struct T1_CMapUnicodeRec_
+  typedef struct  T1_CMapUnicodeRec_
   {
     FT_CMapRec      cmap;
     FT_UInt         num_pairs;
@@ -92,7 +114,11 @@ FT_BEGIN_HEADER
   t1_cmap_unicode_class_rec;
 
  /* */
+
  
 FT_END_HEADER
 
-#endif /* __FT_TYPE1_CMAP_H__ */
+#endif /* __T1CMAP_H__ */
+
+
+/* END */
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index ccda54d..cac5cfe 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript Type 1 decoding routines (body).                          */
 /*                                                                         */
-/*  Copyright 2000-2001 by                                                 */
+/*  Copyright 2000-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -70,6 +70,7 @@
 
   } T1_Operator;
 
+
   static
   const FT_Int  t1_args_count[op_max] =
   {
@@ -122,11 +123,11 @@
   /*                                                                       */
   static FT_Int
   t1_lookup_glyph_by_stdcharcode( T1_Decoder  decoder,
-                                  FT_Int       charcode )
+                                  FT_Int      charcode )
   {
-    FT_UInt             n;
-    const FT_String*    glyph_name;
-    PSNames_Service  psnames = decoder->psnames;
+    FT_UInt           n;
+    const FT_String*  glyph_name;
+    PSNames_Service   psnames = decoder->psnames;
 
 
     /* check range of standard char code */
@@ -176,11 +177,11 @@
   /*                                                                       */
   static FT_Error
   t1operator_seac( T1_Decoder  decoder,
-                   FT_Pos       asb,
-                   FT_Pos       adx,
-                   FT_Pos       ady,
-                   FT_Int       bchar,
-                   FT_Int       achar )
+                   FT_Pos      asb,
+                   FT_Pos      adx,
+                   FT_Pos      ady,
+                   FT_Int      bchar,
+                   FT_Int      achar )
   {
     FT_Error     error;
     FT_Int       bchar_index, achar_index;
@@ -217,8 +218,8 @@
     /* accent character and return the array of subglyphs.         */
     if ( decoder->builder.no_recurse )
     {
-      FT_GlyphSlot     glyph  = (FT_GlyphSlot)decoder->builder.glyph;
-      FT_GlyphLoader   loader = glyph->internal->loader;
+      FT_GlyphSlot    glyph  = (FT_GlyphSlot)decoder->builder.glyph;
+      FT_GlyphLoader  loader = glyph->internal->loader;
       FT_SubGlyph     subg;
 
 
@@ -289,7 +290,7 @@
     decoder->builder.left_bearing = left_bearing;
     decoder->builder.advance      = advance;
 
-    /* XXX: old code doesn't work with postscript hinter */
+    /* XXX: old code doesn't work with PostScript hinter */
 #if 0
     /* Finally, move the accent */
     if ( decoder->builder.load_points )
@@ -332,17 +333,17 @@
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
   T1_Decoder_Parse_Charstrings( T1_Decoder  decoder,
-                                FT_Byte*     charstring_base,
-                                FT_UInt      charstring_len )
+                                FT_Byte*    charstring_base,
+                                FT_UInt     charstring_len )
   {
-    FT_Error          error;
+    FT_Error         error;
     T1_Decoder_Zone  zone;
-    FT_Byte*          ip;
-    FT_Byte*          limit;
+    FT_Byte*         ip;
+    FT_Byte*         limit;
     T1_Builder       builder = &decoder->builder;
-    FT_Pos            x, y, orig_x, orig_y;
+    FT_Pos           x, y, orig_x, orig_y;
 
-    T1_Hints_Funcs    hinter;
+    T1_Hints_Funcs   hinter;
 
 
     /* we don't want to touch the source code -- use macro trick */
@@ -360,7 +361,7 @@
 
     builder->path_begun  = 0;
 
-    hinter = (T1_Hints_Funcs) builder->hints_funcs;
+    hinter = (T1_Hints_Funcs)builder->hints_funcs;
 
     zone->base           = charstring_base;
     limit = zone->limit  = charstring_base + charstring_len;
@@ -448,7 +449,7 @@
       case 12:
         if ( ip > limit )
         {
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                      "invalid escape (12+EOF)\n" ));
           goto Syntax_Error;
         }
@@ -484,7 +485,7 @@
           break;
 
         default:
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                      "invalid escape (12+%d)\n",
                      ip[-1] ));
           goto Syntax_Error;
@@ -494,7 +495,7 @@
       case 255:    /* four bytes integer */
         if ( ip + 4 > limit )
         {
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                      "unexpected EOF in integer\n" ));
           goto Syntax_Error;
         }
@@ -515,7 +516,7 @@
           {
             if ( ++ip > limit )
             {
-              FT_ERROR(( "T1_Decoder_Parse_CharStrings: " ));
+              FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
               FT_ERROR(( "unexpected EOF in integer\n" ));
               goto Syntax_Error;
             }
@@ -528,7 +529,7 @@
         }
         else
         {
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                      "invalid byte (%d)\n", ip[-1] ));
           goto Syntax_Error;
         }
@@ -543,7 +544,7 @@
       {
         if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )
         {
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: stack overflow!\n" ));
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: stack overflow!\n" ));
           goto Syntax_Error;
         }
 
@@ -600,7 +601,7 @@
           if ( decoder->flex_state       == 0 ||
                decoder->num_flex_vectors != 7 )
           {
-            FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+            FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                        "unexpected flex end\n" ));
             goto Syntax_Error;
           }
@@ -611,7 +612,7 @@
                ip[2] != 12 || ip[3] != 17 || /* pop */
                ip[4] != 12 || ip[5] != 33 )  /* setcurpoint */
           {
-            FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+            FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                        "invalid flex charstring\n" ));
             goto Syntax_Error;
           }
@@ -627,14 +628,14 @@
           /* eat the following `pop' */
           if ( ip + 2 > limit )
           {
-            FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+            FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                        "invalid escape (12+%d)\n", ip[-1] ));
             goto Syntax_Error;
           }
 
           if ( ip[0] != 12 || ip[1] != 17 )
           {
-            FT_ERROR(( "T1_Decoder_Parse_CharStrings: " ));
+            FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
             FT_ERROR(( "`pop' expected, found (%d %d)\n", ip[0], ip[1] ));
             goto Syntax_Error;
           }
@@ -658,14 +659,14 @@
         case 18:                    /* multiple masters */
           {
             PS_Blend  blend = decoder->blend;
-            FT_UInt    num_points, nn, mm;
-            FT_Long*   delta;
-            FT_Long*   values;
+            FT_UInt   num_points, nn, mm;
+            FT_Long*  delta;
+            FT_Long*  values;
 
 
             if ( !blend )
             {
-              FT_ERROR(( "T1_Decoder_Parse_CharStrings: " ));
+              FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
               FT_ERROR(( "unexpected multiple masters operator!\n" ));
               goto Syntax_Error;
             }
@@ -673,12 +674,12 @@
             num_points = top[1] - 13 + ( top[1] == 18 );
             if ( top[0] != (FT_Int)( num_points * blend->num_designs ) )
             {
-              FT_ERROR(( "T1_Decoder_Parse_CharStrings: " ));
+              FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
               FT_ERROR(( "incorrect number of mm arguments\n" ));
               goto Syntax_Error;
             }
 
-            top -= blend->num_designs*num_points;
+            top -= blend->num_designs * num_points;
             if ( top < decoder->stack )
               goto Stack_Underflow;
 
@@ -715,7 +716,7 @@
 
         default:
         Unexpected_OtherSubr:
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                      "invalid othersubr [%d %d]!\n", top[0], top[1] ));
           goto Syntax_Error;
         }
@@ -927,7 +928,7 @@
           }
           else
           {
-            FT_ERROR(( "T1_Decoder_Parse_CharStrings: division by 0\n" ));
+            FT_ERROR(( "T1_Decoder_Parse_Charstrings: division by 0\n" ));
             goto Syntax_Error;
           }
           break;
@@ -942,14 +943,14 @@
             idx = top[0];
             if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )
             {
-              FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+              FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                          "invalid subrs index\n" ));
               goto Syntax_Error;
             }
 
             if ( zone - decoder->zones >= T1_MAX_SUBRS_CALLS )
             {
-              FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+              FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                          "too many nested subrs\n" ));
               goto Syntax_Error;
             }
@@ -977,7 +978,7 @@
 
             if ( !zone->base )
             {
-              FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+              FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                          "invoking empty subrs!\n" ));
               goto Syntax_Error;
             }
@@ -1000,7 +1001,7 @@
 
           if ( zone <= decoder->zones )
           {
-            FT_ERROR(( "T1_Decoder_Parse_CharStrings: unexpected return\n" ));
+            FT_ERROR(( "T1_Decoder_Parse_Charstrings: unexpected return\n" ));
             goto Syntax_Error;
           }
 
@@ -1056,6 +1057,7 @@
           {
             FT_Pos  dx = orig_x;
 
+
             top[0] += dx;
             top[2] += dx;
             top[4] += dx;
@@ -1066,12 +1068,12 @@
         case op_setcurrentpoint:
           FT_TRACE4(( " setcurrentpoint" ));
 
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: " ));
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
           FT_ERROR(( "unexpected `setcurrentpoint'\n" ));
           goto Syntax_Error;
 
         default:
-          FT_ERROR(( "T1_Decoder_Parse_CharStrings: "
+          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
                      "unhandled opcode %d\n", op ));
           goto Syntax_Error;
         }
@@ -1100,20 +1102,20 @@
   /* parse a single Type 1 glyph */
   FT_LOCAL_DEF( FT_Error )
   T1_Decoder_Parse_Glyph( T1_Decoder  decoder,
-                          FT_UInt      glyph )
+                          FT_UInt     glyph )
   {
     return decoder->parse_callback( decoder, glyph );
   }
 
 
-  /* initialise T1 decoder */
+  /* initialize T1 decoder */
   FT_LOCAL_DEF( FT_Error )
-  T1_Decoder_Init( T1_Decoder          decoder,
+  T1_Decoder_Init( T1_Decoder           decoder,
                    FT_Face              face,
                    FT_Size              size,
                    FT_GlyphSlot         slot,
                    FT_Byte**            glyph_names,
-                   PS_Blend            blend,
+                   PS_Blend             blend,
                    FT_Bool              hinting,
                    T1_Decoder_Callback  parse_callback )
   {
@@ -1125,7 +1127,7 @@
 
 
       psnames = (PSNames_Service)FT_Get_Module_Interface(
-                   FT_FACE_LIBRARY(face), "psnames" );
+                  FT_FACE_LIBRARY(face), "psnames" );
       if ( !psnames )
       {
         FT_ERROR(( "T1_Decoder_Init: " ));
@@ -1135,6 +1137,7 @@
 
       decoder->psnames = psnames;
     }
+
     T1_Builder_Init( &decoder->builder, face, size, slot, hinting );
 
     decoder->num_glyphs     = face->num_glyphs;
@@ -1142,7 +1145,7 @@
     decoder->blend          = blend;
     decoder->parse_callback = parse_callback;
 
-    decoder->funcs       = t1_decoder_funcs;
+    decoder->funcs          = t1_decoder_funcs;
 
     return 0;
   }
diff --git a/src/psaux/t1decode.h b/src/psaux/t1decode.h
index 1156baf..70fe647 100644
--- a/src/psaux/t1decode.h
+++ b/src/psaux/t1decode.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript Type 1 decoding routines (specification).                 */
 /*                                                                         */
-/*  Copyright 2000-2001 by                                                 */
+/*  Copyright 2000-2001, 2002 by                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -35,20 +35,20 @@ FT_BEGIN_HEADER
 
   FT_LOCAL( FT_Error )
   T1_Decoder_Parse_Glyph( T1_Decoder  decoder,
-                          FT_UInt      glyph_index );
+                          FT_UInt     glyph_index );
 
   FT_LOCAL( FT_Error )
   T1_Decoder_Parse_Charstrings( T1_Decoder  decoder,
-                                FT_Byte*     base,
-                                FT_UInt      len );
+                                FT_Byte*    base,
+                                FT_UInt     len );
 
   FT_LOCAL( FT_Error )
-  T1_Decoder_Init( T1_Decoder          decoder,
+  T1_Decoder_Init( T1_Decoder           decoder,
                    FT_Face              face,
                    FT_Size              size,
                    FT_GlyphSlot         slot,
                    FT_Byte**            glyph_names,
-                   PS_Blend            blend,
+                   PS_Blend             blend,
                    FT_Bool              hinting,
                    T1_Decoder_Callback  parse_glyph );