| 150 | // do_table ----------------------------------------------------------------// |
| 151 | |
| 152 | void do_table() |
| 153 | { |
| 154 | outfile << |
| 155 | "<h1>Path Decomposition Table</h1>\n" |
| 156 | "<p>Shaded entries indicate cases where <i>POSIX</i> and <i>Windows</i>\n" |
| 157 | "implementations yield different results. The top value is the\n" |
| 158 | "<i>POSIX</i> result and the bottom value is the <i>Windows</i> result.\n" |
| 159 | "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n" |
| 160 | "<p>\n" |
| 161 | ; |
| 162 | |
| 163 | // generate the column headings |
| 164 | |
| 165 | outfile << "<tr><td><b>Constructor<br>argument</b></td>\n"; |
| 166 | |
| 167 | for ( int i = 0; i < sizeof(column)/sizeof(column_base&); ++i ) |
| 168 | { |
| 169 | outfile << "<td><b>" << column[i]->heading() << "</b></td>\n"; |
| 170 | } |
| 171 | |
| 172 | outfile << "</tr>\n"; |
| 173 | |
| 174 | // generate a row for each input line |
| 175 | |
| 176 | string test_case; |
| 177 | while ( std::getline( infile, test_case ) ) |
| 178 | { |
| 179 | if (!test_case.empty() && *--test_case.end() == '\r') |
| 180 | test_case.erase(test_case.size()-1); |
| 181 | if (test_case.empty() || test_case[0] != '#') |
| 182 | do_row( test_case ); |
| 183 | } |
| 184 | |
| 185 | outfile << "</table>\n"; |
| 186 | } |
| 187 | |
| 188 | } // unnamed namespace |
| 189 | |