Switch to unified view

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.7 2006-01-23 13:32:28 dockes Exp $ (C) 2004 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: qtry.cpp,v 1.8 2006-04-28 07:54:38 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
...
...
84
    RclConfig *rclconfig = new RclConfig;
84
    RclConfig *rclconfig = new RclConfig;
85
85
86
    if (!rclconfig->ok())
86
    if (!rclconfig->ok())
87
    cerr << "Config could not be built" << endl;
87
    cerr << "Config could not be built" << endl;
88
88
89
    string dbdir;
89
    string dbdir = rclconfig->getDbDir();
90
    if (rclconfig->getConfParam(string("dbdir"), dbdir) == 0) {
90
    if (dbdir.empty()) {
91
    cerr << "No database directory in configuration" << endl;
91
    cerr << "No database directory in configuration" << endl;
92
    exit(1);
92
    exit(1);
93
    }
93
    }
94
    dbdir = path_tildexpand(dbdir);
94
95
    Rcl::Db *rcldb = new Rcl::Db;
95
    Rcl::Db *rcldb = new Rcl::Db;
96
96
97
    if (!rcldb->open(dbdir, Rcl::Db::DbRO)) {
97
    if (!rcldb->open(dbdir, Rcl::Db::DbRO)) {
98
    fprintf(stderr, "Could not open database\n");
98
    fprintf(stderr, "Could not open database\n");
99
    exit(1);
99
    exit(1);