From: Tony Cook Date: Thu, 22 Apr 2004 03:46:59 +0000 (+0000) Subject: font.c now only uses the defined T1Lib error codes X-Git-Tag: Imager-0.48^2~324 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/d5a3f4605d9bb5eafce1e50fd19ce7af2dfaf6c7?ds=sidebyside font.c now only uses the defined T1Lib error codes --- diff --git a/Changes b/Changes index 2c74f1a9..623095ce 100644 --- 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 d2f5eb4b..685991e3 100644 --- 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);