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

@ -10,6 +10,10 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
+ Compile-time defines to specify config file name: GEDCFG (default is
"golded.cfg") and GEDCFG2 (default is platform-depended: "gedw32.cfg",
"ged2.cfg", "geddos.cfg" or nothing).
- Help window will not close on pressing undefined keys. - Help window will not close on pressing undefined keys.
+ DispHdrLocation settings changed to No/Yes/Right/Center. Right == Yes. + DispHdrLocation settings changed to No/Yes/Right/Center. Right == Yes.

View File

@ -28,6 +28,20 @@
#ifndef __GEFN_H__ #ifndef __GEFN_H__
#define __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; return false;
} }
AddBackslash(path); AddBackslash(path);
#if 0
#if defined(__OS2__) #if defined(__OS2__)
found = ExistCfg(path, "ged2.cfg"); found = ExistCfg(path, "ged2.cfg");
#elif defined(__WIN32__) #elif defined(__WIN32__)
found = ExistCfg(path, "gedw32.cfg"); found = ExistCfg(path, "gedw32.cfg");
#endif #endif
#endif
#ifdef GEDCFG2
found = ExistCfg(path, GEDCFG2);
#endif
if(not found) if(not found)
found = ExistCfg(path, "golded.cfg"); found = ExistCfg(path, GEDCFG);
return found; return found;
} }