Switch C64 to CI64 for file positions.

Change Read/Write C64 to CI64 for file positions, all of which are
represented as signed 64-bit integers.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/e5ba8a19
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/e5ba8a19
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/e5ba8a19

Branch: refs/heads/master
Commit: e5ba8a19dd8e04039e7de5479b852150b7705b46
Parents: 5e4dcd2
Author: Marvin Humphrey <[email protected]>
Authored: Wed Apr 20 18:34:30 2016 -0700
Committer: Marvin Humphrey <[email protected]>
Committed: Wed Apr 20 19:26:48 2016 -0700

----------------------------------------------------------------------
 core/Lucy/Index/LexIndex.c             |  4 ++--
 core/Lucy/Index/LexiconWriter.c        |  2 +-
 core/Lucy/Index/Posting/MatchPosting.c | 16 ++++++++--------
 core/Lucy/Index/SkipStepper.c          |  4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/e5ba8a19/core/Lucy/Index/LexIndex.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/LexIndex.c b/core/Lucy/Index/LexIndex.c
index 2c6586b..8a406a3 100644
--- a/core/Lucy/Index/LexIndex.c
+++ b/core/Lucy/Index/LexIndex.c
@@ -131,12 +131,12 @@ S_read_entry(LexIndex *self) {
     TermStepper_Read_Key_Frame(ivars->term_stepper, ix_in);
     int32_t doc_freq = InStream_Read_CI32(ix_in);
     TInfo_Set_Doc_Freq(tinfo, doc_freq);
-    TInfo_Set_Post_FilePos(tinfo, InStream_Read_C64(ix_in));
+    TInfo_Set_Post_FilePos(tinfo, InStream_Read_CI64(ix_in));
     int64_t skip_filepos = doc_freq >= ivars->skip_interval
                            ? InStream_Read_CI64(ix_in)
                            : 0;
     TInfo_Set_Skip_FilePos(tinfo, skip_filepos);
-    TInfo_Set_Lex_FilePos(tinfo, InStream_Read_C64(ix_in));
+    TInfo_Set_Lex_FilePos(tinfo, InStream_Read_CI64(ix_in));
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy/blob/e5ba8a19/core/Lucy/Index/LexiconWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/LexiconWriter.c b/core/Lucy/Index/LexiconWriter.c
index 1ef32f1..7c996d5 100644
--- a/core/Lucy/Index/LexiconWriter.c
+++ b/core/Lucy/Index/LexiconWriter.c
@@ -100,7 +100,7 @@ S_add_last_term_to_ix(LexiconWriter *self) {
                                 ivars->ix_out, 
TermStepper_Get_Value(ivars->term_stepper));
     TermStepper_Write_Key_Frame(ivars->tinfo_stepper,
                                 ivars->ix_out, 
TermStepper_Get_Value(ivars->tinfo_stepper));
-    OutStream_Write_C64(ivars->ix_out, OutStream_Tell(ivars->dat_out));
+    OutStream_Write_CI64(ivars->ix_out, OutStream_Tell(ivars->dat_out));
     ivars->ix_count++;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/e5ba8a19/core/Lucy/Index/Posting/MatchPosting.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Posting/MatchPosting.c 
b/core/Lucy/Index/Posting/MatchPosting.c
index ae4e1f2..c7348fa 100644
--- a/core/Lucy/Index/Posting/MatchPosting.c
+++ b/core/Lucy/Index/Posting/MatchPosting.c
@@ -275,11 +275,11 @@ 
MatchTInfoStepper_Write_Key_Frame_IMP(MatchTermInfoStepper *self,
     OutStream_Write_C32(outstream, doc_freq);
 
     // Write postings file pointer.
-    OutStream_Write_C64(outstream, tinfo_ivars->post_filepos);
+    OutStream_Write_CI64(outstream, tinfo_ivars->post_filepos);
 
     // Write skip file pointer (maybe).
     if (doc_freq >= ivars->skip_interval) {
-        OutStream_Write_C64(outstream, tinfo_ivars->skip_filepos);
+        OutStream_Write_CI64(outstream, tinfo_ivars->skip_filepos);
     }
 
     TInfo_Mimic((TermInfo*)ivars->value, (Obj*)tinfo);
@@ -299,11 +299,11 @@ MatchTInfoStepper_Write_Delta_IMP(MatchTermInfoStepper 
*self,
     OutStream_Write_C32(outstream, doc_freq);
 
     // Write postings file pointer delta.
-    OutStream_Write_C64(outstream, post_delta);
+    OutStream_Write_CI64(outstream, post_delta);
 
     // Write skip file pointer (maybe).
     if (doc_freq >= ivars->skip_interval) {
-        OutStream_Write_C64(outstream, TInfo_IVARS(tinfo)->skip_filepos);
+        OutStream_Write_CI64(outstream, TInfo_IVARS(tinfo)->skip_filepos);
     }
 
     TInfo_Mimic((TermInfo*)ivars->value, (Obj*)tinfo);
@@ -319,11 +319,11 @@ MatchTInfoStepper_Read_Key_Frame_IMP(MatchTermInfoStepper 
*self,
     tinfo_ivars->doc_freq = InStream_Read_C32(instream);
 
     // Read postings file pointer.
-    tinfo_ivars->post_filepos = InStream_Read_C64(instream);
+    tinfo_ivars->post_filepos = InStream_Read_CI64(instream);
 
     // Maybe read skip pointer.
     if (tinfo_ivars->doc_freq >= ivars->skip_interval) {
-        tinfo_ivars->skip_filepos = InStream_Read_C64(instream);
+        tinfo_ivars->skip_filepos = InStream_Read_CI64(instream);
     }
     else {
         tinfo_ivars->skip_filepos = 0;
@@ -339,11 +339,11 @@ MatchTInfoStepper_Read_Delta_IMP(MatchTermInfoStepper 
*self, InStream *instream)
     tinfo_ivars->doc_freq = InStream_Read_C32(instream);
 
     // Adjust postings file pointer.
-    tinfo_ivars->post_filepos += InStream_Read_C64(instream);
+    tinfo_ivars->post_filepos += InStream_Read_CI64(instream);
 
     // Maybe read skip pointer.
     if (tinfo_ivars->doc_freq >= ivars->skip_interval) {
-        tinfo_ivars->skip_filepos = InStream_Read_C64(instream);
+        tinfo_ivars->skip_filepos = InStream_Read_CI64(instream);
     }
     else {
         tinfo_ivars->skip_filepos = 0;

http://git-wip-us.apache.org/repos/asf/lucy/blob/e5ba8a19/core/Lucy/Index/SkipStepper.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SkipStepper.c b/core/Lucy/Index/SkipStepper.c
index 9f22dc9..634e2d8 100644
--- a/core/Lucy/Index/SkipStepper.c
+++ b/core/Lucy/Index/SkipStepper.c
@@ -48,7 +48,7 @@ void
 SkipStepper_Read_Record_IMP(SkipStepper *self, InStream *instream) {
     SkipStepperIVARS *const ivars = SkipStepper_IVARS(self);
     ivars->doc_id   += InStream_Read_C32(instream);
-    ivars->filepos  += InStream_Read_C64(instream);
+    ivars->filepos  += InStream_Read_CI64(instream);
 }
 
 String*
@@ -69,7 +69,7 @@ SkipStepper_Write_Record_IMP(SkipStepper *self, OutStream 
*outstream,
     OutStream_Write_C32(outstream, delta_doc_id);
 
     // Write delta file pointer.
-    OutStream_Write_C64(outstream, delta_filepos);
+    OutStream_Write_CI64(outstream, delta_filepos);
 }
 
 

Reply via email to