-static char *GetResourcePath(char *buf, char *name, bool create)
-{
- if (create && FileExists(name))
- {
- strcpy(buf, name);
- return buf; // Exists so ...
- }
- if (*name == '/')
- strcpy(buf, name);
- else
- {
- // Put in standard place for resource files if not absolute
- strcpy(buf, DEFAULT_XRESOURCE_DIR);
- strcat(buf, "/");
- strcat(buf, FileNameFromPath(name));
- }
- if (create)
- {
- // Touch the file to create it
- FILE *fd = fopen(buf, "w");
- if (fd) fclose(fd);
- }
- return buf;
-}
-
-// Read $HOME for what it says is home, if not
-// read $USER or $LOGNAME for user name else determine
-// the Real User, then determine the Real home dir.
-static char *GetIniFile(char *dest, const char *filename)
-{
- char *home = (char *) NULL;
- if (filename && wxIsAbsolutePath(filename))
- {
- strcpy(dest, filename);
- }
- else
- {
- if ((home = wxGetUserHome(wxString())) != NULL)
- {
- strcpy(dest, home);
- if (dest[strlen(dest) - 1] != '/') strcat(dest, "/");
- if (filename == NULL)
- {
- if ((filename = getenv("XENVIRONMENT")) == NULL) filename = ".Xdefaults";
- }
- else
- if (*filename != '.') strcat(dest, ".");
- strcat(dest, filename);
- }
- else
- {
- dest[0] = '\0';
- }
- }
- return dest;
-}
-
-static void wxXMergeDatabases()