Search config file sequence is changed
This commit is contained in:
parent
53a185b293
commit
348b78be9d
@ -10,6 +10,22 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
! Search config file sequence (*nix):
|
||||
command line option "-C",
|
||||
enviroment variable "GOLDED" (filename),
|
||||
file ${GOLDED}/golded.conf,
|
||||
file ${GOLDED}/golded.cfg,
|
||||
enviroment variable "GED" (filename),
|
||||
file ${GED}/golded.conf,
|
||||
file ${GED}/golded.cfg,
|
||||
file ~/.golded,
|
||||
file ~/.golded/golded.conf,
|
||||
file ~/.golded/golded.cfg,
|
||||
file ~/golded.conf,
|
||||
file ~/golded.cfg,
|
||||
file /usr/local/etc/golded.conf,
|
||||
file /usr/local/etc/golded.cfg.
|
||||
|
||||
- If AREAFILE fidoconfig not exists or can't be opened then Golded+ is printing
|
||||
the diagnostic message.
|
||||
|
||||
|
@ -40,6 +40,8 @@
|
||||
#define GEDCFG2 "gedw32.cfg"
|
||||
#elif defined(__DOS__) || defined(__MSDOS__)
|
||||
#define GEDCFG2 "geddos.cfg"
|
||||
#elif defined(__UNIX__)
|
||||
#define GEDCFG2 "golded.conf"
|
||||
#endif
|
||||
|
||||
#endif /* GEDCFG2 */
|
||||
@ -98,7 +100,7 @@
|
||||
|
||||
#ifndef CFGUSERPATH1
|
||||
#ifdef __UNIX__
|
||||
#define CFGUSERPATH1 "~/.golded/"
|
||||
#define CFGUSERPATH1 "~/.golded"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -458,6 +458,7 @@ static bool FindCfg(char* path) {
|
||||
return false;
|
||||
}
|
||||
AddBackslash(path);
|
||||
|
||||
#ifdef GEDCFG2
|
||||
found = ExistCfg(path, GEDCFG2);
|
||||
#endif
|
||||
@ -561,7 +562,7 @@ void Initialize(int argc, char* argv[]) {
|
||||
|
||||
// Print commandline help and exit if requested
|
||||
if (cmdlinehelp)
|
||||
{
|
||||
{
|
||||
STD_PRINTNL("Copyright (C) 1990-2005 Odinn Sorensen, Alexander Aganichev, Jacobo Tarrio,");
|
||||
STD_PRINTNL(" Stas Degteff and others");
|
||||
STD_PRINTNL("-------------------------------------------------------------------------------");
|
||||
@ -631,7 +632,7 @@ void Initialize(int argc, char* argv[]) {
|
||||
// Get it in user directory (step 1)
|
||||
if(not found) {
|
||||
strxcpy(cmdlinecfg, CFGUSERPATH1, sizeof(cmdlinecfg));
|
||||
getcwd(cmdlinecfg, sizeof(cmdlinecfg));
|
||||
strschg_environ(cmdlinecfg);
|
||||
found = FindCfg(cmdlinecfg);
|
||||
}
|
||||
#endif
|
||||
@ -639,7 +640,7 @@ void Initialize(int argc, char* argv[]) {
|
||||
// Get it in user directory (step 2)
|
||||
if(not found) {
|
||||
strxcpy(cmdlinecfg, CFGUSERPATH2, sizeof(cmdlinecfg));
|
||||
getcwd(cmdlinecfg, sizeof(cmdlinecfg));
|
||||
strschg_environ(cmdlinecfg);
|
||||
found = FindCfg(cmdlinecfg);
|
||||
}
|
||||
#endif
|
||||
@ -647,7 +648,7 @@ void Initialize(int argc, char* argv[]) {
|
||||
// Get it in system config directory
|
||||
if(not found) {
|
||||
strxcpy(cmdlinecfg, CFGPATH, sizeof(cmdlinecfg));
|
||||
getcwd(cmdlinecfg, sizeof(cmdlinecfg));
|
||||
strschg_environ(cmdlinecfg);
|
||||
found = FindCfg(cmdlinecfg);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user