* src/pfr/pfrerror.h: New file. * include/freetype/ftmoderr.h: Add PFR error codes. * src/pfr/pfrgload.c: Include pfrerror.h. Use PCF error codes. (pfr_extra_item_load_stem_snaps): Fix debug message. * src/pfr/pfrgload.c: Include pfrerror.h. Use PCF error codes. (pfr_extra_item_load_bitmap_info, pfr_glyph_load_simple, pfr_glyph_load_compound): Fix debug message. * src/pfr/pfrobjs.c: Include pfrerror.h. Use PCF error codes. (pfr_face_init): Return PFR_Err_Unknown_File_Format. * src/pfr/rules.mk (PFR_DRV_H): Include pfrerror.h.
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
diff --git a/ChangeLog b/ChangeLog
index a161679..e843f21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2002-04-28 Werner Lemberg <wl@gnu.org>
+ * src/pfr/pfrerror.h: New file.
+ * include/freetype/ftmoderr.h: Add PFR error codes.
+ * src/pfr/pfrgload.c: Include pfrerror.h.
+ Use PCF error codes.
+ (pfr_extra_item_load_stem_snaps): Fix debug message.
+ * src/pfr/pfrgload.c: Include pfrerror.h.
+ Use PCF error codes.
+ (pfr_extra_item_load_bitmap_info, pfr_glyph_load_simple,
+ pfr_glyph_load_compound): Fix debug message.
+ * src/pfr/pfrobjs.c: Include pfrerror.h.
+ Use PCF error codes.
+ (pfr_face_init): Return PFR_Err_Unknown_File_Format.
+ * src/pfr/rules.mk (PFR_DRV_H): Include pfrerror.h.
+
+2002-04-27 Werner Lemberg <wl@gnu.org>
+
* src/cache/ftccache.c (ftc_cache_lookup),
src/cache/ftccmap.c (ftc_cmap_family_init),
src/cache/ftcmanag.c (ftc_family_table_alloc),
diff --git a/include/freetype/ftmoderr.h b/include/freetype/ftmoderr.h
index 94659a3..59e15c1 100644
--- a/include/freetype/ftmoderr.h
+++ b/include/freetype/ftmoderr.h
@@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -116,6 +116,7 @@
FT_MODERRDEF( TrueType, 0xB00, "TrueType module" )
FT_MODERRDEF( Type1, 0xC00, "Type 1 module" )
FT_MODERRDEF( Winfonts, 0xD00, "Windows FON/FNT module" )
+ FT_MODERRDEF( PFR, 0xE00, "PFR module" )
#ifdef FT_MODERR_END_LIST
diff --git a/src/pfr/pfrerror.h b/src/pfr/pfrerror.h
new file mode 100644
index 0000000..2e1c401
--- /dev/null
+++ b/src/pfr/pfrerror.h
@@ -0,0 +1,40 @@
+/***************************************************************************/
+/* */
+/* pfrerror.h */
+/* */
+/* PFR error codes (specification only). */
+/* */
+/* Copyright 2002 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. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This file is used to define the PFR error enumeration constants. */
+ /* */
+ /*************************************************************************/
+
+#ifndef __PFRERROR_H__
+#define __PFRERROR_H__
+
+#include FT_MODULE_ERRORS_H
+
+#undef __FTERRORS_H__
+
+#define FT_ERR_PREFIX PFR_Err_
+#define FT_ERR_BASE FT_Mod_Err_PFR
+
+#include FT_ERRORS_H
+
+#endif /* __PFRERROR_H__ */
+
+
+/* END */
diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index 70ea7a7..a0c55d8 100644
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -20,6 +20,8 @@
#include "pfrload.h" /* for macro definitions */
#include FT_INTERNAL_DEBUG_H
+#include "pfrerror.h"
+
#undef FT_COMPONENT
#define FT_COMPONENT trace_pfr
@@ -517,8 +519,8 @@
return error;
Too_Short:
- error = FT_Err_Invalid_Table;
- FT_ERROR(( "pfr_glyph_load: invalid glyph data\n" ));
+ error = PFR_Err_Invalid_Table;
+ FT_ERROR(( "pfr_glyph_load_simple: invalid glyph data\n" ));
goto Exit;
}
@@ -667,8 +669,8 @@
return error;
Too_Short:
- error = FT_Err_Invalid_Table;
- FT_ERROR(( "pfr_glyph_load: invalid glyph data\n" ));
+ error = PFR_Err_Invalid_Table;
+ FT_ERROR(( "pfr_glyph_load_compound: invalid glyph data\n" ));
goto Exit;
}
diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c
index 410bbfa..c4d1503 100644
--- a/src/pfr/pfrload.c
+++ b/src/pfr/pfrload.c
@@ -20,6 +20,8 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
+#include "pfrerror.h"
+
#undef FT_COMPONENT
#define FT_COMPONENT trace_pfr
@@ -89,7 +91,7 @@
Too_Short:
FT_ERROR(( "pfr_extra_items_parse: invalid extra items table\n" ));
- error = FT_Err_Invalid_Table;
+ error = PFR_Err_Invalid_Table;
goto Exit;
}
@@ -234,7 +236,7 @@
goto Exit;
if ( index >= num_log_fonts )
- return FT_Err_Invalid_Argument;
+ return PFR_Err_Invalid_Argument;
if ( FT_STREAM_SKIP( index * 5 ) ||
FT_READ_USHORT( size ) ||
@@ -327,7 +329,7 @@
Too_Short:
FT_ERROR(( "pfr_log_font_load: invalid logical font table\n" ));
- error = FT_Err_Invalid_Table;
+ error = PFR_Err_Invalid_Table;
goto Fail;
}
@@ -424,8 +426,8 @@
return error;
Too_Short:
- error = FT_Err_Invalid_Table;
- FT_ERROR(( "pfr.extra_item_load: invalid bitmap info table\n" ));
+ error = PFR_Err_Invalid_Table;
+ FT_ERROR(( "pfr_extra_item_load_bitmap_info: invalid bitmap info table\n" ));
goto Exit;
}
@@ -493,8 +495,8 @@
return error;
Too_Short:
- error = FT_Err_Invalid_Table;
- FT_ERROR(( "pfr.exta_item_load: invalid stem snaps table\n" ));
+ error = PFR_Err_Invalid_Table;
+ FT_ERROR(( "pfr_exta_item_load_stem_snaps: invalid stem snaps table\n" ));
goto Exit;
}
@@ -678,7 +680,7 @@
return error;
Too_Short:
- error = FT_Err_Invalid_Table;
+ error = PFR_Err_Invalid_Table;
FT_ERROR(( "pfr_phy_font_load: invalid physical font table\n" ));
goto Fail;
}
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index c5eb8d4..8b1bf5e 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -23,6 +23,8 @@
#include FT_OUTLINE_H
#include FT_INTERNAL_DEBUG_H
+#include "pfrerror.h"
+
#undef FT_COMPONENT
#define FT_COMPONENT trace_pfr
@@ -61,7 +63,7 @@
if ( !pfr_header_check( &face->header ) )
{
FT_TRACE4(( "pfr_face_init: not a valid PFR font\n" ));
- error = FT_Err_Invalid_Argument;
+ error = PFR_Err_Unknown_File_Format;
goto Exit;
}
@@ -85,7 +87,7 @@
if ( face_index >= face->root.num_faces )
{
FT_ERROR(( "pfr_face_init: invalid face index\n" ));
- error = FT_Err_Invalid_Argument;
+ error = PFR_Err_Invalid_Argument;
goto Exit;
}
diff --git a/src/pfr/rules.mk b/src/pfr/rules.mk
index f79072f..fe2f6eb 100644
--- a/src/pfr/rules.mk
+++ b/src/pfr/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2002 by
+# Copyright 2002 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,7 +13,7 @@
# fully.
-# Pfr driver directory
+# pfr driver directory
#
PFR_DIR := $(SRC_)pfr
PFR_DIR_ := $(PFR_DIR)$(SEP)
@@ -24,7 +24,7 @@ PFR_DIR_ := $(PFR_DIR)$(SEP)
PFR_COMPILE := $(FT_COMPILE) $I$(PFR_DIR)
-# Pfr driver sources (i.e., C files)
+# pfr driver sources (i.e., C files)
#
PFR_DRV_SRC := $(PFR_DIR_)pfrload.c \
$(PFR_DIR_)pfrgload.c \
@@ -32,9 +32,10 @@ PFR_DRV_SRC := $(PFR_DIR_)pfrload.c \
$(PFR_DIR_)pfrdrivr.c \
$(PFR_DIR_)pfrobjs.c
-# Pfr driver headers
+# pfr driver headers
#
-PFR_DRV_H := $(PFR_DRV_SRC:%.c=%.h)
+PFR_DRV_H := $(PFR_DRV_SRC:%.c=%.h) \
+ $(PFR_DIR_)pfrerror.h
# Pfr driver object(s)
@@ -45,18 +46,18 @@ PFR_DRV_H := $(PFR_DRV_SRC:%.c=%.h)
PFR_DRV_OBJ_M := $(PFR_DRV_SRC:$(PFR_DIR_)%.c=$(OBJ_)%.$O)
PFR_DRV_OBJ_S := $(OBJ_)pfr.$O
-# Pfr driver source file for single build
+# pfr driver source file for single build
#
PFR_DRV_SRC_S := $(PFR_DIR_)pfr.c
-# Pfr driver - single object
+# pfr driver - single object
#
$(PFR_DRV_OBJ_S): $(PFR_DRV_SRC_S) $(PFR_DRV_SRC) $(FREETYPE_H) $(PFR_DRV_H)
$(PFR_COMPILE) $T$@ $(PFR_DRV_SRC_S)
-# Pfr driver - multiple objects
+# pfr driver - multiple objects
#
$(OBJ_)%.$O: $(PFR_DIR_)%.c $(FREETYPE_H) $(PFR_DRV_H)
$(PFR_COMPILE) $T$@ $<
diff --git a/src/sfnt/ttcmap0.c b/src/sfnt/ttcmap0.c
index 0429f80..cb29229 100644
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -652,7 +652,7 @@
/* check that segments are sorted in increasing order and do not */
/* overlap; check also the offsets */
{
- FT_UInt start, end, last = 0,offset, n;
+ FT_UInt start, end, last = 0, offset, n;
FT_Int delta;