* fix compiler warnings of src/base/ftmac.c, drop unnecessary part for Mac OS X.
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
diff --git a/ChangeLog b/ChangeLog
index 14e391b..357b11f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,25 @@
-2006-06-18 Werner Lemberg <wl@gnu.org>
+2007-07-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Apply patches proposed by Sean McBride.
+ (FT_GetFile_From_Mac_Name): Insert FT_UNUSED macros to fix
+ the compiler warnings against unused arguments.
+ (FT_ATSFontGetFileReference): Ditto.
+ (FT_GetFile_From_Mac_ATS_Name): Ditto.
+ (FT_New_Face_From_FSSpec): Ditto.
+ (lookup_lwfn_by_fond): Fix wrong comment.
+ Replace `const StringPtr' by more appropriate type
+ `ConstStr255Param'.
+ FSRefMakePathPath always returns UTF8 POSIX pathname in
+ Mach-O, thus HFS pathname support is dropped.
+ (count_faces): Remove HLock and HUnlock which is not
+ required on Mac OS X anymore.
+ (FT_New_Face_From_SFNT): Ditto.
+ (FT_New_Face_From_FOND): Ditto.
+ * builds/mac/ftmac.c: Synchronize to src/base/ftmac.c,
+ except of HFS pathname support and HLock/HUnlock.
+ They are required on classic CFM environment.
+
+2007-06-18 Werner Lemberg <wl@gnu.org>
* src/psaux/psobjs.c (ps_parser_skip_PS_token): Remove incorrect
assertion.
@@ -10,7 +31,7 @@
Handle zero string_size == 0 and string_buf == 0.
(t42_parse_encoding): Handle one more error.
-2006-06-18 Werner Lemberg <wl@gnu.org>
+2007-06-18 Werner Lemberg <wl@gnu.org>
* src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit
logic.
@@ -22,7 +43,7 @@
* src/cff/cffgload.c (cff_decoder_prepare): Fix change from
2007-06-06.
-2006-06-17 Werner Lemberg <wl@gnu.org>
+2007-06-17 Werner Lemberg <wl@gnu.org>
* src/tools/ftrandom.c (font_size): New global variable.
(TestFace): Use it.
@@ -33,7 +54,7 @@
invalid font.
(FNT_Load_Glyph): Protect against invalid bitmap width.
-2006-06-16 David Turner <david@freetype.org>
+2007-06-16 David Turner <david@freetype.org>
* src/smooth/ftgrays.c (gray_find_cell, gray_set_cell, gray_hline):
Prevent integer overflows when rendering very large outlines.
@@ -48,7 +69,7 @@
(_iup_worker_interpolate): Check argument ranges.
(Ins_IUP): Ignore empty outlines.
-2006-06-16 Dmitry Timoshkov <dmitry@codeweavers.com>
+2007-06-16 Dmitry Timoshkov <dmitry@codeweavers.com>
* src/winfonts/winfnt.h: Add necessary structures for PE resource
parsing.
@@ -62,17 +83,17 @@
* src/winfonts/winfnt.c (fnt_face_get_dll_font): Add support for
loading bitmap .fon files in PE format.
-2006-06-15 Dmitry Timoshkov <dmitry@codeweavers.com>
+2007-06-15 Dmitry Timoshkov <dmitry@codeweavers.com>
* builds/win32/ftdebug.c: Unify debug level handling with other
platforms.
-2006-06-14 Dmitry Timoshkov <dmitry@codeweavers.com>
+2007-06-14 Dmitry Timoshkov <dmitry@codeweavers.com>
* builds/win32/ftdebug.c (FT_Message): Send debug output to the
console as well as to the debugger.
-2006-06-14 Werner Lemberg <wl@gnu.org>
+2007-06-14 Werner Lemberg <wl@gnu.org>
* src/autofit/aflatin.c (af_latin_uniranges): Expand structure to
cover all ranges which could possibly be handled by the aflatin
diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c
index 45365dc..445ff9a 100644
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -153,6 +153,10 @@
FSSpec* pathSpec,
FT_Long* face_index )
{
+ FT_UNUSED( fontName );
+ FT_UNUSED( pathSpec );
+ FT_UNUSED( face_index );
+
return FT_Err_Unimplemented_Feature;
}
@@ -323,6 +327,11 @@
UInt32 maxPathSize,
FT_Long* face_index )
{
+ FT_UNUSED( fontName );
+ FT_UNUSED( path );
+ FT_UNUSED( maxPathSize );
+ FT_UNUSED( face_index );
+
return FT_Err_Unimplemented_Feature;
}
@@ -358,6 +367,10 @@
FSSpec* pathSpec,
FT_Long* face_index )
{
+ FT_UNUSED( fontName );
+ FT_UNUSED( pathSpec );
+ FT_UNUSED( face_index );
+
return FT_Err_Unimplemented_Feature;
}
@@ -778,10 +791,10 @@
static FT_Error
- lookup_lwfn_by_fond( const UInt8* path_fond,
- const StringPtr base_lwfn,
- UInt8* path_lwfn,
- int path_size )
+ lookup_lwfn_by_fond( const UInt8* path_fond,
+ ConstStr255Param base_lwfn,
+ UInt8* path_lwfn,
+ int path_size )
{
#if HAVE_FSREF
@@ -806,7 +819,7 @@
if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
return FT_Err_Invalid_Argument;
- /* now we have absolute dirname in lookup_path */
+ /* now we have absolute dirname in path_lwfn */
if ( path_lwfn[0] == '/' )
ft_strcat( (char *)path_lwfn, "/" );
else
@@ -1450,6 +1463,11 @@
#if !HAVE_FSREF
+ FT_UNUSED( library );
+ FT_UNUSED( ref );
+ FT_UNUSED( face_index );
+ FT_UNUSED( aface );
+
return FT_Err_Unimplemented_Feature;
#else
@@ -1533,6 +1551,11 @@
#else
+ FT_UNUSED( library );
+ FT_UNUSED( spec );
+ FT_UNUSED( face_index );
+ FT_UNUSED( aface );
+
return FT_Err_Unimplemented_Feature;
#endif /* HAVE_FSREF, HAVE_FSSPEC */
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index d696586..fd6201a 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -105,6 +105,10 @@
FSSpec* pathSpec,
FT_Long* face_index )
{
+ FT_UNUSED( fontName );
+ FT_UNUSED( pathSpec );
+ FT_UNUSED( face_index );
+
return FT_Err_Unimplemented_Feature;
}
@@ -118,6 +122,12 @@
FT_ATSFontGetFileReference( ATSFontRef ats_font_id,
FSRef* ats_font_ref )
{
+#if __LP64__
+ FT_UNUSED( ats_font_id );
+ FT_UNUSED( ats_font_ref );
+
+ return fnfErr;
+#else
OSStatus err;
FSSpec spec;
@@ -127,6 +137,7 @@
err = FSpMakeFSRef( &spec, ats_font_ref );
return err;
+#endif
}
@@ -204,11 +215,12 @@
FT_Long* face_index )
{
#if __LP64__
+ FT_UNUSED( fontName );
+ FT_UNUSED( pathSpec );
+ FT_UNUSED( face_index );
return FT_Err_Unimplemented_Feature;
-
#else
-
FSRef ref;
FT_Error err;
@@ -222,7 +234,6 @@
return FT_Err_Unknown_File_Format;
return FT_Err_Ok;
-
#endif
}
@@ -447,10 +458,10 @@
static FT_Error
- lookup_lwfn_by_fond( const UInt8* path_fond,
- const StringPtr base_lwfn,
- UInt8* path_lwfn,
- int path_size )
+ lookup_lwfn_by_fond( const UInt8* path_fond,
+ ConstStr255Param base_lwfn,
+ UInt8* path_lwfn,
+ size_t path_size )
{
FSRef ref, par_ref;
int dirname_len;
@@ -472,12 +483,8 @@
if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
return FT_Err_Invalid_Argument;
- /* now we have absolute dirname in lookup_path */
- if ( path_lwfn[0] == '/' )
- ft_strcat( (char *)path_lwfn, "/" );
- else
- ft_strcat( (char *)path_lwfn, ":" );
-
+ /* now we have absolute dirname in path_lwfn */
+ ft_strcat( (char *)path_lwfn, "/" );
dirname_len = ft_strlen( (char *)path_lwfn );
ft_strcat( (char *)path_lwfn, (char *)base_lwfn + 1 );
path_lwfn[dirname_len + base_lwfn[0]] = '\0';
@@ -507,7 +514,6 @@
have_sfnt = have_lwfn = 0;
- HLock( fond );
parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, 0 );
if ( lwfn_file_name[0] )
@@ -523,7 +529,6 @@
else
num_faces = count_faces_scalable( *fond );
- HUnlock( fond );
return num_faces;
}
@@ -810,9 +815,7 @@
return error;
}
- HLock( sfnt );
ft_memcpy( sfnt_data, *sfnt, sfnt_size );
- HUnlock( sfnt );
ReleaseResource( sfnt );
is_cff = sfnt_size > 4 && sfnt_data[0] == 'O' &&
@@ -894,9 +897,7 @@
if ( ResError() != noErr || fond_type != 'FOND' )
return FT_Err_Invalid_File_Format;
- HLock( fond );
parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index );
- HUnlock( fond );
if ( lwfn_file_name[0] )
{
@@ -1073,6 +1074,14 @@
FT_Long face_index,
FT_Face* aface )
{
+#if __LP64__
+ FT_UNUSED( library );
+ FT_UNUSED( spec );
+ FT_UNUSED( face_index );
+ FT_UNUSED( aface );
+
+ return FT_Err_Unimplemented_Feature;
+#else
FSRef ref;
@@ -1080,6 +1089,7 @@
return FT_Err_Invalid_Argument;
else
return FT_New_Face_From_FSRef( library, &ref, face_index, aface );
+#endif
}