(cmd_list): Add code to implement -p, -k, and -l options. * regtool.cc (Fail): Add call to LocalFree to free memory allocated by FormatMessage.
(cmd_set): Ditto for rv.
Call `RegOpenKeyEx' with that desired access. (cmd_add, cmd_remove, cmd_set, cmd_unset): Call `find_key' with KEY_ALL_ACCESS access. (cmd_list, cmd_check, cmd_get): Call `find_key' with KEY_READ access.