summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b6f779e)
git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/XMLTree@202
3cdefd35-fc62-479d-8e8d-
bae585ffb9ca
Tags->save(fp);\r
\r
// stores the texts \r
Tags->save(fp);\r
\r
// stores the texts \r
- if (!disable_tc){\r
- int st = CachedText.size();\r
- ufwrite(&st, sizeof(int),1,fp);\r
- for (int i = 0; i< CachedText.size(); ++i){\r
- st = CachedText.at(i).size();\r
+ int st = CachedText.size();\r
ufwrite(&st, sizeof(int),1,fp);\r
ufwrite(&st, sizeof(int),1,fp);\r
- ufwrite(CachedText.at(i).c_str(),sizeof(char),(1+strlen(CachedText.at(i).c_str())),fp);\r
- };\r
+ for (int i = 0; i< CachedText.size(); i++){\r
+ st = CachedText.at(i).size();\r
+ ufwrite(&st, sizeof(int),1,fp);\r
+ ufwrite(CachedText.at(i).c_str(),sizeof(char),1+CachedText.at(i).size(),fp);\r
+ };\r
s_text = ftell(fp) - s_text;\r
\r
\r
s_text = ftell(fp) - s_text;\r
\r
\r
found_attributes = false;\r
npar = 0;\r
parArraySize = 1;\r
found_attributes = false;\r
npar = 0;\r
parArraySize = 1;\r
disable_tc = dtc;\r
\r
indexing_empty_texts = empty_texts;\r
disable_tc = dtc;\r
\r
indexing_empty_texts = empty_texts;\r
\r
tags_aux = (TagType *) umalloc(sizeof(TagType));\r
\r
\r
tags_aux = (TagType *) umalloc(sizeof(TagType));\r
\r
- TagName = (unsigned char **) umalloc(2*sizeof(unsigned char*));\r
+ TagName = (unsigned char **) umalloc(4*sizeof(unsigned char*));\r
\r
TagName[0] = (unsigned char *) umalloc(4*sizeof(unsigned char));\r
\r
\r
TagName[0] = (unsigned char *) umalloc(4*sizeof(unsigned char));\r
\r
TagName[1] = (unsigned char *) umalloc(4*sizeof(unsigned char));\r
\r
strcpy((char *) TagName[1], "<$>");\r
TagName[1] = (unsigned char *) umalloc(4*sizeof(unsigned char));\r
\r
strcpy((char *) TagName[1], "<$>");\r
+ \r
+ //OJO need to put these in the table too.\r
+ TagName[2] = (unsigned char *) umalloc(5*sizeof(unsigned char));\r
+\r
+ strcpy((char *) TagName[2], "/<@>");\r
+\r
+ TagName[3] = (unsigned char *) umalloc(5*sizeof(unsigned char));\r
+\r
+ strcpy((char *) TagName[3], "/<$>");\r
\r
\r
if (!indexing_empty_texts) \r
\r
\r
if (!indexing_empty_texts) \r
}\r
\r
uchar* GetCachedText(DocID d) {\r
}\r
\r
uchar* GetCachedText(DocID d) {\r
- uchar * str = (uchar*) calloc(sizeof(char),(CachedText.at(d).size() + 1)); \r
+ uchar * str = (uchar*) calloc(sizeof(char),(CachedText.at(d).size() + 1));\r
+ strcpy((char*) str,(const char*) CachedText.at(d).c_str());\r
return (uchar*) (str);\r
}\r
\r
return (uchar*) (str);\r
}\r
\r