int sst;\r
int st;\r
ufread(&sst, sizeof(int),1,fp);\r
int sst;\r
int st;\r
ufread(&sst, sizeof(int),1,fp);\r
uint max_tag = 0;\r
for(uint i=0;i<(uint)npar-1;i++)\r
max_tag = max(max_tag,tags_aux[i]);\r
uint max_tag = 0;\r
for(uint i=0;i<(uint)npar-1;i++)\r
max_tag = max(max_tag,tags_aux[i]);\r
- max_tag++;\r
- tags_aux = (TagType *) urealloc(tags_aux, sizeof(TagType)*(npar + 1));\r
- tags_aux[npar++] = max_tag;\r
+ //max_tag++;\r
+ //tags_aux = (TagType *) urealloc(tags_aux, sizeof(TagType)*(npar + 1));\r
+ //tags_aux[npar++] = max_tag;\r
//int ntagsize = found_attributes ? 2*ntagnames-1 : 2*ntagnames - 2;\r
int ntagsize = 2*ntagnames + 2;\r
\r
//int ntagsize = found_attributes ? 2*ntagnames-1 : 2*ntagnames - 2;\r
int ntagsize = 2*ntagnames + 2;\r
\r
// creates the data structure marking the non-empty texts (just in the case it is necessary)\r
if (!indexing_empty_texts) {\r
EBVector = new static_bitsequence_rrr02((uint *)empty_texts_aux,(ulong)npar,(uint)32);\r
// creates the data structure marking the non-empty texts (just in the case it is necessary)\r
if (!indexing_empty_texts) {\r
EBVector = new static_bitsequence_rrr02((uint *)empty_texts_aux,(ulong)npar,(uint)32);\r
// this should be changed for more efficient processing\r
for (i=0; i<ntagnames; i++)\r
if (strcmp((const char *)tagname,(const char *)TagName[i])==0) break; \r
// this should be changed for more efficient processing\r
for (i=0; i<ntagnames; i++)\r
if (strcmp((const char *)tagname,(const char *)TagName[i])==0) break; \r
if (tagid >= ntagnames) return NULL; // invalid tag identifier\r
s = (unsigned char *)umalloc((strlen((const char *)TagName[tagid])+1)*sizeof(unsigned char));\r
strcpy((char *)s, (const char *)TagName[tagid]);\r
if (tagid >= ntagnames) return NULL; // invalid tag identifier\r
s = (unsigned char *)umalloc((strlen((const char *)TagName[tagid])+1)*sizeof(unsigned char));\r
strcpy((char *)s, (const char *)TagName[tagid]);\r
if (tagid >= ntagnames) return NULL; // invalid tag identifier\r
return ((const unsigned char*) TagName[tagid]);\r
}\r
if (tagid >= ntagnames) return NULL; // invalid tag identifier\r
return ((const unsigned char*) TagName[tagid]);\r
}\r