]> git.imager.perl.org - imager.git/blobdiff - font.c
- added samp-form.cgi and samp-image.cgi to the samples directory to
[imager.git] / font.c
diff --git a/font.c b/font.c
index d2f5eb4be2062ab2d19a09a97f5e90f0326df7a3..7b5d0931f3a5bc9fe149fdc73b2ebc2dd9156c6b 100644 (file)
--- a/font.c
+++ b/font.c
@@ -488,7 +488,6 @@ i_t1_has_chars(int font_num, const char *text, int len, int utf8,
 
   while (len) {
     unsigned long c;
-    int index;
     if (utf8) {
       c = i_utf8_advance(&text, &len);
       if (c == ~0UL) {
@@ -595,73 +594,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);
@@ -1213,7 +1246,6 @@ int
 i_tt_has_chars(TT_Fonthandle *handle, char const *text, int len, int utf8,
                char *out) {
   int count = 0;
-  int inst;
   mm_log((1, "i_tt_has_chars(handle %p, text %p, len %d, utf8 %d)\n", 
           handle, text, len, utf8));
 
@@ -1347,7 +1379,6 @@ i_tt_render_all_glyphs( TT_Fonthandle *handle, int inst, TT_Raster_Map *bit,
                         TT_Raster_Map *small_bit, int cords[6], 
                         char const* txt, int len, int smooth, int utf8 ) {
   unsigned long j;
-  int i;
   TT_F26Dot6 x,y;
   
   mm_log((1,"i_tt_render_all_glyphs( handle 0x%X, inst %d, bit 0x%X, small_bit 0x%X, txt '%.*s', len %d, smooth %d, utf8 %d)\n",