Set GEDCFG and GEDCFG2 defines to specify config file name.

This commit is contained in:
Stas Degteff
2005-10-27 17:14:43 +00:00
parent 1f3c735f39
commit 0cce1be48c
3 changed files with 26 additions and 2 deletions

View File

@@ -28,6 +28,20 @@
#ifndef __GEFN_H__
#define __GEFN_H__
#ifndef GEDCFG
#define GEDCFG "golded.cfg"
#endif /* GEDCFG */
#endif
#ifndef GEDCFG2
#if defined(__OS2__)
#define GEDCFG2 "ged2.cfg"
#elif defined(__WIN32__)
#define GEDCFG2 "gedw32.cfg"
#elif defined(__DOS__) || defined(__MSDOS__)
#define GEDCFG2 "geddos.cfg"
#endif
#endif /* GEDCFG2 */
#endif /* __GEFN_H__ */

View File

@@ -455,13 +455,19 @@ static bool FindCfg(char* path) {
return false;
}
AddBackslash(path);
#if 0
#if defined(__OS2__)
found = ExistCfg(path, "ged2.cfg");
#elif defined(__WIN32__)
found = ExistCfg(path, "gedw32.cfg");
#endif
#endif
#ifdef GEDCFG2
found = ExistCfg(path, GEDCFG2);
#endif
if(not found)
found = ExistCfg(path, "golded.cfg");
found = ExistCfg(path, GEDCFG);
return found;
}