Only in tgif-4.1.41: Makefile Only in tgif-4.1.41: Makefile.bak Only in tgif-4.1.41: align.o Only in tgif-4.1.41: animate.o Only in tgif-4.1.41: arc.o Only in tgif-4.1.41: attr.o Only in tgif-4.1.41: auxtext.o Only in tgif-4.1.41: box.o Only in tgif-4.1.41: button.o Only in tgif-4.1.41: chinput.o Only in tgif-4.1.41: choice.o Only in tgif-4.1.41: choose.o Only in tgif-4.1.41: cli_xcin.c.orig Only in tgif-4.1.41: cli_xcin.c.rej Only in tgif-4.1.41: cli_xcin.o Only in tgif-4.1.41: cmd.o Only in tgif-4.1.41: color.o Only in tgif-4.1.41: convkinput.o Only in tgif-4.1.41: convxim.o Only in tgif-4.1.41: cursor.o Only in tgif-4.1.41: cutpaste.o Only in tgif-4.1.41: dialog.o Only in tgif-4.1.41: drawing.o Only in tgif-4.1.41: dup.o Only in tgif-4.1.41: edit.o Only in tgif-4.1.41: eps.o Only in tgif-4.1.41: exec.o Only in tgif-4.1.41: expr.o Only in tgif-4.1.41: file.o diff -I *.o -I tgif -I Makefile -ur tgif-4.1.41.dist/font.c tgif-4.1.41/font.c --- tgif-4.1.41.dist/font.c Wed Sep 5 18:25:42 2001 +++ tgif-4.1.41/font.c Sat Jan 12 15:04:19 2002 @@ -32,6 +32,7 @@ */ #define _INCLUDE_FROM_FONT_C_ +#define BROKEN_XDRAWSTRING16 #include "tgifdefs.h" #include "cmdids.h" @@ -946,6 +947,26 @@ if (nDoubleByte) { int nDoubleByteIndex=0, nOdd=FALSE, w=0, i=0; +#ifdef BROKEN_XDRAWSTRING16 + /* Netwinder DM 12's double-byte functions internally treats a + * double-byte string as packed (byte-aligned). However, double- + * byte strings created in userland are word-aligned. The result + * is strangely spaced and incomplete output. Obviously this + * special case should never make it to the official patches! + */ + for (psz=pszStart, nSubStrIndex=0; + nIndex+nSubStrIndex < nLen && + (nOdd || ((*psz)&0x80) == nDoubleByte); + psz++, nSubStrIndex++, nDoubleByteIndex++, nOdd = !nOdd) { + ((char *)gpszTmpStr16)[nDoubleByteIndex] = *psz; + } + if (canvasFontDoubleByteModBytes) { + for (i=0; i < nDoubleByteIndex; i++) { + ((char *)gpszTmpStr16)[i] &= 0x7f; + } + } + nDoubleByteIndex /= 2; +#else for (psz=pszStart, nSubStrIndex=0; nIndex+nSubStrIndex < nLen && (nOdd || ((*psz)&0x80) == nDoubleByte); @@ -964,6 +985,7 @@ gpszTmpStr16[i].byte2 &= 0x7f; } } +#endif if (canvasFontDoubleByteVertical) { for (i=0; i < nDoubleByteIndex; i++) { char buf[3]; @@ -999,9 +1021,21 @@ nTotal += w; } } else { + w = XTextWidth16(canvasFontPtr, gpszTmpStr16, nDoubleByteIndex); +#ifdef BROKEN_XDRAWSTRING16 + /* Netwinder DM Build 12's XDrawString16 is really broken. + * It doesn't merely have mismatching notions of what a + * double-byte string looks like; it even inserts a phantom + * space before the actual string, we have to draw the string + * one full space left of the real position, and supply a + * phantom trailing character for drawing. (!) + */ + XDrawString16(dpy, d, gc, x+nTotal-w/nDoubleByteIndex, y, + gpszTmpStr16, nDoubleByteIndex+1); +#else XDrawString16(dpy, d, gc, x+nTotal, y, gpszTmpStr16, nDoubleByteIndex); - w = XTextWidth16(canvasFontPtr, gpszTmpStr16, nDoubleByteIndex); +#endif nTotal += w; } } else { Only in tgif-4.1.41: font.c.orig Only in tgif-4.1.41: font.o Only in tgif-4.1.41: ftp.o Only in tgif-4.1.41: grid.o Only in tgif-4.1.41: group.o Only in tgif-4.1.41: help.o Only in tgif-4.1.41: http.o Only in tgif-4.1.41: imgproc.o Only in tgif-4.1.41: import.o Only in tgif-4.1.41: ini.o Only in tgif-4.1.41: inmethod.o Only in tgif-4.1.41: list.o Only in tgif-4.1.41: mainloop.o Only in tgif-4.1.41: mainmenu.o Only in tgif-4.1.41: mark.o Only in tgif-4.1.41: markup.o Only in tgif-4.1.41: menu.o Only in tgif-4.1.41: menuinfo.o Only in tgif-4.1.41: miniline.o Only in tgif-4.1.41: move.o Only in tgif-4.1.41: msg.o Only in tgif-4.1.41: names.o Only in tgif-4.1.41: navigate.o Only in tgif-4.1.41: nkf.o Only in tgif-4.1.41: obj.o Only in tgif-4.1.41: oval.o Only in tgif-4.1.41: page.o Only in tgif-4.1.41: pattern.o Only in tgif-4.1.41: pin.o Only in tgif-4.1.41: poly.o Only in tgif-4.1.41: polygon.o Only in tgif-4.1.41: ps.o Only in tgif-4.1.41: raster.o Only in tgif-4.1.41: rcbox.o Only in tgif-4.1.41: rect.o Only in tgif-4.1.41: remote.o Only in tgif-4.1.41: ruler.o Only in tgif-4.1.41: scroll.o Only in tgif-4.1.41: select.o Only in tgif-4.1.41: setup.o Only in tgif-4.1.41: shape.o Only in tgif-4.1.41: shortcut.o Only in tgif-4.1.41: special.o Only in tgif-4.1.41: spline.o Only in tgif-4.1.41: stk.o Only in tgif-4.1.41: stream.o Only in tgif-4.1.41: stretch.o Only in tgif-4.1.41: strtbl.o Only in tgif-4.1.41: tangram2.o Only in tgif-4.1.41: tcp.o Only in tgif-4.1.41: text.c.orig Only in tgif-4.1.41: text.c.rej Only in tgif-4.1.41: text.o Only in tgif-4.1.41: tgif Only in tgif-4.1.41: tgif.bak Only in tgif-4.1.41: tgif.o Only in tgif-4.1.41: tgif_dbg.o Only in tgif-4.1.41: util.o Only in tgif-4.1.41: version.o Only in tgif-4.1.41: vms_comp.o Only in tgif-4.1.41: wb.o Only in tgif-4.1.41: wb1.o Only in tgif-4.1.41: wb2.o Only in tgif-4.1.41: wb3.o Only in tgif-4.1.41: wb_buff.o Only in tgif-4.1.41: wb_mcast.o Only in tgif-4.1.41: wb_seg.o Only in tgif-4.1.41: xbitmap.o Only in tgif-4.1.41: xpixmap.o Only in tgif-4.1.41: xprtfltr.o