You are not logged in.

#1 2019-12-28 07:37:02

Portal
Member
Registered: 2019-03-11
Posts: 34

X11 xlib resource manager questions

After a call to

XrmInitialize()
XrmGetDatabase(dpy);

Where is the created database (if the above lines do indeed create a new database) stored? How do we retrieve this database the next time the code is run?

Also, the manual claims that "Resources are stored in the database with only partially specified names and classes." What is the advantage of using loose bindings such as a "*" or "?"? Why can't the database just store the plain fully qualified names?

Offline

#2 2019-12-28 13:09:45

Trilby
Banned
Registered: 2011-11-29
Posts: 22,631
Website

Re: X11 xlib resource manager questions

Portal wrote:

Where is the created database (if the above lines do indeed create a new database) stored?

Those lines do not create a new database.  They are used to access the current database stored by the xserver (in memory).  There are other functions if you actually want to load or save these data to/from a file.

Portal wrote:

How do we retrieve this database the next time the code is run?

What do you mean by "retrieve this database"?  The result of the second line should be stored, as that is the (handle to) the database.

What are you actually trying to do?  It sounds like you may not actually want to use the xrmdb but rather you want some other static database storage for your program.

The xrmdb is not where you would store data from one run of your program that you'd want to retreive on the next run.

Last edited by Trilby (2019-12-28 13:13:17)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB