Path: utzoo!attcan!uunet!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: <49344@lll-winken.LLNL.GOV> Date: 20 Feb 90 19:16:42 GMT References: <49250@lll-winken.LLNL.GOV> <9002200431.AA16109@expo.lcs.mit.edu> Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 37 | From: keith@EXPO.LCS.MIT.EDU (Keith Packard) | | > Also, what are the fundamental objections to making XGetDefault handle | > multi-level resources. If the X Consortium is really planning on nuking | > XGetDefault, I hope they are planning on replacing it with something | > simple to use for simple (or in awm's case, dynamic) cases. | | One could always use the Xrm functions XrmGetResource or XrmQGetResource. | A nice feature of using the XrmQGetResource function would be that the | application could save a considerable number of XrmStringToQuark calls. | | To initialize the database you'd need to call XGetDefault on some bogus | resource (or duplicate the code from mit/lib/X/XGetDflt.c), then use | dpy->db for the Xrm functions. | | I believe the Xrm functions are documented in the Xlib manual. They are. It will probably take me about a day to rewrite XGetDefault in terms of these routines since I don't have enough background in X programming to get myself out of a wet paper sack. And in the end I will have done exactly that: simply rewritten XGetDefault using a different set of routines. Again, I don't understand the reluctance to keep something usefully simple like XGetDefault around. I could well understand a desire to put it in Xt as XtGetDefault along with the other resource helper routines. Even the MIT software uses XGetDefault extensively. In mit/clients I count 23 calls to XGetDefault in 4 clients (there are two more references to it in xrdb's manual page.) In all there are 90 references to XGetDefault throughout the mit subdirectory as program calls and tutorial/documentation references. Please forgive my earlier flame and don't let its tone back you into a corner on this. I truly think that there's a place for an extremely simple interface to the resource database. Casey