Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!noao!ncar!ico!auto-trol!marbru From: marbru@auto-trol.UUCP (Martin Brunecky) Newsgroups: comp.windows.x Subject: WHITE PAPER: Enhancing the X resource file syntax Keywords: Xrm Message-ID: <841@auto-trol.UUCP> Date: 24 Sep 90 17:18:08 GMT Reply-To: marbru@auto-trol.COM (Martin Brunecky) Organization: Auto-trol Technology, Denver Lines: 40 WHITE PAPER: Enhancing the X resource file syntax The resource file syntax, as required by XrmGetFileDatabase and XrmPutLineResource is well known. However, any frequent Xrm user is probably tired of typing lines like: MyApp*file_menu.btn1.foreground: white MyApp*file_menu.btn1.background: black MyApp*file_menu.btn1.borderColor: red .... MyApp*file_menu.btn1.xxxx: yyyy Sure, using loose bindings and/or using unique names (such as f_menu_b_1) and/or using cpp, the amount of typing (and the resource file size) can be reduced. But often at the cost of clarity and/or flexibility. So why not allow something like: MyApp*file_menu.btn1.foreground: white -.background: black -.borderColor: red The "-" operator would save lots of typing. It would reduce the file size. It would increase readability. Plus, it would allow internal optimizations within XrmGetFileDatabase: it could save the overhead of string parsing and database search list lookup for the repeated database path. May be not that significant. But small improvements keep adding, and we all are desperately looking for ways to improve Xt applications startup performance. Thus, consider this yet another wish list item for R5. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky marbru@auto-trol.COM (303) 252-2499 {...}ncar!ico!auto-trol!marbru Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404