XrmMergeDatabases(3)
π NAME π
okay bestie, welcome to the XrmMergeDatabases(3) page from XLIB FUNCTIONS β literally the resource-database merge girlies. β¨ The trio is XrmMergeDatabases, XrmCombineDatabase, and XrmCombineFileDatabase, and their whole thing is merging resource databases. Periodt. π
β¨ SYNTAX β¨
#include <X11/Xresource.h>
void XrmMergeDatabases(XrmDatabase source_db, XrmDatabase *target_db);
void XrmCombineDatabase(XrmDatabase source_db, XrmDatabase *target_db,
Bool override);
Status XrmCombineFileDatabase(_Xconst char *filename, XrmDatabase
*target_db, Bool override);
πΈ ARGUMENTS πΈ
source_dbβ specifies the resource database that is to be merged into the target database. πtarget_dbβ specifies the resource database into which the source database is to be merged. πfilenameβ specifies the resource database file name. π¦overrideβ specifies whether source entries override target ones. π
π¦ DESCRIPTION π¦
okay so first up: calling the XrmMergeDatabases function is equivalent to calling the XrmCombineDatabase function with an override argument of True. No cap. β¨
The XrmCombineDatabase function merges the contents of one database into another. If the same specifier is used for an entry in both databases, the entry in source_db will replace the entry in target_db if override is True; otherwise, the entry in source_db is discarded. If target_db contains NULL, XrmCombineDatabase simply stores source_db in it. Otherwise, source_db is destroyed by the merge, but the database pointed to by target_db is not destroyed. The database entries are merged without changing values or types, regardless of the locales of the databases. The locale of the target database is not modified. π
tiny but important vibe check: source_db getting destroyed in the non-NULL case is real, bestie β the database pointed to by target_db is the one that survives. π«Ά
The XrmCombineFileDatabase function merges the contents of a resource file into a database. If the same specifier is used for an entry in both the file and the database, the entry in the file will replace the entry in the database if override is True; otherwise, the entry in the file is discarded. The file is parsed in the current locale. If the file cannot be read, a zero status is returned; otherwise, a nonzero status is returned. If target_db contains NULL, XrmCombineFileDatabase creates and returns a new database to it. Otherwise, the database pointed to by target_db is not destroyed by the merge. The database entries are merged without changing values or types, regardless of the locale of the database. The locale of the target database is not modified. π
π SEE ALSO π
XrmGetResource(3)XrmInitialize(3)XrmPutResource(3)Xlib - C Language X Interface
and thatβs the vibe check, bestie! This page comes from X Version 11 and libX11 1.8.14; the original footer doesnβt show a date, so Iβm not inventing one β no cap. πππ¦
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms