Commit dcbb708e7addcf312607f7814c4052c1964b348f

Werner Lemberg 2007-02-08T08:54:09

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
diff --git a/ChangeLog b/ChangeLog
index 70c1c88..3bad4af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,19 +7,20 @@
 
 	* include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE):
 	Introduce __attribute((deprecated))__ to warn functions
-	which use non ANSI data types in their interfaces.
+	which use non-ANSI data types in its interfaces.
 	(FT_GetFile_From_Mac_Name): Deprecated, using FSSpec.
 	(FT_GetFile_From_Mac_ATS_Name): Deprecated, using FSSpec.
 	(FT_New_Face_From_FSSpec): Deprecated, using FSSpec.
 	(FT_New_Face_From_FSRef): Deprecated, using FSRef.
-	* src/base/ftmac.c: predefine FT_DEPRECATED_ATTRIBUTE as blank
-	to avoid warning in building freetype.
+
+	* src/base/ftmac.c: Predefine FT_DEPRECATED_ATTRIBUTE as void
+	to avoid warning in building FreeType.
 	* builds/mac/ftmac.c: Ditto.
 
 2007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	* src/base/ftbase.c: Fix to use builds/mac/ftmac.c, if configured
-	"--with-fsspec" etc. Replace #include "ftmac.c" by
+	`--with-fsspec' etc.  Replace #include "ftmac.c" with
 	#include <ftmac.c>.
 
 2007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
@@ -33,16 +34,17 @@
 
 2007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
-	* include/freetype/ftmac.h: Fixed wrong comment, FSSpec of
+	* include/freetype/ftmac.h: Fixed wrong comment: FSSpec of
 	FT_GetFile_From_Mac_Name, FT_GetFile_From_Mac_ATS_Name are
 	for passing to FT_New_Face_From_FSSpec.
 
 2007-02-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
-	* builds/unix/configure.raw: Checks if Mac OS X system headers
+	* builds/unix/configure.raw: Check whether Mac OS X system headers
 	can be built under ANSI C mode.
-	* src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by ANSI C
-	compatible one, if system headers are ANSI C incompatible.
+
+	* src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by a version
+	compatible to ANSI C in case system headers are ANSI C incompatible.
 	* builds/mac/ftmac.c (OS_INLINE): Ditto.
 
 2007-02-01  Werner Lemberg  <wl@gnu.org>
diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c
index 3b89a23..5a7c0cd 100644
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -5,7 +5,7 @@
 /*    Mac FOND support.  Written by just@letterror.com.                    */
 /*  Heavily Fixed by mpsuzuki, George Williams and Sean McBride            */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -256,14 +256,13 @@
   FT_ATSFontGetFileReference( ATSFontRef  ats_font_id,
                               FSRef*      ats_font_ref )
   {
-    OSStatus    err;
-    FSSpec      spec;
+    OSStatus  err;
+    FSSpec    spec;
+
 
     err = ATSFontGetFileSpecification( ats_font_id, &spec );
     if ( noErr == err )
-    {
       err = FSpMakeFSRef( &spec, ats_font_ref );
-    }
 
     return err;
   }
@@ -305,7 +304,7 @@
         if ( noErr != FSCompareFSRefs( ats_font_ref, &ref2 ) )
           break;
 
-        id2 --;
+        id2--;
       }
       *face_index = ats_font_id - ( id2 + 1 );
     }
@@ -363,7 +362,7 @@
 
 #else
 
-  /* This function is deprecated because FSSpec is deprecated in Mac OS X  */
+  /* This function is deprecated because FSSpec is deprecated in Mac OS X. */
   FT_EXPORT_DEF( FT_Error )
   FT_GetFile_From_Mac_ATS_Name( const char*  fontName,
                                 FSSpec*      pathSpec,
@@ -372,6 +371,7 @@
     FSRef     ref;
     FT_Error  err;
 
+
     err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
     if ( FT_Err_Ok != err )
       return err;
@@ -579,7 +579,7 @@
 #else
 
     FSSpec  spec;
-    FInfo  finfo;
+    FInfo   finfo;
 
 
     if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
@@ -667,7 +667,6 @@
      to load a face OTHER than the first one in the FOND!
   */
 
-
   static void
   parse_fond( char*   fond_data,
               short*  have_sfnt,
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 254ae89..5bba402 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -183,6 +183,7 @@ if test x$with_old_mac_fonts = xyes; then
   FT2_EXTRA_LIBS="-Wl,-framework,CoreServices,-framework,ApplicationServices"
   LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
   AC_TRY_LINK([
+
 #if defined(__GNUC__) && defined(__APPLE_CC__)
 # include <Carbon/Carbon.h>
 # include <ApplicationServices/ApplicationServices.h>
@@ -190,6 +191,7 @@ if test x$with_old_mac_fonts = xyes; then
 # include <ConditionalMacros.h>
 # include <Files.h>
 #endif
+
     ],
     [
 
@@ -204,6 +206,7 @@ if test x$with_old_mac_fonts = xyes; then
      orig_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
      AC_TRY_COMPILE([
+
 #if defined(__GNUC__) && defined(__APPLE_CC__)
 # include <Carbon/Carbon.h>
 # include <ApplicationServices/ApplicationServices.h>
@@ -211,20 +214,24 @@ if test x$with_old_mac_fonts = xyes; then
 # include <ConditionalMacros.h>
 # include <Files.h>
 #endif
+
        ],
        [
-         /* OSHostByteOrder() is typed as 'OS_INLINE' */
-         int32_t os_byte_order = OSHostByteOrder();
+
+         /* OSHostByteOrder() is typed as `OS_INLINE' */
+         int32_t  os_byte_order = OSHostByteOrder();
+
+
          if ( OSBigEndian != os_byte_order )
            return 1;
+
        ],
-       [
-         AC_MSG_RESULT([ok])
-         CFLAGS="$orig_CFLAGS"
-         CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
-       ],[
-         AC_MSG_RESULT([no, ANSI incompatible])
-         CFLAGS="$orig_CFLAGS"
+       [AC_MSG_RESULT([ok])
+        CFLAGS="$orig_CFLAGS"
+        CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
+       ],
+       [AC_MSG_RESULT([no, ANSI incompatible])
+        CFLAGS="$orig_CFLAGS"
        ])
     ],
     [AC_MSG_RESULT([not found])
@@ -263,16 +270,16 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then
     ],
     [
 
-  FCBPBPtr          paramBlock;
-  short             vRefNum;
-  long              dirID;
-  ConstStr255Param  fileName;
-  FSSpec*           spec;
+      FCBPBPtr          paramBlock;
+      short             vRefNum;
+      long              dirID;
+      ConstStr255Param  fileName;
+      FSSpec*           spec;
 
 
-  /* FSSpec functions: deprecated sicne Mac OS X 10.4 */
-  PBGetFCBInfoSync( paramBlock );
-  FSMakeFSSpec( vRefNum, dirID, fileName, spec );
+      /* FSSpec functions: deprecated since Mac OS X 10.4 */
+      PBGetFCBInfoSync( paramBlock );
+      FSMakeFSSpec( vRefNum, dirID, fileName, spec );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -309,33 +316,33 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
     ],
     [
 
-  FCBPBPtr             paramBlock;
-  short                vRefNum;
-  long                 dirID;
-  ConstStr255Param     fileName;
-  FSSpec*              spec;
-
-  Boolean*             isDirectory;
-  UInt8*               path;
-  SInt16               desiredRefNum;
-  SInt16*              iterator;
-  SInt16*              actualRefNum;
-  HFSUniStr255*        outForkName;
-  FSVolumeRefNum       volume;
-  FSCatalogInfoBitmap  whichInfo;
-  FSCatalogInfo*       catalogInfo;
-  FSForkInfo*          forkInfo;
-  FSRef*               ref;
-
-
-  /* FSRef functions: no need to check? */
-  FSGetForkCBInfo( desiredRefNum, volume, iterator,
-                   actualRefNum, forkInfo, ref,
-                   outForkName );
-  FSpMakeFSRef ( spec, ref );
-  FSGetCatalogInfo( ref, whichInfo, catalogInfo,
-                    outForkName, spec, ref );
-  FSPathMakeRef( path, ref, isDirectory );
+      FCBPBPtr             paramBlock;
+      short                vRefNum;
+      long                 dirID;
+      ConstStr255Param     fileName;
+      FSSpec*              spec;
+
+      Boolean*             isDirectory;
+      UInt8*               path;
+      SInt16               desiredRefNum;
+      SInt16*              iterator;
+      SInt16*              actualRefNum;
+      HFSUniStr255*        outForkName;
+      FSVolumeRefNum       volume;
+      FSCatalogInfoBitmap  whichInfo;
+      FSCatalogInfo*       catalogInfo;
+      FSForkInfo*          forkInfo;
+      FSRef*               ref;
+
+
+      /* FSRef functions: no need to check? */
+      FSGetForkCBInfo( desiredRefNum, volume, iterator,
+                       actualRefNum, forkInfo, ref,
+                       outForkName );
+      FSpMakeFSRef ( spec, ref );
+      FSGetCatalogInfo( ref, whichInfo, catalogInfo,
+                        outForkName, spec, ref );
+      FSPathMakeRef( path, ref, isDirectory );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -345,7 +352,8 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
 fi
 
 
-# Whether to use QuickDraw API in ToolBox which is deprecated since Mac OS X 10.4.
+# Whether to use QuickDraw API in ToolBox which is deprecated since
+# Mac OS X 10.4.
 
 AC_ARG_WITH([quickdraw-toolbox],
   AS_HELP_STRING([--with-quickdraw-toolbox],
@@ -367,15 +375,15 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
     ],
     [
 
-  Str255     familyName;
-  SInt16     familyID   = 0;
-  FMInput*   fmIn       = NULL;
-  FMOutput*  fmOut      = NULL;
+      Str255     familyName;
+      SInt16     familyID   = 0;
+      FMInput*   fmIn       = NULL;
+      FMOutput*  fmOut      = NULL;
 
 
-  GetFontName( familyID, familyName );
-  GetFNum( familyName, &familyID );
-  fmOut = FMSwapFont( fmIn );
+      GetFontName( familyID, familyName );
+      GetFNum( familyName, &familyID );
+      fmOut = FMSwapFont( fmIn );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -385,7 +393,8 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
 fi
 
 
-# Whether to use QuickDraw API in Carbon which is deprecated since Mac OS X 10.4.
+# Whether to use QuickDraw API in Carbon which is deprecated since
+# Mac OS X 10.4.
 
 AC_ARG_WITH([quickdraw-carbon],
   AS_HELP_STRING([--with-quickdraw-carbon],
@@ -407,24 +416,25 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then
     ],
     [
 
-  FMFontFamilyIterator          famIter;
-  FMFontFamily                  family;
-  Str255                        famNameStr;
-  FMFontFamilyInstanceIterator  instIter;
-  FMFontStyle                   style;
-  FMFontSize                    size;
-  FMFont                        font;
-  FSSpec*                       pathSpec;
-
-
-  FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption, &famIter );
-  FMGetNextFontFamily( &famIter, &family );
-  FMGetFontFamilyName( family, famNameStr );
-  FMCreateFontFamilyInstanceIterator( family, &instIter );
-  FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
-  FMDisposeFontFamilyInstanceIterator( &instIter );
-  FMDisposeFontFamilyIterator( &famIter );
-  FMGetFontContainer( font, pathSpec );
+      FMFontFamilyIterator          famIter;
+      FMFontFamily                  family;
+      Str255                        famNameStr;
+      FMFontFamilyInstanceIterator  instIter;
+      FMFontStyle                   style;
+      FMFontSize                    size;
+      FMFont                        font;
+      FSSpec*                       pathSpec;
+
+
+      FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption,
+                                  &famIter );
+      FMGetNextFontFamily( &famIter, &family );
+      FMGetFontFamilyName( family, famNameStr );
+      FMCreateFontFamilyInstanceIterator( family, &instIter );
+      FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
+      FMDisposeFontFamilyInstanceIterator( &instIter );
+      FMDisposeFontFamilyIterator( &famIter );
+      FMGetFontContainer( font, pathSpec );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -451,11 +461,11 @@ elif test x$with_old_mac_fonts = xyes -a x$with_ats != x ; then
     ],
     [
 
-  FSSpec*  pathSpec;
+      FSSpec*  pathSpec;
 
 
-  ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
-  ATSFontGetFileSpecification( 0, pathSpec );
+      ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
+      ATSFontGetFileSpecification( 0, pathSpec );
 
     ],
     [AC_MSG_RESULT([ok])
@@ -503,7 +513,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
    rm ftconfig.tmp])
 
 # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
-# and 'builds/unix/unix-cc.mk' that will be used by the build system
+# and `builds/unix/unix-cc.mk' that will be used by the build system
 #
 AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
                  unix-def.mk:unix-def.in
@@ -516,4 +526,4 @@ AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
 
 AC_OUTPUT
 
-# end of configure.ac
+# end of configure.raw
diff --git a/include/freetype/ftmac.h b/include/freetype/ftmac.h
index fc4f6bc..3c6fafe 100644
--- a/include/freetype/ftmac.h
+++ b/include/freetype/ftmac.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Additional Mac-specific API.                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2004, 2006 by                                     */
+/*  Copyright 1996-2001, 2004, 2006, 2007 by                               */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -35,10 +35,11 @@
 FT_BEGIN_HEADER
 
 
-/* gcc-3.4.1 and later can warn the functions attributed as deprecated */
+/* gcc-3.4.1 and later can warn about functions tagged as deprecated */
 #ifndef FT_DEPRECATED_ATTRIBUTE
-#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
-#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
+#if defined(__GNUC__)                                               && \
+    ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+#define FT_DEPRECATED_ATTRIBUTE  __attribute__((deprecated))
 #else
 #define FT_DEPRECATED_ATTRIBUTE
 #endif
@@ -115,10 +116,10 @@ FT_BEGIN_HEADER
   /*                  Bold).                                               */
   /*                                                                       */
   /* <Output>                                                              */
-  /*    pathSpec   :: FSSpec to the file. For passing to                   */
+  /*    pathSpec   :: FSSpec to the file.  For passing to                  */
   /*                  @FT_New_Face_From_FSSpec.                            */
   /*                                                                       */
-  /*    face_index :: Index of the face. For passing to                    */
+  /*    face_index :: Index of the face.  For passing to                   */
   /*                  @FT_New_Face_From_FSSpec.                            */
   /*                                                                       */
   /* <Return>                                                              */
@@ -172,8 +173,8 @@ FT_BEGIN_HEADER
   /*    fontName    :: Mac OS name of the font in ATS framework.           */
   /*                                                                       */
   /* <Output>                                                              */
-  /*    path        :: Buffer to store pathname of the file. For passing   */
-  /*                   to @FT_New_Face. The client must allocate this      */
+  /*    path        :: Buffer to store pathname of the file.  For passing  */
+  /*                   to @FT_New_Face.  The client must allocate this     */
   /*                   buffer before calling this function.                */
   /*                                                                       */
   /*    maxPathSize :: Lengths of the buffer `path' that client allocated. */
diff --git a/src/base/ftbase.c b/src/base/ftbase.c
index 114400e..d176b81 100644
--- a/src/base/ftbase.c
+++ b/src/base/ftbase.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Single object library component (body only).                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2006 by                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 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/ftmac.c b/src/base/ftmac.c
index 82e05d4..1347d7d 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -8,7 +8,7 @@
 /*  This file is for Mac OS X only; see builds/mac/ftoldmac.c for          */
 /*  classic platforms built by MPW.                                        */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -74,7 +74,7 @@
   /* -ansi compilation flag of GCC.                         */
 #if !HAVE_ANSI_OS_INLINE
 #undef  OS_INLINE
-#define OS_INLINE   static __inline__
+#define OS_INLINE  static __inline__
 #endif
 #include <Carbon/Carbon.h>
 
@@ -118,14 +118,13 @@
   FT_ATSFontGetFileReference( ATSFontRef  ats_font_id,
                               FSRef*      ats_font_ref )
   {
-    OSStatus    err;
-    FSSpec      spec;
+    OSStatus  err;
+    FSSpec    spec;
+
 
     err = ATSFontGetFileSpecification( ats_font_id, &spec );
     if ( noErr == err )
-    {
       err = FSpMakeFSRef( &spec, ats_font_ref );
-    }
 
     return err;
   }
@@ -204,11 +203,15 @@
                                 FT_Long*     face_index )
   {
 #if __LP64__
+
     return FT_Err_Unimplemented_Feature;
+
 #else
+
     FSRef     ref;
     FT_Error  err;
 
+
     err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
     if ( FT_Err_Ok != err )
       return err;
@@ -218,6 +221,7 @@
       return FT_Err_Unknown_File_Format;
 
     return FT_Err_Ok;
+
 #endif
   }