Changed sequence of config search, thanks to Alexey Vissarionov 2:5020/545

This commit is contained in:
Stas Degteff 2008-05-28 23:21:46 +00:00
parent a9e6100dd9
commit e50d2f728e
4 changed files with 26 additions and 7 deletions

View File

@ -10,6 +10,14 @@ _____________________________________________________________________________
 ¬¥β<C2A5>¨ ¤«ο GoldED+ 1.1.5, /snapshot/  ¬¥β<C2A5>¨ ¤«ο GoldED+ 1.1.5, /snapshot/
_____________________________________________________________________________ _____________________________________________________________________________
! (’®«ìª® UNIX) ˆ§¬¥­¥­  ¯®á«¥¤®¢ â¥«ì­®áâì ¯®¨áª  ä ©«  ª®­ä¨£ãà æ¨¨ ¢ î­¨ªá®¯®¤®¡­ëå
Ž‘. <20>®¢ ï ®ç¥àñ¤­®áâì ¯®¨áª :
1 - ~/fido/etc/
2 - ~/ftn/etc/
3 - ~/.golded/
4 - ⥪ã騩 ª â «®£ (§ ¯ã᪠)
“¤ «¥­ë ¨§ ¯®¨áª : ª â «®£ /usr/local/etc/ ¨ ª â «®£ á ¡¨­ à­¨ª®¬ gedlnx.
- <20>⬥­¥­® ¨§¬¥­¥­¨¥ ®΅ΰ ΅®β<C2AE>¨ γΰ®Ά­ο <20>®¤¨ΰ®Ά<C2AE>¨ ᨬΆ®«®Ά (<28>« ¤¦ CHRS). ’ΰ ­α«οζ¨ο - <20>⬥­¥­® ¨§¬¥­¥­¨¥ ®΅ΰ ΅®β<C2AE>¨ γΰ®Ά­ο <20>®¤¨ΰ®Ά<C2AE>¨ ᨬΆ®«®Ά (<28>« ¤¦ CHRS). ’ΰ ­α«οζ¨ο
¨α―®«μ§γ¥βαο ¤«ο Άα¥ε γΰ®Ά­¥©. (‘¬. ‘­ ―θ®β ®β 14 ο­Ά ΰο 2006.) ¨α―®«μ§γ¥βαο ¤«ο Άα¥ε γΰ®Ά­¥©. (‘¬. ‘­ ―θ®β ®β 14 ο­Ά ΰο 2006.)

View File

@ -10,6 +10,15 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
! (UNIX only) Changed sequience for config file search in unix-like OS.
New order is:
1 - ~/fido/etc/
2 - ~/ftn/etc/
3 - ~/.golded/
4 - current (running) directory
Removed from search order: a directory /usr/local/etc/ and the directory
where is gedlnx binary.
- Reverce fix for charset level processing (CHRS kludge). Translate all - Reverce fix for charset level processing (CHRS kludge). Translate all
levels. (See Snapshot for the January 14, 2006.) levels. (See Snapshot for the January 14, 2006.)

View File

@ -100,19 +100,19 @@
#ifndef CFGUSERPATH1 #ifndef CFGUSERPATH1
#ifdef __UNIX__ #ifdef __UNIX__
#define CFGUSERPATH1 "~/.golded/" /* Trailing slash: this is directory */ #define CFGUSERPATH1 "~/fido/etc/" /* Trailing slash: this is directory */
#endif #endif
#endif #endif
#ifndef CFGUSERPATH2 #ifndef CFGUSERPATH2
#ifdef __UNIX__ #ifdef __UNIX__
#define CFGUSERPATH2 "~/" #define CFGUSERPATH2 "~/ftn/etc/" /* Trailing slash: this is directory */
#endif #endif
#endif #endif
#ifndef CFGPATH #ifndef CFGPATH
#ifdef __UNIX__ #ifdef __UNIX__
#define CFGPATH "/usr/local/etc/" #define CFGPATH "~/.golded/" /* Trailing slash: this is directory */
#endif #endif
#endif #endif

View File

@ -683,15 +683,17 @@ void Initialize(int argc, char* argv[]) {
found = FindCfg(cmdlinecfg); found = FindCfg(cmdlinecfg);
} }
#ifndef __UNIX__
// Get it where the the binary file is // Get it where the the binary file is
if(not found) { if(not found) {
extractdirname(cmdlinecfg, argv[0]); extractdirname(cmdlinecfg, argv[0]);
found = FindCfg(cmdlinecfg); found = FindCfg(cmdlinecfg);
// If we still could not find config name...
if(not found)
strcat(cmdlinecfg, GEDCFG);
} }
#endif
// If we still could not find config name...
if(not found)
strcat(cmdlinecfg, GEDCFG);
} }
extractdirname(CFG->goldpath, cmdlinecfg); extractdirname(CFG->goldpath, cmdlinecfg);
truepathtmp = CFG->goldpath; truepathtmp = CFG->goldpath;