X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/36b1973b672029dbb51c14fdd3e99d485f326e0a..87f4567d04c1fbe0b7d01ead5605417960c27cde:/util/charstat.cpp diff --git a/util/charstat.cpp b/util/charstat.cpp index 369cffe..ae96135 100644 --- a/util/charstat.cpp +++ b/util/charstat.cpp @@ -23,17 +23,18 @@ public: os.width(4); os.fill(' '); if (isgraph(p.first)) { - os << p.first; - } else { - std::ostringstream oss; - oss << "0x"; - oss.width(2); - oss.fill('0'); - oss.setf(std::ios::hex, std::ios::basefield); - oss << int(p.first); - os << oss.str(); + os << p.first << " ["; } - os << " (" << double(p.second) / total * 100 << "%)\n"; + std::ostringstream oss; + oss << "0x"; + oss.width(2); + oss.fill('0'); + oss.setf(std::ios::hex, std::ios::basefield); + oss << int(p.first); + os << oss.str() << ":" << unsigned(p.first); + if (isgraph(p.first)) os << "]"; + os << " (" << double(p.second) / total * 100 << "% : " + << unsigned((double(p.second) / total) * 4294967296ull) << ")\n"; } };