Commit 94ffae5239631a18b8b5a39674c0afa8a992410e

Werner Lemberg 2002-04-14T00:54:32

* src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid compiler warning. formatting/fixing ChangeLog

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
diff --git a/ChangeLog b/ChangeLog
index 9bcc925..453f508 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,74 +1,78 @@
+2002-04-13  Werner LEMBERG  <wl@gnu.org>
+
+	* src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid
+	compiler warning.
+
 2002-04-12  David Turner  <david@freetype.org>
 
-        * builds/unix/ftconfig.in, builds/vms/ftconfig.h: Oops, forgot to
-          update these files too
-
-        * README.UNX: updated the Unix-specific quick-compilation guide to
-          warn about the GNU Make requirement at compile time..
-
-        * include/freetype/config/ftstdlib.h,
-          include/freetype/config/ftconfig.h,
-          include/freetype/config/ftheader.h,
-          include/freetype/internal/ftmemory.h,
-          include/freetype/internal/ftobjs.h,
-          
-          src/autohint/ahoptim.c,
-          
-          src/base/ftdbgmem.c, src/base/ftdebug.c,
-          src/base/ftmac.c,    src/base/ftobjs.c,
-          src/base/ftsystem.c,
-
-          src/cache/ftcimage.c, src/cache/ftcsbits.c,
-          
-          src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,
-          
-          src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,
-          
-          src/pcf/pcfdriver.c, src/pcf/pcfread.c,
-          
-          src/psaux/t1cmap.c, src/psaux/t1decode.c,
-          
-          src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
-          src/pshinter/pshrec.c,
-          
-          src/psnames/psmodule.c,
-          
-          src/raster/ftraster.c,
-          
-          src/sfnt/sfdriver.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
-          
-          src/smooth/ftgrays.c,
-          
-          src/type1/t1afm.c,  src/type1/t1driver.c, src/type1/t1gload.c,
-          src/type1/t1load.c, src/type1/t1objs.c,   src/type1/t1parse.c:
-          
-            added the new configuration file "ftstdlib.h" used to define
-            aliases for all ISO C library functions used by the engine
-            (e.g. strlen, qsort, setjmp, etc...)
-            
-            this eases the porting of FreeType 2 to exotic environments like
-            XFree86 modules/extensions..
-
-            also removed many #include <string.h>, #include <stdlib.h>, etc...
-            from the engine's sources where they're not needed..
+	* README.UNX: Updated the Unix-specific quick-compilation guide to
+	warn about the GNU Make requirement at compile time.
 
+	* include/freetype/config/ftstdlib.h,
+	include/freetype/config/ftconfig.h,
+	include/freetype/config/ftheader.h,
+	include/freetype/internal/ftmemory.h,
+	include/freetype/internal/ftobjs.h,
 
-2002-04-12  Vincent Caron  <v.caron@zerodeux.net>
+	src/autohint/ahoptim.c,
+
+	src/base/ftdbgmem.c, src/base/ftdebug.c, src/base/ftmac.c,
+	src/base/ftobjs.c, src/base/ftsystem.c,
+
+	src/cache/ftcimage.c, src/cache/ftcsbits.c,
+
+	src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,
+
+	src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,
+
+	src/pcf/pcfdriver.c, src/pcf/pcfread.c,
+
+	src/psaux/t1cmap.c, src/psaux/t1decode.c,
+
+	src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
+	src/pshinter/pshrec.c,
+
+	src/psnames/psmodule.c,
 
-        * configure, builds/detect.mk: updated the build system to print
-          a warning message in case GNU Make isn't used to build the library.
-          Very nice !
+	src/raster/ftraster.c,
+
+	src/sfnt/sfdriver.c, src/sfnt/ttload.c,
+
+	src/smooth/ftgrays.c,
+
+	src/type1/t1afm.c, src/type1/t1driver.c, src/type1/t1gload.c,
+	src/type1/t1load.c, src/type1/t1objs.c, src/type1/t1parse.c,
+
+	builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+
+	builds/amiga/src/base/ftdebug.c:
+
+	Added the new configuration file "ftstdlib.h" used to define
+	aliases for all ISO C library functions used by the engine
+	(e.g. strlen, qsort, setjmp, etc.).
+
+	This eases the porting of FreeType 2 to environments like
+	XFree86 modules/extensions.
+
+	Also removed many #include <string.h>, #include <stdlib.h>, etc.
+	from the engine's sources where they are not needed.
+
+	* src/sfnt/ttpost.c: Use macro name for psnames.h.
+
+2002-04-12  Vincent Caron  <v.caron@zerodeux.net>
 
+	* configure, builds/detect.mk: Updated the build system to print
+	a warning message in case GNU Make isn't used to build the library.
 
 2002-04-11  David Turner  <david@freetype.org>
 
-        * README, docs/CHANGES, Jamfile.in: updating for the 2.1.0 release
+	* README, docs/CHANGES, Jamfile.in: Updates for the 2.1.0 release.
 
-        * docs/FTL.txt: updated license text to provide a preffered disclaimer
-          and adjust copyright dates/extents
+	* docs/FTL.txt: Updated license text to provide a preferred
+	disclaimer and adjust copyright dates/extents.
 
-        * include/freetype/cache/ftcglyph.h: removing obsolete (and confusing
-          comment)
+	* include/freetype/cache/ftcglyph.h: Removing obsolete (and
+	confusing) comment.
 
 	* Jamfile.in: New file.
 
diff --git a/README.UNX b/README.UNX
index 2ca23fe..6ed8edd 100644
--- a/README.UNX
+++ b/README.UNX
@@ -8,22 +8,22 @@ SPECIAL NOTE FOR UNIX USERS
 
 
 
-  I. Enable the TrueType bytecode hinter if you need it:
-  ------------------------------------------------------
+  I. Enable the TrueType bytecode hinter if you need it
+  -----------------------------------------------------
 
     The  TrueType  bytecode  interpreter  is disabled  in  all  public
     releases  of  the  FreeType  packages  for  patents  reasons  (see
     http://www.freetype.org/patents.html for more details).
-    
+
     However, many Linux distributions do enable the interpreter in the
     FreeType packages (DEB/RPM/etc.) they produce for their platforms.
     If you are using TrueType  fonts on your system, you most probably
     want to enable it manually by doing the following:
-    
+
       - open the file "include/freetype/config/ftoption.h"
-      
+
       - locate a line that says:
-      
+
           #undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
       - change it to:
@@ -34,100 +34,99 @@ SPECIAL NOTE FOR UNIX USERS
 
 
 
-  II. Determine the correct installation path:
+  II. Determine the correct installation path
   --------------------------------------------
-  
+
     By  default,  the  source  package  will install  the  library  in
     "/usr/local".   However, many Unix  distributions now  install the
     library in  "/usr", since FreeType  is becoming a  critical system
     component.
 
     If FreeType is already installed on your system, type
-    
+
       freetype-config --prefix
-       
+
     on the command line.  This  should return the installation path to
     use below  (e.g. "/usr"  or "/usr/local").  Otherwise,  simply use
     "/usr" (or what you think is adequate for your installation).
 
 
 
-  III. Ensure that you're using GNU Make:
+  III. Ensure that you are using GNU Make
   ---------------------------------------
 
-    The FreeType build system _exclusively_ works with GNU Make. You will
-    not be able to compile the library with the following instructions with
-    any other alternative (including BSD Make !!).
-
-    Trying to compile the library with a different Make tool will print a
-    message like:
-    
-      "Sorry, GNU make is required to build FreeType2."
-      
-    and the build will be aborted. If this happens, install GNU Make on your
-    system, and use the GNUMAKE environment variable to name it.
-    
-
-
-  IV. Build and install the library:
-  ----------------------------------
-  
-    The following should work on all Unix systems where the 'make' command
-    invokes GNU Make:
-  
+    The FreeType build system  _exclusively_ works with GNU Make.  You
+    will  not be  able to  compile the  library with  the instructions
+    below using any other alternative (including BSD Make).
+
+    Trying  to compile  the library  with a  different Make  tool will
+    print a message like:
+
+      Sorry, GNU make is required to build FreeType2.
+
+    and the build  process will be aborted.  If  this happens, install
+    GNU Make on your system,  and use the GNUMAKE environment variable
+    to name it.
+
+
+
+  IV. Build and install the library
+  ---------------------------------
+
+    The following  should work  on all Unix  systems where  the `make'
+    command invokes GNU Make:
+
       ./configure --prefix=<yourprefix>
       make
       make install           (as root)
-    
+
     where "<yourprefix>"  must be replaced  by the prefix  returned by
     the "freetype-config" command.
 
-
     When using a different command to invoke GNU Make, use the GNUMAKE
-    variable. For example, if 'gmake' is the command to use on your system,
-    do something like:
-    
-       GNUMAKE=gmake  ./configure  --prefix=<yourprefix>
+    variable.  For example,  if `gmake' is the command  to use on your
+    system, do something like:
+
+       GNUMAKE=gmake ./configure --prefix=<yourprefix>
        gmake
-       gmake install  (as root)
+       gmake install            (as root)
 
+    If  this  still  doesn't   work,  read  the  detailed  compilation
+    procedure available in the file "docs/BUILD" for troubleshooting.
 
-    If this still doesn't work, read the detailed compilation procedure
-    available in the file "docs/BUILD" for troubleshooting..
 
+  V. Take care of XFree86 version 4
+  ---------------------------------
 
-  V. Take care of XFree86 version 4:
-  ----------------------------------
-  
     Certain recent Linux distributions will install _several_ versions
     of FreeType on your system.   For example, on a fresh Mandrake 8.1
     system, you can find the following files:
-    
+
       /usr/lib/libfreetype.so             which links to
       /usr/lib/libfreetype.6.1.0.so
-    
+
     and
-    
+
       /usr/X11R6/lib/libfreetype.so       which links to
       /usr/X11R6/lib/libfreetype.6.0.so
-    
+
     Note that these  files correspond to two distinct  versions of the
     library!   It seems  that  this  surprising issue  is  due to  the
     install  scripts  of recent  XFree86  servers  (from 4.1.0)  which
     irremediably install  their own (dated) version of  the library in
     "/usr/X11R6/lib".
-    
+
     In certain _rare_  cases you may experience minor  problems if you
     install this release  of the library in "/usr"  only, namely, that
     certain  applications will  not  benefit from  the  bug fixes  and
     rendering improvements you'd expect.
-    
+
     There are two good ways to deal with this situation:
-    
+
       - Install  the library  _twice_, in  "/usr" and  in "/usr/X11R6"
         (you  have to do  that each  time you  install a  new FreeType
         release though).
-      
+
       - Change the link in /usr/X11R6/lib/libfreetype.so to point to
 
           /usr/lib/libfreetype.so,
diff --git a/builds/amiga/src/base/ftdebug.c b/builds/amiga/src/base/ftdebug.c
index 80fec06..b270f7f 100644
--- a/builds/amiga/src/base/ftdebug.c
+++ b/builds/amiga/src/base/ftdebug.c
@@ -38,7 +38,7 @@ extern void __stdargs KVPrintF( const char *formatString, const void *values );
   /*                                                                       */
   /* - release mode:                                                       */
   /*                                                                       */
-  /*   No error message is sent or generated.  The code is ft_free from any   */
+  /*   No error message is sent or generated.  The code is free from any   */
   /*   debugging parts.                                                    */
   /*                                                                       */
   /*************************************************************************/
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index e43a9e6..d4936e8 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -122,7 +122,6 @@
 #endif
 
 
-
   /*************************************************************************/
   /*                                                                       */
   /* @macro:                                                               */
diff --git a/include/freetype/config/ftstdlib.h b/include/freetype/config/ftstdlib.h
index 28db872..445069b 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -2,9 +2,10 @@
 /*                                                                         */
 /*  ftstdlib.h                                                             */
 /*                                                                         */
-/*    ANSI-specific configuration file                                     */
+/*    ANSI-specific library and header configuration file (specification   */
+/*    only).                                                               */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 2002 by                                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -13,104 +14,113 @@
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
-/*                                                                         */
-/*  This file is used to group all #includes to the ANSI C library         */
-/*  that FreeType normally requires. It also defines macros to rename      */
-/*  the standard functions within the FT source code                       */
-/*                                                                         */
-/*  (You're free to provide alternative when working in exotic             */
-/*   runtime environments :-)                                              */
-/*                                                                         */
 /***************************************************************************/
 
-#ifndef __FT_STANDARD_LIBRARY_H__
-#define __FT_STANDARD_LIBRARY_H__
-
-
-/************************************************************************/
-/*                                                                      */
-/*                            integer limits                            */
-/*                                                                      */
-/*  UINT_MAX and ULONG_MAX are used to automatically compute the size   */
-/*  of 'int' and 'long' in bytes at compile-time. So far, this works    */
-/*  for all platforms the library has been tested on.                   */
-/*                                                                      */
-/*  Note that on the extremely rare platforms that do not provide       */
-/*  integer types that are _exactly_ 16 and 32 bits wide (e.g. some     */
-/*  old Crays where 'int' is 36 bits !!), we do not make any guarantee  */
-/*  about the correct behaviour of FT2 with all fonts..                 */
-/*                                                                      */
-/*  in these case, "ftconfig.h" will refuse to compile anyway with a    */
-/*  message like "couldn't find 32-bit type" or something similar       */
-/*  anyway..                                                            */
-/*                                                                      */
-/*                                                                      */
-/*  IMPORTANT NOTE: We do not define aliases for heap management and    */
-/*                  i/o routines (i.e. malloc/free/fopen/fread/...)     */
-/*                  since these functions should all be encapsulated    */
-/*                  by platform-specific implementations of             */
-/*                  "ftsystem.c" anyway !!                              */
-/*                                                                      */
-/************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file is used to group all #includes to the ANSI C library that   */
+  /* FreeType normally requires.  It also defines macros to rename the     */
+  /* standard functions within the FreeType source code.                   */
+  /*                                                                       */
+  /* Load a file which defines __FTSTDLIB_H__ before this one to override  */
+  /* it.                                                                   */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTSTDLIB_H__
+#define __FTSTDLIB_H__
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                           integer limits                           */
+  /*                                                                    */
+  /* UINT_MAX and ULONG_MAX are used to automatically compute the size  */
+  /* of `int' and `long' in bytes at compile-time.  So far, this works  */
+  /* for all platforms the library has been tested on.                  */
+  /*                                                                    */
+  /* Note that on the extremely rare platforms that do not provide      */
+  /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some    */
+  /* old Crays where `int' is 36 bits), we do not make any guarantee    */
+  /* about the correct behaviour of FT2 with all fonts.                 */
+  /*                                                                    */
+  /* In these case, "ftconfig.h" will refuse to compile anyway with a   */
+  /* message like "couldn't find 32-bit type" or something similar.     */
+  /*                                                                    */
+  /* IMPORTANT NOTE: We do not define aliases for heap management and   */
+  /*                 i/o routines (i.e. malloc/free/fopen/fread/...)    */
+  /*                 since these functions should all be encapsulated   */
+  /*                 by platform-specific implementations of            */
+  /*                 "ftsystem.c".                                      */
+  /*                                                                    */
+  /**********************************************************************/
+
 
 #include <limits.h>
-#define  FT_UINT_MAX   UINT_MAX
-#define  FT_ULONG_MAX  ULONG_MAX
+#define FT_UINT_MAX   UINT_MAX
+#define FT_ULONG_MAX  ULONG_MAX
 
 
-/************************************************************************/
-/*                                                                      */
-/*                   character and string processing                    */
-/*                                                                      */
-/************************************************************************/
+  /**********************************************************************/
+  /*                                                                    */
+  /*                 character and string processing                    */
+  /*                                                                    */
+  /**********************************************************************/
+
 
 #include <ctype.h>
-#define  ft_isalnum    isalnum
-#define  ft_isupper    isupper
-#define  ft_islower    islower
+#define ft_isalnum  isalnum
+#define ft_isupper  isupper
+#define ft_islower  islower
 
 
 #include <string.h>
-#define  ft_strlen     strlen
-#define  ft_strcmp     strcmp
-#define  ft_strncmp    strncmp
-#define  ft_memcpy     memcpy
-#define  ft_strcpy     strcpy
-#define  ft_strncpy    strncpy
-#define  ft_memset     memset
-#define  ft_memmove    memmove
+#define ft_strlen   strlen
+#define ft_strcmp   strcmp
+#define ft_strncmp  strncmp
+#define ft_memcpy   memcpy
+#define ft_strcpy   strcpy
+#define ft_strncpy  strncpy
+#define ft_memset   memset
+#define ft_memmove  memmove
+
 
+  /**********************************************************************/
+  /*                                                                    */
+  /*                             sorting                                */
+  /*                                                                    */
+  /**********************************************************************/
 
-/************************************************************************/
-/*                                                                      */
-/*                               sorting                                */
-/*                                                                      */
-/************************************************************************/
 
-#include <stdlib.h>   /* for qsort() */
-#define  ft_qsort      qsort
+#include <stdlib.h>
+#define ft_qsort  qsort
 
 
-/************************************************************************/
-/*                                                                      */
-/*                           execution control                          */
-/*                                                                      */
-/************************************************************************/
+  /**********************************************************************/
+  /*                                                                    */
+  /*                         execution control                          */
+  /*                                                                    */
+  /**********************************************************************/
 
 #include <setjmp.h>
 
-#define  ft_jmp_buf   jmp_buf   /* note: this cannot be a typedef since */
-                                /*       jmp_buf is defined as a macro  */
-                                /*       on certain platforms..         */
+#define ft_jmp_buf  jmp_buf   /* note: this cannot be a typedef since */
+                              /*       jmp_buf is defined as a macro  */
+                              /*       on certain platforms           */
 
-#define  ft_setjmp   setjmp     /* same thing here */
-#define  ft_longjmp  longjmp    /*   "             */
+#define ft_setjmp   setjmp    /* same thing here */
+#define ft_longjmp  longjmp   /* "               */
 
 
-/* the following is only used for debugging purposes, i.e. when */
-/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined     */
-/*                                                              */
+  /* the following is only used for debugging purposes, i.e. when */
+  /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined     */
+  /*                                                              */
 #include <stdarg.h>
 
 
-#endif /* __FT_STANDARD_LIBRARY_H__ */
+#endif /* __FTSTDLIB_H__ */
+
+
+/* END */
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 796513d..66b42da 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -127,12 +127,12 @@ FT_BEGIN_HEADER
   /* validator structure */
   typedef struct  FT_ValidatorRec_
   {
-    const FT_Byte*      base;   /* address of table in memory       */
-    const FT_Byte*      limit;  /* `base' + sizeof(table) in memory */
-    FT_ValidationLevel  level;  /* validation level                 */
-    FT_Error            error;  /* error returned. 0 means success  */
+    const FT_Byte*      base;        /* address of table in memory       */
+    const FT_Byte*      limit;       /* `base' + sizeof(table) in memory */
+    FT_ValidationLevel  level;       /* validation level                 */
+    FT_Error            error;       /* error returned. 0 means success  */
 
-    ft_jmp_buf             jump_buffer;  /* used for exception handling */
+    ft_jmp_buf          jump_buffer; /* used for exception handling      */
 
   } FT_ValidatorRec;
 
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 7326654..07a137c 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -1724,16 +1724,16 @@
 
         case cff_op_random:
           {
-            FT_Fixed  rand;
+            FT_Fixed  Rand;
 
 
             FT_TRACE4(( " rand" ));
 
-            rand = seed;
-            if ( rand >= 0x8000 )
-              rand++;
+            Rand = seed;
+            if ( Rand >= 0x8000 )
+              Rand++;
 
-            args[0] = rand;
+            args[0] = Rand;
             seed    = FT_MulFix( seed, 0x10000L - seed );
             if ( seed == 0 )
               seed += 0x2873;
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index 3afdd16..95f1965 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -283,8 +283,8 @@
   is_alpha( char  c )
   {
     return ( ft_isalnum( (int)c ) ||
-             c == '.'          ||
-             c == '_'          );
+             c == '.'             ||
+             c == '_'             );
   }
 
 
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index 821f2fe..3de73b5 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -72,7 +72,7 @@
       goto Exit;
 
     if ( ft_strncmp( (char *)stream->cursor,
-                  "%!PS-Adobe-3.0 Resource-CIDFont", 31 ) )
+                     "%!PS-Adobe-3.0 Resource-CIDFont", 31 ) )
     {
       FT_TRACE2(( "[not a valid CID-keyed font]\n" ));
       error = CID_Err_Unknown_File_Format;
diff --git a/src/pcf/pcfdriver.c b/src/pcf/pcfdriver.c
index 9fc0930..d3bf0b5 100644
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -315,9 +315,9 @@ THE SOFTWARE.
       if ( ( charset_registry != NULL ) &&
            ( charset_encoding != NULL ) )
       {
-        if ( !ft_strcmp( face->charset_registry, "ISO10646" ) ||
-           ( !ft_strcmp( face->charset_registry, "ISO8859" ) &&
-             !ft_strcmp( face->charset_encoding, "1" ) ) )
+        if ( !ft_strcmp( face->charset_registry, "ISO10646" )     ||
+             ( !ft_strcmp( face->charset_registry, "ISO8859" ) &&
+               !ft_strcmp( face->charset_encoding, "1" )       )  )
           unicode_charmap = 1;
       }
 
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 7757f7f..db3b968 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -80,8 +80,8 @@
         const char* gname = cmap->glyph_names[n];
 
 
-        if ( gname && gname[0] == glyph_name[0] &&
-             ft_strcmp( gname, glyph_name ) == 0   )
+        if ( gname && gname[0] == glyph_name[0]  &&
+             ft_strcmp( gname, glyph_name ) == 0 )
         {
           result = n;
           break;
@@ -337,9 +337,9 @@
 
         /* sort the pairs table to allow efficient binary searches */
         ft_qsort( cmap->pairs,
-               new_count,
-               sizeof ( T1_CMapUniPairRec ),
-               t1_cmap_uni_pair_compare );
+                  new_count,
+                  sizeof ( T1_CMapUniPairRec ),
+                  t1_cmap_uni_pair_compare );
 
         cmap->num_pairs = new_count;
       }
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index c8e0709..b183fcb 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -142,7 +142,7 @@
       FT_String*  name = (FT_String*)decoder->glyph_names[n];
 
 
-      if ( name && name[0] == glyph_name[0] &&
+      if ( name && name[0] == glyph_name[0]  &&
            ft_strcmp( name,glyph_name ) == 0 )
         return n;
     }
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 32f813c..b3da35d 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2094,7 +2094,7 @@
       {
         target[0] |= f1;
 
-        /* ft_memset() is slower than the following code on many platforms. */
+        /* memset() is slower than the following code on many platforms. */
         /* This is due to the fact that, in the vast majority of cases,  */
         /* the span length in bytes is relatively small.                 */
         c2--;
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 5de5769..bbef665 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -1719,7 +1719,7 @@
             if ( tt_kern_pair_compare( pair0, pair0 + 1 ) != -1 )
             {
               ft_qsort( (void*)face->kern_pairs, (int)num_pairs,
-                     sizeof ( TT_Kern0_PairRec ), tt_kern_pair_compare );
+                        sizeof ( TT_Kern0_PairRec ), tt_kern_pair_compare );
               break;
             }
           }
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index a3025cc..abe0906 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -99,17 +99,12 @@
 #define ErrRaster_MemoryOverflow   -4
 
 
-
-
-
-
-
 #ifdef _STANDALONE_
 
 #include <string.h>             /* for ft_memcpy() */
 #include <setjmp.h>
 #include <limits.h>
-#define  FT_UINT_MAX  UINT_MAX
+#define FT_UINT_MAX  UINT_MAX
 
 #define ErrRaster_Invalid_Mode     -2
 #define ErrRaster_Invalid_Outline  -1
@@ -312,7 +307,7 @@
     int  conic_level;
     int  cubic_level;
 
-    void*    memory;
+    void*       memory;
     ft_jmp_buf  jump_buffer;
 
 #ifdef GRAYS_USE_GAMMA
@@ -1088,7 +1083,7 @@
 #ifdef QUICK_SORT
 
   /* This is a non-recursive quicksort that directly process our cells     */
-  /* array.  It should be faster than calling the stdlib ft_qsort(), and we   */
+  /* array.  It should be faster than calling the stdlib qsort(), and we   */
   /* can even tailor our insertion threshold...                            */
 
 #define QSORT_THRESHOLD  9  /* below this size, a sub-array will be sorted */
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 36df559..a8f993f 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -46,8 +46,8 @@
 #define IS_KERN_PAIR( p )  ( p[0] == 'K' && p[1] == 'P' )
 
 #define IS_ALPHANUM( c )  ( ft_isalnum( c ) || \
-                            c == '_'     || \
-                            c == '.'     )
+                            c == '_'        || \
+                            c == '.'        )
 
 
   /* read a glyph name and return the equivalent glyph index */
@@ -227,7 +227,7 @@
 
     /* now, sort the kern pairs according to their glyph indices */
     ft_qsort( afm->kern_pairs, count, sizeof ( T1_Kern_Pair ),
-           compare_kern_pairs );
+              compare_kern_pairs );
 
   Exit:
     if ( error )
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index c4b538a..d062975 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1294,7 +1294,7 @@
 
         /* record index of /.notdef              */
         if ( ft_strcmp( (const char*)".notdef",
-                     (const char*)(name_table->elements[n]) ) == 0 )
+                        (const char*)(name_table->elements[n]) ) == 0 )
         {
           notdef_index = n;
           notdef_found = 1;
@@ -1334,7 +1334,7 @@
 
     /* if /.notdef is found but does not occupy index 0, do our magic.      */
     if ( ft_strcmp( (const char*)".notdef",
-                 (const char*)name_table->elements[0] ) &&
+                    (const char*)name_table->elements[0] ) &&
          notdef_found                                      )
     {
       /* Swap glyph in index 0 with /.notdef glyph.  First, add index 0    */
@@ -1510,7 +1510,7 @@
           cur2 = cur;
 
           /* lookup the `known' keyword */
-          while ( cur < limit && *cur != 'k'        &&
+          while ( cur < limit && *cur != 'k'           &&
                   ft_strncmp( (char*)cur, "known", 5 ) )
             cur++;
 
@@ -1559,7 +1559,7 @@
                 if ( !name )
                   break;
 
-                if ( cur[0] == name[0]                          &&
+                if ( cur[0] == name[0]                             &&
                      len == (FT_Int)ft_strlen( (const char*)name ) )
                 {
                   FT_Int  n;
@@ -1730,7 +1730,7 @@
           {
             glyph_name = (FT_Byte*)type1->glyph_names[idx];
             if ( ft_strcmp( (const char*)char_name,
-                         (const char*)glyph_name ) == 0 )
+                            (const char*)glyph_name ) == 0 )
             {
               type1->encoding.char_index[charcode] = (FT_UShort)idx;
               type1->encoding.char_name [charcode] = (char*)glyph_name;
@@ -1738,7 +1738,7 @@
               /* Change min/max encoded char only if glyph name is */
               /* not /.notdef                                      */
               if ( ft_strcmp( (const char*)".notdef",
-                           (const char*)glyph_name ) != 0 )
+                              (const char*)glyph_name ) != 0 )
               {
                 if (charcode < min_char) min_char = charcode;
                 if (charcode > max_char) max_char = charcode;
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index e21e57d..3107e0a 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -200,11 +200,11 @@
     /* Now check font format; we must see `%!PS-AdobeFont-1' */
     /* or `%!FontType'                                       */
     {
-      if ( size <= 16                                    ||
+      if ( size <= 16                                       ||
            ( ft_strncmp( (const char*)parser->base_dict,
-                      "%!PS-AdobeFont-1", 16 )        &&
+                         "%!PS-AdobeFont-1", 16 )        &&
              ft_strncmp( (const char*)parser->base_dict,
-                      "%!FontType", 10 )              )  )
+                         "%!FontType", 10 )              )  )
       {
         FT_TRACE2(( "[not a Type1 font]\n" ));
         error = T1_Err_Unknown_File_Format;