Resume from file on startup
This commit is contained in:
parent
51a88bec4d
commit
300d246179
4 changed files with 27 additions and 6 deletions
|
@ -86,6 +86,10 @@ int resume(FILE *input)
|
|||
linenoiseFree(name);
|
||||
}
|
||||
|
||||
return restore(fp);
|
||||
}
|
||||
|
||||
int restore(FILE* fp){
|
||||
IGNORE(fread(&save, sizeof(struct save_t), 1, fp));
|
||||
fclose(fp);
|
||||
if (save.version != VRSION) {
|
||||
|
@ -101,4 +105,4 @@ int resume(FILE *input)
|
|||
return GO_TOP;
|
||||
}
|
||||
|
||||
/* end */
|
||||
/* end */
|
Loading…
Add table
Add a link
Reference in a new issue