got rid of STRIPCHARS compile-time variable to make the code more readable, and corresponding configure option. + make sure that CONFDIR from environment gets translated to absolute path
This commit is contained in:
@@ -99,9 +99,6 @@
|
||||
/* Use multiple threads for indexing */
|
||||
#undef IDX_THREADS
|
||||
|
||||
/* Remove case and accents from terms */
|
||||
#undef RCL_INDEX_STRIPCHARS
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
|
||||
@@ -51,10 +51,10 @@ using namespace std;
|
||||
|
||||
// Static, logically const, RclConfig members are initialized once from the
|
||||
// first object build during process initialization.
|
||||
#ifndef RCL_INDEX_STRIPCHARS
|
||||
|
||||
// We default to a case- and diacritics-less index for now
|
||||
bool o_index_stripchars = true;
|
||||
#endif
|
||||
|
||||
string RclConfig::o_localecharset;
|
||||
|
||||
bool ParamStale::needrecompute()
|
||||
@@ -138,7 +138,7 @@ RclConfig::RclConfig(const string *argcnf)
|
||||
} else {
|
||||
const char *cp = getenv("RECOLL_CONFDIR");
|
||||
if (cp) {
|
||||
m_confdir = cp;
|
||||
m_confdir = path_canon(cp);
|
||||
} else {
|
||||
autoconfdir = true;
|
||||
m_confdir = path_cat(path_home(), ".recoll/");
|
||||
@@ -274,13 +274,11 @@ bool RclConfig::updateMainConfig()
|
||||
FsTreeWalker::setNoFnmPathname();
|
||||
}
|
||||
|
||||
#ifndef RCL_INDEX_STRIPCHARS
|
||||
static int m_index_stripchars_init = 0;
|
||||
if (!m_index_stripchars_init) {
|
||||
getConfParam("indexStripChars", &o_index_stripchars);
|
||||
m_index_stripchars_init = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -319,9 +319,8 @@ class RclConfig {
|
||||
// stripped of accents and case or a raw one. Ideally, it should be
|
||||
// constant, but it needs to be initialized from the configuration, so
|
||||
// there is no way to do this. It never changes after initialization
|
||||
// of course. When set, it is supposed to get all of recoll to behave like if
|
||||
// if was compiled with RCL_INDEX_STRIPCHARS
|
||||
#ifndef RCL_INDEX_STRIPCHARS
|
||||
// of course. Changing the value on a given index imposes a
|
||||
// reset. When using multiple indexes, all must have the same value
|
||||
extern bool o_index_stripchars;
|
||||
#endif
|
||||
|
||||
#endif /* _RCLCONFIG_H_INCLUDED_ */
|
||||
|
||||
Reference in New Issue
Block a user