Open katef opened 7 years ago
For the specific cases in which you want to parse them, would it work to set a hook (such as the trial_seed
field on theft_run_config.hooks.trial_post
's info struct) to capture it directly, rather than re-parsing the string output?
I'm just after parsing a seed passed in by argv[]
, not to try and capture it during a run.
My use-case is just for my own convenience, when running the CLI by hand:
https://github.com/katef/libfsm/pull/73/files#diff-7e45faf72d5b4dc573ca4facacecbfe3R72
That's a great idea, and what I said about hooks doesn't really apply -- something like theft_seed theft_seed_of_string(char *s)
should go in theft_aux.c
, near theft_seed_of_time
.
This should use strtoull(s, NULL, 16)
.
Given that theft.h abstracts the
theft_seed
type, it'd be handy to provide something akin tostrtoul()
which parses a suitably-sized string in the same format which theft prints seeds.