Changeset 6132 for branches/stable_5.0
- Timestamp:
- 13/08/09 07:15:12 (3 years ago)
- Files:
-
- 1 modified
-
branches/stable_5.0/HELP_SOURCE/arb_help2xml.cxx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/stable_5.0/HELP_SOURCE/arb_help2xml.cxx
r5785 r6132 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 2000 // 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 }
