| 80 | } |
| 81 | #else |
| 82 | int main(int argc, char * argv[]) |
| 83 | { |
| 84 | if (argc < 2 || argc > 3) |
| 85 | return EXIT_FAILURE; |
| 86 | |
| 87 | std::ifstream f(argv[1]); |
| 88 | if (!f.is_open()) |
| 89 | return EXIT_FAILURE; |
| 90 | |
| 91 | std::ostringstream oss; |
| 92 | oss << f.rdbuf(); |
| 93 | |
| 94 | if (!f.good()) |
| 95 | return EXIT_FAILURE; |
| 96 | |
| 97 | const int cnt = (argc == 3) ? std::stoi(argv[2]) : 1; |
| 98 | |
| 99 | const std::string code = oss.str(); |
| 100 | for (int i = 0; i < cnt; ++i) |
| 101 | doCheck(reinterpret_cast<const unsigned char*>(code.data()), code.size()); |
| 102 | |
| 103 | return EXIT_SUCCESS; |
| 104 | } |
| 105 | #endif |
| 106 | |
| 107 | |