37 bool Rand(
const std::vector<std::string> &
args) {
38 bool forever =
true, hex =
false;
42 std::vector<std::string> args_copy(
args);
45 if (!last_arg.empty() && last_arg[0] !=
'-') {
47 unsigned long long num = strtoull(last_arg.c_str(), &endptr, 10);
55 std::map<std::string, std::string> args_map;
61 hex = args_map.count(
"-hex") > 0;
75 static const char hextable[16 + 1] =
"0123456789abcdef";
76 for (
unsigned i = 0;
i <
todo;
i++) {
91 if (hex && fwrite(
"\n", 1, 1,
stdout) != 1) {