X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/36b1973b672029dbb51c14fdd3e99d485f326e0a..7e82309c7b430e006f63193a8fc0319e43822d7a:/util/charstat.cpp?ds=inline 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"; } };