*** XKBBind.c.orig Sat Feb 15 01:37:29 1997 --- lib/X11/XKBBind.c Sat Feb 15 04:37:47 1997 *************** *** 583,588 **** --- 583,589 ---- xkbi->desc = desc; _XkbGetConverters(_XkbGetCharset(),&xkbi->cvt); + _XkbGetConverters("ISO8859-1",&xkbi->latin1cvt); UnlockDisplay(dpy); oldEvents= xkbi->selected_events; if (!(xkbi->xlib_ctrls&XkbLC_IgnoreNewKeyboards)) { *************** *** 665,670 **** --- 666,673 ---- #endif { register XkbInfoPtr xkb; + XkbKSToMBFunc cvtr; + XPointer priv; char tmp[4]; register struct _XKeytrans *p; int n; *************** *** 702,709 **** if ( xkb->cvt.KSToUpper && (mods&LockMask) ) { *sym_rtrn = (*xkb->cvt.KSToUpper)(*sym_rtrn); } ! n = (*xkb->cvt.KSToMB)(xkb->cvt.KSToMBPriv,*sym_rtrn,buffer,nbytes, ! extra_rtrn); if ((!xkb->cvt.KSToUpper)&&( mods&LockMask )) { register int i; --- 705,719 ---- if ( xkb->cvt.KSToUpper && (mods&LockMask) ) { *sym_rtrn = (*xkb->cvt.KSToUpper)(*sym_rtrn); } ! if (xkb->xlib_ctrls & XkbLC_ForceLatin1Lookup) { ! cvtr = xkb->latin1cvt.KSToMB; ! priv = xkb->latin1cvt.KSToMBPriv; ! } else { ! cvtr = xkb->cvt.KSToMB; ! priv = xkb->cvt.KSToMBPriv; ! } ! ! n = (*cvtr)(priv,*sym_rtrn,buffer,nbytes,extra_rtrn); if ((!xkb->cvt.KSToUpper)&&( mods&LockMask )) { register int i; *** XKBCvt.c.orig Sat Feb 15 01:37:29 1997 --- lib/X11/XKBCvt.c Sat Feb 15 01:46:57 1997 *************** *** 109,115 **** 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x000c}; /* maps Cyrillic keysyms to 8859-5 */ ! static unsigned char Const cyrillic[128] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, --- 109,115 ---- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x000c}; /* maps Cyrillic keysyms to 8859-5 */ ! unsigned char Const _Xcyrillic[128] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, *************** *** 127,134 **** 0xbf, 0xcf, 0xc0, 0xc1, 0xc2, 0xc3, 0xb6, 0xb2, /* 15 */ 0xcc, 0xcb, 0xb7, 0xc8, 0xcd, 0xc9, 0xc7, 0xca}; ! /* maps Cyrillic keysyms to KOI0-8 */ ! static unsigned char Const koi8[128] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, --- 127,134 ---- 0xbf, 0xcf, 0xc0, 0xc1, 0xc2, 0xc3, 0xb6, 0xb2, /* 15 */ 0xcc, 0xcb, 0xb7, 0xc8, 0xcd, 0xc9, 0xc7, 0xca}; ! /* maps Cyrillic keysyms to KOI8-R */ ! unsigned char Const _Xkoi8[128] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, *************** *** 147,153 **** 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff}; /* maps Greek keysyms to 8859-7 */ ! static unsigned char Const greek[128] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, --- 147,153 ---- 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff}; /* maps Greek keysyms to 8859-7 */ ! unsigned char Const _Xgreek[128] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, *************** *** 296,305 **** count = 0; break; case sCyrillic: ! buf[0] = cyrillic[keysym & 0x7f]; break; case sGreek: ! buf[0] = greek[keysym & 0x7f]; if (!buf[0]) count = 0; break; --- 296,305 ---- count = 0; break; case sCyrillic: ! buf[0] = _Xcyrillic[keysym & 0x7f]; break; case sGreek: ! buf[0] = _Xgreek[keysym & 0x7f]; if (!buf[0]) count = 0; break; *************** *** 470,476 **** if (nbytes>0) { if ( (keysym&0x80)==0 ) buffer[0] = keysym&0x7f; ! else buffer[0] = koi8[keysym & 0x7f]; if (nbytes>1) buffer[1]= '\0'; return 1; --- 470,476 ---- if (nbytes>0) { if ( (keysym&0x80)==0 ) buffer[0] = keysym&0x7f; ! else buffer[0] = _Xkoi8[keysym & 0x7f]; if (nbytes>1) buffer[1]= '\0'; return 1; *************** *** 492,499 **** return buffer[0]; else if ((buffer[0]&0x7f)>=32) { register int i; ! for (i=0;i=32) { register int i; ! for (i=0;idisplay); ! XkbSetXlibControls (event->display, ! XkbLC_ForceLatin1Lookup, XkbLC_ForceLatin1Lookup); ! ret = XLookupString(event, buffer, nbytes, keysym, status); ! XkbSetXlibControls (event->display, ctrls, ctrls); ! return ret; } + #endif #define BUF_SIZE (20) *************** *** 144,153 **** unsigned char c; Status dummy; Xim im = (Xim)ic->core.im; char local_buf[BUF_SIZE]; unsigned char look[BUF_SIZE]; ! count = XLookupString(event, (char *)buffer, nbytes, &symbol, status); if (keysym) *keysym = symbol; if ((nbytes == 0) || (symbol == NoSymbol)) { return(count); --- 204,214 ---- unsigned char c; Status dummy; Xim im = (Xim)ic->core.im; + XLCd lcd = im->core.lcd; char local_buf[BUF_SIZE]; unsigned char look[BUF_SIZE]; ! count = XLOOKUPSTRING(event, (char *)buffer, nbytes, &symbol, status); if (keysym) *keysym = symbol; if ((nbytes == 0) || (symbol == NoSymbol)) { return(count); *************** *** 160,165 **** --- 221,230 ---- break; } } + if (kset == sCyrillic && + (strcmp (XLC_PUBLIC(lcd,encoding_name),"KOI8-R") == 0)) { + cset = &koi8codeset; + } if ((cset) && (c = (*cset->char_code)(symbol))) { strcpy(local_buf, cset->designator); local_count = strlen(cset->designator); *************** *** 201,210 **** unsigned char c; Status dummy; Xim im = (Xim)ic->core.im; char local_buf[BUF_SIZE]; unsigned char look[BUF_SIZE]; ! count = XLookupString(event, (char *)look, nbytes, &symbol, status); if (keysym) *keysym = symbol; if ((nbytes == 0) || (symbol == NoSymbol)) { return(count); --- 266,276 ---- unsigned char c; Status dummy; Xim im = (Xim)ic->core.im; + XLCd lcd = im->core.lcd; char local_buf[BUF_SIZE]; unsigned char look[BUF_SIZE]; ! count = XLOOKUPSTRING(event, (char *)look, nbytes, &symbol, status); if (keysym) *keysym = symbol; if ((nbytes == 0) || (symbol == NoSymbol)) { return(count); *************** *** 217,222 **** --- 283,292 ---- cset = &codeset[i]; break; } + } + if (kset == sCyrillic && + (strcmp (XLC_PUBLIC(lcd,encoding_name),"KOI8-R") == 0)) { + cset = &koi8codeset; } if ((cset) && (c = (*cset->char_code)(symbol))) { strcpy(local_buf, cset->designator); *** lcCT.c.orig Fri Jan 5 16:11:20 1996 --- lib/X11/lcCT.c Sat Feb 15 01:46:57 1997 *************** *** 83,88 **** --- 83,89 ---- /* Non-Standard Character Set Encodings */ { "TIS620.2533-1:GR", "\033-T"}, #endif + { "KOI8-R:GR", "\033%/1\200\210koi8-r\002"}, } ; #define XctC0 0x0000