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