#include #include #include #include #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Auxiliary program to echo (reverted) string. * \author mdejong */ int main(int argc, char* argv[]) { using namespace std; bool revert; try { JParser<> zap("Auxiliary program to echo (reverted) string."); zap['r'] = make_field(revert); zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } string buffer; while (getline(cin,buffer) && buffer != "") { if (revert) reverse(buffer.begin(), buffer.end()); cout << buffer << endl; } }