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.4 2005-01-25 14:37:20 dockes Exp $ (C) 2004 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.5 2005-01-31 14:31:09 dockes Exp $ (C) 2004 J.F.Dockes";
3
#endif
3
#endif
4
4
5
#include <iostream>
5
#include <iostream>
6
6
7
#include "rclconfig.h"
7
#include "rclconfig.h"
8
#include "pathut.h"
8
#include "pathut.h"
9
#include "conftree.h"
9
#include "conftree.h"
10
#include "debuglog.h"
10
#include "debuglog.h"
11
11
12
static DebugLog debuglog;
13
DebugLog *dbl = &debuglog;
14
class loginitializer {
15
 public:
16
    loginitializer() {
17
  dbl->setlogfilename("stderr");
18
  dbl->setloglevel(10);
19
    }
20
};
21
static loginitializer lgntlzr;
22
23
using namespace std;
12
using namespace std;
24
13
25
RclConfig::RclConfig()
14
RclConfig::RclConfig()
26
    : m_ok(false), conf(0), mimemap(0), mimeconf(0)
15
    : m_ok(false), conf(0), mimemap(0), mimeconf(0)
27
{
16
{
17
    static int loginit = 0;
18
    if (!loginit) {
19
  DebugLog::setfilename("stderr");
20
  DebugLog::getdbl()->setloglevel(10);
21
  loginit = 1;
22
    }
23
28
    const char *cp = getenv("RECOLL_CONFDIR");
24
    const char *cp = getenv("RECOLL_CONFDIR");
29
    if (cp) {
25
    if (cp) {
30
    confdir = cp;
26
    confdir = cp;
31
    } else {
27
    } else {
32
    confdir = path_home();
28
    confdir = path_home();