Switch to unified view

a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.30 2006-09-08 09:02:47 dockes Exp $ (C) 2004 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.31 2006-10-16 15:33:08 dockes Exp $ (C) 2004 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
148
    return false;
148
    return false;
149
    *bvp = stringToBool(s);
149
    *bvp = stringToBool(s);
150
    return true;
150
    return true;
151
}
151
}
152
152
153
list<string> RclConfig::getTopdirs()
154
{
155
    list<string> tdl;
156
    // Retrieve the list of directories to be indexed.
157
    string topdirs;
158
    if (!getConfParam("topdirs", topdirs)) {
159
  LOGERR(("RclConfig::getTopdirs: no top directories in config\n"));
160
  return tdl;
161
    }
162
    if (!stringToStrings(topdirs, tdl)) {
163
  LOGERR(("RclConfig::getTopdirs: parse error for directory list\n"));
164
  return tdl;
165
    }
166
    for (list<string>::iterator it = tdl.begin(); it != tdl.end(); it++) {
167
  *it = path_tildexpand(*it);
168
  *it = path_canon(*it);
169
    }
170
    return tdl;
171
}
172
153
// Get charset to be used for transcoding to utf-8 if unspecified by doc
173
// Get charset to be used for transcoding to utf-8 if unspecified by doc
154
// For document contents:
174
// For document contents:
155
//   If defcharset was set (from the config or a previous call), use it.
175
//   If defcharset was set (from the config or a previous call), use it.
156
//   Else, try to guess it from the locale
176
//   Else, try to guess it from the locale
157
//   Use iso8859-1 as ultimate default
177
//   Use iso8859-1 as ultimate default