1 /* quartzcheck.cc: use btree::check to try and find fault with db's
3 * ----START-LICENCE----
4 * Copyright 1999,2000,2001 BrightStation PLC
5 * Copyright 2002 Ananova Ltd
6 * Copyright 2002 Olly Betts
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * -----END-LICENCE-----
37 main(int argc
, char **argv
)
40 cout
<< "usage: " << argv
[0]
41 << " <path to btree and prefix> [<options>]" << endl
42 << " e.g. " << argv
[0] << " /var/spool/xapian/mydb/postlist_"
48 if (argc
>2) Btree::check(argv
[1],argv
[2]);
49 else Btree::check(argv
[1],"+");
51 catch (const OmError
&error
) {
52 cerr
<< argv
[0] << ": " << error
.get_msg() << endl
;