summaryrefslogtreecommitdiff
path: root/src/type1
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2001-06-06 17:30:41 +0000
committerWerner Lemberg <wl@gnu.org>2001-06-06 17:30:41 +0000
commit1f7f0e87e58168b2e739e2622db0ee06e0c9accc (patch)
treec07f14bd53312ecc405c2499a44a170a3a16971b /src/type1
parentb3d9f882d0a0fce056d238a507267327301ee456 (diff)
downloadfreetype2-1f7f0e87e58168b2e739e2622db0ee06e0c9accc.tar.gz
Complete redesign of error codes. Please check ftmoderr.h for more
details. * include/freetype/internal/cfferrs.h, include/freetype/internal/tterrors.h, include/freetype/internal/t1errors.h: Removed. Replaced with files local to the module. All extra error codes have been moved to `fterrors.h'. * src/sfnt/ttpost.h: Move error codes to `fterrors.h'. * src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h, src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h, src/smooth/ftsmerrs.h, src/truetype/tterrors.h, src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the error names for the module it belongs to. * include/freetype/ftmoderr.h: New file, defining the module error offsets. Its structure is similar to `fterrors.h'. * include/freetype/fterrors.h (FT_NOERRORDEF): New macro. (FT_ERRORDEF): Redefined to use module error offsets. All internal error codes are now public; unused error codes have been removed, some are new. * include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New macro. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro. All other source files have been updated to use the new error codes; some already existing (internal) error codes local to a module have been renamed to give them the same name as in the base module. All make files have been updated to include the local error files. * src/cid/cidtokens.h: Replaced with... * src/cid/cidtoken.h: This file for 8+3 consistency. * src/raster/ftraster.c: Use macros for header file names.
Diffstat (limited to 'src/type1')
-rw-r--r--src/type1/rules.mk3
-rw-r--r--src/type1/t1driver.c2
-rw-r--r--src/type1/t1errors.h43
-rw-r--r--src/type1/t1gload.c2
-rw-r--r--src/type1/t1load.c3
-rw-r--r--src/type1/t1objs.c2
-rw-r--r--src/type1/t1objs.h1
-rw-r--r--src/type1/t1parse.c4
8 files changed, 56 insertions, 4 deletions
diff --git a/src/type1/rules.mk b/src/type1/rules.mk
index aff446f9a..5f4ce9f21 100644
--- a/src/type1/rules.mk
+++ b/src/type1/rules.mk
@@ -36,7 +36,8 @@ T1_DRV_SRC := $(T1_DIR_)t1parse.c \
# Type1 driver headers
#
T1_DRV_H := $(T1_DRV_SRC:%.c=%.h) \
- $(T1_DIR_)t1tokens.h
+ $(T1_DIR_)t1tokens.h \
+ $(T1_DIR_)t1errors.h
# Type1 driver object(s)
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 5146192f2..c83a5019f 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -21,6 +21,8 @@
#include "t1gload.h"
#include "t1load.h"
+#include "t1errors.h"
+
#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.h"
#endif
diff --git a/src/type1/t1errors.h b/src/type1/t1errors.h
new file mode 100644
index 000000000..ebd0a81be
--- /dev/null
+++ b/src/type1/t1errors.h
@@ -0,0 +1,43 @@
+/***************************************************************************/
+/* */
+/* t1errors.h */
+/* */
+/* Type 1 error codes (specification only). */
+/* */
+/* Copyright 2001 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 Type 1 error enumeration constants. */
+ /* */
+ /*************************************************************************/
+
+#ifndef __T1ERRORS_H__
+#define __T1ERRORS_H__
+
+#include FT_MODULE_ERRORS_H
+
+#undef __FTERRORS_H__
+
+#define FT_ERRORDEF( e, v, s ) T1_Err_ ## e = v + FT_Mod_Err_Type1,
+#define FT_NOERRORDEF( e, v, s ) T1_Err_ ## e = v,
+
+#define FT_ERROR_START_LIST enum {
+#define FT_ERROR_END_LIST T1_Err_Max };
+
+#include FT_ERRORS_H
+
+#endif /* __T1ERRORS_H__ */
+
+
+/* END */
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 881c99801..695897f90 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -23,6 +23,8 @@
#include FT_OUTLINE_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include "t1errors.h"
+
#include <string.h> /* for strcmp() */
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index b848c9786..faff55230 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -66,10 +66,11 @@
#include FT_CONFIG_CONFIG_H
#include FT_MULTIPLE_MASTERS_H
#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_TYPE1_ERRORS_H
#include "t1load.h"
+#include "t1errors.h"
+
#include <string.h> /* for strncmp(), strcmp() */
#include <ctype.h> /* for isalnum() */
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index b830092a5..1c9f45bab 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -25,6 +25,8 @@
#include "t1gload.h"
#include "t1load.h"
+#include "t1errors.h"
+
#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.h"
#endif
diff --git a/src/type1/t1objs.h b/src/type1/t1objs.h
index 8c83fa7a3..810380a03 100644
--- a/src/type1/t1objs.h
+++ b/src/type1/t1objs.h
@@ -23,7 +23,6 @@
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
#include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_TYPE1_ERRORS_H
#include FT_INTERNAL_TYPE1_TYPES_H
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index 2ec6ba3f4..fee1b380c 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -37,10 +37,12 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_CALC_H
#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_TYPE1_ERRORS_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+
#include "t1parse.h"
+#include "t1errors.h"
+
#include <string.h> /* for strncmp() */