(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,
len = strlen (params[0]) + 7;  pmapName  = MyStackAlloc(len, mapName); pmapClass = MyStackAlloc(len, mapClass); if (pmapName == NULL || pmapClass == NULL) SysError(ERROR_KMMALLOC1);  (void) sprintf( pmapName, "%sKeymap", params[0] ); (void) strcpy( pmapClass, pmapName ); if (islower(pmapClass[0])) pmapClass[0] = toupper(pmapClass[0]); XtGetSubresources( w, (XtPointer)&keymap, pmapName, pmapClass,
static void HandleKeymapChange(w, event, params, param_count)    Widget w;    XEvent *event GCC_UNUSED;    String *params;    Cardinal *param_count;{    static XtTranslations keymap, original;    static XtResource key_resources[] = {	{ XtNtranslations, XtCTranslations, XtRTranslationTable,	      sizeof(XtTranslations), 0, XtRTranslationTable, (XtPointer)NULL}    };    char mapName[1000];    char mapClass[1000];    if (*param_count != 1) return;    if (original == NULL) original = w->core.tm.translations;    if (strcmp(params[0], "None") == 0) {	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,		       key_resources, (Cardinal)1, NULL, (Cardinal)0 );    if (keymap != NULL)	XtOverrideTranslations(w, keymap);}