bool disable_tc;\r
\r
FILE* stream;\r
- int stream_fd;\r
+ int stream_fd; \r
+ string * buffer;\r
+ void myfputs(const char* s, FILE * fp){\r
+ buffer->append(s);\r
+ if (buffer->size() >= 100000){\r
+ fputs(buffer->c_str(),fp);\r
+ buffer->clear();\r
+ };\r
\r
+ }\r
+ void myfputc(const char c, FILE*fp){\r
+ buffer->append(1,c);\r
+ if (buffer->size() >= 100000){\r
+ fputs(buffer->c_str(),fp);\r
+ buffer->clear();\r
+ };\r
+ }\r
+ void mybufferflush(FILE* fp){\r
+ fputs(buffer->c_str(), fp);\r
+ buffer->clear();\r
+ }\r
/** Data structure constructors */\r
- XMLTree(){;};\r
+ XMLTree(){ buffer = 0;};\r
\r
// non const pointer are freed by this method.\r
XMLTree( pb * const par, uint npar, vector<string> * const TN, TagIdMap * const tim, uint *empty_texts_bmp, TagType *tags,\r
\r
\r
/** Print procedure */\r
- void Print(int fd,treeNode x);\r
+ void Print(int fd,treeNode x, bool no_text);\r
+ void Print(int fd,treeNode x) { Print(fd,x,false); }\r
\r
};\r
\r