--- Imakefile.dist Tue Jan 17 05:59:27 1995 +++ Imakefile Mon Mar 1 23:25:11 1999 @@ -1,8 +1,10 @@ -#include "../imake.compat" +XCOMM #include "../imake.compat" XCOMM $Id: Imakefile,v 1.3 1995/01/17 10:59:07 ygz Exp $ - DEFINES = $(X_COMPATIBLE_FLAGS) + CDEBUGFLAGS = -O2 -g -Wall /* override defaults for debugging */ + + DEFINES = $(X_COMPATIBLE_FLAGS) -I$(CXTERMSRC) CXTERMSRC = ../cxterm --- tit2cit.c.dist Tue Feb 14 00:53:17 1995 +++ tit2cit.c Mon Mar 1 23:46:47 1999 @@ -69,6 +69,10 @@ #include "HZtable.h" +#if defined(__linux) && defined(__arm__) +#define BROKEN_XCHAR2B_HANDLING +#endif + /* * Dynamic structure dynTrie is different with the TRIE structures * defined in HZtable.h, which is static. @@ -158,6 +162,7 @@ static void ParseKey (); static void Predefine (); +int main(argc, argv) int argc; char *argv[]; @@ -187,7 +192,7 @@ BuildTrie (); Output (ofile); - exit (0); + return 0; } static void Warning (str) @@ -655,17 +660,35 @@ while (*hzptr) { if (*hzptr != HZ_PHRASE_TAG) { /* a hanzi */ +#ifndef BROKEN_XCHAR2B_HANDLING hzList[pHZList ].byte1 = *hzptr++; hzList[pHZList++].byte2 = *hzptr++; +#else /* BROKEN_XCHAR2B_HANDLING */ + ((char *)hzList)[ pHZList*2 ] = *hzptr++; + ((char *)hzList)[(pHZList*2)+1] = *hzptr++; + pHZList += 1; +#endif /* BROKEN_XCHAR2B_HANDLING */ } else { /* a phrase */ register int i, hzlen = *(hzptr+1); +#ifndef BROKEN_XCHAR2B_HANDLING hzList[pHZList ].byte1 = *hzptr++; hzList[pHZList++].byte2 = *hzptr++; +#else /* BROKEN_XCHAR2B_HANDLING */ + ((char *)hzList)[ pHZList*2 ] = *hzptr++; + ((char *)hzList)[(pHZList*2)+1] = *hzptr++; + pHZList += 1; +#endif /* BROKEN_XCHAR2B_HANDLING */ for (i = 0; i < hzlen; i++) { +#ifndef BROKEN_XCHAR2B_HANDLING hzList[pHZList ].byte1 = *hzptr++; hzList[pHZList++].byte2 = *hzptr++; +#else /* BROKEN_XCHAR2B_HANDLING */ + ((char *)hzList)[ pHZList*2 ] = *hzptr++; + ((char *)hzList)[(pHZList*2)+1] = *hzptr++; + pHZList += 1; +#endif /* BROKEN_XCHAR2B_HANDLING */ } } numChoice ++ ;