#include "FileIO.h" #include "util.h" #include #include #include /* uint8_t */ #include #include int main (int argc, char **argv) { int rc; rc = 1; try { while (argc-- > 1) { FileIO f (argv[argc], "r"); std::string buf = f.ReadToString (); if (util_IsProbablyAscii (buf.c_str (), buf.size ())) std::cout << buf << std::endl; else util_HexDump (buf.c_str (), buf.size ()); rc = 0; } } catch (const std::string& e) { std::cerr << e << std::endl; } return rc; }