strcpy(buf, "@im=");
! strcat(buf, s);
if ((p = XSetLocaleModifiers(buf)) != NULL && *p
&& (xim = XOpenIM(XtDisplay(term), NULL, NULL, NULL)) != NULL)
break;
--- 3788,3805 ----
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
xim = XOpenIM(XtDisplay(term), NULL, NULL, NULL);
} else {
! for(ns=s=term->misc.input_method; ns && *s;) {
while (*s && isspace(*s)) s++;
if (!*s) break;
if ((ns = end = strchr(s, ',')) == 0)
end = s + strlen(s);
while (isspace(*end)) end--;
strcpy(buf, "@im=");
! if (end - (s + (sizeof(buf) - 5)) > 0)
! end = s + (sizeof(buf) - 5);
! strncat(buf, s, end - s);
!
if ((p = XSetLocaleModifiers(buf)) != NULL && *p
&& (xim = XOpenIM(XtDisplay(term), NULL, NULL, NULL)) != NULL)
break;
***************
*** 3824,3831 ****
}
found = False;
! strcpy(tmp, term->misc.preedit_type);
! for(s = tmp; s && !found;) {
while (*s && isspace(*s)) s++;
if (!*s) break;
if ((ns = end = strchr(s, ',')) != 0)
--- 3824,3830 ----
}
found = False;
! for(s = term->misc.preedit_type; s && !found;) {
while (*s && isspace(*s)) s++;
if (!*s) break;
if ((ns = end = strchr(s, ',')) != 0)
***************
*** 3833,3845 ****
else
end = s + strlen(s);
while (isspace(*end)) end--;
- *end = '\0';
! if (!strcmp(s, "OverTheSpot")) {
input_style = (XIMPreeditPosition | XIMStatusArea);
! } else if (!strcmp(s, "OffTheSpot")) {
input_style = (XIMPreeditArea | XIMStatusArea);
! } else if (!strcmp(s, "Root")) {
input_style = (XIMPreeditNothing | XIMStatusNothing);
}
for (i = 0; (unsigned short)i < xim_styles->count_styles; i++)
--- 3832,3843 ----
else
end = s + strlen(s);
while (isspace(*end)) end--;
! if (!strncmp(s, "OverTheSpot", end - s)) {
input_style = (XIMPreeditPosition | XIMStatusArea);
! } else if (!strncmp(s, "OffTheSpot", end - s)) {
input_style = (XIMPreeditArea | XIMStatusArea);
! } else if (!strncmp(s, "Root", end - s)) {
input_style = (XIMPreeditNothing | XIMStatusNothing);
}
for (i = 0; (unsigned short)i < xim_styles->count_styles; i++)
***************
*** 4372,4378 ****
XtOverrideTranslations(w, original);
return;
}
! (void) sprintf( mapName, "%sKeymap", params[0] );
(void) strcpy( mapClass, mapName );
if (islower(mapClass[0])) mapClass[0] = toupper(mapClass[0]);
XtGetSubresources( w, (XtPointer)&keymap, mapName, mapClass,
--- 4370,4376 ----
XtOverrideTranslations(w, original);
return;
}
! (void) sprintf( mapName, "%.*sKeymap", (int)sizeof(mapName) - 10, params[0] );
(void) strcpy( mapClass, mapName );
if (islower(mapClass[0])) mapClass[0] = toupper(mapClass[0]);
XtGetSubresources( w, (XtPointer)&keymap, mapName, mapClass,
***************
*** 4790,4796 ****
* not be set before the widget's realized, so it's tested separately).
*/
if(screen->colorMode) {
! if (TextWindow(screen) != 0 && (cc != bg)) {
/* we might have a colored foreground/background later */
xgcv.font = screen->fnt_norm->fid;
mask = (GCForeground | GCBackground | GCFont);
--- 4788,4794 ----
* not be set before the widget's realized, so it's tested separately).
*/
if(screen->colorMode) {
! if (TextWindow(screen) != 0 && (cc != bg) && (cc != fg)) {
/* we might have a colored foreground/background later */
xgcv.font = screen->fnt_norm->fid;
mask = (GCForeground | GCBackground | GCFont);
Index: programs/xterm/main.c
===================================================================
RCS file: /cvsroot/xsrc/xc/programs/xterm/main.c,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 main.c
*** main.c 1997/08/20 06:28:15 1.1.1.3
--- main.c 1998/05/06 06:52:35
***************
*** 3467,3473 ****
int i, n, ncap;
errstat err;
struct caplist *cl;
! char buf[64], numbuf[12];
struct caplist *capvnew;
int ttythread();
int xwatchdogthread();
--- 3467,3473 ----
int i, n, ncap;
errstat err;
struct caplist *cl;
! char buf[64];
struct caplist *capvnew;
int ttythread();
int xwatchdogthread();
Index: programs/xterm/misc.c
===================================================================
RCS file: /cvsroot/xsrc/xc/programs/xterm/misc.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 misc.c
*** misc.c 1997/06/30 14:03:25 1.1.1.2
--- misc.c 1998/05/06 06:52:35
***************
*** 48,60 ****
#include <X11/Xmu/SysUtil.h>
#include <X11/Xmu/WinUtil.h>