Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
xosview
xosview-1.8.3-appdef.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xosview-1.8.3-appdef.dif of Package xosview
--- Xrm.cc +++ Xrm.cc 2006-12-11 10:46:28.000000000 +0000 @@ -11,6 +11,7 @@ #include <stdlib.h> #include <stdio.h> // For snprintf(). #include <ctype.h> +#include <sys/stat.h> // For stat(). #ifdef HAVE_IOSTREAM #include <iostream> #else @@ -152,20 +153,26 @@ Listed from weakest to strongest: // Merge in the system resource database. char rfilename[2048]; + struct stat st; // Get the app-defaults + snprintf(rfilename, 2048, "/usr/share/X11/app-defaults/%s", + XrmQuarkToString(_class)); + if (rfilename != NULL && stat(rfilename, &st) == 0) + XrmCombineFileDatabase (rfilename, &_db, 1); + // Old X11R6 snprintf(rfilename, 2048, "/usr/X11R6/lib/X11/app-defaults/%s", XrmQuarkToString(_class)); - if (rfilename != NULL) + if (rfilename != NULL && stat(rfilename, &st) == 0) XrmCombineFileDatabase (rfilename, &_db, 1); // Try a few more, for SunOS/Solaris folks. snprintf(rfilename, 2048, "/usr/openwin/lib/X11/app-defaults/%s", XrmQuarkToString(_class)); - if (rfilename != NULL) + if (rfilename != NULL && stat(rfilename, &st) == 0) XrmCombineFileDatabase (rfilename, &_db, 1); snprintf(rfilename, 2048, "/usr/local/X11R6/lib/X11/app-defaults/%s", XrmQuarkToString(_class)); - if (rfilename != NULL) + if (rfilename != NULL && stat(rfilename, &st) == 0) XrmCombineFileDatabase (rfilename, &_db, 1); // Now, check for an XOSView file in the XAPPLRESDIR directory...
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor