Fixed missing include in quartzcheck.cc
[xapian.git] / xapian-core / backends / quartz / quartzcheck.cc
blobf4a18ef4c5d095b29b23be5cf68191e784038ff6
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
21 * USA
22 * -----END-LICENCE-----
25 #include <om/om.h>
26 #include <iostream>
28 using namespace std;
30 #include <errno.h>
31 #include <string.h>
32 #include <sys/stat.h>
34 #include "btree.h"
36 int
37 main(int argc, char **argv)
39 if (argc < 2) {
40 cout << "usage: " << argv[0]
41 << " <path to btree and prefix> [<options>]" << endl
42 << " e.g. " << argv[0] << " /var/spool/xapian/mydb/postlist_"
43 << endl;
44 exit(1);
47 try {
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;
53 exit(1);
55 return 0;