Sha256: 829e1e6ebcad04174ec7ce491395446e43baee40986523daf5f0c5e59671a7b1
Contents?: true
Size: 832 Bytes
Versions: 16
Compression:
Stored size: 832 Bytes
Contents
#include "lth_cat.hpp" #include <boost/nowide/iostream.hpp> #include <set> namespace nw = boost::nowide; using namespace std; static string prompt(set<string> const& codes) { if (codes.count("overwhelm")) { return lth_cat::overwhelm; } return {}; } int main(int argc, char** argv) { // Enable special testing modes set<string> codes(argv+1, argv+argc); if (codes.count("prefix")) { nw::cout << lth_cat::prefix << flush; } string buf; nw::cout << prompt(codes) << flush; while (getline(nw::cin, buf)) { nw::cout << buf << endl; if (codes.count("stderr")) { nw::cerr << buf << endl; } nw::cout << prompt(codes) << flush; } if (codes.count("suffix")) { nw::cout << lth_cat::suffix << flush; } return 0; }
Version data entries
16 entries across 16 versions & 2 rubygems