mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-04-23 23:39:11 +00:00
Use long argument for checkpoint
This commit is contained in:
parent
2a4afad91a
commit
c9396de8b2
1 changed files with 9 additions and 7 deletions
16
main.c
16
main.c
|
@ -112,7 +112,7 @@ static void printhelp(FILE *out,const char *progname)
|
|||
#ifdef PASSPHRASE
|
||||
"\t-p passphrase - use passphrase to initialize the random seed with\n"
|
||||
"\t-P - same as -p, but takes passphrase from PASSPHRASE environment variable\n"
|
||||
"\t-c filename - load/save checkpoint of progress to specified file (requires passphrase)\n"
|
||||
"\t--checkpoint filename - load/save checkpoint of progress to specified file (requires passphrase)\n"
|
||||
#endif
|
||||
,progname,progname);
|
||||
fflush(out);
|
||||
|
@ -249,6 +249,14 @@ int main(int argc,char **argv)
|
|||
}
|
||||
else if (!strcmp(arg,"rawyaml"))
|
||||
yamlraw = 1;
|
||||
#ifdef PASSPHRASE
|
||||
else if (!strcmp(arg,"checkpoint")) {
|
||||
if (argc--)
|
||||
checkpointfile = *argv++;
|
||||
else
|
||||
e_additional();
|
||||
}
|
||||
#endif // PASSPHRASE
|
||||
else {
|
||||
fprintf(stderr,"unrecognised argument: --%s\n",arg);
|
||||
exit(1);
|
||||
|
@ -394,12 +402,6 @@ int main(int argc,char **argv)
|
|||
setpassphrase(pass);
|
||||
deterministic = 1;
|
||||
}
|
||||
else if (*arg == 'c') {
|
||||
if (argc--)
|
||||
checkpointfile = *argv++;
|
||||
else
|
||||
e_additional();
|
||||
}
|
||||
#endif // PASSPHRASE
|
||||
else {
|
||||
fprintf(stderr,"unrecognised argument: -%c\n",*arg);
|
||||
|
|
Loading…
Add table
Reference in a new issue