Commit 4ea0a7f0b65c026420f39cabdc146b943c74e2c5

Werner Lemberg 2007-01-05T09:03:31

formatting, minor doc fixes, copyright years

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
diff --git a/ChangeLog b/ChangeLog
index 2931c17..da996a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,38 +1,55 @@
 2007-01-04  David Turner  <david@freetype.org>
 
-	* docs/INSTALL.UNIX: simplified some parts, add reference to
-	autogen.sh and pointer to README.CVS
-
-	* README.CVS: add common problem description and solution
-	when running autogen.sh
-
-	* docs/INSTALL: add reference to MacOS X
-
-	* docs/MAKEPP, docs/INSTALL.MAC: add new documentation files
-
-	* docs/TODO: remove obsolete items
-
-	* src/raster/ftraster.c: removing dynamically generated "count_table",
-	and replace it with a constant array of bytes
-
-	* src/raster/ftraster.c, src/smooth/ftgrays.c: small optimization, the
-	rasterizers now	use the render pool to store their state during
-	scanline conversion. this saves about 6 KB of heap space for each
-	FT_Library instance
+	* docs/INSTALL.UNIX: Simplify some parts, add reference to
+	autogen.sh and pointer to README.CVS.
+
+	* README.CVS: Add common problem description and solution
+	when running autogen.sh.
+
+	* docs/INSTALL: Add reference to MacOS X.
+
+	* docs/MAKEPP, docs/INSTALL.MAC: New documentation files.
+
+	* docs/TODO: Remove obsolete items.
+
+	* src/raster/ftraster.c: (TRaster_Instance): Replace it with...
+	(TWorker): This.
+	Remove `count_table' and `memory'.
+	Make `grays' a pointer.
+	(TRaster): New structure.
+	(count_table): New static array.
+	(RAS_ARGS, RAS_ARG, RAS_VARS, RAS_VAR, FT_UNUSED_RASTER, cur_ras,
+	Vertical_Gray_Sweep_Step, ft_black_new, ft_black_done,
+	ft_black_set_mode, ft_black_render): Updated.
+	(ft_black_init): Don't initialize `count_table'.
+	(ft_black_reset): Use the render pool.  This saves about 6KB of
+	heap space for each FT_Library instance.
+
+	* src/smooth/ftgrays.c (TRaster): Replaced with...
+	(TWorker): This.
+	Remove `memory'.
+	(TRaster): New structure.
+
+	(RAS_ARG_, RAS_ARG, RAS_VAR_, RAS_VAR, ras, gray_render_line,
+	gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to,
+	gray_render_span, gray_raster_render): Updated.
+	(gray_raster_reset): Use the render pool.  This saves about 6KB of
+	heap space for each FT_Library instance.
 
 	* src/sfnt/sfobjs.c, src/sfnt/ttkern.c, src/sfnt/ttkern.h,
 	src/sfnt/ttmtx.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
-	src/truetype/ttpload.c, include/freetype/config/ftoption.h:
-	remove FT_OPTIMIZE_MEMORY macro, since the optimization is
-	no longer experimental
+	src/truetype/ttpload.c, include/freetype/config/ftoption.h: Remove
+	FT_OPTIMIZE_MEMORY macro (and code for !FT_OPTIMIZE_MEMORY) since
+	the optimization is no longer experimental.
 
-	* src/pshinter/pshalgo.c: remove a stupid typo that results in no
-	hinting and a memory leak with some large Asian CFF fonts
+	* src/pshinter/pshalgo.c (psh_glyph_interpolate_normal_points):
+	Remove a typo that results in no hinting and a memory leak with some
+	large Asian CFF fonts.
 
-	* src/base/ftobjs.c (FT_Done_Library): remove a subtle memory leak
-	which happens when FT_Done_Library is called with opened CFF_Faces in
-	it. We need to close all faces before destroying the modules, or else
-	some bad things (memory leaks) may happen.
+	* src/base/ftobjs.c (FT_Done_Library): Remove a subtle memory leak
+	which happens when FT_Done_Library is called with still open
+	CFF_Faces in it.  We need to close all faces before destroying the
+	modules, or else some bad things (memory leaks) may happen.
 
 2007-01-02  Werner Lemberg  <wl@gnu.org>
 
@@ -3973,7 +3990,7 @@
 
 ----------------------------------------------------------------------------
 
-Copyright 2005, 2006 by
+Copyright 2005, 2006, 2007 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/README.CVS b/README.CVS
index 0359b96..63afddf 100644
--- a/README.CVS
+++ b/README.CVS
@@ -9,12 +9,12 @@ which in turn depends on the following packages:
   libtool (1.5.22)
   autoconf (2.59c)
 
-The  versions given  in  parentheses  are known  to  work.  Note  that
-autogen.sh also sets up proper  file permissions for the configure and
-auxiliary scripts.
+The versions given  in parentheses are known to  work.  Newer versions
+should work too, of course.   Note that autogen.sh also sets up proper
+file permissions for the `configure' and auxiliary scripts.
 
-Note that a very common problem is that the script complains that
-the aclocal program doesn't accept a --force option:
+A very common problem is that this script complains that the `aclocal'
+program doesn't accept a `--force' option:
 
   generating `configure.ac'
   running `aclocal -I . --force'
@@ -22,8 +22,8 @@ the aclocal program doesn't accept a --force option:
   Try `aclocal --help' for more information.
   error while running `aclocal -I . --force'
 
-What this really means that your version of Automake is too old,
-please update it before trying to build FreeType.
+This  means that  your version  of the  automake package  is  too old.
+Please update it before trying to build FreeType.
 
 
 For static builds which  don't use platform specific optimizations, no
@@ -35,4 +35,16 @@ configure script is necessary at all; saying
 should work on all platforms which have GNU make (or makepp).
 
 
+----------------------------------------------------------------------
+
+Copyright 2005, 2006, 2007 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.
+
+
 --- end of README.CVS ---
diff --git a/devel/ftoption.h b/devel/ftoption.h
index aa92659..0add36a 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -595,7 +595,6 @@ FT_BEGIN_HEADER
   /* */
 
 
-
   /*
    * Define this variable if you want to keep the layout of internal
    * structures that was used prior to FreeType 2.2.  This also compiles in
diff --git a/docs/INSTALL b/docs/INSTALL
index 572adc8..78f04c9 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -13,7 +13,7 @@ I. Normal installation and upgrades
     need it, read the file `TRUETYPE' for information.
 
 
-  2. Unix Systems (including Mac OS X, as well as Cygwin or MSys on Windows)
+  2. Unix Systems (including Mac OS X, Cygwin, and MSys on Windows)
 
     Please read *both* `UPGRADE.UNIX' and `INSTALL.UNIX' to install or
     upgrade FreeType  2 on  a Unix system.   Note that you  *need* GNU
@@ -76,7 +76,7 @@ II. Custom builds of the library
 
 ----------------------------------------------------------------------
 
-Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 by
+Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
diff --git a/docs/INSTALL.MAC b/docs/INSTALL.MAC
index d466fc3..df2b4fc 100644
--- a/docs/INSTALL.MAC
+++ b/docs/INSTALL.MAC
@@ -1 +1,2 @@
-Follow the instructions in INSTALL.UNIX to install FreeType on Mac OS X
+Please follow the instructions in INSTALL.UNIX to install FreeType on
+Mac OS X.
diff --git a/docs/INSTALL.UNIX b/docs/INSTALL.UNIX
index 6a5aa31..3ddfb8e 100644
--- a/docs/INSTALL.UNIX
+++ b/docs/INSTALL.UNIX
@@ -19,32 +19,32 @@ or MSys on Win32:
        GNU Make  <version number>
        Copyright (C) <year> Free Software Foundation Inc.
 
-    Note that version 3.78.1 or higher is *required*, or the build will
+    Note that version 3.78.1 or higher is *required* or the build will
     fail.
 
-    It's also OK to have GNU Make under another name (e.g. 'gmake')
-    if you use the GNUMAKE trick described below.
+    It is also fine to have GNU Make under another name (e.g. 'gmake')
+    if you use the GNUMAKE variable as described below.
 
-    As a special exception, 'makepp' can also be used to build
-    FreeType 2. See the file docs/MAKEPP for details
+    As  a  special exception,  'makepp'  can  also  be used  to  build
+    FreeType 2.  See the file docs/MAKEPP for details.
 
 
-  2. Regenerate the configure script when needed
-  ----------------------------------------------
+  2. Regenerate the configure script if needed
+  --------------------------------------------
 
-   This only applies if you're building a CVS snapshot or checkout,
-   *not* if you grabbed the sources of an official release.
+    This only applies if you  are building a CVS snapshot or checkout,
+    *not* if you grabbed the sources of an official release.
 
-   you need to invoke the "autogen.sh" script in the top-level
-   directory in order to re-generate the configure script for your
-   platform. Normally, this simply means typing:
+    You  need  to invoke  the  `autogen.sh'  script  in the  top-level
+    directory  in order  to  create the  `configure'  script for  your
+    platform.  Normally, this simply means typing:
 
-     sh autogen.sh <your configure options>
+      sh autogen.sh
+
+    In case of problems, you  may need to install or upgrade Automake,
+    Autoconf or  Libtool.  See  README.CVS in the  top-level directory
+    for more information.
 
-   in case of problems, you may need to install or upgrade Automake,
-   Autoconf or Libtool. See README.CVS in the top-level directory for
-   the gory details.
-    
 
   3. Build and install the library
   --------------------------------
@@ -83,7 +83,7 @@ or MSys on Win32:
 
 ----------------------------------------------------------------------
 
-Copyright 2003, 2004, 2005, 2006 by
+Copyright 2003, 2004, 2005, 2006, 2007 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
diff --git a/docs/MAKEPP b/docs/MAKEPP
index 97512cc..58eaf55 100644
--- a/docs/MAKEPP
+++ b/docs/MAKEPP
@@ -1,5 +1,5 @@
-As a special exception, FreeType can also be built with the
-'makepp' build tool, available from http://makepp.sourceforge.net
+As a special  exception, FreeType can also be  built with the 'makepp'
+build tool, available from http://makepp.sourceforge.net.
 
-Note however that you will need at least version 1.19 and pass
-the option --norc-substitution to have it work correctly
+Note, however. that  you will need at least version  1.19 and pass the
+option --norc-substitution to have it work correctly.
diff --git a/docs/TODO b/docs/TODO
index 4d38fcf..be60d6f 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType.
 
 ------------------------------------------------------------------------
 
-Copyright 2001, 2002, 2003, 2004, 2005, 2006 by
+Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 1f66c3a..afd8139 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 0f88f0f..a0ddbb6 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -5,7 +5,7 @@
 /*    Basic SFNT/TrueType type definitions and interface (specification    */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2004, 2005, 2006 by                         */
+/*  Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007 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/base/ftobjs.c b/src/base/ftobjs.c
index 2384a27..a2e682a 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType private base classes (body).                            */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -3758,34 +3758,34 @@
     if ( library->generic.finalizer )
       library->generic.finalizer( library );
 
-    /* Close all faces in the library. if we don't do
+    /* Close all faces in the library.  If we don't do
      * this, we can have some subtle memory leaks.
-     * for example:
+     * Example:
      *
      *  - the cff font driver uses the pshinter module in cff_size_done
      *  - if the pshinter module is destroyed before the cff font driver,
-     *    opened FT_Face objects managed by the driver will not be properly
+     *    opened FT_Face objects managed by the driver are not properly
      *    destroyed, resulting in a memory leak
      */
     {
       FT_UInt  n;
 
+
       for ( n = 0; n < library->num_modules; n++ )
       {
         FT_Module  module = library->modules[n];
         FT_List    faces;
 
-        if ( (module->clazz->module_flags & FT_MODULE_FONT_DRIVER) == 0 )
+
+        if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 )
           continue;
 
         faces = &FT_DRIVER(module)->faces_list;
-        while ( faces->head ) {
-          FT_Done_Face( FT_FACE(faces->head->data) );
-        }
+        while ( faces->head )
+          FT_Done_Face( FT_FACE( faces->head->data ) );
       }
     }
 
-
     /* Close all other modules in the library */
 #if 1
     /* XXX Modules are removed in the reversed order so that  */
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 83c07dd..7d6b2ec 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript hinting algorithm (body).                                 */
 /*                                                                         */
-/*  Copyright 2001, 2002, 2003, 2004, 2005, 2006 by                        */
+/*  Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 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/raster/ftraster.c b/src/raster/ftraster.c
index 9c292f9..63d6bb7 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph rasterizer (body).                                */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2005 by                               */
+/*  Copyright 1996-2001, 2002, 2003, 2005, 2007 by                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -3177,6 +3177,7 @@ static const char  count_table[256] =
 #ifdef FT_RASTER_OPTION_ANTI_ALIASING
     FT_UInt  n;
 
+
     /* set default 5-levels gray palette */
     for ( n = 0; n < 5; n++ )
       raster->grays[n] = n * 255 / 4;
@@ -3263,8 +3264,10 @@ static const char  count_table[256] =
       {
         PWorker  worker = (PWorker)pool_base;
 
-        raster->buffer      = pool_base + ((sizeof(*worker) + 7) & ~7);
-        raster->buffer_size = ((pool_base + pool_size) - (char*)raster->buffer)/sizeof(Long);
+
+        raster->buffer      = pool_base + ( (sizeof ( *worker ) + 7 ) & ~7 );
+        raster->buffer_size = ( ( pool_base + pool_size ) -
+                                (char*)raster->buffer ) / sizeof ( Long );
         raster->worker      = worker;
       }
       else
@@ -3339,7 +3342,8 @@ static const char  count_table[256] =
     ras.target   = *target_map;
 
     worker->buff        = (PLong) raster->buffer;
-    worker->sizeBuff    = worker->buff + raster->buffer_size/sizeof(Long);
+    worker->sizeBuff    = worker->buff +
+                            raster->buffer_size / sizeof ( Long );
 #ifdef FT_RASTER_OPTION_ANTI_ALIASING
     worker->grays       = raster->grays;
     worker->gray_width  = raster->gray_width;
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 80c026f..ce19f72 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    SFNT object management (base).                                       */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 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/sfnt/ttkern.c b/src/sfnt/ttkern.c
index 15ff13f..8eb2ff4 100644
--- a/src/sfnt/ttkern.c
+++ b/src/sfnt/ttkern.c
@@ -5,7 +5,7 @@
 /*    Load the basic TrueType kerning table.  This doesn't handle          */
 /*    kerning data within the GPOS table at the moment.                    */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 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/sfnt/ttkern.h b/src/sfnt/ttkern.h
index 77c1f9a..df1da9b 100644
--- a/src/sfnt/ttkern.h
+++ b/src/sfnt/ttkern.h
@@ -5,7 +5,7 @@
 /*    Load the basic TrueType kerning table.  This doesn't handle          */
 /*    kerning data within the GPOS table at the moment.                    */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2005 by                                     */
+/*  Copyright 1996-2001, 2002, 2005, 2007 by                               */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -41,7 +41,7 @@ FT_BEGIN_HEADER
                        FT_UInt     left_glyph,
                        FT_UInt     right_glyph );
 
-#  define TT_FACE_HAS_KERNING( face )  ( (face)->kern_avail_bits != 0 )
+#define TT_FACE_HAS_KERNING( face )  ( (face)->kern_avail_bits != 0 )
 
 
 FT_END_HEADER
diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c
index c8fc220..9d8e79a 100644
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Load the metrics tables common to TTF and OTF fonts (body).          */
 /*                                                                         */
-/*  Copyright 2006 by                                                      */
+/*  Copyright 2006, 2007 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/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index d060343..50d6ec3 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (body).                */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 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/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index a6e5176..c6067c0 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (specification).       */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 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/smooth/ftgrays.c b/src/smooth/ftgrays.c
index c38f42f..da722cc 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    A new `perfect' anti-aliasing renderer (body).                       */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2005, 2006 by                         */
+/*  Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007 by                   */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -1929,14 +1929,20 @@
 
     if ( raster )
     {
-      if ( pool_base && pool_size >= (long)sizeof(TWorker) + 2048 )
+      if ( pool_base && pool_size >= (long)sizeof ( TWorker ) + 2048 )
       {
-        PWorker  worker = (PWorker) pool_base;
+        PWorker  worker = (PWorker)pool_base;
+
 
         rast->worker      = worker;
-        rast->buffer      = pool_base + ((sizeof(TWorker) + sizeof(TCell)-1) & ~(sizeof(TCell)-1));
-        rast->buffer_size = (long)((pool_base + pool_size) - (char*)rast->buffer) & ~(sizeof(TCell)-1);
-        rast->band_size   = (int)( rast->buffer_size/(sizeof(TCell)*8) );
+        rast->buffer      = pool_base +
+                              ( ( sizeof ( TWorker ) + sizeof ( TCell ) - 1 ) &
+                                ~( sizeof ( TCell ) - 1 ) );
+        rast->buffer_size = (long)( ( pool_base + pool_size ) -
+                                    (char*)rast->buffer ) &
+                                      ~( sizeof ( TCell ) - 1 );
+        rast->band_size   = (int)( rast->buffer_size /
+                                     ( sizeof ( TCell ) * 8 ) );
       }
       else
       {