Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: Re: Does anyone have a fix for R4/PL1 XGetDefault? Message-ID: <49225@lll-winken.LLNL.GOV> Date: 19 Feb 90 21:21:02 GMT References: <47970@lll-winken.LLNL.GOV> <9002191921.AA01528@expire.lcs.mit.edu> Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 47 | From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) | | Under R4, XGetDefault doesn't work 100%. | | Yes, it does (modulo the bug in the prototype declaration). | | If you attempt to do an XGetDefault(dpy, prog, "foo.bar"), XGetDefault | won't break the string "foo.bar" up into separate ``Quarks'' and | therefore won't match the desired resource. | | That's correct. XGetDefault is *not supposed* to handle multi-level | resources, it was only designed to handle single-level resources. I | suspect it is largely by accident that abuse of it worked in R3. | | I've got a bug report in to MIT, but I don't know when we'll see a | fix from them. | | I don't think you'll see one from us, since it isn't considered a bug. Well piss me off! Why the hell didn't someone answer this way sooner?! I thought I wasn't seeing a response from someone in authority because they didn't have the time for the fix. How long would it have taken you to write this response a month ago when I first asked? (Note that you're responding to my second posting.) Now I've gone and implemented a ``fix'' for XGetDefault that's not compatible with what you describe as Proper Behavior. That time has now been wasted and I still need to come up with a fix for awm that makes sense. And as I maintain almost a hundred machines running on four different architectures, it will now take me three days to just back out the XGetDefault change. As for Proper Behavior: DOCUMENT IT DAMN IT!!! There is no explicit mention of this ``Proper Behavior'' in the XGetDefault manual page. And it should be pointed out that this is a particularly non-useful definition of Proper Behavior. It sure as hell isn't consistent with the other resource routines which do break up multi-level name specifications. What is the rationale for not supporting multi-level resource names in XGetDefault?? Are you simply trying to discourage its use? If so, mark it as deprecated in the manual page! I don't know what the hell I'm going to do for awm now. I'll probably have to do some weird-ass dynamic building of XtResourceList's ... What a pain. Pissed off, Casey