You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2012/11/18 19:46:19 UTC
[lucy-commits] [6/23] Switch to 'bool'
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Plan/StringType.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Plan/StringType.cfh b/core/Lucy/Plan/StringType.cfh
index fefa749..fa8667e 100644
--- a/core/Lucy/Plan/StringType.cfh
+++ b/core/Lucy/Plan/StringType.cfh
@@ -34,8 +34,8 @@ public class Lucy::Plan::StringType
init(StringType *self);
inert StringType*
- init2(StringType *self, float boost = 1.0, bool_t indexed = true,
- bool_t stored = true, bool_t sortable = false);
+ init2(StringType *self, float boost = 1.0, bool indexed = true,
+ bool stored = true, bool sortable = false);
public inert incremented StringType*
new();
@@ -52,7 +52,7 @@ public class Lucy::Plan::StringType
public incremented StringType*
Load(StringType *self, Obj *dump);
- public bool_t
+ public bool
Equals(StringType *self, Obj *other);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/ANDMatcher.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/ANDMatcher.c b/core/Lucy/Search/ANDMatcher.c
index 3945f2a..03636b2 100644
--- a/core/Lucy/Search/ANDMatcher.c
+++ b/core/Lucy/Search/ANDMatcher.c
@@ -90,7 +90,7 @@ ANDMatcher_advance(ANDMatcher *self, int32_t target) {
// Second step: reconcile.
while (1) {
- bool_t agreement = true;
+ bool agreement = true;
// Scoot all Matchers up.
for (uint32_t i = 0; i < num_kids; i++) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/ANDMatcher.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/ANDMatcher.cfh b/core/Lucy/Search/ANDMatcher.cfh
index a0646b5..94202ec 100644
--- a/core/Lucy/Search/ANDMatcher.cfh
+++ b/core/Lucy/Search/ANDMatcher.cfh
@@ -22,8 +22,8 @@ parcel Lucy;
class Lucy::Search::ANDMatcher inherits Lucy::Search::PolyMatcher {
Matcher **kids;
- bool_t more;
- bool_t first_time;
+ bool more;
+ bool first_time;
inert incremented ANDMatcher*
new(VArray *children, Similarity *sim);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/ANDQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/ANDQuery.c b/core/Lucy/Search/ANDQuery.c
index c976a35..f7c367d 100644
--- a/core/Lucy/Search/ANDQuery.c
+++ b/core/Lucy/Search/ANDQuery.c
@@ -63,7 +63,7 @@ ANDQuery_to_string(ANDQuery *self) {
}
-bool_t
+bool
ANDQuery_equals(ANDQuery *self, Obj *other) {
if ((ANDQuery*)other == self) { return true; }
if (!Obj_Is_A(other, ANDQUERY)) { return false; }
@@ -72,7 +72,7 @@ ANDQuery_equals(ANDQuery *self, Obj *other) {
Compiler*
ANDQuery_make_compiler(ANDQuery *self, Searcher *searcher, float boost,
- bool_t subordinate) {
+ bool subordinate) {
ANDCompiler *compiler = ANDCompiler_new(self, searcher, boost);
if (!subordinate) {
ANDCompiler_Normalize(compiler);
@@ -98,7 +98,7 @@ ANDCompiler_init(ANDCompiler *self, ANDQuery *parent, Searcher *searcher,
Matcher*
ANDCompiler_make_matcher(ANDCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
uint32_t num_kids = VA_Get_Size(self->children);
if (num_kids == 1) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/ANDQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/ANDQuery.cfh b/core/Lucy/Search/ANDQuery.cfh
index 7069b72..e7d2bb3 100644
--- a/core/Lucy/Search/ANDQuery.cfh
+++ b/core/Lucy/Search/ANDQuery.cfh
@@ -36,12 +36,12 @@ public class Lucy::Search::ANDQuery inherits Lucy::Search::PolyQuery
public incremented Compiler*
Make_Compiler(ANDQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
public incremented CharBuf*
To_String(ANDQuery *self);
- public bool_t
+ public bool
Equals(ANDQuery *self, Obj *other);
}
@@ -56,7 +56,7 @@ class Lucy::Search::ANDCompiler
float boost);
public incremented nullable Matcher*
- Make_Matcher(ANDCompiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(ANDCompiler *self, SegReader *reader, bool need_score);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Collector.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Collector.c b/core/Lucy/Search/Collector.c
index f0da8ee..4fa9a70 100644
--- a/core/Lucy/Search/Collector.c
+++ b/core/Lucy/Search/Collector.c
@@ -81,7 +81,7 @@ BitColl_collect(BitCollector *self, int32_t doc_id) {
BitVec_Set(self->bit_vec, (self->base + doc_id));
}
-bool_t
+bool
BitColl_need_score(BitCollector *self) {
UNUSED_VAR(self);
return false;
@@ -128,7 +128,7 @@ OffsetColl_collect(OffsetCollector *self, int32_t doc_id) {
Coll_Collect(self->inner_coll, (doc_id + self->offset));
}
-bool_t
+bool
OffsetColl_need_score(OffsetCollector *self) {
return Coll_Need_Score(self->inner_coll);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Collector.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Collector.cfh b/core/Lucy/Search/Collector.cfh
index 67c6acd..abeafeb 100644
--- a/core/Lucy/Search/Collector.cfh
+++ b/core/Lucy/Search/Collector.cfh
@@ -65,7 +65,7 @@ public abstract class Lucy::Search::Collector cnick Coll
/** Indicate whether the Collector will call Score() on its Matcher.
*/
- public abstract bool_t
+ public abstract bool
Need_Score(Collector *self);
/** Setter for "matcher".
@@ -101,7 +101,7 @@ public class Lucy::Search::Collector::BitCollector cnick BitColl
/** Returns false, since BitCollector requires only doc ids.
*/
- public bool_t
+ public bool
Need_Score(BitCollector *self);
}
@@ -127,7 +127,7 @@ class Lucy::Search::Collector::OffsetCollector cnick OffsetColl
public void
Collect(OffsetCollector *self, int32_t doc_id);
- public bool_t
+ public bool
Need_Score(OffsetCollector *self);
public void
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Collector/SortCollector.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Collector/SortCollector.c b/core/Lucy/Search/Collector/SortCollector.c
index 01bb21b..9c4d182 100644
--- a/core/Lucy/Search/Collector/SortCollector.c
+++ b/core/Lucy/Search/Collector/SortCollector.c
@@ -62,7 +62,7 @@ static int8_t
S_derive_action(SortRule *rule, SortCache *sort_cache);
// Decide whether a doc should be inserted into the HitQueue.
-static INLINE bool_t
+static INLINE bool
SI_competitive(SortCollector *self, int32_t doc_id);
SortCollector*
@@ -176,7 +176,7 @@ SortColl_destroy(SortCollector *self) {
static int8_t
S_derive_action(SortRule *rule, SortCache *cache) {
int32_t rule_type = SortRule_Get_Type(rule);
- bool_t reverse = !!SortRule_Get_Reverse(rule);
+ bool reverse = !!SortRule_Get_Reverse(rule);
if (rule_type == SortRule_SCORE) {
return COMPARE_BY_SCORE + reverse;
@@ -259,7 +259,7 @@ SortColl_get_total_hits(SortCollector *self) {
return self->total_hits;
}
-bool_t
+bool
SortColl_need_score(SortCollector *self) {
return self->need_score;
}
@@ -400,7 +400,7 @@ SI_validate_doc_id(SortCollector *self, int32_t doc_id) {
return doc_id;
}
-static INLINE bool_t
+static INLINE bool
SI_competitive(SortCollector *self, int32_t doc_id) {
/* Ordinarily, we would cache local copies of more member variables in
* const automatic variables in order to improve code clarity and provide
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Collector/SortCollector.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Collector/SortCollector.cfh b/core/Lucy/Search/Collector/SortCollector.cfh
index 99a8900..dd89e9b 100644
--- a/core/Lucy/Search/Collector/SortCollector.cfh
+++ b/core/Lucy/Search/Collector/SortCollector.cfh
@@ -39,8 +39,8 @@ class Lucy::Search::Collector::SortCollector cnick SortColl
float bubble_score;
int32_t bubble_doc;
int32_t seg_doc_max;
- bool_t need_score;
- bool_t need_values;
+ bool need_score;
+ bool need_values;
inert incremented SortCollector*
new(Schema *schema = NULL, SortSpec *sort_spec = NULL, uint32_t wanted);
@@ -74,7 +74,7 @@ class Lucy::Search::Collector::SortCollector cnick SortColl
public void
Set_Reader(SortCollector *self, SegReader *reader);
- public bool_t
+ public bool
Need_Score(SortCollector *self);
public void
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Compiler.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Compiler.c b/core/Lucy/Search/Compiler.c
index be6bdc3..585add1 100644
--- a/core/Lucy/Search/Compiler.c
+++ b/core/Lucy/Search/Compiler.c
@@ -109,7 +109,7 @@ Compiler_to_string(Compiler *self) {
return string;
}
-bool_t
+bool
Compiler_equals(Compiler *self, Obj *other) {
Compiler *twin = (Compiler*)other;
if (twin == self) { return true; }
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Compiler.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Compiler.cfh b/core/Lucy/Search/Compiler.cfh
index 66b8159..910e708 100644
--- a/core/Lucy/Search/Compiler.cfh
+++ b/core/Lucy/Search/Compiler.cfh
@@ -83,7 +83,7 @@ public class Lucy::Search::Compiler inherits Lucy::Search::Query {
* documents.
*/
public abstract incremented nullable Matcher*
- Make_Matcher(Compiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(Compiler *self, SegReader *reader, bool need_score);
/** Return the Compiler's numerical weight, a scoring multiplier. By
* default, returns the object's boost.
@@ -157,7 +157,7 @@ public class Lucy::Search::Compiler inherits Lucy::Search::Query {
public incremented Compiler*
Deserialize(decremented Compiler *self, InStream *instream);
- public bool_t
+ public bool
Equals(Compiler *self, Obj *other);
public incremented CharBuf*
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/HitQueue.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/HitQueue.c b/core/Lucy/Search/HitQueue.c
index a9bca7a..0930cb1 100644
--- a/core/Lucy/Search/HitQueue.c
+++ b/core/Lucy/Search/HitQueue.c
@@ -62,7 +62,7 @@ HitQ_init(HitQueue *self, Schema *schema, SortSpec *sort_spec,
for (uint32_t i = 0; i < num_rules; i++) {
SortRule *rule = (SortRule*)VA_Fetch(rules, i);
int32_t rule_type = SortRule_Get_Type(rule);
- bool_t reverse = SortRule_Get_Reverse(rule);
+ bool reverse = SortRule_Get_Reverse(rule);
if (rule_type == SortRule_SCORE) {
self->actions[action_num++] = reverse
@@ -135,7 +135,7 @@ SI_compare_by_value(HitQueue *self, uint32_t tick, MatchDoc *a, MatchDoc *b) {
return FType_null_back_compare_values(field_type, a_val, b_val);
}
-bool_t
+bool
HitQ_less_than(HitQueue *self, Obj *obj_a, Obj *obj_b) {
MatchDoc *const a = (MatchDoc*)obj_a;
MatchDoc *const b = (MatchDoc*)obj_b;
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/HitQueue.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/HitQueue.cfh b/core/Lucy/Search/HitQueue.cfh
index d7defc4..fa8a049 100644
--- a/core/Lucy/Search/HitQueue.cfh
+++ b/core/Lucy/Search/HitQueue.cfh
@@ -28,7 +28,7 @@ class Lucy::Search::HitQueue cnick HitQ
FieldType **field_types;
uint8_t *actions;
uint32_t num_actions;
- bool_t need_values;
+ bool need_values;
inert incremented HitQueue*
new(Schema *schema = NULL, SortSpec *sort_spec = NULL, uint32_t wanted);
@@ -52,7 +52,7 @@ class Lucy::Search::HitQueue cnick HitQ
incremented nullable Obj*
Jostle(HitQueue *self, decremented Obj *element);
- bool_t
+ bool
Less_Than(HitQueue *self, Obj *a, Obj *b);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/IndexSearcher.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/IndexSearcher.c b/core/Lucy/Search/IndexSearcher.c
index 83d0a3f..fc48c13 100644
--- a/core/Lucy/Search/IndexSearcher.c
+++ b/core/Lucy/Search/IndexSearcher.c
@@ -125,7 +125,7 @@ void
IxSearcher_collect(IndexSearcher *self, Query *query, Collector *collector) {
VArray *const seg_readers = self->seg_readers;
I32Array *const seg_starts = self->seg_starts;
- bool_t need_score = Coll_Need_Score(collector);
+ bool need_score = Coll_Need_Score(collector);
Compiler *compiler = Query_Is_A(query, COMPILER)
? (Compiler*)INCREF(query)
: Query_Make_Compiler(query, (Searcher*)self,
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/LeafQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/LeafQuery.c b/core/Lucy/Search/LeafQuery.c
index 1dd04e9..781eb11 100644
--- a/core/Lucy/Search/LeafQuery.c
+++ b/core/Lucy/Search/LeafQuery.c
@@ -54,7 +54,7 @@ LeafQuery_get_text(LeafQuery *self) {
return self->text;
}
-bool_t
+bool
LeafQuery_equals(LeafQuery *self, Obj *other) {
LeafQuery *twin = (LeafQuery*)other;
if (twin == self) { return true; }
@@ -107,7 +107,7 @@ LeafQuery_deserialize(LeafQuery *self, InStream *instream) {
Compiler*
LeafQuery_make_compiler(LeafQuery *self, Searcher *searcher, float boost,
- bool_t subordinate) {
+ bool subordinate) {
UNUSED_VAR(self);
UNUSED_VAR(searcher);
UNUSED_VAR(boost);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/LeafQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/LeafQuery.cfh b/core/Lucy/Search/LeafQuery.cfh
index cdfe8c8..d6c7bb6 100644
--- a/core/Lucy/Search/LeafQuery.cfh
+++ b/core/Lucy/Search/LeafQuery.cfh
@@ -51,7 +51,7 @@ public class Lucy::Search::LeafQuery inherits Lucy::Search::Query
public CharBuf*
Get_Text(LeafQuery *self);
- public bool_t
+ public bool
Equals(LeafQuery *self, Obj *other);
public incremented CharBuf*
@@ -67,7 +67,7 @@ public class Lucy::Search::LeafQuery inherits Lucy::Search::Query
*/
public incremented Compiler*
Make_Compiler(LeafQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
public void
Destroy(LeafQuery *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/MatchAllQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/MatchAllQuery.c b/core/Lucy/Search/MatchAllQuery.c
index c8b823f..aa1eda0 100644
--- a/core/Lucy/Search/MatchAllQuery.c
+++ b/core/Lucy/Search/MatchAllQuery.c
@@ -40,7 +40,7 @@ MatchAllQuery_init(MatchAllQuery *self) {
return (MatchAllQuery*)Query_init((Query*)self, 0.0f);
}
-bool_t
+bool
MatchAllQuery_equals(MatchAllQuery *self, Obj *other) {
MatchAllQuery *twin = (MatchAllQuery*)other;
if (!Obj_Is_A(other, MATCHALLQUERY)) { return false; }
@@ -56,7 +56,7 @@ MatchAllQuery_to_string(MatchAllQuery *self) {
Compiler*
MatchAllQuery_make_compiler(MatchAllQuery *self, Searcher *searcher,
- float boost, bool_t subordinate) {
+ float boost, bool subordinate) {
MatchAllCompiler *compiler = MatchAllCompiler_new(self, searcher, boost);
if (!subordinate) {
MatchAllCompiler_Normalize(compiler);
@@ -83,7 +83,7 @@ MatchAllCompiler_init(MatchAllCompiler *self, MatchAllQuery *parent,
Matcher*
MatchAllCompiler_make_matcher(MatchAllCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
float weight = MatchAllCompiler_Get_Weight(self);
UNUSED_VAR(need_score);
return (Matcher*)MatchAllMatcher_new(weight, SegReader_Doc_Max(reader));
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/MatchAllQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/MatchAllQuery.cfh b/core/Lucy/Search/MatchAllQuery.cfh
index 7b6f431..19e32c8 100644
--- a/core/Lucy/Search/MatchAllQuery.cfh
+++ b/core/Lucy/Search/MatchAllQuery.cfh
@@ -34,7 +34,7 @@ public abstract class Lucy::Search::MatchAllQuery
public inert MatchAllQuery*
init(MatchAllQuery *self);
- public bool_t
+ public bool
Equals(MatchAllQuery *self, Obj *other);
public incremented CharBuf*
@@ -42,7 +42,7 @@ public abstract class Lucy::Search::MatchAllQuery
public incremented Compiler*
Make_Compiler(MatchAllQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
}
class Lucy::Search::MatchAllCompiler
@@ -57,7 +57,7 @@ class Lucy::Search::MatchAllCompiler
public incremented nullable Matcher*
Make_Matcher(MatchAllCompiler *self, SegReader *reader,
- bool_t need_score);
+ bool need_score);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/NOTQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/NOTQuery.c b/core/Lucy/Search/NOTQuery.c
index 7d88a79..11062d3 100644
--- a/core/Lucy/Search/NOTQuery.c
+++ b/core/Lucy/Search/NOTQuery.c
@@ -59,7 +59,7 @@ NOTQuery_to_string(NOTQuery *self) {
return retval;
}
-bool_t
+bool
NOTQuery_equals(NOTQuery *self, Obj *other) {
if ((NOTQuery*)other == self) { return true; }
if (!Obj_Is_A(other, NOTQUERY)) { return false; }
@@ -68,7 +68,7 @@ NOTQuery_equals(NOTQuery *self, Obj *other) {
Compiler*
NOTQuery_make_compiler(NOTQuery *self, Searcher *searcher, float boost,
- bool_t subordinate) {
+ bool subordinate) {
NOTCompiler *compiler = NOTCompiler_new(self, searcher, boost);
if (!subordinate) {
NOTCompiler_Normalize(compiler);
@@ -110,7 +110,7 @@ NOTCompiler_highlight_spans(NOTCompiler *self, Searcher *searcher,
Matcher*
NOTCompiler_make_matcher(NOTCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
Compiler *negated_compiler
= (Compiler*)CERTIFY(VA_Fetch(self->children, 0), COMPILER);
Matcher *negated_matcher
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/NOTQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/NOTQuery.cfh b/core/Lucy/Search/NOTQuery.cfh
index 818538e..874dbb8 100644
--- a/core/Lucy/Search/NOTQuery.cfh
+++ b/core/Lucy/Search/NOTQuery.cfh
@@ -52,12 +52,12 @@ public class Lucy::Search::NOTQuery inherits Lucy::Search::PolyQuery
public incremented Compiler*
Make_Compiler(NOTQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
public incremented CharBuf*
To_String(NOTQuery *self);
- public bool_t
+ public bool
Equals(NOTQuery *self, Obj *other);
}
@@ -72,7 +72,7 @@ class Lucy::Search::NOTCompiler
float boost);
public incremented nullable Matcher*
- Make_Matcher(NOTCompiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(NOTCompiler *self, SegReader *reader, bool need_score);
public float
Sum_Of_Squared_Weights(NOTCompiler *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/NoMatchQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/NoMatchQuery.c b/core/Lucy/Search/NoMatchQuery.c
index a2f4d76..ca07a3c 100644
--- a/core/Lucy/Search/NoMatchQuery.c
+++ b/core/Lucy/Search/NoMatchQuery.c
@@ -40,7 +40,7 @@ NoMatchQuery_init(NoMatchQuery *self) {
return self;
}
-bool_t
+bool
NoMatchQuery_equals(NoMatchQuery *self, Obj *other) {
NoMatchQuery *twin = (NoMatchQuery*)other;
if (!Obj_Is_A(other, NOMATCHQUERY)) { return false; }
@@ -57,7 +57,7 @@ NoMatchQuery_to_string(NoMatchQuery *self) {
Compiler*
NoMatchQuery_make_compiler(NoMatchQuery *self, Searcher *searcher,
- float boost, bool_t subordinate) {
+ float boost, bool subordinate) {
NoMatchCompiler *compiler = NoMatchCompiler_new(self, searcher, boost);
if (!subordinate) {
NoMatchCompiler_Normalize(compiler);
@@ -66,11 +66,11 @@ NoMatchQuery_make_compiler(NoMatchQuery *self, Searcher *searcher,
}
void
-NoMatchQuery_set_fails_to_match(NoMatchQuery *self, bool_t fails_to_match) {
+NoMatchQuery_set_fails_to_match(NoMatchQuery *self, bool fails_to_match) {
self->fails_to_match = fails_to_match;
}
-bool_t
+bool
NoMatchQuery_get_fails_to_match(NoMatchQuery *self) {
return self->fails_to_match;
}
@@ -127,7 +127,7 @@ NoMatchCompiler_init(NoMatchCompiler *self, NoMatchQuery *parent,
Matcher*
NoMatchCompiler_make_matcher(NoMatchCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
UNUSED_VAR(self);
UNUSED_VAR(reader);
UNUSED_VAR(need_score);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/NoMatchQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/NoMatchQuery.cfh b/core/Lucy/Search/NoMatchQuery.cfh
index 40f3584..461274f 100644
--- a/core/Lucy/Search/NoMatchQuery.cfh
+++ b/core/Lucy/Search/NoMatchQuery.cfh
@@ -26,7 +26,7 @@ parcel Lucy;
public class Lucy::Search::NoMatchQuery inherits Lucy::Search::Query
: dumpable {
- bool_t fails_to_match;
+ bool fails_to_match;
inert incremented NoMatchQuery*
new();
@@ -37,9 +37,9 @@ public class Lucy::Search::NoMatchQuery inherits Lucy::Search::Query
init(NoMatchQuery *self);
void
- Set_Fails_To_Match(NoMatchQuery *self, bool_t fails_to_match);
+ Set_Fails_To_Match(NoMatchQuery *self, bool fails_to_match);
- bool_t
+ bool
Get_Fails_To_Match(NoMatchQuery *self);
public incremented Obj*
@@ -54,7 +54,7 @@ public class Lucy::Search::NoMatchQuery inherits Lucy::Search::Query
public incremented NoMatchQuery*
Deserialize(decremented NoMatchQuery *self, InStream *instream);
- public bool_t
+ public bool
Equals(NoMatchQuery *self, Obj *other);
public incremented CharBuf*
@@ -62,7 +62,7 @@ public class Lucy::Search::NoMatchQuery inherits Lucy::Search::Query
public incremented Compiler*
Make_Compiler(NoMatchQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
}
class Lucy::Search::NoMatchCompiler
@@ -76,7 +76,7 @@ class Lucy::Search::NoMatchCompiler
Searcher *searcher, float boost);
public incremented nullable Matcher*
- Make_Matcher(NoMatchCompiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(NoMatchCompiler *self, SegReader *reader, bool need_score);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/ORQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/ORQuery.c b/core/Lucy/Search/ORQuery.c
index ab9dded..7f5c9d7 100644
--- a/core/Lucy/Search/ORQuery.c
+++ b/core/Lucy/Search/ORQuery.c
@@ -39,7 +39,7 @@ ORQuery_init(ORQuery *self, VArray *children) {
Compiler*
ORQuery_make_compiler(ORQuery *self, Searcher *searcher, float boost,
- bool_t subordinate) {
+ bool subordinate) {
ORCompiler *compiler = ORCompiler_new(self, searcher, boost);
if (!subordinate) {
ORCompiler_Normalize(compiler);
@@ -47,7 +47,7 @@ ORQuery_make_compiler(ORQuery *self, Searcher *searcher, float boost,
return (Compiler*)compiler;
}
-bool_t
+bool
ORQuery_equals(ORQuery *self, Obj *other) {
if ((ORQuery*)other == self) { return true; }
if (!Obj_Is_A(other, ORQUERY)) { return false; }
@@ -94,7 +94,7 @@ ORCompiler_init(ORCompiler *self, ORQuery *parent, Searcher *searcher,
Matcher*
ORCompiler_make_matcher(ORCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
uint32_t num_kids = VA_Get_Size(self->children);
if (num_kids == 1) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/ORQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/ORQuery.cfh b/core/Lucy/Search/ORQuery.cfh
index 2c689d1..c7bcdd9 100644
--- a/core/Lucy/Search/ORQuery.cfh
+++ b/core/Lucy/Search/ORQuery.cfh
@@ -38,12 +38,12 @@ public class Lucy::Search::ORQuery inherits Lucy::Search::PolyQuery
public incremented Compiler*
Make_Compiler(ORQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
public incremented CharBuf*
To_String(ORQuery *self);
- public bool_t
+ public bool
Equals(ORQuery *self, Obj *other);
}
@@ -58,7 +58,7 @@ class Lucy::Search::ORCompiler
float boost);
public incremented nullable Matcher*
- Make_Matcher(ORCompiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(ORCompiler *self, SegReader *reader, bool need_score);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/PhraseMatcher.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PhraseMatcher.c b/core/Lucy/Search/PhraseMatcher.c
index c10f523..a101980 100644
--- a/core/Lucy/Search/PhraseMatcher.c
+++ b/core/Lucy/Search/PhraseMatcher.c
@@ -134,7 +134,7 @@ PhraseMatcher_advance(PhraseMatcher *self, int32_t target) {
// Find a doc which contains all the terms.
while (1) {
- bool_t agreement = true;
+ bool agreement = true;
// Scoot all posting lists up to at least the current minimum.
for (uint32_t i = 0; i < num_elements; i++) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/PhraseMatcher.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PhraseMatcher.cfh b/core/Lucy/Search/PhraseMatcher.cfh
index 2669b71..d1179c8 100644
--- a/core/Lucy/Search/PhraseMatcher.cfh
+++ b/core/Lucy/Search/PhraseMatcher.cfh
@@ -30,8 +30,8 @@ class Lucy::Search::PhraseMatcher inherits Lucy::Search::Matcher {
float phrase_boost;
Compiler *compiler;
float weight;
- bool_t first_time;
- bool_t more;
+ bool first_time;
+ bool more;
inert incremented PhraseMatcher*
new(Similarity *similarity, VArray *posting_lists, Compiler *compiler);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/PhraseQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PhraseQuery.c b/core/Lucy/Search/PhraseQuery.c
index 8884464..38005ea 100644
--- a/core/Lucy/Search/PhraseQuery.c
+++ b/core/Lucy/Search/PhraseQuery.c
@@ -89,7 +89,7 @@ PhraseQuery_deserialize(PhraseQuery *self, InStream *instream) {
return S_do_init(self, field, terms, boost);
}
-bool_t
+bool
PhraseQuery_equals(PhraseQuery *self, Obj *other) {
PhraseQuery *twin = (PhraseQuery*)other;
if (twin == self) { return true; }
@@ -124,7 +124,7 @@ PhraseQuery_to_string(PhraseQuery *self) {
Compiler*
PhraseQuery_make_compiler(PhraseQuery *self, Searcher *searcher,
- float boost, bool_t subordinate) {
+ float boost, bool subordinate) {
if (VA_Get_Size(self->terms) == 1) {
// Optimize for one-term "phrases".
Obj *term = VA_Fetch(self->terms, 0);
@@ -214,7 +214,7 @@ PhraseCompiler_deserialize(PhraseCompiler *self, InStream *instream) {
return self;
}
-bool_t
+bool
PhraseCompiler_equals(PhraseCompiler *self, Obj *other) {
PhraseCompiler *twin = (PhraseCompiler*)other;
if (!Obj_Is_A(other, PHRASECOMPILER)) { return false; }
@@ -244,7 +244,7 @@ PhraseCompiler_apply_norm_factor(PhraseCompiler *self, float factor) {
Matcher*
PhraseCompiler_make_matcher(PhraseCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
UNUSED_VAR(need_score);
PhraseQuery *const parent = (PhraseQuery*)self->parent;
VArray *const terms = parent->terms;
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/PhraseQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PhraseQuery.cfh b/core/Lucy/Search/PhraseQuery.cfh
index e2dbaa8..6991430 100644
--- a/core/Lucy/Search/PhraseQuery.cfh
+++ b/core/Lucy/Search/PhraseQuery.cfh
@@ -50,9 +50,9 @@ public class Lucy::Search::PhraseQuery inherits Lucy::Search::Query
public incremented Compiler*
Make_Compiler(PhraseQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
- public bool_t
+ public bool
Equals(PhraseQuery *self, Obj *other);
public incremented CharBuf*
@@ -84,7 +84,7 @@ class Lucy::Search::PhraseCompiler
float boost);
public incremented nullable Matcher*
- Make_Matcher(PhraseCompiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(PhraseCompiler *self, SegReader *reader, bool need_score);
public float
Get_Weight(PhraseCompiler *self);
@@ -99,7 +99,7 @@ class Lucy::Search::PhraseCompiler
Highlight_Spans(PhraseCompiler *self, Searcher *searcher,
DocVector *doc_vec, const CharBuf *field);
- public bool_t
+ public bool
Equals(PhraseCompiler *self, Obj *other);
public void
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/PolyQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PolyQuery.c b/core/Lucy/Search/PolyQuery.c
index 99c8420..8ad4862 100644
--- a/core/Lucy/Search/PolyQuery.c
+++ b/core/Lucy/Search/PolyQuery.c
@@ -86,7 +86,7 @@ PolyQuery_deserialize(PolyQuery *self, InStream *instream) {
return self;
}
-bool_t
+bool
PolyQuery_equals(PolyQuery *self, Obj *other) {
PolyQuery *twin = (PolyQuery*)other;
if (twin == self) { return true; }
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/PolyQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PolyQuery.cfh b/core/Lucy/Search/PolyQuery.cfh
index f294f37..e4fc450 100644
--- a/core/Lucy/Search/PolyQuery.cfh
+++ b/core/Lucy/Search/PolyQuery.cfh
@@ -54,7 +54,7 @@ public abstract class Lucy::Search::PolyQuery
public incremented PolyQuery*
Deserialize(decremented PolyQuery *self, InStream *instream);
- public bool_t
+ public bool
Equals(PolyQuery *self, Obj *other);
public void
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Query.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Query.cfh b/core/Lucy/Search/Query.cfh
index 4f7b238..0b48b15 100644
--- a/core/Lucy/Search/Query.cfh
+++ b/core/Lucy/Search/Query.cfh
@@ -59,7 +59,7 @@ public class Lucy::Search::Query inherits Clownfish::Obj : dumpable {
*/
public abstract incremented Compiler*
Make_Compiler(Query *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
/** Set the Query's boost.
*/
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/QueryParser.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.c b/core/Lucy/Search/QueryParser.c
index de2fc70..1e32839 100644
--- a/core/Lucy/Search/QueryParser.c
+++ b/core/Lucy/Search/QueryParser.c
@@ -54,7 +54,7 @@
// Helper function for Tree().
static Query*
S_parse_subquery(QueryParser *self, VArray *elems, CharBuf *default_field,
- bool_t enclosed);
+ bool enclosed);
// Drop unmatched right parens and add matching right parens at end to
// close paren groups implicitly.
@@ -93,7 +93,7 @@ S_compose_or_queries(QueryParser *self, VArray *elems);
// Derive a single subquery from all Query objects in the clause.
static Query*
-S_compose_subquery(QueryParser *self, VArray *elems, bool_t enclosed);
+S_compose_subquery(QueryParser *self, VArray *elems, bool enclosed);
QueryParser*
QParser_new(Schema *schema, Analyzer *analyzer, const CharBuf *default_boolop,
@@ -182,13 +182,13 @@ QParser_get_fields(QueryParser *self) {
return self->fields;
}
-bool_t
+bool
QParser_heed_colons(QueryParser *self) {
return self->heed_colons;
}
void
-QParser_set_heed_colons(QueryParser *self, bool_t heed_colons) {
+QParser_set_heed_colons(QueryParser *self, bool heed_colons) {
self->heed_colons = heed_colons;
QueryLexer_Set_Heed_Colons(self->lexer, heed_colons);
}
@@ -284,7 +284,7 @@ S_discard_elems(VArray *elems, uint32_t type) {
static Query*
S_parse_subquery(QueryParser *self, VArray *elems, CharBuf *default_field,
- bool_t enclosed) {
+ bool enclosed) {
if (VA_Get_Size(elems)) {
ParserElem *first = (ParserElem*)VA_Fetch(elems, 0);
if (ParserElem_Get_Type(first) == TOKEN_OPEN_PAREN) {
@@ -532,7 +532,7 @@ S_compose_or_queries(QueryParser *self, VArray *elems) {
}
static Query*
-S_compose_subquery(QueryParser *self, VArray *elems, bool_t enclosed) {
+S_compose_subquery(QueryParser *self, VArray *elems, bool enclosed) {
Query *retval;
if (VA_Get_Size(elems) == 0) {
@@ -641,7 +641,7 @@ S_compose_subquery(QueryParser *self, VArray *elems, bool_t enclosed) {
return retval;
}
-static bool_t
+static bool
S_has_valid_clauses(Query *query) {
if (Query_Is_A(query, NOTQUERY)) {
return false;
@@ -740,7 +740,7 @@ QParser_expand(QueryParser *self, Query *query) {
Query *new_child = QParser_Expand(self, child); // recurse
if (new_child) {
if (Query_Is_A(new_child, NOMATCHQUERY)) {
- bool_t fails = NoMatchQuery_Get_Fails_To_Match(
+ bool fails = NoMatchQuery_Get_Fails_To_Match(
(NoMatchQuery*)new_child);
if (fails) {
VA_Push(new_kids, (Obj*)new_child);
@@ -844,8 +844,8 @@ QParser_expand_leaf(QueryParser *self, Query *query) {
LeafQuery *leaf_query = (LeafQuery*)query;
Schema *schema = self->schema;
ZombieCharBuf *source_text = ZCB_BLANK();
- bool_t is_phrase = false;
- bool_t ambiguous = false;
+ bool is_phrase = false;
+ bool ambiguous = false;
// Determine whether we can actually process the input.
if (!Query_Is_A(query, LEAFQUERY)) { return NULL; }
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/QueryParser.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.cfh b/core/Lucy/Search/QueryParser.cfh
index 6e37960..f98caa7 100644
--- a/core/Lucy/Search/QueryParser.cfh
+++ b/core/Lucy/Search/QueryParser.cfh
@@ -48,8 +48,8 @@ public class Lucy::Search::QueryParser cnick QParser
CharBuf *default_boolop;
VArray *fields;
QueryLexer *lexer;
- bool_t heed_colons;
- bool_t default_occur;
+ bool heed_colons;
+ int32_t default_occur;
inert incremented QueryParser*
new(Schema *schema, Analyzer *analyzer = NULL,
@@ -214,13 +214,13 @@ public class Lucy::Search::QueryParser cnick QParser
VArray*
Get_Fields(QueryParser *self);
- bool_t
+ bool
Heed_Colons(QueryParser *self);
/** Enable/disable parsing of <code>fieldname:foo</code> constructs.
*/
public void
- Set_Heed_Colons(QueryParser *self, bool_t heed_colons);
+ Set_Heed_Colons(QueryParser *self, bool heed_colons);
public void
Destroy(QueryParser *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/QueryParser/ParserElem.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/ParserElem.c b/core/Lucy/Search/QueryParser/ParserElem.c
index ba9a3ab..2bedc2d 100644
--- a/core/Lucy/Search/QueryParser/ParserElem.c
+++ b/core/Lucy/Search/QueryParser/ParserElem.c
@@ -102,17 +102,17 @@ ParserElem_negate(ParserElem *self) {
}
}
-bool_t
+bool
ParserElem_optional(ParserElem *self) {
return self->occur == LUCY_QPARSER_SHOULD;
}
-bool_t
+bool
ParserElem_required(ParserElem *self) {
return self->occur == LUCY_QPARSER_MUST;
}
-bool_t
+bool
ParserElem_negated(ParserElem *self) {
return self->occur == LUCY_QPARSER_MUST_NOT;
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/QueryParser/ParserElem.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/ParserElem.cfh b/core/Lucy/Search/QueryParser/ParserElem.cfh
index 1849652..ebc5e03 100644
--- a/core/Lucy/Search/QueryParser/ParserElem.cfh
+++ b/core/Lucy/Search/QueryParser/ParserElem.cfh
@@ -65,17 +65,17 @@ class Lucy::Search::QueryParser::ParserElem inherits Clownfish::Obj {
/** Return true if the element MUST be present.
*/
- bool_t
+ bool
Required(ParserElem *self);
/** Return true if the element SHOULD be present.
*/
- bool_t
+ bool
Optional(ParserElem *self);
/** Return true if the element MUST NOT be present.
*/
- bool_t
+ bool
Negated(ParserElem *self);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/QueryParser/QueryLexer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/QueryLexer.c b/core/Lucy/Search/QueryParser/QueryLexer.c
index 6524a44..851380c 100644
--- a/core/Lucy/Search/QueryParser/QueryLexer.c
+++ b/core/Lucy/Search/QueryParser/QueryLexer.c
@@ -59,13 +59,13 @@ QueryLexer_init(QueryLexer *self) {
return self;
}
-bool_t
+bool
QueryLexer_heed_colons(QueryLexer *self) {
return self->heed_colons;
}
void
-QueryLexer_set_heed_colons(QueryLexer *self, bool_t heed_colons) {
+QueryLexer_set_heed_colons(QueryLexer *self, bool heed_colons) {
self->heed_colons = heed_colons;
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/QueryParser/QueryLexer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/QueryLexer.cfh b/core/Lucy/Search/QueryParser/QueryLexer.cfh
index 6685742..5555ed0 100644
--- a/core/Lucy/Search/QueryParser/QueryLexer.cfh
+++ b/core/Lucy/Search/QueryParser/QueryLexer.cfh
@@ -18,7 +18,7 @@ parcel Lucy;
class Lucy::Search::QueryParser::QueryLexer inherits Clownfish::Obj {
- bool_t heed_colons;
+ bool heed_colons;
inert incremented QueryLexer*
new();
@@ -34,12 +34,12 @@ class Lucy::Search::QueryParser::QueryLexer inherits Clownfish::Obj {
incremented VArray*
Tokenize(QueryLexer *self, const CharBuf *query_string = NULL);
- bool_t
+ bool
Heed_Colons(QueryLexer *self);
/** Enable/disable parsing of <code>fieldname:foo</code> constructs.
*/
void
- Set_Heed_Colons(QueryLexer *self, bool_t heed_colons);
+ Set_Heed_Colons(QueryLexer *self, bool heed_colons);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/RangeQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RangeQuery.c b/core/Lucy/Search/RangeQuery.c
index c05ace2..a67dc63 100644
--- a/core/Lucy/Search/RangeQuery.c
+++ b/core/Lucy/Search/RangeQuery.c
@@ -42,7 +42,7 @@ S_find_upper_bound(RangeCompiler *self, SortCache *sort_cache);
RangeQuery*
RangeQuery_new(const CharBuf *field, Obj *lower_term, Obj *upper_term,
- bool_t include_lower, bool_t include_upper) {
+ bool include_lower, bool include_upper) {
RangeQuery *self = (RangeQuery*)VTable_Make_Obj(RANGEQUERY);
return RangeQuery_init(self, field, lower_term, upper_term,
include_lower, include_upper);
@@ -50,7 +50,7 @@ RangeQuery_new(const CharBuf *field, Obj *lower_term, Obj *upper_term,
RangeQuery*
RangeQuery_init(RangeQuery *self, const CharBuf *field, Obj *lower_term,
- Obj *upper_term, bool_t include_lower, bool_t include_upper) {
+ Obj *upper_term, bool include_lower, bool include_upper) {
Query_init((Query*)self, 0.0f);
self->field = CB_Clone(field);
self->lower_term = lower_term ? Obj_Clone(lower_term) : NULL;
@@ -73,7 +73,7 @@ RangeQuery_destroy(RangeQuery *self) {
SUPER_DESTROY(self, RANGEQUERY);
}
-bool_t
+bool
RangeQuery_equals(RangeQuery *self, Obj *other) {
RangeQuery *twin = (RangeQuery*)other;
if (twin == self) { return true; }
@@ -142,8 +142,8 @@ RangeQuery_deserialize(RangeQuery *self, InStream *instream) {
= CB_Deserialize((CharBuf*)VTable_Make_Obj(CHARBUF), instream);
Obj *lower_term = InStream_Read_U8(instream) ? THAW(instream) : NULL;
Obj *upper_term = InStream_Read_U8(instream) ? THAW(instream) : NULL;
- bool_t include_lower = InStream_Read_U8(instream);
- bool_t include_upper = InStream_Read_U8(instream);
+ bool include_lower = InStream_Read_U8(instream);
+ bool include_upper = InStream_Read_U8(instream);
// Init object.
RangeQuery_init(self, field, lower_term, upper_term, include_lower,
@@ -158,7 +158,7 @@ RangeQuery_deserialize(RangeQuery *self, InStream *instream) {
RangeCompiler*
RangeQuery_make_compiler(RangeQuery *self, Searcher *searcher,
- float boost, bool_t subordinate) {
+ float boost, bool subordinate) {
RangeCompiler *compiler = RangeCompiler_new(self, searcher, boost);
if (!subordinate) {
RangeCompiler_Normalize(compiler);
@@ -184,7 +184,7 @@ RangeCompiler_init(RangeCompiler *self, RangeQuery *parent,
Matcher*
RangeCompiler_make_matcher(RangeCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
RangeQuery *parent = (RangeQuery*)self->parent;
SortReader *sort_reader
= (SortReader*)SegReader_Fetch(reader, VTable_Get_Name(SORTREADER));
@@ -226,7 +226,7 @@ S_find_lower_bound(RangeCompiler *self, SortCache *sort_cache) {
else {
Obj *value = SortCache_Make_Blank(sort_cache);
Obj *low_found = SortCache_Value(sort_cache, low_ord, value);
- bool_t exact_match = low_found == NULL
+ bool exact_match = low_found == NULL
? false
: Obj_Equals(lower_term, low_found);
@@ -256,7 +256,7 @@ S_find_upper_bound(RangeCompiler *self, SortCache *sort_cache) {
else {
Obj *value = SortCache_Make_Blank(sort_cache);
Obj *hi_found = SortCache_Value(sort_cache, hi_ord, value);
- bool_t exact_match = hi_found == NULL
+ bool exact_match = hi_found == NULL
? false
: Obj_Equals(upper_term, (Obj*)hi_found);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/RangeQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RangeQuery.cfh b/core/Lucy/Search/RangeQuery.cfh
index de41787..1ad4ff4 100644
--- a/core/Lucy/Search/RangeQuery.cfh
+++ b/core/Lucy/Search/RangeQuery.cfh
@@ -28,12 +28,12 @@ public class Lucy::Search::RangeQuery inherits Lucy::Search::Query
CharBuf *field;
Obj *lower_term;
Obj *upper_term;
- bool_t include_lower;
- bool_t include_upper;
+ bool include_lower;
+ bool include_upper;
inert incremented RangeQuery*
new(const CharBuf *field, Obj *lower_term = NULL, Obj *upper_term = NULL,
- bool_t include_lower = true, bool_t include_upper = true);
+ bool include_lower = true, bool include_upper = true);
/** Takes 5 parameters; <code>field</code> is required, as
* is at least one of either <code>lower_term</code> or
@@ -52,9 +52,9 @@ public class Lucy::Search::RangeQuery inherits Lucy::Search::Query
public inert RangeQuery*
init(RangeQuery *self, const CharBuf *field,
Obj *lower_term = NULL, Obj *upper_term = NULL,
- bool_t include_lower = true, bool_t include_upper = true);
+ bool include_lower = true, bool include_upper = true);
- public bool_t
+ public bool
Equals(RangeQuery *self, Obj *other);
public incremented CharBuf*
@@ -62,7 +62,7 @@ public class Lucy::Search::RangeQuery inherits Lucy::Search::Query
public incremented RangeCompiler*
Make_Compiler(RangeQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
public void
Serialize(RangeQuery *self, OutStream *outstream);
@@ -84,7 +84,7 @@ class Lucy::Search::RangeCompiler inherits Lucy::Search::Compiler {
float boost);
public incremented nullable Matcher*
- Make_Matcher(RangeCompiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(RangeCompiler *self, SegReader *reader, bool need_score);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/RequiredOptionalMatcher.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RequiredOptionalMatcher.cfh b/core/Lucy/Search/RequiredOptionalMatcher.cfh
index 5da6707..84fb254 100644
--- a/core/Lucy/Search/RequiredOptionalMatcher.cfh
+++ b/core/Lucy/Search/RequiredOptionalMatcher.cfh
@@ -24,7 +24,7 @@ class Lucy::Search::RequiredOptionalMatcher cnick ReqOptMatcher
Matcher *req_matcher;
Matcher *opt_matcher;
- bool_t opt_matcher_first_time;
+ bool opt_matcher_first_time;
inert incremented RequiredOptionalMatcher*
new(Similarity *similarity, Matcher *required_matcher,
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/RequiredOptionalQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RequiredOptionalQuery.c b/core/Lucy/Search/RequiredOptionalQuery.c
index 76d4539..9a03123 100644
--- a/core/Lucy/Search/RequiredOptionalQuery.c
+++ b/core/Lucy/Search/RequiredOptionalQuery.c
@@ -73,7 +73,7 @@ ReqOptQuery_to_string(RequiredOptionalQuery *self) {
return retval;
}
-bool_t
+bool
ReqOptQuery_equals(RequiredOptionalQuery *self, Obj *other) {
if ((RequiredOptionalQuery*)other == self) { return true; }
if (!Obj_Is_A(other, REQUIREDOPTIONALQUERY)) { return false; }
@@ -82,7 +82,7 @@ ReqOptQuery_equals(RequiredOptionalQuery *self, Obj *other) {
Compiler*
ReqOptQuery_make_compiler(RequiredOptionalQuery *self, Searcher *searcher,
- float boost, bool_t subordinate) {
+ float boost, bool subordinate) {
RequiredOptionalCompiler *compiler
= ReqOptCompiler_new(self, searcher, boost);
if (!subordinate) {
@@ -113,7 +113,7 @@ ReqOptCompiler_init(RequiredOptionalCompiler *self,
Matcher*
ReqOptCompiler_make_matcher(RequiredOptionalCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
Schema *schema = SegReader_Get_Schema(reader);
Similarity *sim = Schema_Get_Similarity(schema);
Compiler *req_compiler = (Compiler*)VA_Fetch(self->children, 0);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/RequiredOptionalQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RequiredOptionalQuery.cfh b/core/Lucy/Search/RequiredOptionalQuery.cfh
index e02e4e1..92dcab9 100644
--- a/core/Lucy/Search/RequiredOptionalQuery.cfh
+++ b/core/Lucy/Search/RequiredOptionalQuery.cfh
@@ -55,12 +55,12 @@ public class Lucy::Search::RequiredOptionalQuery cnick ReqOptQuery
public incremented Compiler*
Make_Compiler(RequiredOptionalQuery *self, Searcher *searcher,
- float boost, bool_t subordinate = false);
+ float boost, bool subordinate = false);
public incremented CharBuf*
To_String(RequiredOptionalQuery *self);
- public bool_t
+ public bool
Equals(RequiredOptionalQuery *self, Obj *other);
}
@@ -76,7 +76,7 @@ class Lucy::Search::RequiredOptionalCompiler cnick ReqOptCompiler
public incremented nullable Matcher*
Make_Matcher(RequiredOptionalCompiler *self, SegReader *reader,
- bool_t need_score);
+ bool need_score);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/SortRule.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/SortRule.c b/core/Lucy/Search/SortRule.c
index 45d401c..bb6a419 100644
--- a/core/Lucy/Search/SortRule.c
+++ b/core/Lucy/Search/SortRule.c
@@ -26,14 +26,14 @@ int32_t SortRule_SCORE = 1;
int32_t SortRule_DOC_ID = 2;
SortRule*
-SortRule_new(int32_t type, const CharBuf *field, bool_t reverse) {
+SortRule_new(int32_t type, const CharBuf *field, bool reverse) {
SortRule *self = (SortRule*)VTable_Make_Obj(SORTRULE);
return SortRule_init(self, type, field, reverse);
}
SortRule*
SortRule_init(SortRule *self, int32_t type, const CharBuf *field,
- bool_t reverse) {
+ bool reverse) {
self->field = field ? CB_Clone(field) : NULL;
self->type = type;
self->reverse = reverse;
@@ -87,7 +87,7 @@ SortRule_get_type(SortRule *self) {
return self->type;
}
-bool_t
+bool
SortRule_get_reverse(SortRule *self) {
return self->reverse;
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/SortRule.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/SortRule.cfh b/core/Lucy/Search/SortRule.cfh
index 2acc87d..cae7537 100644
--- a/core/Lucy/Search/SortRule.cfh
+++ b/core/Lucy/Search/SortRule.cfh
@@ -27,7 +27,7 @@ public class Lucy::Search::SortRule inherits Clownfish::Obj {
int32_t type;
CharBuf *field;
- bool_t reverse;
+ bool reverse;
inert int32_t FIELD;
inert int32_t SCORE;
@@ -35,7 +35,7 @@ public class Lucy::Search::SortRule inherits Clownfish::Obj {
public inert incremented SortRule*
new(int32_t type = 0, const CharBuf *field = NULL,
- bool_t reverse = false);
+ bool reverse = false);
/**
* @param type Indicate whether to sort by score, field, etc. (The
@@ -45,7 +45,7 @@ public class Lucy::Search::SortRule inherits Clownfish::Obj {
*/
public inert incremented SortRule*
init(SortRule *self, int32_t type = 0, const CharBuf *field = NULL,
- bool_t reverse = false);
+ bool reverse = false);
/** Accessor for "field" member.
*/
@@ -59,7 +59,7 @@ public class Lucy::Search::SortRule inherits Clownfish::Obj {
/** Accessor for "reverse" member.
*/
- public bool_t
+ public bool
Get_Reverse(SortRule *self);
public incremented SortRule*
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Span.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Span.c b/core/Lucy/Search/Span.c
index f272e50..f4d65f9 100644
--- a/core/Lucy/Search/Span.c
+++ b/core/Lucy/Search/Span.c
@@ -64,7 +64,7 @@ Span_set_weight(Span *self, float weight) {
self->weight = weight;
}
-bool_t
+bool
Span_equals(Span *self, Obj *other) {
Span *twin = (Span*)other;
if (self == twin) { return true; }
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/Span.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Span.cfh b/core/Lucy/Search/Span.cfh
index cd61428..e9d60df 100644
--- a/core/Lucy/Search/Span.cfh
+++ b/core/Lucy/Search/Span.cfh
@@ -74,7 +74,7 @@ public class Lucy::Search::Span inherits Clownfish::Obj {
public void
Set_Weight(Span *self, float weight);
- public bool_t
+ public bool
Equals(Span *self, Obj *other);
public int32_t
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/TermQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/TermQuery.c b/core/Lucy/Search/TermQuery.c
index ebae612..3e3da4b 100644
--- a/core/Lucy/Search/TermQuery.c
+++ b/core/Lucy/Search/TermQuery.c
@@ -81,7 +81,7 @@ TermQuery_get_term(TermQuery *self) {
return self->term;
}
-bool_t
+bool
TermQuery_equals(TermQuery *self, Obj *other) {
TermQuery *twin = (TermQuery*)other;
if (twin == self) { return true; }
@@ -102,7 +102,7 @@ TermQuery_to_string(TermQuery *self) {
Compiler*
TermQuery_make_compiler(TermQuery *self, Searcher *searcher, float boost,
- bool_t subordinate) {
+ bool subordinate) {
TermCompiler *compiler = TermCompiler_new((Query*)self, searcher, boost);
if (!subordinate) {
TermCompiler_Normalize(compiler);
@@ -156,7 +156,7 @@ TermCompiler_init(TermCompiler *self, Query *parent, Searcher *searcher,
return self;
}
-bool_t
+bool
TermCompiler_equals(TermCompiler *self, Obj *other) {
TermCompiler *twin = (TermCompiler*)other;
if (!Compiler_equals((Compiler*)self, other)) { return false; }
@@ -217,7 +217,7 @@ TermCompiler_get_weight(TermCompiler *self) {
Matcher*
TermCompiler_make_matcher(TermCompiler *self, SegReader *reader,
- bool_t need_score) {
+ bool need_score) {
TermQuery *tparent = (TermQuery*)self->parent;
PostingListReader *plist_reader
= (PostingListReader*)SegReader_Fetch(
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Search/TermQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/TermQuery.cfh b/core/Lucy/Search/TermQuery.cfh
index 0707024..70b01a6 100644
--- a/core/Lucy/Search/TermQuery.cfh
+++ b/core/Lucy/Search/TermQuery.cfh
@@ -51,7 +51,7 @@ public class Lucy::Search::TermQuery inherits Lucy::Search::Query
public incremented Compiler*
Make_Compiler(TermQuery *self, Searcher *searcher, float boost,
- bool_t subordinate = false);
+ bool subordinate = false);
public incremented CharBuf*
To_String(TermQuery *self);
@@ -62,7 +62,7 @@ public class Lucy::Search::TermQuery inherits Lucy::Search::Query
public incremented TermQuery*
Deserialize(decremented TermQuery *self, InStream *instream);
- public bool_t
+ public bool
Equals(TermQuery *self, Obj *other);
public void
@@ -83,7 +83,7 @@ class Lucy::Search::TermCompiler inherits Lucy::Search::Compiler {
float boost);
public incremented nullable Matcher*
- Make_Matcher(TermCompiler *self, SegReader *reader, bool_t need_score);
+ Make_Matcher(TermCompiler *self, SegReader *reader, bool need_score);
public float
Get_Weight(TermCompiler *self);
@@ -98,7 +98,7 @@ class Lucy::Search::TermCompiler inherits Lucy::Search::Compiler {
Highlight_Spans(TermCompiler *self, Searcher *searcher,
DocVector *doc_vec, const CharBuf *field);
- public bool_t
+ public bool
Equals(TermCompiler *self, Obj *other);
public void
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/CompoundFileReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/CompoundFileReader.c b/core/Lucy/Store/CompoundFileReader.c
index da51f5a..21e08a8 100644
--- a/core/Lucy/Store/CompoundFileReader.c
+++ b/core/Lucy/Store/CompoundFileReader.c
@@ -146,7 +146,7 @@ CFReader_local_open_filehandle(CompoundFileReader *self,
return fh;
}
-bool_t
+bool
CFReader_local_delete(CompoundFileReader *self, const CharBuf *name) {
Hash *record = (Hash*)Hash_Delete(self->records, (Obj*)name);
DECREF(record);
@@ -205,14 +205,14 @@ CFReader_local_open_in(CompoundFileReader *self, const CharBuf *name) {
}
}
-bool_t
+bool
CFReader_local_exists(CompoundFileReader *self, const CharBuf *name) {
if (Hash_Fetch(self->records, (Obj*)name)) { return true; }
if (Folder_Local_Exists(self->real_folder, name)) { return true; }
return false;
}
-bool_t
+bool
CFReader_local_is_directory(CompoundFileReader *self, const CharBuf *name) {
if (Hash_Fetch(self->records, (Obj*)name)) { return false; }
if (Folder_Local_Is_Directory(self->real_folder, name)) { return true; }
@@ -224,14 +224,14 @@ CFReader_close(CompoundFileReader *self) {
InStream_Close(self->instream);
}
-bool_t
+bool
CFReader_local_mkdir(CompoundFileReader *self, const CharBuf *name) {
if (Hash_Fetch(self->records, (Obj*)name)) {
Err_set_error(Err_new(CB_newf("Can't MkDir: '%o' exists", name)));
return false;
}
else {
- bool_t result = Folder_Local_MkDir(self->real_folder, name);
+ bool result = Folder_Local_MkDir(self->real_folder, name);
if (!result) { ERR_ADD_FRAME(Err_get_error()); }
return result;
}
@@ -273,7 +273,7 @@ CFReaderDH_init(CFReaderDirHandle *self, CompoundFileReader *cf_reader) {
return self;
}
-bool_t
+bool
CFReaderDH_close(CFReaderDirHandle *self) {
if (self->elems) {
VA_Dec_RefCount(self->elems);
@@ -286,7 +286,7 @@ CFReaderDH_close(CFReaderDirHandle *self) {
return true;
}
-bool_t
+bool
CFReaderDH_next(CFReaderDirHandle *self) {
if (self->elems) {
self->tick++;
@@ -304,7 +304,7 @@ CFReaderDH_next(CFReaderDirHandle *self) {
return false;
}
-bool_t
+bool
CFReaderDH_entry_is_dir(CFReaderDirHandle *self) {
if (self->elems) {
CharBuf *name = (CharBuf*)VA_Fetch(self->elems, self->tick);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/CompoundFileReader.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/CompoundFileReader.cfh b/core/Lucy/Store/CompoundFileReader.cfh
index 697df15..a977680 100644
--- a/core/Lucy/Store/CompoundFileReader.cfh
+++ b/core/Lucy/Store/CompoundFileReader.cfh
@@ -60,13 +60,13 @@ class Lucy::Store::CompoundFileReader cnick CFReader
public void
Destroy(CompoundFileReader *self);
- bool_t
+ bool
Local_Delete(CompoundFileReader *self, const CharBuf *name);
- bool_t
+ bool
Local_Exists(CompoundFileReader *self, const CharBuf *name);
- bool_t
+ bool
Local_Is_Directory(CompoundFileReader *self, const CharBuf *name);
incremented nullable FileHandle*
@@ -76,7 +76,7 @@ class Lucy::Store::CompoundFileReader cnick CFReader
incremented nullable InStream*
Local_Open_In(CompoundFileReader *self, const CharBuf *name);
- bool_t
+ bool
Local_MkDir(CompoundFileReader *self, const CharBuf *name);
nullable Folder*
@@ -101,13 +101,13 @@ class Lucy::Store::CFReaderDirHandle cnick CFReaderDH
inert CFReaderDirHandle*
init(CFReaderDirHandle *self, CompoundFileReader *cf_reader);
- bool_t
+ bool
Next(CFReaderDirHandle *self);
- bool_t
+ bool
Entry_Is_Dir(CFReaderDirHandle *self);
- bool_t
+ bool
Close(CFReaderDirHandle *self);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/CompoundFileWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/CompoundFileWriter.c b/core/Lucy/Store/CompoundFileWriter.c
index 15a5b5a..2ff716b 100644
--- a/core/Lucy/Store/CompoundFileWriter.c
+++ b/core/Lucy/Store/CompoundFileWriter.c
@@ -93,7 +93,7 @@ S_do_consolidate(CompoundFileWriter *self) {
VArray *merged = VA_new(VA_Get_Size(files));
CharBuf *cf_file = (CharBuf*)ZCB_WRAP_STR("cf.dat", 6);
OutStream *outstream = Folder_Open_Out(folder, (CharBuf*)cf_file);
- bool_t rename_success;
+ bool rename_success;
if (!outstream) { RETHROW(INCREF(Err_get_error())); }
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/DirHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/DirHandle.cfh b/core/Lucy/Store/DirHandle.cfh
index 740c5cd..fc26f63 100644
--- a/core/Lucy/Store/DirHandle.cfh
+++ b/core/Lucy/Store/DirHandle.cfh
@@ -35,13 +35,13 @@ abstract class Lucy::Store::DirHandle cnick DH
*
* @return true on success, false when finished.
*/
- abstract bool_t
+ abstract bool
Next(DirHandle *self);
/** Attempt to close the DirHandle. Returns true on success, sets
* Err_error and returns false on failure.
*/
- abstract bool_t
+ abstract bool
Close(DirHandle *self);
/** Return the object's <code>dir</code> attribute.
@@ -58,13 +58,13 @@ abstract class Lucy::Store::DirHandle cnick DH
/** Returns true if the current entry is a directory, false otherwise.
*/
- abstract bool_t
+ abstract bool
Entry_Is_Dir(DirHandle *self);
/** Returns true if the current entry is a symbolic link (or a Windows
* junction), false otherwise.
*/
- abstract bool_t
+ abstract bool
Entry_Is_Symlink(DirHandle *self);
/** Invokes Close(), but ignores any errors.
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FSDirHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSDirHandle.c b/core/Lucy/Store/FSDirHandle.c
index 4315e65..27ecb59 100644
--- a/core/Lucy/Store/FSDirHandle.c
+++ b/core/Lucy/Store/FSDirHandle.c
@@ -44,7 +44,7 @@ FSDH_destroy(FSDirHandle *self) {
SUPER_DESTROY(self, FSDIRHANDLE);
}
-static INLINE bool_t
+static INLINE bool
SI_is_updir(const char *name, size_t len) {
if (len == 2 && strncmp(name, "..", 2) == 0) {
return true;
@@ -105,7 +105,7 @@ FSDH_do_open(FSDirHandle *self, const CharBuf *dir) {
return self;
}
-bool_t
+bool
FSDH_entry_is_dir(FSDirHandle *self) {
WIN32_FIND_DATA *find_data = (WIN32_FIND_DATA*)self->sys_dir_entry;
if (find_data) {
@@ -116,7 +116,7 @@ FSDH_entry_is_dir(FSDirHandle *self) {
return false;
}
-bool_t
+bool
FSDH_entry_is_symlink(FSDirHandle *self) {
WIN32_FIND_DATA *find_data = (WIN32_FIND_DATA*)self->sys_dir_entry;
if (find_data) {
@@ -127,7 +127,7 @@ FSDH_entry_is_symlink(FSDirHandle *self) {
return false;
}
-bool_t
+bool
FSDH_close(FSDirHandle *self) {
if (self->sys_dirhandle && self->sys_dirhandle != INVALID_HANDLE_VALUE) {
HANDLE dirhandle = (HANDLE)self->sys_dirhandle;
@@ -157,7 +157,7 @@ FSDH_close(FSDirHandle *self) {
}
}
-bool_t
+bool
FSDH_next(FSDirHandle *self) {
HANDLE dirhandle = (HANDLE)self->sys_dirhandle;
WIN32_FIND_DATA *find_data = (WIN32_FIND_DATA*)self->sys_dir_entry;
@@ -216,7 +216,7 @@ FSDH_do_open(FSDirHandle *self, const CharBuf *dir) {
return self;
}
-bool_t
+bool
FSDH_next(FSDirHandle *self) {
self->sys_dir_entry = (struct dirent*)readdir((DIR*)self->sys_dirhandle);
if (!self->sys_dir_entry) {
@@ -240,7 +240,7 @@ FSDH_next(FSDirHandle *self) {
}
}
-bool_t
+bool
FSDH_entry_is_dir(FSDirHandle *self) {
struct dirent *sys_dir_entry = (struct dirent*)self->sys_dir_entry;
if (!sys_dir_entry) { return false; }
@@ -268,7 +268,7 @@ FSDH_entry_is_dir(FSDirHandle *self) {
return false;
}
-bool_t
+bool
FSDH_entry_is_symlink(FSDirHandle *self) {
struct dirent *sys_dir_entry = (struct dirent*)self->sys_dir_entry;
if (!sys_dir_entry) { return false; }
@@ -291,7 +291,7 @@ FSDH_entry_is_symlink(FSDirHandle *self) {
#endif // CHY_HAS_DIRENT_D_TYPE
}
-bool_t
+bool
FSDH_close(FSDirHandle *self) {
if (self->fullpath) {
CB_Dec_RefCount(self->fullpath);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FSDirHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSDirHandle.cfh b/core/Lucy/Store/FSDirHandle.cfh
index aecb776..88700ea 100644
--- a/core/Lucy/Store/FSDirHandle.cfh
+++ b/core/Lucy/Store/FSDirHandle.cfh
@@ -25,7 +25,7 @@ class Lucy::Store::FSDirHandle cnick FSDH
void *sys_dir_entry;
CharBuf *fullpath;
Err *saved_error;
- bool_t delayed_iter;
+ bool delayed_iter;
inert incremented nullable FSDirHandle*
open(const CharBuf *path);
@@ -33,16 +33,16 @@ class Lucy::Store::FSDirHandle cnick FSDH
inert nullable FSDirHandle*
do_open(FSDirHandle *self, const CharBuf *path);
- bool_t
+ bool
Next(FSDirHandle *self);
- bool_t
+ bool
Entry_Is_Dir(FSDirHandle *self);
- bool_t
+ bool
Entry_Is_Symlink(FSDirHandle *self);
- bool_t
+ bool
Close(FSDirHandle *self);
public void
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FSFileHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFileHandle.c b/core/Lucy/Store/FSFileHandle.c
index a34bddd..b5a314a 100644
--- a/core/Lucy/Store/FSFileHandle.c
+++ b/core/Lucy/Store/FSFileHandle.c
@@ -64,20 +64,20 @@ static INLINE void*
SI_map(FSFileHandle *self, int64_t offset, int64_t len);
// Release a memory mapped region assigned by SI_map.
-static INLINE bool_t
+static INLINE bool
SI_unmap(FSFileHandle *self, char *ptr, int64_t len);
// 32-bit or 64-bit inlined helpers for FSFH_window.
-static INLINE bool_t
+static INLINE bool
SI_window(FSFileHandle *self, FileWindow *window, int64_t offset, int64_t len);
// Architecture- and OS- specific initialization for a read-only FSFileHandle.
-static INLINE bool_t
+static INLINE bool
SI_init_read_only(FSFileHandle *self);
// Windows-specific routine needed for closing read-only handles.
#ifdef CHY_HAS_WINDOWS_H
-static INLINE bool_t
+static INLINE bool
SI_close_win_handles(FSFileHandle *self);
#endif
@@ -157,7 +157,7 @@ FSFH_do_open(FSFileHandle *self, const CharBuf *path, uint32_t flags) {
return self;
}
-bool_t
+bool
FSFH_close(FSFileHandle *self) {
// On 64-bit systems, cancel the whole-file mapping.
if (IS_64_BIT && (self->flags & FH_READ_ONLY) && self->buf != NULL) {
@@ -183,7 +183,7 @@ FSFH_close(FSFileHandle *self) {
return true;
}
-bool_t
+bool
FSFH_write(FSFileHandle *self, const void *data, size_t len) {
if (len) {
// Write data, track file length, check for errors.
@@ -210,7 +210,7 @@ FSFH_length(FSFileHandle *self) {
return self->len;
}
-bool_t
+bool
FSFH_window(FSFileHandle *self, FileWindow *window, int64_t offset,
int64_t len) {
const int64_t end = offset + len;
@@ -237,21 +237,21 @@ FSFH_window(FSFileHandle *self, FileWindow *window, int64_t offset,
#if IS_64_BIT
-static INLINE bool_t
+static INLINE bool
SI_window(FSFileHandle *self, FileWindow *window, int64_t offset,
int64_t len) {
FileWindow_Set_Window(window, self->buf + offset, offset, len);
return true;
}
-bool_t
+bool
FSFH_release_window(FSFileHandle *self, FileWindow *window) {
UNUSED_VAR(self);
FileWindow_Set_Window(window, NULL, 0, 0);
return true;
}
-bool_t
+bool
FSFH_read(FSFileHandle *self, char *dest, int64_t offset, size_t len) {
const int64_t end = offset + len;
@@ -277,7 +277,7 @@ FSFH_read(FSFileHandle *self, char *dest, int64_t offset, size_t len) {
#else
-static INLINE bool_t
+static INLINE bool
SI_window(FSFileHandle *self, FileWindow *window, int64_t offset,
int64_t len) {
// Release the previously mmap'd region, if any.
@@ -300,7 +300,7 @@ SI_window(FSFileHandle *self, FileWindow *window, int64_t offset,
return true;
}
-bool_t
+bool
FSFH_release_window(FSFileHandle *self, FileWindow *window) {
if (!SI_unmap(self, window->buf, window->len)) { return false; }
FileWindow_Set_Window(window, NULL, 0, 0);
@@ -313,7 +313,7 @@ FSFH_release_window(FSFileHandle *self, FileWindow *window) {
#ifdef CHY_HAS_SYS_MMAN_H
-static INLINE bool_t
+static INLINE bool
SI_init_read_only(FSFileHandle *self) {
// Open.
self->fd = open((char*)CB_Get_Ptr8(self->path),
@@ -372,7 +372,7 @@ SI_map(FSFileHandle *self, int64_t offset, int64_t len) {
return buf;
}
-static INLINE bool_t
+static INLINE bool
SI_unmap(FSFileHandle *self, char *buf, int64_t len) {
if (buf != NULL) {
if (munmap(buf, len)) {
@@ -385,7 +385,7 @@ SI_unmap(FSFileHandle *self, char *buf, int64_t len) {
}
#if !IS_64_BIT
-bool_t
+bool
FSFH_read(FSFileHandle *self, char *dest, int64_t offset, size_t len) {
int64_t check_val;
@@ -418,7 +418,7 @@ FSFH_read(FSFileHandle *self, char *dest, int64_t offset, size_t len) {
#elif defined(CHY_HAS_WINDOWS_H)
-static INLINE bool_t
+static INLINE bool
SI_init_read_only(FSFileHandle *self) {
char *filepath = (char*)CB_Get_Ptr8(self->path);
SYSTEM_INFO sys_info;
@@ -495,7 +495,7 @@ SI_map(FSFileHandle *self, int64_t offset, int64_t len) {
return buf;
}
-static INLINE bool_t
+static INLINE bool
SI_unmap(FSFileHandle *self, char *buf, int64_t len) {
if (buf != NULL) {
if (!UnmapViewOfFile(buf)) {
@@ -509,7 +509,7 @@ SI_unmap(FSFileHandle *self, char *buf, int64_t len) {
return true;
}
-static INLINE bool_t
+static INLINE bool
SI_close_win_handles(FSFileHandle *self) {
// Close both standard handle and mapping handle.
if (self->win_maphandle) {
@@ -537,7 +537,7 @@ SI_close_win_handles(FSFileHandle *self) {
}
#if !IS_64_BIT
-bool_t
+bool
FSFH_read(FSFileHandle *self, char *dest, int64_t offset, size_t len) {
BOOL check_val;
DWORD got;
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FSFileHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFileHandle.cfh b/core/Lucy/Store/FSFileHandle.cfh
index 1f0019b..ddcdb3f 100644
--- a/core/Lucy/Store/FSFileHandle.cfh
+++ b/core/Lucy/Store/FSFileHandle.cfh
@@ -40,22 +40,22 @@ class Lucy::Store::FSFileHandle cnick FSFH
inert nullable FSFileHandle*
do_open(FSFileHandle *self, const CharBuf *path = NULL, uint32_t flags);
- bool_t
+ bool
Window(FSFileHandle *self, FileWindow *window, int64_t offset, int64_t len);
- bool_t
+ bool
Release_Window(FSFileHandle *self, FileWindow *window);
- bool_t
+ bool
Read(FSFileHandle *self, char *dest, int64_t offset, size_t len);
- bool_t
+ bool
Write(FSFileHandle *self, const void *data, size_t len);
int64_t
Length(FSFileHandle *self);
- bool_t
+ bool
Close(FSFileHandle *self);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FSFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFolder.c b/core/Lucy/Store/FSFolder.c
index 244aaca..fd27f9d 100644
--- a/core/Lucy/Store/FSFolder.c
+++ b/core/Lucy/Store/FSFolder.c
@@ -51,19 +51,19 @@ static CharBuf*
S_fullpath(FSFolder *self, const CharBuf *path);
// Return true if the supplied path is a directory.
-static bool_t
+static bool
S_dir_ok(const CharBuf *path);
// Create a directory, or set Err_error and return false.
-bool_t
+bool
S_create_dir(const CharBuf *path);
// Return true unless the supplied path contains a slash.
-bool_t
+bool
S_is_local_entry(const CharBuf *path);
// Create a hard link.
-bool_t
+bool
S_hard_link(CharBuf *from_path, CharBuf *to_path);
FSFolder*
@@ -89,7 +89,7 @@ FSFolder_initialize(FSFolder *self) {
}
}
-bool_t
+bool
FSFolder_check(FSFolder *self) {
return S_dir_ok(self->path);
}
@@ -104,10 +104,10 @@ FSFolder_local_open_filehandle(FSFolder *self, const CharBuf *name,
return (FileHandle*)fh;
}
-bool_t
+bool
FSFolder_local_mkdir(FSFolder *self, const CharBuf *name) {
CharBuf *dir = S_fullpath(self, name);
- bool_t result = S_create_dir(dir);
+ bool result = S_create_dir(dir);
if (!result) { ERR_ADD_FRAME(Err_get_error()); }
DECREF(dir);
return result;
@@ -120,7 +120,7 @@ FSFolder_local_open_dir(FSFolder *self) {
return dh;
}
-bool_t
+bool
FSFolder_local_exists(FSFolder *self, const CharBuf *name) {
if (Hash_Fetch(self->entries, (Obj*)name)) {
return true;
@@ -131,7 +131,7 @@ FSFolder_local_exists(FSFolder *self, const CharBuf *name) {
else {
struct stat stat_buf;
CharBuf *fullpath = S_fullpath(self, name);
- bool_t retval = false;
+ bool retval = false;
if (stat((char*)CB_Get_Ptr8(fullpath), &stat_buf) != -1) {
retval = true;
}
@@ -140,7 +140,7 @@ FSFolder_local_exists(FSFolder *self, const CharBuf *name) {
}
}
-bool_t
+bool
FSFolder_local_is_directory(FSFolder *self, const CharBuf *name) {
// Check for a cached object, then fall back to a system call.
Obj *elem = Hash_Fetch(self->entries, (Obj*)name);
@@ -149,17 +149,17 @@ FSFolder_local_is_directory(FSFolder *self, const CharBuf *name) {
}
else {
CharBuf *fullpath = S_fullpath(self, name);
- bool_t result = S_dir_ok(fullpath);
+ bool result = S_dir_ok(fullpath);
DECREF(fullpath);
return result;
}
}
-bool_t
+bool
FSFolder_rename(FSFolder *self, const CharBuf* from, const CharBuf *to) {
CharBuf *from_path = S_fullpath(self, from);
CharBuf *to_path = S_fullpath(self, to);
- bool_t retval = !rename((char*)CB_Get_Ptr8(from_path),
+ bool retval = !rename((char*)CB_Get_Ptr8(from_path),
(char*)CB_Get_Ptr8(to_path));
if (!retval) {
Err_set_error(Err_new(CB_newf("rename from '%o' to '%o' failed: %s",
@@ -170,25 +170,25 @@ FSFolder_rename(FSFolder *self, const CharBuf* from, const CharBuf *to) {
return retval;
}
-bool_t
+bool
FSFolder_hard_link(FSFolder *self, const CharBuf *from,
const CharBuf *to) {
CharBuf *from_path = S_fullpath(self, from);
CharBuf *to_path = S_fullpath(self, to);
- bool_t retval = S_hard_link(from_path, to_path);
+ bool retval = S_hard_link(from_path, to_path);
DECREF(from_path);
DECREF(to_path);
return retval;
}
-bool_t
+bool
FSFolder_local_delete(FSFolder *self, const CharBuf *name) {
CharBuf *fullpath = S_fullpath(self, name);
char *path_ptr = (char*)CB_Get_Ptr8(fullpath);
#ifdef CHY_REMOVE_ZAPS_DIRS
- bool_t result = !remove(path_ptr);
+ bool result = !remove(path_ptr);
#else
- bool_t result = !rmdir(path_ptr) || !remove(path_ptr);
+ bool result = !rmdir(path_ptr) || !remove(path_ptr);
#endif
DECREF(Hash_Delete(self->entries, (Obj*)name));
DECREF(fullpath);
@@ -256,7 +256,7 @@ S_fullpath(FSFolder *self, const CharBuf *path) {
return fullpath;
}
-static bool_t
+static bool
S_dir_ok(const CharBuf *path) {
struct stat stat_buf;
if (stat((char*)CB_Get_Ptr8(path), &stat_buf) != -1) {
@@ -265,7 +265,7 @@ S_dir_ok(const CharBuf *path) {
return false;
}
-bool_t
+bool
S_create_dir(const CharBuf *path) {
if (-1 == chy_makedir((char*)CB_Get_Ptr8(path), 0777)) {
Err_set_error(Err_new(CB_newf("Couldn't create directory '%o': %s",
@@ -275,7 +275,7 @@ S_create_dir(const CharBuf *path) {
return true;
}
-bool_t
+bool
S_is_local_entry(const CharBuf *path) {
ZombieCharBuf *scratch = ZCB_WRAP(path);
uint32_t code_point;
@@ -296,7 +296,7 @@ S_is_local_entry(const CharBuf *path) {
#include <windows.h>
-bool_t
+bool
S_hard_link(CharBuf *from_path, CharBuf *to_path) {
char *from8 = (char*)CB_Get_Ptr8(from_path);
char *to8 = (char*)CB_Get_Ptr8(to_path);
@@ -315,7 +315,7 @@ S_hard_link(CharBuf *from_path, CharBuf *to_path) {
#elif (defined(CHY_HAS_UNISTD_H))
-bool_t
+bool
S_hard_link(CharBuf *from_path, CharBuf *to_path) {
char *from8 = (char*)CB_Get_Ptr8(from_path);
char *to8 = (char*)CB_Get_Ptr8(to_path);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FSFolder.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFolder.cfh b/core/Lucy/Store/FSFolder.cfh
index 0a59604..5ff916c 100644
--- a/core/Lucy/Store/FSFolder.cfh
+++ b/core/Lucy/Store/FSFolder.cfh
@@ -44,7 +44,7 @@ public class Lucy::Store::FSFolder inherits Lucy::Store::Folder {
/** Verify that <code>path</code> is a directory. TODO: check
* permissions.
*/
- public bool_t
+ public bool
Check(FSFolder *self);
public void
@@ -57,25 +57,25 @@ public class Lucy::Store::FSFolder inherits Lucy::Store::Folder {
incremented nullable DirHandle*
Local_Open_Dir(FSFolder *self);
- bool_t
+ bool
Local_MkDir(FSFolder *self, const CharBuf *name);
- bool_t
+ bool
Local_Exists(FSFolder *self, const CharBuf *name);
- bool_t
+ bool
Local_Is_Directory(FSFolder *self, const CharBuf *name);
nullable Folder*
Local_Find_Folder(FSFolder *self, const CharBuf *name);
- bool_t
+ bool
Local_Delete(FSFolder *self, const CharBuf *name);
- public bool_t
+ public bool
Rename(FSFolder *self, const CharBuf* from, const CharBuf *to);
- public bool_t
+ public bool
Hard_Link(FSFolder *self, const CharBuf *from, const CharBuf *to);
/** Transform a relative path into an abolute path.
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FileHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FileHandle.c b/core/Lucy/Store/FileHandle.c
index 719d29b..9b37809 100644
--- a/core/Lucy/Store/FileHandle.c
+++ b/core/Lucy/Store/FileHandle.c
@@ -43,7 +43,7 @@ FH_destroy(FileHandle *self) {
FH_object_count--;
}
-bool_t
+bool
FH_grow(FileHandle *self, int64_t length) {
UNUSED_VAR(self);
UNUSED_VAR(length);
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/FileHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FileHandle.cfh b/core/Lucy/Store/FileHandle.cfh
index c0a689d..4efe0a4 100644
--- a/core/Lucy/Store/FileHandle.cfh
+++ b/core/Lucy/Store/FileHandle.cfh
@@ -62,7 +62,7 @@ abstract class Lucy::Store::FileHandle cnick FH
* @param len Number of bytes to expose via the window.
* @return true on success, false on failure (sets Err_error)
*/
- abstract bool_t
+ abstract bool
Window(FileHandle *self, FileWindow *window, int64_t offset, int64_t len);
/** Clean up the FileWindow, doing whatever is necessary to free its
@@ -70,7 +70,7 @@ abstract class Lucy::Store::FileHandle cnick FH
*
* @return true on success, false on failure (sets Err_error)
*/
- abstract bool_t
+ abstract bool
Release_Window(FileHandle *self, FileWindow *window);
/** Copy file content into the supplied buffer.
@@ -80,7 +80,7 @@ abstract class Lucy::Store::FileHandle cnick FH
* @param len Number of bytes to copy.
* @return true on success, false on failure (sets Err_error)
*/
- abstract bool_t
+ abstract bool
Read(FileHandle *self, char *dest, int64_t offset, size_t len);
/** Write supplied content.
@@ -89,7 +89,7 @@ abstract class Lucy::Store::FileHandle cnick FH
* @param len Number of bytes to write.
* @return true on success, false on failure (sets Err_error)
*/
- abstract bool_t
+ abstract bool
Write(FileHandle *self, const void *data, size_t len);
/** Return the current length of the file in bytes, or set Err_error and
@@ -103,7 +103,7 @@ abstract class Lucy::Store::FileHandle cnick FH
*
* @return true on success, false on failure (sets Err_error).
*/
- bool_t
+ bool
Grow(FileHandle *self, int64_t len);
/** Close the FileHandle, possibly releasing resources. Implementations
@@ -112,7 +112,7 @@ abstract class Lucy::Store::FileHandle cnick FH
*
* @return true on success, false on failure (sets Err_error)
*/
- abstract bool_t
+ abstract bool
Close(FileHandle *self);
/** Set the object's <code>path</code> attribute.
http://git-wip-us.apache.org/repos/asf/lucy/blob/ab68b5fb/core/Lucy/Store/Folder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Folder.c b/core/Lucy/Store/Folder.c
index b7d2796..414a189 100644
--- a/core/Lucy/Store/Folder.c
+++ b/core/Lucy/Store/Folder.c
@@ -133,12 +133,12 @@ Folder_open_filehandle(Folder *self, const CharBuf *path, uint32_t flags) {
return fh;
}
-bool_t
+bool
Folder_delete(Folder *self, const CharBuf *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
if (enclosing_folder) {
ZombieCharBuf *name = IxFileNames_local_part(path, ZCB_BLANK());
- bool_t result = Folder_Local_Delete(enclosing_folder, (CharBuf*)name);
+ bool result = Folder_Local_Delete(enclosing_folder, (CharBuf*)name);
return result;
}
else {
@@ -146,7 +146,7 @@ Folder_delete(Folder *self, const CharBuf *path) {
}
}
-bool_t
+bool
Folder_delete_tree(Folder *self, const CharBuf *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
@@ -171,14 +171,14 @@ Folder_delete_tree(Folder *self, const CharBuf *path) {
}
for (uint32_t i = 0, max = VA_Get_Size(dirs); i < max; i++) {
CharBuf *name = (CharBuf*)VA_Fetch(files, i);
- bool_t success = Folder_Delete_Tree(inner_folder, name);
+ bool success = Folder_Delete_Tree(inner_folder, name);
if (!success && Folder_Local_Exists(inner_folder, name)) {
break;
}
}
for (uint32_t i = 0, max = VA_Get_Size(files); i < max; i++) {
CharBuf *name = (CharBuf*)VA_Fetch(files, i);
- bool_t success = Folder_Local_Delete(inner_folder, name);
+ bool success = Folder_Local_Delete(inner_folder, name);
if (!success && Folder_Local_Exists(inner_folder, name)) {
break;
}
@@ -196,7 +196,7 @@ Folder_delete_tree(Folder *self, const CharBuf *path) {
}
}
-static bool_t
+static bool
S_is_updir(CharBuf *path) {
if (CB_Equals_Str(path, ".", 1) || CB_Equals_Str(path, "..", 2)) {
return true;
@@ -266,10 +266,10 @@ Folder_open_dir(Folder *self, const CharBuf *path) {
return dh;
}
-bool_t
+bool
Folder_mkdir(Folder *self, const CharBuf *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
- bool_t result = false;
+ bool result = false;
if (!CB_Get_Size(path)) {
Err_set_error(Err_new(CB_newf("Invalid path: '%o'", path)));
@@ -289,10 +289,10 @@ Folder_mkdir(Folder *self, const CharBuf *path) {
return result;
}
-bool_t
+bool
Folder_exists(Folder *self, const CharBuf *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
- bool_t retval = false;
+ bool retval = false;
if (enclosing_folder) {
ZombieCharBuf *name = IxFileNames_local_part(path, ZCB_BLANK());
if (Folder_Local_Exists(enclosing_folder, (CharBuf*)name)) {
@@ -302,10 +302,10 @@ Folder_exists(Folder *self, const CharBuf *path) {
return retval;
}
-bool_t
+bool
Folder_is_directory(Folder *self, const CharBuf *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
- bool_t retval = false;
+ bool retval = false;
if (enclosing_folder) {
ZombieCharBuf *name = IxFileNames_local_part(path, ZCB_BLANK());
if (Folder_Local_Is_Directory(enclosing_folder, (CharBuf*)name)) {