Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: Re: 'awm' window manager: what's the newest (public) version? Message-ID: <1990Aug28.173100@gauss.llnl.gov> Date: 29 Aug 90 00:31:00 GMT References: <1990Aug27.115956@ICSI.Berkeley.EDU> Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 75 | From: stolcke@ICSI.Berkeley.EDU (Andreas Stolcke) | | I had no trouble compiling the latest version of awm under R4, but found it | couldn't parse it's defaults correctly because the algorithm changed from | R3 to R4. The solution was to grab lib/X/XGetDflt.c from the R3 dist and | link it with awm. Or, you can apply the following patch to the R4 source. Note that MIT has specifically decided *NOT* to support this ability in future releases. This is just a work around hack. All applications should be converted to do something more standard. Unfortunately for awm that may be fairly difficult. Casey %%% mit/lib/X/XGetDflt.c: %%% %%% Fix XGetDefault so that XGetDefault(dpy, program, name) works when name %%% containing a compound string (``foo.bar'', etc.) *** mit/lib/X/XGetDflt.c-dist Tue Jan 30 18:35:20 1990 --- mit/lib/X/XGetDflt.c Sun Feb 11 22:32:00 1990 *************** *** 124,134 **** register char *name; /* name of option program wants */ #endif { /* to get, for example, "font" */ ! XrmName names[3]; ! XrmClass classes[3]; XrmRepresentation fromType; XrmValue result; char *progname; /* * strip path off of program name (XXX - this is OS specific) --- 124,136 ---- register char *name; /* name of option program wants */ #endif { /* to get, for example, "font" */ ! XrmName names[100]; /* 100: YECH -- and XrmStringToNameList */ ! XrmClass classes[100]; /* does not even let us pass in this limit */ XrmRepresentation fromType; XrmValue result; char *progname; + register XrmClass classp; + register int i; /* * strip path off of program name (XXX - this is OS specific) *************** *** 150,160 **** UnlockDisplay(dpy); names[0] = XrmStringToName(progname); - names[1] = XrmStringToName(name); - names[2] = NULLQUARK; classes[0] = XrmStringToClass("Program"); ! classes[1] = XrmStringToClass("Name"); ! classes[2] = NULLQUARK; (void)XrmQGetResource(dpy->db, names, classes, &fromType, &result); return (result.addr); } --- 152,163 ---- UnlockDisplay(dpy); names[0] = XrmStringToName(progname); classes[0] = XrmStringToClass("Program"); ! XrmStringToNameList(name, &names[1]); ! classp = XrmStringToClass("Name"); ! for (i = 1; names[i] != NULLQUARK; i++) ! classes[i] = classp; ! classes[i] = NULLQUARK; (void)XrmQGetResource(dpy->db, names, classes, &fromType, &result); return (result.addr); }