Changeset 6131
- Timestamp:
- 12/08/09 18:41:30 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
HELP_SOURCE/arb_help2xml.cxx (modified) (2 diffs)
-
XML/xml.cxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HELP_SOURCE/arb_help2xml.cxx
r5785 r6131 42 42 43 43 // #define DUMP_DATA // use this to see internal data (class Helpfile) 44 #define MAX_LINE_LENGTH 500 // maximum length of lines in input stream44 #define MAX_LINE_LENGTH 200 // maximum length of lines in input stream 45 45 #define TABSIZE 8 46 46 … … 139 139 void getline() { 140 140 if (!eof) { 141 if (!in.good()) eof = true; 142 in.getline(lineBuffer, MAX_LINE_LENGTH); 143 lineNo++; 144 145 if (strchr(lineBuffer, '\t')) { 146 int o2 = 0; 147 148 for (int o = 0; lineBuffer[o]; ++o) { 149 if (lineBuffer[o] == '\t') { 150 int spaces = TABSIZE - (o2 % TABSIZE); 151 while (spaces--) lineBuffer2[o2++] = ' '; 141 if (in.eof()) eof = true; 142 else { 143 h2x_assert(in.good()); 144 145 in.getline(lineBuffer, MAX_LINE_LENGTH); 146 lineNo++; 147 148 if (in.eof()) eof = true; 149 else if (in.fail()) throw "line too long"; 150 151 if (strchr(lineBuffer, '\t')) { 152 int o2 = 0; 153 154 for (int o = 0; lineBuffer[o]; ++o) { 155 if (lineBuffer[o] == '\t') { 156 int spaces = TABSIZE - (o2 % TABSIZE); 157 while (spaces--) lineBuffer2[o2++] = ' '; 158 } 159 else { 160 lineBuffer2[o2++] = lineBuffer[o]; 161 } 152 162 } 153 else { 154 lineBuffer2[o2++] = lineBuffer[o]; 155 } 156 } 157 lineBuffer2[o2] = 0; 158 strcpy(lineBuffer, lineBuffer2); 163 lineBuffer2[o2] = 0; 164 strcpy(lineBuffer, lineBuffer2); 165 } 159 166 } 160 167 } -
trunk/XML/xml.cxx
r5675 r6131 145 145 XML_Tag::~XML_Tag() { 146 146 FILE *out = the_XML_Document->Out(); 147 if (son) { 148 throw string("XML_Tag has son in destructor"); 149 } 147 if (son) throw string("XML_Tag has son in destructor"); 150 148 close(out); 149 150 delete attribute; 151 151 } 152 152
