mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-04-21 06:19:09 +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
|
#ifdef PASSPHRASE
|
||||||
"\t-p passphrase - use passphrase to initialize the random seed with\n"
|
"\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-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
|
#endif
|
||||||
,progname,progname);
|
,progname,progname);
|
||||||
fflush(out);
|
fflush(out);
|
||||||
|
@ -249,6 +249,14 @@ int main(int argc,char **argv)
|
||||||
}
|
}
|
||||||
else if (!strcmp(arg,"rawyaml"))
|
else if (!strcmp(arg,"rawyaml"))
|
||||||
yamlraw = 1;
|
yamlraw = 1;
|
||||||
|
#ifdef PASSPHRASE
|
||||||
|
else if (!strcmp(arg,"checkpoint")) {
|
||||||
|
if (argc--)
|
||||||
|
checkpointfile = *argv++;
|
||||||
|
else
|
||||||
|
e_additional();
|
||||||
|
}
|
||||||
|
#endif // PASSPHRASE
|
||||||
else {
|
else {
|
||||||
fprintf(stderr,"unrecognised argument: --%s\n",arg);
|
fprintf(stderr,"unrecognised argument: --%s\n",arg);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -394,12 +402,6 @@ int main(int argc,char **argv)
|
||||||
setpassphrase(pass);
|
setpassphrase(pass);
|
||||||
deterministic = 1;
|
deterministic = 1;
|
||||||
}
|
}
|
||||||
else if (*arg == 'c') {
|
|
||||||
if (argc--)
|
|
||||||
checkpointfile = *argv++;
|
|
||||||
else
|
|
||||||
e_additional();
|
|
||||||
}
|
|
||||||
#endif // PASSPHRASE
|
#endif // PASSPHRASE
|
||||||
else {
|
else {
|
||||||
fprintf(stderr,"unrecognised argument: -%c\n",*arg);
|
fprintf(stderr,"unrecognised argument: -%c\n",*arg);
|
||||||
|
|
Loading…
Add table
Reference in a new issue