From e50d2f728e51d74f0b0330c8e7e95e0b45e90067 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Wed, 28 May 2008 23:21:46 +0000 Subject: [PATCH] Changed sequence of config search, thanks to Alexey Vissarionov 2:5020/545 --- docs/notework.rus | 8 ++++++++ docs/notework.txt | 9 +++++++++ golded3/gefn.h | 6 +++--- golded3/geinit.cpp | 10 ++++++---- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/notework.rus b/docs/notework.rus index 0251cc1..1ea5fdd 100644 --- a/docs/notework.rus +++ b/docs/notework.rus @@ -10,6 +10,14 @@ _____________________________________________________________________________ Заметки для GoldED+ 1.1.5, /snapshot/ _____________________________________________________________________________ +! (Только UNIX) Изменена последовательность поиска файла конфигурации в юниксоподобных + ОС. Новая очерёдность поиска: + 1 - ~/fido/etc/ + 2 - ~/ftn/etc/ + 3 - ~/.golded/ + 4 - текущий каталог (запуска) + Удалены из поиска: каталог /usr/local/etc/ и каталог с бинарником gedlnx. + - Отменено изменение обработки уровня кодировки символов (кладж CHRS). Трансляция используется для всех уровней. (См. Снапшот от 14 января 2006.) diff --git a/docs/notework.txt b/docs/notework.txt index b18f2c9..3c3862a 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,15 @@ ______________________________________________________________________ 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 levels. (See Snapshot for the January 14, 2006.) diff --git a/golded3/gefn.h b/golded3/gefn.h index ce47538..59b395d 100644 --- a/golded3/gefn.h +++ b/golded3/gefn.h @@ -100,19 +100,19 @@ #ifndef CFGUSERPATH1 #ifdef __UNIX__ -#define CFGUSERPATH1 "~/.golded/" /* Trailing slash: this is directory */ +#define CFGUSERPATH1 "~/fido/etc/" /* Trailing slash: this is directory */ #endif #endif #ifndef CFGUSERPATH2 #ifdef __UNIX__ -#define CFGUSERPATH2 "~/" +#define CFGUSERPATH2 "~/ftn/etc/" /* Trailing slash: this is directory */ #endif #endif #ifndef CFGPATH #ifdef __UNIX__ -#define CFGPATH "/usr/local/etc/" +#define CFGPATH "~/.golded/" /* Trailing slash: this is directory */ #endif #endif diff --git a/golded3/geinit.cpp b/golded3/geinit.cpp index b77be19..e6916cd 100644 --- a/golded3/geinit.cpp +++ b/golded3/geinit.cpp @@ -683,15 +683,17 @@ void Initialize(int argc, char* argv[]) { found = FindCfg(cmdlinecfg); } + #ifndef __UNIX__ // Get it where the the binary file is if(not found) { extractdirname(cmdlinecfg, argv[0]); 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); truepathtmp = CFG->goldpath;