* src/pfr/pfrcmap.c: Include pfrerror.h. * src/autofit/afindic.c: Add some external declarations to pacify `make multi' compilation. * src/cid/cidgload.c (cid_load_glyph): Pacify compiler. * src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c (cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP), src/autofit/aflatin.c (af_latin_hints_compute_edges), src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c (tt_face_get_metrics), src/base/ftobjs.c (open_face) [FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler. * docs/release: Mention test compilation targets.
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
diff --git a/ChangeLog b/ChangeLog
index c5b80ce..8fc5ba7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2007-07-06 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrcmap.c: Include pfrerror.h.
+
+ * src/autofit/afindic.c: Add some external declarations to pacify
+ `make multi' compilation.
+
+ * src/cid/cidgload.c (cid_load_glyph): Pacify compiler.
+
+ * src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c
+ (cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP),
+ src/autofit/aflatin.c (af_latin_hints_compute_edges),
+ src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c
+ (tt_face_get_metrics), src/base/ftobjs.c (open_face)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler.
+
+ * docs/release: Mention test compilation targets.
+
2007-07-04 Werner Lemberg <wl@gnu.org>
* docs/PROBLEMS: Mention that some PS based fonts can't be
diff --git a/docs/release b/docs/release
index 36bcb47..d68da88 100644
--- a/docs/release
+++ b/docs/release
@@ -18,6 +18,21 @@ How to prepare a new release
. ChangeLog: Announce new release (both in freetype2 and ft2demos
modules).
+. Copy the CVS archive to another directory and run
+
+ make distclean; make devel; make
+ make distclean; make devel; make multi
+ make distclean; make devel CC=g++; make CC=g++
+ make distclean; make devel CC=g++; make multi CC=g++
+
+ sh autogen.sh
+ make distclean; ./configure; make
+ make distclean; ./configure CC=g++; make
+
+ to test compilation with both gcc and g++.
+
+. Test C++ compilation for ft2demos too.
+
. Tag the CVS (freetype2, ft2demos).
TODO: Tag the home page CVS on savannah.nongnu.org.
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index c6ddc42..2010ca9 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -333,8 +333,8 @@ FT_BEGIN_HEADER
FT_ULong size,
FT_Error *p_error );
-#define FT_MEM_STRDUP( dst, str ) \
- (dst) = ft_mem_strdup( memory, (const char*)(str), &error )
+#define FT_MEM_STRDUP( dst, str ) \
+ (dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error )
#define FT_STRDUP( dst, str ) \
FT_MEM_SET_ERROR( FT_MEM_STRDUP( dst, str ) )
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index c7ca266..7e9438b 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -45,7 +45,7 @@
/*************************************************************************/
/*************************************************************************/
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
af_cjk_metrics_init( AF_LatinMetrics metrics,
FT_Face face )
{
@@ -91,7 +91,7 @@
}
- static void
+ FT_LOCAL_DEF( void )
af_cjk_metrics_scale( AF_LatinMetrics metrics,
AF_Scaler scaler )
{
@@ -427,7 +427,9 @@
/* insert a new edge in the list and */
/* sort according to the position */
- error = af_axis_hints_new_edge( axis, seg->pos, seg->dir, memory, &edge );
+ error = af_axis_hints_new_edge( axis, seg->pos,
+ (AF_Direction)seg->dir,
+ memory, &edge );
if ( error )
goto Exit;
@@ -596,7 +598,7 @@
}
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
af_cjk_hints_init( AF_GlyphHints hints,
AF_LatinMetrics metrics )
{
@@ -1350,7 +1352,7 @@
}
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
af_cjk_hints_apply( AF_GlyphHints hints,
FT_Outline* outline,
AF_LatinMetrics metrics )
diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h
index 0de4a5a..9f77fda 100644
--- a/src/autofit/afcjk.h
+++ b/src/autofit/afcjk.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for CJK script (specification). */
/* */
-/* 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, */
@@ -31,6 +31,23 @@ FT_BEGIN_HEADER
af_cjk_script_class;
+ FT_LOCAL( FT_Error )
+ af_cjk_metrics_init( AF_LatinMetrics metrics,
+ FT_Face face );
+
+ FT_LOCAL( void )
+ af_cjk_metrics_scale( AF_LatinMetrics metrics,
+ AF_Scaler scaler );
+
+ FT_LOCAL( FT_Error )
+ af_cjk_hints_init( AF_GlyphHints hints,
+ AF_LatinMetrics metrics );
+
+ FT_LOCAL( FT_Error )
+ af_cjk_hints_apply( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_LatinMetrics metrics );
+
/* */
FT_END_HEADER
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 52e952d..b70da06 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1004,12 +1004,14 @@
if ( !found )
{
- AF_Edge edge;
+ AF_Edge edge;
/* insert a new edge in the list and */
/* sort according to the position */
- error = af_axis_hints_new_edge( axis, seg->pos, seg->dir, memory, &edge );
+ error = af_axis_hints_new_edge( axis, seg->pos,
+ (AF_Direction)seg->dir,
+ memory, &edge );
if ( error )
goto Exit;
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index fa08094..1bcccf7 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1013,7 +1013,8 @@
for ( i = 0; i < num_params && !face->internal->incremental_interface;
i++ )
if ( params[i].tag == FT_PARAM_TAG_INCREMENTAL )
- face->internal->incremental_interface = params[i].data;
+ face->internal->incremental_interface =
+ (FT_Incremental_Interface)params[i].data;
}
#endif
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 952e88e..ff2edb3 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -306,9 +306,10 @@
if ( cff && cff->font_info == NULL )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
- PS_FontInfoRec *font_info;
- FT_Memory memory = face->root.memory;
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
+ PS_FontInfoRec *font_info;
+ FT_Memory memory = face->root.memory;
+ FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) )
@@ -316,19 +317,19 @@
font_info->version = cff_index_get_sid_string( &cff->string_index,
dict->version,
- cff->psnames );
+ psnames );
font_info->notice = cff_index_get_sid_string( &cff->string_index,
dict->notice,
- cff->psnames );
+ psnames );
font_info->full_name = cff_index_get_sid_string( &cff->string_index,
dict->full_name,
- cff->psnames );
+ psnames );
font_info->family_name = cff_index_get_sid_string( &cff->string_index,
dict->family_name,
- cff->psnames );
+ psnames );
font_info->weight = cff_index_get_sid_string( &cff->string_index,
dict->weight,
- cff->psnames );
+ psnames );
font_info->italic_angle = dict->italic_angle;
font_info->is_fixed_pitch = dict->is_fixed_pitch;
font_info->underline_position = (FT_Short)dict->underline_position;
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index c02cf33..544deea 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -288,7 +288,9 @@
FT_String* result;
- result = ft_mem_strdup( memory, source, &error );
+ (void)FT_STRDUP( result, source );
+
+ FT_UNUSED( error );
return result;
}
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 8bec6e1..64994b4 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -74,7 +74,7 @@
if ( glyph_data.length != 0 )
{
glyph_length = glyph_data.length - cid->fd_bytes;
- FT_ALLOC( charstring, glyph_length );
+ (void)FT_ALLOC( charstring, glyph_length );
if ( !error )
ft_memcpy( charstring, glyph_data.pointer + cid->fd_bytes,
glyph_length );
diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c
index c8faee0..fe9eb69 100644
--- a/src/pfr/pfrcmap.c
+++ b/src/pfr/pfrcmap.c
@@ -20,6 +20,8 @@
#include "pfrobjs.h"
#include FT_INTERNAL_DEBUG_H
+#include "pfrerror.h"
+
FT_CALLBACK_DEF( FT_Error )
pfr_cmap_init( PFR_CMap cmap )
diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c
index 286bd0c..55f681a 100644
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -431,7 +431,8 @@
{
void* v = &face->vertical;
void* h = &face->horizontal;
- TT_HoriHeader* header = vertical ? (TT_HoriHeader*)v : h;
+ TT_HoriHeader* header = vertical ? (TT_HoriHeader*)v
+ : (TT_HoriHeader*)h;
TT_LongMetrics longs_m;
FT_UShort k = header->number_Of_HMetrics;