|
Revision 9982, 1.9 kB
(checked in by olly, 12 months ago)
|
|
backends/flint/flint_check.h,backends/flint/flint_table.h,
backends/quartz/btree.h,net/tcpserver.cc,tests/harness/testsuite.cc:
Add XAPIAN_NORETURN() annotations to functions and non-virtual
methods which don't return.
net/remoteserver.cc: Assign bool variable using a comparison rather
than subtraction, so the intent is clearer.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | #ifndef OM_HGUARD_FLINT_CHECK_H |
|---|
| 24 | #define OM_HGUARD_FLINT_CHECK_H |
|---|
| 25 | |
|---|
| 26 | #include "flint_table.h" |
|---|
| 27 | #include "noreturn.h" |
|---|
| 28 | |
|---|
| 29 | #include <iostream> |
|---|
| 30 | #include <string> |
|---|
| 31 | |
|---|
| 32 | class BtreeCheck : public FlintTable { |
|---|
| 33 | public: |
|---|
| 34 | static void check(const string & name, int opts, |
|---|
| 35 | std::ostream &out = std::cout); |
|---|
| 36 | private: |
|---|
| 37 | BtreeCheck(const std::string &name_, bool readonly, std::ostream &out_) |
|---|
| 38 | : FlintTable(name_, readonly), out(out_) { } |
|---|
| 39 | |
|---|
| 40 | void block_check(Cursor_ * C_, int j, int opts); |
|---|
| 41 | int block_usage(const byte * p) const; |
|---|
| 42 | void report_block(int m, int n, const byte * p) const; |
|---|
| 43 | void report_block_full(int m, int n, const byte * p) const; |
|---|
| 44 | void report_cursor(int N, const Cursor_ *C_) const; |
|---|
| 45 | |
|---|
| 46 | XAPIAN_NORETURN(void failure(int n) const); |
|---|
| 47 | void print_key(const byte * p, int c, int j) const; |
|---|
| 48 | void print_tag(const byte * p, int c, int j) const; |
|---|
| 49 | void print_spaces(int n) const; |
|---|
| 50 | void print_bytes(int n, const byte * p) const; |
|---|
| 51 | |
|---|
| 52 | mutable std::ostream &out; |
|---|
| 53 | }; |
|---|
| 54 | |
|---|
| 55 | #define OPT_SHORT_TREE 1 |
|---|
| 56 | #define OPT_FULL_TREE 2 |
|---|
| 57 | #define OPT_SHOW_BITMAP 4 |
|---|
| 58 | #define OPT_SHOW_STATS 8 |
|---|
| 59 | |
|---|
| 60 | #endif |
|---|