| 181 | } |
| 182 | |
| 183 | void |
| 184 | OutputMgr::OutputStepHashFuncDef(std::ostream &out) |
| 185 | { |
| 186 | out << std::endl; |
| 187 | out << "void " << OutputMgr::step_hash_func_name << "(int stmt_id)" << std::endl; |
| 188 | out << "{" << std::endl; |
| 189 | |
| 190 | int indent = 1; |
| 191 | OutputMgr::output_tab_(out, indent); |
| 192 | out << "int i = 0;" << std::endl; |
| 193 | OutputMgr::OutputHashFuncInvocation(out, indent); |
| 194 | OutputMgr::output_tab_(out, indent); |
| 195 | out << "printf(\"before stmt(%d): "; |
| 196 | out << "checksum = %X\\n\", stmt_id, crc32_context ^ 0xFFFFFFFFUL);" << std::endl; |
| 197 | |
| 198 | OutputMgr::output_tab_(out, indent); |
| 199 | out << "crc32_context = 0xFFFFFFFFUL; " << std::endl; |
| 200 | |
| 201 | OutputMgr::output_tab_(out, indent); |
| 202 | out << "for (i = 0; i < 256; i++) { " << std::endl; |
| 203 | OutputMgr::output_tab_(out, indent+1); |
| 204 | out << "crc32_tab[i] = 0;" << std::endl; |
| 205 | OutputMgr::output_tab_(out, indent); |
| 206 | out << "}" << std::endl; |
| 207 | OutputMgr::output_tab_(out, indent); |
| 208 | out << "crc32_gentab();" << endl; |
| 209 | out << "}" << std::endl; |
| 210 | } |
| 211 | |
| 212 | void |
| 213 | OutputMgr::OutputHashFuncDecl(std::ostream &out) |
nothing calls this directly
no outgoing calls
no test coverage detected