|
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.6 2005-02-04 09:39:44 dockes Exp $ (C) 2004 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.7 2005-03-31 10:04:07 dockes Exp $ (C) 2004 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
#include <unistd.h>
|
4 |
#include <unistd.h>
|
5 |
|
5 |
|
6 |
#include <iostream>
|
6 |
#include <iostream>
|
7 |
|
7 |
|
|
... |
|
... |
49 |
mimemap = new ConfTree(mpath.c_str());
|
49 |
mimemap = new ConfTree(mpath.c_str());
|
50 |
if (mimemap == 0) {
|
50 |
if (mimemap == 0) {
|
51 |
cerr << "No mime map file" << endl;
|
51 |
cerr << "No mime map file" << endl;
|
52 |
return;
|
52 |
return;
|
53 |
}
|
53 |
}
|
|
|
54 |
// mimemap->list();
|
|
|
55 |
|
54 |
string mimeconffile;
|
56 |
string mimeconffile;
|
55 |
if (!conf->get("mimeconffile", mimeconffile, "")) {
|
57 |
if (!conf->get("mimeconffile", mimeconffile, "")) {
|
56 |
mimeconffile = "mimeconf";
|
58 |
mimeconffile = "mimeconf";
|
57 |
}
|
59 |
}
|
58 |
mpath = confdir;
|
60 |
mpath = confdir;
|
59 |
|
|
|
60 |
path_cat(mpath, mimeconffile);
|
61 |
path_cat(mpath, mimeconffile);
|
61 |
mimeconf = new ConfTree(mpath.c_str());
|
62 |
mimeconf = new ConfTree(mpath.c_str());
|
62 |
if (mimeconf == 0) {
|
63 |
if (mimeconf == 0) {
|
63 |
cerr << "No mime conf file" << endl;
|
64 |
cerr << "No mime conf file" << endl;
|
64 |
return;
|
65 |
return;
|
65 |
}
|
66 |
}
|
|
|
67 |
// mimeconf->list();
|
|
|
68 |
|
66 |
setKeyDir(string(""));
|
69 |
setKeyDir(string(""));
|
67 |
// mimeconf->list();
|
70 |
|
68 |
m_ok = true;
|
71 |
m_ok = true;
|
69 |
return;
|
72 |
return;
|
70 |
}
|
73 |
}
|
71 |
|
74 |
|
72 |
// Look up an executable filter.
|
75 |
// Look up an executable filter.
|