Hi Robert,

> > On the powerpc, bidi-reordering does not seem to be done; 
> > this does not change with the +b/-b flag.
I found two bugs. Both are in charproc.c; the one prevents
the option from being parsed properly on linux-ppc,
the other fixes the crash whem bidi is forced on anyway.

Here is the diff:

--- clean/charproc.c    Tue Nov  7 12:48:41 2000
+++ xterm-147/charproc.c        Tue Nov  7 13:46:08 2000
@@ -539,7 +539,8 @@
        XtOffsetOf(XtermWidgetRec, screen.utf8_mode),
        XtRString, defaultUTF8},
 
-{XtNutf8, XtCBidi, XtRInt, sizeof(int),
+  
+{XtNutf8, XtCBidi, XtRBoolean, sizeof(Boolean),
        XtOffsetOf(XtermWidgetRec, screen.bidi),
        XtRString, defaultBidi},
 
@@ -2876,7 +2877,7 @@
     input[i] = getXtermCell(screen, row, i);
   }
   
-  fribidi_log2vis(input, len, &type, NULL, lvmap, vlmap, embed);
+  fribidi_log2vis(input, len+1, &type, NULL, lvmap, vlmap, embed);
   
   for (i=0;i<=len;i++) {
     if (lvmap[i] != i) {


--- clean/main.c        Tue Nov  7 12:48:41 2000
+++ xterm-147/main.c    Tue Nov  7 13:23:34 2000
@@ -971,8 +971,8 @@
 #if OPT_WIDE_CHARS
 {"-u8",                "*utf8",        XrmoptionNoArg,         (caddr_t) "2"},
 {"+u8",                "*utf8",        XrmoptionNoArg,         (caddr_t) "0"},
-{"-b",         "*bidi",        XrmoptionNoArg,         (caddr_t) "1"},
-{"+b",         "*bidi",        XrmoptionNoArg,         (caddr_t) "0"},
+{"-b",         "*bidi",        XrmoptionNoArg,         (caddr_t) "on"},
+{"+b",         "*bidi",        XrmoptionNoArg,         (caddr_t) "off"},
 #endif
 {"-ulc",       "*colorULMode", XrmoptionNoArg,         (caddr_t) "off"},
 {"+ulc",       "*colorULMode", XrmoptionNoArg,         (caddr_t) "on"},




Some explenation: The second error is: the real length is len+1, not len.

The first is more tricky, because it does not show directly.
Anyway, bidi is defined as Boolean in ptyx.h, and so reading in an int 
just messes up other members of the struct TScreen, and does not
set screen->bidi to one. As it is, at least the resource-parsing seems ok,
I'm not sure about the command-line, though.


Karl


-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to