--- main.c.dist Fri Jul 12 01:01:38 1996 +++ main.c Sun Nov 5 01:50:48 2000 @@ -97,6 +97,10 @@ #define USE_SYSV_SIGNALS #endif +#ifdef linux /* esp. ARM Linux, which escaped detection */ +#define USE_TERMIOS +#endif + #ifdef SVR4 #ifndef SYSV #define SYSV /* SVR4 is (approx) superset of SVR3 */ @@ -1152,7 +1156,9 @@ #ifdef USE_TERMIOS /* { */ d_tio.c_cc[VSUSP] = CSUSP; +#ifdef VDSUSP d_tio.c_cc[VDSUSP] = CDSUSP; +#endif d_tio.c_cc[VREPRINT] = CRPRNT; d_tio.c_cc[VDISCARD] = CFLUSH; d_tio.c_cc[VWERASE] = CWERASE; @@ -1293,7 +1299,9 @@ #endif /* } TIOCSLTC */ #ifdef USE_TERMIOS /* { */ d_tio.c_cc[VSUSP] = CSUSP; +#ifdef VDSUSP d_tio.c_cc[VDSUSP] = '\000'; +#endif d_tio.c_cc[VREPRINT] = '\377'; d_tio.c_cc[VDISCARD] = '\377'; d_tio.c_cc[VWERASE] = '\377'; --- screen.c.dist Sun Jun 23 04:00:26 1996 +++ screen.c Sun Nov 5 02:10:41 2000 @@ -1,3 +1,6 @@ +#if defined(linux) && defined(arm) +#define BROKEN_MBCS +#endif /* * $XConsortium: screen.c,v 1.33 94/04/02 17:34:36 gildea Exp $ * $Id: screen.c,v 6.3 1996/06/23 08:00:09 kagotani Rel $ @@ -1166,8 +1169,13 @@ if ((endcol-col+1)/2 > 256) dbuf2 = (XChar2b *)XtMalloc((endcol-col+1)/2 * sizeof(XChar2b)); for (c = col, n = 0; c < endcol; c++, n++) { +# ifndef BROKEN_MBCS dbuf2[n].byte1 = str[c++].code; dbuf2[n].byte2 = str[c].code; +# else + ((char *)dbuf2)[n*2 ] = str[c++].code; + ((char *)dbuf2)[n*2+1] = str[c].code; +# endif } } else # endif /* KTERM_MBCS */ @@ -1246,8 +1254,20 @@ XDrawImageString16(screen->display, TextWindow(screen), gc, x, Y, dbuf2, n); if (flags & BOLD && screen->normalboldGC == screen->normalGC) +# ifndef BROKEN_MBCS XDrawString16(screen->display, TextWindow(screen), gc, x + 1, Y, dbuf2, n); +# else + /* 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(screen->display, TextWindow(screen), + gc, x + 1 - 2*FontWidth(screen), Y, dbuf2, n + 1); +# endif } else #endif /* KTERM_MBCS */ {