Commit 7f049f422141b79a5bc6d0abf24b954906629d98

Werner Lemberg 2006-02-25T16:52:16

Formatting, 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
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
diff --git a/ChangeLog b/ChangeLog
index 42b173c..f3e7bce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,23 +1,38 @@
 2006-02-25  David Turner  <david@freetype.org>
 
-    * include/freetype/config/ftoption.h, src/autofit/afcjk.c,
-    src/base/ftobjs.c, src/base/ftutil.c, src/cff/cffobjs.c,
-    src/psaux/afmparse.c, src/sfnt/ttbdf.c, src/tools/apinames.c,
-    src/truetype/ttdriver.c:
+	Fix compiler warnings as well as C++ compilation problems.
+	Add missing prototypes.
 
-       solved compiler warnings as well as C++ compilation problems
+	* src/autofit/afcjk.c, src/base/ftobjs.c, src/base/ftutil.c,
+	src/bdf/bdfdrivr.c, src/cff/cffcmap.c, src/cff/cffobjs.c,
+	src/psaux/afmparse.c,, src/psaux/t1cmap.c, src/smooth/ftgrays.c
+	src/tools/apinames.c, src/truetype/ttdriver.c: Add various casts,
+	initialize variables, and decorate functions with FT_CALLBACK_DEF,
+	etc., to fix compiler warnings (and C++ compiling errors).
 
-    * builds/unix/ftsystem.c, include/freetype/config/ftheader.h,
-    include/freetype/internal/services/svotval.h,
-    include/freetype/internal/services/svpfr.h,
-    src/base/ftsystem.c, src/bdf/bdfdrivr.c, src/cache/ftcbasic.c,
-    src/cff/cffcmap.c, src/gzip/ftgzip.c, src/lzw/ftlzw.c,
-    src/lzw/ftlzw2.c, src/psaux/t1cmap.c, src/sfnt/ttbdf.c,
-    src/smooth/ftgrays.c:
+	* src/cache/ftcbasic.c: Fix `-Wmissing-prototypes' warnings with
+	gcc.
 
-       solved -Wmissing-prototypes warnings with GCC
+	* builds/unix/ftsystem.c: Don't include FT_INTERNAL_OBJECTS_H but
+	FT_INTERNAL_STREAM_H.
 
+	* src/base/ftsystem.c: Include FT_INTERNAL_STREAM_H.
 
+	* include/freetype/config/ftheader.h (FT_PFR_H): New macro.
+
+	* include/freetype/config/ftoption.h (FT_STRICT_ALIASING): Don't
+	define for C++.
+
+	* include/freetype/internal/services/svotval.h: Don't include
+	FT_OPENTYPE_VALIDATE_H but FT_INTERNAL_VALIDATE_H.
+
+	* include/freetype/internal/services/svpfr.h: Include FT_PFR_H.
+
+	* src/gzip/ftgzip.c: Include FT_GZIP_H.
+
+	* src/lzw/ftlzw.c, src/lzw/ftlzw2.c: Include FT_LZW_H.
+
+	* src/sfnt/ttbdf.c (tt_face_load_bdf_props): Rearrange code.
 
 2006-02-24  Chia-I Wu  <b90201047@ntu.edu.tw>
 
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index 754bbe8..2253dba 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Unix-specific FreeType low-level system interface (body).            */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2004, 2005 by                               */
+/*  Copyright 1996-2001, 2002, 2004, 2005, 2006 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/ftheader.h b/include/freetype/config/ftheader.h
index d5dcd0d..d704f1d 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -602,6 +602,7 @@
    */
 #define FT_GX_VALIDATE_H  <freetype/ftgxval.h>
 
+
   /*************************************************************************
    *
    * @macro:
@@ -615,7 +616,6 @@
 #define FT_PFR_H  <freetype/ftpfr.h>
 
 
-
   /* */
 
 #define FT_TRIGONOMETRY_H       <freetype/fttrigon.h>
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 810e199..587531a 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -587,8 +587,8 @@ FT_BEGIN_HEADER
    * releases from emitting zillions of `strict aliasing' warning messages
    * each time a memory-management function is called.
    *
-   * note that it shouldn't be activated when compiling the library
-   * as C++
+   * Note that it shouldn't be activated when building the library with
+   * a C++ compiler.
    */
 #ifndef __cplusplus
 #define FT_STRICT_ALIASING
@@ -601,10 +601,9 @@ FT_BEGIN_HEADER
    * a few obsolete functions to avoid linking problems on typical Unix
    * distributions.
    *
-   * if you're on an embedded system, or if you're building a new
-   * distribution from scratch, it is recommended to disable the macro
-   * since it will reduce the library's code size and activate a few
-   * memory-saving optimizations as well.
+   * For embedded systems or building a new distribution from scratch, it
+   * is recommended to disable the macro since it reduces the library's code
+   * size and activates a few memory-saving optimizations as well.
    */
 #define FT_CONFIG_OPTION_OLD_INTERNALS
 
diff --git a/include/freetype/internal/services/svotval.h b/include/freetype/internal/services/svotval.h
index 435761d..88da778 100644
--- a/include/freetype/internal/services/svotval.h
+++ b/include/freetype/internal/services/svotval.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType OpenType validation service (specification).            */
 /*                                                                         */
-/*  Copyright 2004 by                                                      */
+/*  Copyright 2004, 2006 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/services/svpfr.h b/include/freetype/internal/services/svpfr.h
index 4c93f1f..462786f 100644
--- a/include/freetype/internal/services/svpfr.h
+++ b/include/freetype/internal/services/svpfr.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Internal PFR service functions (specification).                      */
 /*                                                                         */
-/*  Copyright 2003 by                                                      */
+/*  Copyright 2003, 2006 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/lzw/ftlzw.c b/src/lzw/ftlzw.c
index f28a41e..8066d2f 100644
--- a/src/lzw/ftlzw.c
+++ b/src/lzw/ftlzw.c
@@ -8,7 +8,7 @@
 /*  be used to parse compressed PCF fonts, as found with many X11 server   */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2005 by                                                */
+/*  Copyright 2004, 2005, 2006 by                                          */
 /*  Albert Chin-A-Young.                                                   */
 /*                                                                         */
 /*  Based on code in src/gzip/ftgzip.c, Copyright 2004 by                  */
diff --git a/src/lzw/ftlzw2.c b/src/lzw/ftlzw2.c
index 6df37f4..f051777 100644
--- a/src/lzw/ftlzw2.c
+++ b/src/lzw/ftlzw2.c
@@ -8,7 +8,7 @@
 /*  be used to parse compressed PCF fonts, as found with many X11 server   */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2005 by                                                */
+/*  Copyright 2004, 2005, 2006 by                                          */
 /*  Albert Chin-A-Young.                                                   */
 /*                                                                         */
 /*  Based on code in src/gzip/ftgzip.c, Copyright 2004 by                  */
diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c
index ab69d65..6c95387 100644
--- a/src/sfnt/ttbdf.c
+++ b/src/sfnt/ttbdf.c
@@ -1,250 +1,250 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ttbdf.c                                                                */
-/*                                                                         */
-/*    TrueType and OpenType embedded BDF properties (body).                */
-/*                                                                         */
-/*  Copyright 2005 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 <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-#include "ttbdf.h"
-
-#include "sferrors.h"
-
-
-#ifdef TT_CONFIG_OPTION_BDF
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
-  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
-  /* messages during execution.                                            */
-  /*                                                                       */
-#undef  FT_COMPONENT
-#define FT_COMPONENT  trace_ttbdf
-
-
-  FT_LOCAL_DEF( void )
-  tt_face_free_bdf_props( TT_Face  face )
-  {
-    TT_BDF  bdf = &face->bdf;
-
-
-    if ( bdf->loaded )
-    {
-      FT_Stream  stream = FT_FACE(face)->stream;
-
-
-      if ( bdf->table != NULL )
-        FT_FRAME_RELEASE( bdf->table );
-
-      bdf->table_end    = NULL;
-      bdf->strings      = NULL;
-      bdf->strings_size = 0;
-    }
-  }
-
-
-  static FT_Error
-  tt_face_load_bdf_props( TT_Face    face,
-                          FT_Stream  stream )
-  {
-    TT_BDF    bdf = &face->bdf;
-    FT_ULong  length;
-    FT_Error  error;
-
-
-    FT_ZERO( bdf );
-
-    error = tt_face_goto_table( face, TTAG_BDF, stream, &length );
-    if ( error                                  ||
-         length < 8                             ||
-         FT_FRAME_EXTRACT( length, bdf->table ) )
-    {
-      error = FT_Err_Invalid_Table;
-      goto Exit;
-    }
-
-    bdf->table_end = bdf->table + length;
-
-    {
-      FT_Byte*   p           = bdf->table;
-      FT_UInt    version     = FT_NEXT_USHORT( p );
-      FT_UInt    num_strikes = FT_NEXT_USHORT( p );
-      FT_UInt32  strings     = FT_NEXT_ULONG ( p );
-      FT_UInt    count;
-      FT_Byte*   strike;
-
-
-      if ( version != 0x0001                 ||
-           strings < 8                       ||
-           ( strings - 8 ) / 4 < num_strikes ||
-           strings + 1 > length              )
-      {
-        goto BadTable;
-      }
-
-      bdf->num_strikes  = num_strikes;
-      bdf->strings      = bdf->table + strings;
-      bdf->strings_size = length - strings;
-
-      count  = bdf->num_strikes;
-      p      = bdf->table + 8;
-      strike = p + count * 4;
-
-
-      for ( ; count > 0; count-- )
-      {
-        FT_UInt  num_items = FT_PEEK_USHORT( p + 2 );
-
-        /*
-         *  We don't need to check the value sets themselves, since this
-         *  is done later.
-         */
-        strike += 10 * num_items;
-
-        p += 4;
-      }
-
-      if ( strike > bdf->strings )
-        goto BadTable;
-    }
-
-    bdf->loaded = 1;
-
-  Exit:
-    return error;
-
-  BadTable:
-    FT_FRAME_RELEASE( bdf->table );
-    FT_ZERO( bdf );
-    error = FT_Err_Invalid_Table;
-    goto Exit;
-  }
-
-
-  FT_LOCAL_DEF( FT_Error )
-  tt_face_find_bdf_prop( TT_Face           face,
-                         const char*       property_name,
-                         BDF_PropertyRec  *aprop )
-  {
-    TT_BDF    bdf   = &face->bdf;
-    FT_Size   size  = FT_FACE(face)->size;
-    FT_Error  error = 0;
-    FT_Byte*  p;
-    FT_UInt   count;
-    FT_Byte*  strike;
-    FT_UInt   property_len;
-
-
-    aprop->type = BDF_PROPERTY_TYPE_NONE;
-
-    if ( bdf->loaded == 0 )
-    {
-      error = tt_face_load_bdf_props( face, FT_FACE( face )->stream );
-      if ( error )
-        goto Exit;
-    }
-
-    count  = bdf->num_strikes;
-    p      = bdf->table + 8;
-    strike = p + 4 * count;
-
-    error = FT_Err_Invalid_Argument;
-
-    if ( size == NULL || property_name == NULL )
-      goto Exit;
-
-    property_len = ft_strlen( property_name );
-    if ( property_len == 0 )
-      goto Exit;
-
-    for ( ; count > 0; count-- )
-    {
-      FT_UInt  _ppem  = FT_NEXT_USHORT( p );
-      FT_UInt  _count = FT_NEXT_USHORT( p );
-
-      if ( _ppem == size->metrics.y_ppem )
-      {
-        count = _count;
-        goto FoundStrike;
-      }
-
-      strike += 10 * _count;
-    }
-    goto Exit;
-
-  FoundStrike:
-    p = strike;
-    for ( ; count > 0; count-- )
-    {
-      FT_UInt  type = FT_PEEK_USHORT( p + 4 );
-
-      if ( ( type & 0x10 ) != 0 )
-      {
-        FT_UInt32  name_offset = FT_PEEK_ULONG( p     );
-        FT_UInt32  value       = FT_PEEK_ULONG( p + 6 );
-
-        /* be a bit paranoid for invalid entries here */
-        if ( name_offset < bdf->strings_size                    &&
-             property_len < bdf->strings_size - name_offset     &&
-             ft_strncmp( property_name,
-                         (const char*)bdf->strings + name_offset,
-                         bdf->strings_size - name_offset ) == 0 )
-        {
-          switch ( type & 0x0F )
-          {
-          case 0x00:  /* string */
-          case 0x01:  /* atoms */
-            /* check that the content is really 0-terminated */
-            if ( value < bdf->strings_size &&
-                 ft_memchr( bdf->strings + value, 0, bdf->strings_size ) )
-            {
-              aprop->type   = BDF_PROPERTY_TYPE_ATOM;
-              aprop->u.atom = (const char*)bdf->strings + value;
-              error         = 0;
-              goto Exit;
-            }
-            break;
-
-          case 0x02:
-            aprop->type      = BDF_PROPERTY_TYPE_INTEGER;
-            aprop->u.integer = (FT_Int32)value;
-            error            = 0;
-            goto Exit;
-
-          case 0x03:
-            aprop->type       = BDF_PROPERTY_TYPE_CARDINAL;
-            aprop->u.cardinal = value;
-            error             = 0;
-            goto Exit;
-
-          default:
-            ;
-          }
-        }
-      }
-      p += 10;
-    }
-
-  Exit:
-    return error;
-  }
-
-#endif /* TT_CONFIG_OPTION_BDF */
-
-
-/* END */
+/***************************************************************************/
+/*                                                                         */
+/*  ttbdf.c                                                                */
+/*                                                                         */
+/*    TrueType and OpenType embedded BDF properties (body).                */
+/*                                                                         */
+/*  Copyright 2005, 2006 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 <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_STREAM_H
+#include FT_TRUETYPE_TAGS_H
+#include "ttbdf.h"
+
+#include "sferrors.h"
+
+
+#ifdef TT_CONFIG_OPTION_BDF
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
+  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
+  /* messages during execution.                                            */
+  /*                                                                       */
+#undef  FT_COMPONENT
+#define FT_COMPONENT  trace_ttbdf
+
+
+  FT_LOCAL_DEF( void )
+  tt_face_free_bdf_props( TT_Face  face )
+  {
+    TT_BDF  bdf = &face->bdf;
+
+
+    if ( bdf->loaded )
+    {
+      FT_Stream  stream = FT_FACE(face)->stream;
+
+
+      if ( bdf->table != NULL )
+        FT_FRAME_RELEASE( bdf->table );
+
+      bdf->table_end    = NULL;
+      bdf->strings      = NULL;
+      bdf->strings_size = 0;
+    }
+  }
+
+
+  static FT_Error
+  tt_face_load_bdf_props( TT_Face    face,
+                          FT_Stream  stream )
+  {
+    TT_BDF    bdf = &face->bdf;
+    FT_ULong  length;
+    FT_Error  error;
+
+
+    FT_ZERO( bdf );
+
+    error = tt_face_goto_table( face, TTAG_BDF, stream, &length );
+    if ( error                                  ||
+         length < 8                             ||
+         FT_FRAME_EXTRACT( length, bdf->table ) )
+    {
+      error = FT_Err_Invalid_Table;
+      goto Exit;
+    }
+
+    bdf->table_end = bdf->table + length;
+
+    {
+      FT_Byte*   p           = bdf->table;
+      FT_UInt    version     = FT_NEXT_USHORT( p );
+      FT_UInt    num_strikes = FT_NEXT_USHORT( p );
+      FT_UInt32  strings     = FT_NEXT_ULONG ( p );
+      FT_UInt    count;
+      FT_Byte*   strike;
+
+
+      if ( version != 0x0001                 ||
+           strings < 8                       ||
+           ( strings - 8 ) / 4 < num_strikes ||
+           strings + 1 > length              )
+      {
+        goto BadTable;
+      }
+
+      bdf->num_strikes  = num_strikes;
+      bdf->strings      = bdf->table + strings;
+      bdf->strings_size = length - strings;
+
+      count  = bdf->num_strikes;
+      p      = bdf->table + 8;
+      strike = p + count * 4;
+
+
+      for ( ; count > 0; count-- )
+      {
+        FT_UInt  num_items = FT_PEEK_USHORT( p + 2 );
+
+        /*
+         *  We don't need to check the value sets themselves, since this
+         *  is done later.
+         */
+        strike += 10 * num_items;
+
+        p += 4;
+      }
+
+      if ( strike > bdf->strings )
+        goto BadTable;
+    }
+
+    bdf->loaded = 1;
+
+  Exit:
+    return error;
+
+  BadTable:
+    FT_FRAME_RELEASE( bdf->table );
+    FT_ZERO( bdf );
+    error = FT_Err_Invalid_Table;
+    goto Exit;
+  }
+
+
+  FT_LOCAL_DEF( FT_Error )
+  tt_face_find_bdf_prop( TT_Face           face,
+                         const char*       property_name,
+                         BDF_PropertyRec  *aprop )
+  {
+    TT_BDF    bdf   = &face->bdf;
+    FT_Size   size  = FT_FACE(face)->size;
+    FT_Error  error = 0;
+    FT_Byte*  p;
+    FT_UInt   count;
+    FT_Byte*  strike;
+    FT_UInt   property_len;
+
+
+    aprop->type = BDF_PROPERTY_TYPE_NONE;
+
+    if ( bdf->loaded == 0 )
+    {
+      error = tt_face_load_bdf_props( face, FT_FACE( face )->stream );
+      if ( error )
+        goto Exit;
+    }
+
+    count  = bdf->num_strikes;
+    p      = bdf->table + 8;
+    strike = p + 4 * count;
+
+    error = FT_Err_Invalid_Argument;
+
+    if ( size == NULL || property_name == NULL )
+      goto Exit;
+
+    property_len = ft_strlen( property_name );
+    if ( property_len == 0 )
+      goto Exit;
+
+    for ( ; count > 0; count-- )
+    {
+      FT_UInt  _ppem  = FT_NEXT_USHORT( p );
+      FT_UInt  _count = FT_NEXT_USHORT( p );
+
+      if ( _ppem == size->metrics.y_ppem )
+      {
+        count = _count;
+        goto FoundStrike;
+      }
+
+      strike += 10 * _count;
+    }
+    goto Exit;
+
+  FoundStrike:
+    p = strike;
+    for ( ; count > 0; count-- )
+    {
+      FT_UInt  type = FT_PEEK_USHORT( p + 4 );
+
+      if ( ( type & 0x10 ) != 0 )
+      {
+        FT_UInt32  name_offset = FT_PEEK_ULONG( p     );
+        FT_UInt32  value       = FT_PEEK_ULONG( p + 6 );
+
+        /* be a bit paranoid for invalid entries here */
+        if ( name_offset < bdf->strings_size                    &&
+             property_len < bdf->strings_size - name_offset     &&
+             ft_strncmp( property_name,
+                         (const char*)bdf->strings + name_offset,
+                         bdf->strings_size - name_offset ) == 0 )
+        {
+          switch ( type & 0x0F )
+          {
+          case 0x00:  /* string */
+          case 0x01:  /* atoms */
+            /* check that the content is really 0-terminated */
+            if ( value < bdf->strings_size &&
+                 ft_memchr( bdf->strings + value, 0, bdf->strings_size ) )
+            {
+              aprop->type   = BDF_PROPERTY_TYPE_ATOM;
+              aprop->u.atom = (const char*)bdf->strings + value;
+              error         = 0;
+              goto Exit;
+            }
+            break;
+
+          case 0x02:
+            aprop->type      = BDF_PROPERTY_TYPE_INTEGER;
+            aprop->u.integer = (FT_Int32)value;
+            error            = 0;
+            goto Exit;
+
+          case 0x03:
+            aprop->type       = BDF_PROPERTY_TYPE_CARDINAL;
+            aprop->u.cardinal = value;
+            error             = 0;
+            goto Exit;
+
+          default:
+            ;
+          }
+        }
+      }
+      p += 10;
+    }
+
+  Exit:
+    return error;
+  }
+
+#endif /* TT_CONFIG_OPTION_BDF */
+
+
+/* END */
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 8c6699d..3d61d79 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 by                               */
+/*  Copyright 2000-2001, 2002, 2003, 2005, 2006 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/tools/apinames.c b/src/tools/apinames.c
index 2d8583f..43d58d6 100644
--- a/src/tools/apinames.c
+++ b/src/tools/apinames.c
@@ -10,7 +10,7 @@
  * accepted if you are using GCC for compilation (and probably by
  * other compilers too).
  *
- * Author: David Turner, 2005
+ * Author: David Turner, 2005, 2006
  *
  * This code is explicitly placed into the public domain.
  *