static int restore_state(FILE *file) { if (fscanf(file, "%d\n%ld\n", &rec_rule, &rec_pos) != 2) return 1; rec_line = 0; if (rec_version >= 4 && fscanf(file, "%lu\n", &rec_line) != 1) return 1; if (rec_rule < 0 || rec_pos < 0) return 1; if (restore_rule_number()) return 1; if (word_file == stdin) { restore_line_number(); } else { if (fseek(word_file, rec_pos, SEEK_SET)) pexit("fseek"); line_number = rec_line; } return 0; }
static int restore_state(FILE *file) { if (fscanf(file, "%d\n", &rec_rule) != 1) return 1; return restore_rule_number(); }