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/
|
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
|
- If AREAFILE fidoconfig not exists or can't be opened then Golded+ is printing
|
||||||
the diagnostic message.
|
the diagnostic message.
|
||||||
|
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#define GEDCFG2 "gedw32.cfg"
|
#define GEDCFG2 "gedw32.cfg"
|
||||||
#elif defined(__DOS__) || defined(__MSDOS__)
|
#elif defined(__DOS__) || defined(__MSDOS__)
|
||||||
#define GEDCFG2 "geddos.cfg"
|
#define GEDCFG2 "geddos.cfg"
|
||||||
|
#elif defined(__UNIX__)
|
||||||
|
#define GEDCFG2 "golded.conf"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* GEDCFG2 */
|
#endif /* GEDCFG2 */
|
||||||
@ -98,7 +100,7 @@
|
|||||||
|
|
||||||
#ifndef CFGUSERPATH1
|
#ifndef CFGUSERPATH1
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
#define CFGUSERPATH1 "~/.golded/"
|
#define CFGUSERPATH1 "~/.golded"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -458,6 +458,7 @@ static bool FindCfg(char* path) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
AddBackslash(path);
|
AddBackslash(path);
|
||||||
|
|
||||||
#ifdef GEDCFG2
|
#ifdef GEDCFG2
|
||||||
found = ExistCfg(path, GEDCFG2);
|
found = ExistCfg(path, GEDCFG2);
|
||||||
#endif
|
#endif
|
||||||
@ -631,7 +632,7 @@ void Initialize(int argc, char* argv[]) {
|
|||||||
// Get it in user directory (step 1)
|
// Get it in user directory (step 1)
|
||||||
if(not found) {
|
if(not found) {
|
||||||
strxcpy(cmdlinecfg, CFGUSERPATH1, sizeof(cmdlinecfg));
|
strxcpy(cmdlinecfg, CFGUSERPATH1, sizeof(cmdlinecfg));
|
||||||
getcwd(cmdlinecfg, sizeof(cmdlinecfg));
|
strschg_environ(cmdlinecfg);
|
||||||
found = FindCfg(cmdlinecfg);
|
found = FindCfg(cmdlinecfg);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -639,7 +640,7 @@ void Initialize(int argc, char* argv[]) {
|
|||||||
// Get it in user directory (step 2)
|
// Get it in user directory (step 2)
|
||||||
if(not found) {
|
if(not found) {
|
||||||
strxcpy(cmdlinecfg, CFGUSERPATH2, sizeof(cmdlinecfg));
|
strxcpy(cmdlinecfg, CFGUSERPATH2, sizeof(cmdlinecfg));
|
||||||
getcwd(cmdlinecfg, sizeof(cmdlinecfg));
|
strschg_environ(cmdlinecfg);
|
||||||
found = FindCfg(cmdlinecfg);
|
found = FindCfg(cmdlinecfg);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -647,7 +648,7 @@ void Initialize(int argc, char* argv[]) {
|
|||||||
// Get it in system config directory
|
// Get it in system config directory
|
||||||
if(not found) {
|
if(not found) {
|
||||||
strxcpy(cmdlinecfg, CFGPATH, sizeof(cmdlinecfg));
|
strxcpy(cmdlinecfg, CFGPATH, sizeof(cmdlinecfg));
|
||||||
getcwd(cmdlinecfg, sizeof(cmdlinecfg));
|
strschg_environ(cmdlinecfg);
|
||||||
found = FindCfg(cmdlinecfg);
|
found = FindCfg(cmdlinecfg);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user