|
a/src/query/qtry.cpp |
|
b/src/query/qtry.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: qtry.cpp,v 1.3 2005-01-26 11:47:27 dockes Exp $ (C) 2004 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: qtry.cpp,v 1.4 2005-01-31 14:31:10 dockes Exp $ (C) 2004 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
|
4 |
|
5 |
// Tests with the query interface
|
5 |
// Tests with the query interface
|
6 |
|
6 |
|
7 |
#include <strings.h>
|
7 |
#include <strings.h>
|
|
... |
|
... |
13 |
#include "conftree.h"
|
13 |
#include "conftree.h"
|
14 |
#include "rclconfig.h"
|
14 |
#include "rclconfig.h"
|
15 |
#include "rcldb.h"
|
15 |
#include "rcldb.h"
|
16 |
#include "transcode.h"
|
16 |
#include "transcode.h"
|
17 |
#include "mimehandler.h"
|
17 |
#include "mimehandler.h"
|
|
|
18 |
#include "pathut.h"
|
18 |
|
19 |
|
19 |
using namespace std;
|
20 |
using namespace std;
|
20 |
|
21 |
|
21 |
#include "rcldb.h"
|
22 |
#include "rcldb.h"
|
22 |
|
23 |
|
|
... |
|
... |
70 |
string dbdir;
|
71 |
string dbdir;
|
71 |
if (rclconfig->getConfParam(string("dbdir"), dbdir) == 0) {
|
72 |
if (rclconfig->getConfParam(string("dbdir"), dbdir) == 0) {
|
72 |
cerr << "No database directory in configuration" << endl;
|
73 |
cerr << "No database directory in configuration" << endl;
|
73 |
exit(1);
|
74 |
exit(1);
|
74 |
}
|
75 |
}
|
75 |
|
76 |
dbdir = path_tildexpand(dbdir);
|
76 |
Rcl::Db *rcldb = new Rcl::Db;
|
77 |
Rcl::Db *rcldb = new Rcl::Db;
|
77 |
|
78 |
|
78 |
if (!rcldb->open(dbdir, Rcl::Db::DbRO)) {
|
79 |
if (!rcldb->open(dbdir, Rcl::Db::DbRO)) {
|
79 |
fprintf(stderr, "Could not open database\n");
|
80 |
fprintf(stderr, "Could not open database\n");
|
80 |
exit(1);
|
81 |
exit(1);
|