]> git.imager.perl.org - imager.git/commitdiff
font.c now only uses the defined T1Lib error codes
authorTony Cook <tony@develop=help.com>
Thu, 22 Apr 2004 03:46:59 +0000 (03:46 +0000)
committerTony Cook <tony@develop=help.com>
Thu, 22 Apr 2004 03:46:59 +0000 (03:46 +0000)
Changes
font.c

diff --git a/Changes b/Changes
index 2c74f1a99bb819969fef34b5100c662be979fb56..623095ce486875f142233bc595de6e0f81dd2e16 100644 (file)
--- a/Changes
+++ b/Changes
@@ -753,6 +753,7 @@ Revision history for Perl extension Imager.
          names out of the =item lines so we can make them into links
        - the scale() method now produces a warning when called in
          void context.
+       - font.c now only uses the defined T1Lib error codes
 
 =================================================================
 
diff --git a/font.c b/font.c
index d2f5eb4be2062ab2d19a09a97f5e90f0326df7a3..685991e3c7a203bec0d03ee9f314e3f8d5b3a450 100644 (file)
--- a/font.c
+++ b/font.c
@@ -595,73 +595,107 @@ t1_push_error(void) {
     i_push_error(0, "No error"); 
     break;
 
+#ifdef T1ERR_SCAN_FONT_FORMAT
   case T1ERR_SCAN_FONT_FORMAT:
     i_push_error(T1ERR_SCAN_FONT_FORMAT, "SCAN_FONT_FORMAT"); 
     break;
+#endif
 
+#ifdef T1ERR_SCAN_FILE_OPEN_ERR
   case T1ERR_SCAN_FILE_OPEN_ERR:
     i_push_error(T1ERR_SCAN_FILE_OPEN_ERR, "SCAN_FILE_OPEN_ERR"); 
     break;
+#endif
 
+#ifdef T1ERR_SCAN_OUT_OF_MEMORY
   case T1ERR_SCAN_OUT_OF_MEMORY:
     i_push_error(T1ERR_SCAN_OUT_OF_MEMORY, "SCAN_OUT_OF_MEMORY"); 
     break;
+#endif
 
+#ifdef T1ERR_SCAN_ERROR
   case T1ERR_SCAN_ERROR:
     i_push_error(T1ERR_SCAN_ERROR, "SCAN_ERROR"); 
     break;
+#endif
 
+#ifdef T1ERR_SCAN_FILE_EOF
   case T1ERR_SCAN_FILE_EOF:
     i_push_error(T1ERR_SCAN_FILE_EOF, "SCAN_FILE_EOF"); 
     break;
+#endif
 
+#ifdef T1ERR_PATH_ERROR
   case T1ERR_PATH_ERROR:
     i_push_error(T1ERR_PATH_ERROR, "PATH_ERROR"); 
     break;
+#endif
 
+#ifdef T1ERR_PARSE_ERROR
   case T1ERR_PARSE_ERROR:
     i_push_error(T1ERR_PARSE_ERROR, "PARSE_ERROR"); 
     break;
+#endif
 
+#ifdef T1ERR_TYPE1_ABORT
   case T1ERR_TYPE1_ABORT:
     i_push_error(T1ERR_TYPE1_ABORT, "TYPE1_ABORT"); 
     break;
+#endif
 
+#ifdef T1ERR_INVALID_FONTID
   case T1ERR_INVALID_FONTID:
     i_push_error(T1ERR_INVALID_FONTID, "INVALID_FONTID"); 
     break;
+#endif
 
+#ifdef T1ERR_INVALID_PARAMETER
   case T1ERR_INVALID_PARAMETER:
     i_push_error(T1ERR_INVALID_PARAMETER, "INVALID_PARAMETER"); 
     break;
+#endif
 
+#ifdef T1ERR_OP_NOT_PERMITTED
   case T1ERR_OP_NOT_PERMITTED:
     i_push_error(T1ERR_OP_NOT_PERMITTED, "OP_NOT_PERMITTED"); 
     break;
+#endif
 
+#ifdef T1ERR_ALLOC_MEM
   case T1ERR_ALLOC_MEM:
     i_push_error(T1ERR_ALLOC_MEM, "ALLOC_MEM"); 
     break;
+#endif
 
+#ifdef T1ERR_FILE_OPEN_ERR
   case T1ERR_FILE_OPEN_ERR:
     i_push_error(T1ERR_FILE_OPEN_ERR, "FILE_OPEN_ERR"); 
     break;
+#endif
 
+#ifdef T1ERR_UNSPECIFIED
   case T1ERR_UNSPECIFIED:
     i_push_error(T1ERR_UNSPECIFIED, "UNSPECIFIED"); 
     break;
+#endif
 
+#ifdef T1ERR_NO_AFM_DATA
   case T1ERR_NO_AFM_DATA:
     i_push_error(T1ERR_NO_AFM_DATA, "NO_AFM_DATA"); 
     break;
+#endif
 
+#ifdef T1ERR_X11
   case T1ERR_X11:
     i_push_error(T1ERR_X11, "X11"); 
     break;
+#endif
 
+#ifdef T1ERR_COMPOSITE_CHAR
   case T1ERR_COMPOSITE_CHAR:
     i_push_error(T1ERR_COMPOSITE_CHAR, "COMPOSITE_CHAR"); 
     break;
+#endif
 
   default:
     i_push_errorf(T1_errno, "unknown error %d", (int)T1_errno);