[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#127005: Problem with t1lib in the latest teTeX beta



Hi Thomas,

Gerhard Tonn <GerhardTonn@swol.de> reported the problem below in the copy
of t1lib the latest teTeX beta ships on architectures where char is
unsigned (e.g. arm, powerpc or s390).

Compile time warning:

gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2 -DT1LIB_IDENT="\"1.2\""
-DGLOBAL_CONFIG_DIR="\"/usr/share/t1lib\""  -c t1finfo.c
t1finfo.c: In function `T1_QueryLigs':
t1finfo.c:568: warning: comparison is always false due to limited range of
data type
t1finfo.c:573: warning: comparison is always false due to limited range of
data type


Relevant pieces of code:


 if ((succ_index=T1_GetEncodingIndex( FontID, (char*) ligs->succ))==-1) {
      /* successor is not current encoding */
      ligs=ligs->next;
      continue;
    }

if ((lig_index=T1_GetEncodingIndex( FontID, (char*) ligs->lig))==-1) {
      /* Specified ligature is not in current encoding */
      ligs=ligs->next;
      continue;
    }


teTeX ships with t1lib-1.2. t1lib-1.3.1 contains the following patch that
should fix the problem:

--- /home/bunk/Debian/tetex/tetex-bin-1.0.7+20011202/libs/t1lib/t1finfo.c	Sun Oct 14 20:14:23 2001
+++ lib/t1lib/t1finfo.c	Sun May 27 05:40:11 2001
@@ -510,9 +510,9 @@
   char *c_name;
   char cc_name[128];
   static char succ[MAX_LIGS];
-  char succ_index;
+  int succ_index;
   static char lig[MAX_LIGS];
-  char lig_index;
+  int lig_index;

   Ligature *ligs;
   int i,j;


Could you either upgrade t1lib in teTeX or apply this patch?


TIA
Adrian





Reply to: