- Timestamp:
- 2012-02-28T13:59:00+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/mgpp/text/mgpp_invf_dump.cpp
r19822 r25147 52 52 invf_file_header &ifh, 53 53 word_dict_el &wordEl, 54 unsignedlong wordStart,54 mg_u_long wordStart, 55 55 bool printFrags) { 56 56 cout << wordEl.frag_occur << " \"" << wordEl.el << "\"\n"; … … 62 62 stdio_bitio_buffer buffer(invfFile); 63 63 64 unsignedlong B = BIO_Bblock_Init (idh.num_frags, wordEl.frag_occur);65 unsignedlong fragNum = 0;66 unsignedlong i;64 mg_u_long B = BIO_Bblock_Init (idh.num_frags, wordEl.frag_occur); 65 mg_u_long fragNum = 0; 66 mg_u_long i; 67 67 for (i=0; i<wordEl.frag_occur; ++i) { 68 unsignedlong delta = buffer.bblock_decode (B, NULL);68 mg_u_long delta = buffer.bblock_decode (B, NULL); 69 69 fragNum += delta; 70 70 cout << " " << fragNum; 71 71 72 72 if (!ifh.word_level_index ) { 73 unsignedlong count = buffer.gamma_decode (NULL);73 mg_u_long count = buffer.gamma_decode (NULL); 74 74 cout << "(" << count << ")"; 75 75 } else { … … 88 88 invf_file_header &/*ifh*/, 89 89 dict_el &tagEl, 90 unsignedlong tagStart,90 mg_u_long tagStart, 91 91 bool printFrags) { 92 92 cout << tagEl.frag_occur << " \"<" << tagEl.el << ">\"\n"; … … 98 98 stdio_bitio_buffer buffer(invfFile); 99 99 100 unsignedlong pTag = tagEl.frag_occur*2;101 unsignedlong B = BIO_Bblock_Init (idh.num_frags+pTag, pTag);102 unsignedlong fragNum = 0;103 unsignedlong i;100 mg_u_long pTag = tagEl.frag_occur*2; 101 mg_u_long B = BIO_Bblock_Init (idh.num_frags+pTag, pTag); 102 mg_u_long fragNum = 0; 103 mg_u_long i; 104 104 for (i=0; i<tagEl.frag_occur; ++i) { 105 unsignedlong delta = buffer.bblock_decode (B, NULL)-1;105 mg_u_long delta = buffer.bblock_decode (B, NULL)-1; 106 106 fragNum += delta; 107 107 cout << " " << fragNum; … … 169 169 // process all the words 170 170 if (printWords) { 171 unsignedlong wordNum;172 unsignedlong wordStart;171 mg_u_long wordNum; 172 mg_u_long wordStart; 173 173 word_dict_el wordEl; 174 174 wordEl.SetNumLevels (idh.num_levels); … … 182 182 // process all the tags 183 183 if (printTags) { 184 unsignedlong tagNum;185 unsignedlong tagStart;184 mg_u_long tagNum; 185 mg_u_long tagStart; 186 186 dict_el tagEl; 187 187 for (tagNum=0; tagNum<idh.tag_dict_size; ++tagNum) { … … 199 199 200 200 int main (int argc, char **argv) { 201 char *dir_name, *filename = "";201 char *dir_name, *filename = (char*)""; 202 202 int ch; 203 203 msg_prefix = argv[0];
Note:
See TracChangeset
for help on using the changeset viewer.