diff options
author | Willem Jan Palenstijn | 2009-02-22 22:07:30 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-02-22 22:07:30 +0000 |
commit | a5a29a44e9f129a3bff8cc93a02b71b17b7e9163 (patch) | |
tree | 9cf81ed5d0f4229f796d44c1a7fad1fc1e81ab6b /engines/sci | |
parent | 4c1349e0f436c273b79073c39ced1b224f6a4371 (diff) | |
download | scummvm-rg350-a5a29a44e9f129a3bff8cc93a02b71b17b7e9163.tar.gz scummvm-rg350-a5a29a44e9f129a3bff8cc93a02b71b17b7e9163.tar.bz2 scummvm-rg350-a5a29a44e9f129a3bff8cc93a02b71b17b7e9163.zip |
Check for end of file more often while reading CFSML
svn-id: r38796
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 798 |
1 files changed, 422 insertions, 376 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index b7255afd44..94a71856fd 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -227,7 +227,7 @@ RECORD synonym_t "synonym_t" { // Auto-generated CFSML declaration and function block -#line 736 "engines/sci/engine/savegame.cfsml" +#line 740 "engines/sci/engine/savegame.cfsml" #define CFSML_SUCCESS 0 #define CFSML_FAILURE 1 @@ -588,7 +588,7 @@ _cfsml_write_sfx_state_t(Common::WriteStream *fh, sfx_state_t* save_struc) static int _cfsml_read_sfx_state_t(Common::SeekableReadStream *fh, sfx_state_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -621,13 +621,13 @@ _cfsml_read_sfx_state_t(Common::SeekableReadStream *fh, sfx_state_t* save_struc, return CFSML_FAILURE; } if (!strcmp(token, "songlib")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_songlib_t(fh, (songlib_t*) &(save_struc->songlib), value, line, hiteof)) { _cfsml_error("Token expected by read_songlib_t() for songlib at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("sfx_state_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -656,7 +656,7 @@ _cfsml_write_clone_entry_t(Common::WriteStream *fh, clone_entry_t* save_struc) static int _cfsml_read_clone_entry_t(Common::SeekableReadStream *fh, clone_entry_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -689,20 +689,20 @@ _cfsml_read_clone_entry_t(Common::SeekableReadStream *fh, clone_entry_t* save_st return CFSML_FAILURE; } if (!strcmp(token, "next_free")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "entry")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_clone_t(fh, (clone_t*) &(save_struc->entry), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_clone_t() for entry at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("clone_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -753,7 +753,7 @@ _cfsml_write_object_t(Common::WriteStream *fh, object_t* save_struc) static int _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -786,48 +786,48 @@ _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const return CFSML_FAILURE; } if (!strcmp(token, "flags")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "pos")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->pos), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for pos at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "variables_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->variables_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for variables_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "variable_names_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->variable_names_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for variable_names_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "methods_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->methods_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for methods_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "variables")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -843,11 +843,11 @@ _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const _cfsml_register_pointer(save_struc->variables); } else save_struc->variables = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -865,7 +865,7 @@ _cfsml_read_object_t(Common::SeekableReadStream *fh, object_t* save_struc, const } while (!done); save_struc->variables_nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("object_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -893,7 +893,7 @@ _cfsml_write_string(Common::WriteStream *fh, char ** save_struc) static int _cfsml_read_string(Common::SeekableReadStream *fh, char ** save_struc, const char *lastval, int *line, int *hiteof) { -#line 519 "engines/sci/engine/savegame.cfsml" +#line 523 "engines/sci/engine/savegame.cfsml" if (strcmp(lastval, "\\null\\")) { // null pointer? unsigned int length = strlen(lastval); @@ -944,7 +944,7 @@ _cfsml_write_menubar_t(Common::WriteStream *fh, menubar_t* save_struc) static int _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -977,13 +977,13 @@ _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, con return CFSML_FAILURE; } if (!strcmp(token, "menus")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -999,11 +999,11 @@ _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, con _cfsml_register_pointer(save_struc->menus); } else save_struc->menus = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -1021,7 +1021,7 @@ _cfsml_read_menubar_t(Common::SeekableReadStream *fh, menubar_t* save_struc, con } while (!done); save_struc->menus_nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("menubar_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -1042,7 +1042,7 @@ _cfsml_write_size_t(Common::WriteStream *fh, size_t* save_struc) static int _cfsml_read_size_t(Common::SeekableReadStream *fh, size_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 506 "engines/sci/engine/savegame.cfsml" +#line 510 "engines/sci/engine/savegame.cfsml" char *token; *save_struc = strtol(lastval, &token, 0); @@ -1076,7 +1076,7 @@ _cfsml_write_list_entry_t(Common::WriteStream *fh, list_entry_t* save_struc) static int _cfsml_read_list_entry_t(Common::SeekableReadStream *fh, list_entry_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -1109,20 +1109,20 @@ _cfsml_read_list_entry_t(Common::SeekableReadStream *fh, list_entry_t* save_stru return CFSML_FAILURE; } if (!strcmp(token, "next_free")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "entry")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_list_t(fh, (list_t*) &(save_struc->entry), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_list_t() for entry at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("list_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -1159,7 +1159,7 @@ _cfsml_write_int_hash_map_t(Common::WriteStream *fh, int_hash_map_t* save_struc) static int _cfsml_read_int_hash_map_t(Common::SeekableReadStream *fh, int_hash_map_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -1192,14 +1192,14 @@ _cfsml_read_int_hash_map_t(Common::SeekableReadStream *fh, int_hash_map_t* save_ return CFSML_FAILURE; } if (!strcmp(token, "base_value")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->base_value), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for base_value at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "nodes")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; @@ -1207,11 +1207,11 @@ _cfsml_read_int_hash_map_t(Common::SeekableReadStream *fh, int_hash_map_t* save_ int max,done,i; // Prepare to restore static array max = DCS_INT_HASH_MAX+1; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -1228,7 +1228,7 @@ _cfsml_read_int_hash_map_t(Common::SeekableReadStream *fh, int_hash_map_t* save_ done = 1; } while (!done); } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("int_hash_map_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -1294,7 +1294,7 @@ _cfsml_write_SegManager(Common::WriteStream *fh, SegManager* save_struc) static int _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -1327,20 +1327,20 @@ _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, c return CFSML_FAILURE; } if (!strcmp(token, "id_seg_map")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_int_hash_map_tp(fh, (int_hash_map_t **) &(save_struc->id_seg_map), value, line, hiteof)) { _cfsml_error("Token expected by read_int_hash_map_tp() for id_seg_map at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "heap")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -1356,11 +1356,11 @@ _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, c _cfsml_register_pointer(save_struc->heap); } else save_struc->heap = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -1379,69 +1379,69 @@ _cfsml_read_SegManager(Common::SeekableReadStream *fh, SegManager* save_struc, c save_struc->heap_size = max ; // Set array size accordingly } else if (!strcmp(token, "heap_size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->heap_size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for heap_size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "reserved_id")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->reserved_id), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for reserved_id at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "exports_wide")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->exports_wide), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for exports_wide at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "isSci1_1")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->isSci1_1), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for isSci1_1 at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "gc_mark_bits")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->gc_mark_bits), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for gc_mark_bits at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "mem_allocated")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->mem_allocated), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_size_t() for mem_allocated at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "clones_seg_id")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->clones_seg_id), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_seg_id_t() for clones_seg_id at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "lists_seg_id")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->lists_seg_id), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_seg_id_t() for lists_seg_id at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "nodes_seg_id")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->nodes_seg_id), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_seg_id_t() for nodes_seg_id at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("SegManager: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -1488,7 +1488,7 @@ _cfsml_write_song_t(Common::WriteStream *fh, song_t* save_struc) static int _cfsml_read_song_t(Common::SeekableReadStream *fh, song_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -1521,62 +1521,62 @@ _cfsml_read_song_t(Common::SeekableReadStream *fh, song_t* save_struc, const cha return CFSML_FAILURE; } if (!strcmp(token, "handle")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_song_handle_t(fh, (song_handle_t*) &(save_struc->handle), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_song_handle_t() for handle at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "resource_num")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->resource_num), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for resource_num at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "priority")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->priority), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for priority at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "status")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->status), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for status at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "restore_behavior")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->restore_behavior), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for restore_behavior at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "restore_time")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->restore_time), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for restore_time at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "loops")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->loops), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for loops at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "hold")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->hold), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for hold at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("song_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -1643,7 +1643,7 @@ _cfsml_write_menu_item_t(Common::WriteStream *fh, menu_item_t* save_struc) static int _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -1676,35 +1676,35 @@ _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc, return CFSML_FAILURE; } if (!strcmp(token, "type")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->type), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for type at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "keytext")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->keytext), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for keytext at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "keytext_size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->keytext_size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for keytext_size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "flags")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "said")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; @@ -1712,11 +1712,11 @@ _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc, int max,done,i; // Prepare to restore static array max = MENU_SAID_SPEC_SIZE; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -1734,55 +1734,55 @@ _cfsml_read_menu_item_t(Common::SeekableReadStream *fh, menu_item_t* save_struc, } while (!done); } else if (!strcmp(token, "said_pos")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->said_pos), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for said_pos at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "text")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->text), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for text at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "text_pos")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->text_pos), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for text_pos at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "modifiers")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->modifiers), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for modifiers at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "key")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->key), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for key at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "enabled")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->enabled), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for enabled at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "tag")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->tag), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for tag at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("menu_item_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -1811,7 +1811,7 @@ _cfsml_write_node_entry_t(Common::WriteStream *fh, node_entry_t* save_struc) static int _cfsml_read_node_entry_t(Common::SeekableReadStream *fh, node_entry_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -1844,20 +1844,20 @@ _cfsml_read_node_entry_t(Common::SeekableReadStream *fh, node_entry_t* save_stru return CFSML_FAILURE; } if (!strcmp(token, "next_free")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "entry")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_node_t(fh, (node_t*) &(save_struc->entry), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_node_t() for entry at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("node_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -1878,7 +1878,7 @@ _cfsml_write_seg_id_t(Common::WriteStream *fh, seg_id_t* save_struc) static int _cfsml_read_seg_id_t(Common::SeekableReadStream *fh, seg_id_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 506 "engines/sci/engine/savegame.cfsml" +#line 510 "engines/sci/engine/savegame.cfsml" char *token; *save_struc = strtol(lastval, &token, 0); @@ -1925,7 +1925,7 @@ _cfsml_write_dynmem_t(Common::WriteStream *fh, dynmem_t* save_struc) static int _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -1958,27 +1958,27 @@ _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const return CFSML_FAILURE; } if (!strcmp(token, "size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "description")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->description), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for description at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "buf")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -1994,11 +1994,11 @@ _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const _cfsml_register_pointer(save_struc->buf); } else save_struc->buf = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -2016,7 +2016,7 @@ _cfsml_read_dynmem_t(Common::SeekableReadStream *fh, dynmem_t* save_struc, const } while (!done); save_struc->size = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("dynmem_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -2058,7 +2058,7 @@ _cfsml_write_local_variables_t(Common::WriteStream *fh, local_variables_t* save_ static int _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -2091,27 +2091,27 @@ _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t* return CFSML_FAILURE; } if (!strcmp(token, "script_id")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->script_id), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for script_id at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "locals")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -2127,11 +2127,11 @@ _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t* _cfsml_register_pointer(save_struc->locals); } else save_struc->locals = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -2149,7 +2149,7 @@ _cfsml_read_local_variables_t(Common::SeekableReadStream *fh, local_variables_t* } while (!done); save_struc->nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("local_variables_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -2197,7 +2197,7 @@ _cfsml_write_node_table_t(Common::WriteStream *fh, node_table_t* save_struc) static int _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -2230,41 +2230,41 @@ _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_stru return CFSML_FAILURE; } if (!strcmp(token, "entries_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "first_free")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "entries_used")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "max_entry")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "table")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -2280,11 +2280,11 @@ _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_stru _cfsml_register_pointer(save_struc->table); } else save_struc->table = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -2302,7 +2302,7 @@ _cfsml_read_node_table_t(Common::SeekableReadStream *fh, node_table_t* save_stru } while (!done); save_struc->entries_nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("node_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -2336,7 +2336,7 @@ _cfsml_write_sys_strings_t(Common::WriteStream *fh, sys_strings_t* save_struc) static int _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -2369,7 +2369,7 @@ _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_st return CFSML_FAILURE; } if (!strcmp(token, "strings")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; @@ -2377,11 +2377,11 @@ _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_st int max,done,i; // Prepare to restore static array max = SYS_STRINGS_MAX; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -2398,7 +2398,7 @@ _cfsml_read_sys_strings_t(Common::SeekableReadStream *fh, sys_strings_t* save_st done = 1; } while (!done); } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("sys_strings_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -2419,7 +2419,7 @@ _cfsml_write_byte(Common::WriteStream *fh, byte* save_struc) static int _cfsml_read_byte(Common::SeekableReadStream *fh, byte* save_struc, const char *lastval, int *line, int *hiteof) { -#line 506 "engines/sci/engine/savegame.cfsml" +#line 510 "engines/sci/engine/savegame.cfsml" char *token; *save_struc = strtol(lastval, &token, 0); @@ -2459,7 +2459,7 @@ _cfsml_write_node_t(Common::WriteStream *fh, node_t* save_struc) static int _cfsml_read_node_t(Common::SeekableReadStream *fh, node_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -2492,34 +2492,34 @@ _cfsml_read_node_t(Common::SeekableReadStream *fh, node_t* save_struc, const cha return CFSML_FAILURE; } if (!strcmp(token, "pred")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->pred), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for pred at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "succ")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->succ), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for succ at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "key")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->key), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for key at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "value")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->value), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for value at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("node_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -2567,7 +2567,7 @@ _cfsml_write_list_table_t(Common::WriteStream *fh, list_table_t* save_struc) static int _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -2600,41 +2600,41 @@ _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_stru return CFSML_FAILURE; } if (!strcmp(token, "entries_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "first_free")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "entries_used")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "max_entry")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "table")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -2650,11 +2650,11 @@ _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_stru _cfsml_register_pointer(save_struc->table); } else save_struc->table = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -2672,7 +2672,7 @@ _cfsml_read_list_table_t(Common::SeekableReadStream *fh, list_table_t* save_stru } while (!done); save_struc->entries_nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("list_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -2701,7 +2701,7 @@ _cfsml_write_class_t(Common::WriteStream *fh, class_t* save_struc) static int _cfsml_read_class_t(Common::SeekableReadStream *fh, class_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -2734,20 +2734,20 @@ _cfsml_read_class_t(Common::SeekableReadStream *fh, class_t* save_struc, const c return CFSML_FAILURE; } if (!strcmp(token, "script")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->script), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for script at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "reg")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->reg), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for reg at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("class_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -2768,7 +2768,7 @@ _cfsml_write_song_handle_t(Common::WriteStream *fh, song_handle_t* save_struc) static int _cfsml_read_song_handle_t(Common::SeekableReadStream *fh, song_handle_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 506 "engines/sci/engine/savegame.cfsml" +#line 510 "engines/sci/engine/savegame.cfsml" char *token; *save_struc = strtol(lastval, &token, 0); @@ -2794,7 +2794,7 @@ _cfsml_write_int(Common::WriteStream *fh, int* save_struc) static int _cfsml_read_int(Common::SeekableReadStream *fh, int* save_struc, const char *lastval, int *line, int *hiteof) { -#line 506 "engines/sci/engine/savegame.cfsml" +#line 510 "engines/sci/engine/savegame.cfsml" char *token; *save_struc = strtol(lastval, &token, 0); @@ -2862,7 +2862,7 @@ _cfsml_write_EngineState(Common::WriteStream *fh, EngineState* save_struc) static int _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -2895,69 +2895,69 @@ _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc, return CFSML_FAILURE; } if (!strcmp(token, "savegame_version")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_version), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for savegame_version at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "game_version")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->game_version), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for game_version at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "version")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_sci_version(fh, (sci_version_t*) &(save_struc->version), value, line, hiteof)) { _cfsml_error("Token expected by read_sci_version() for version at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "menubar")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_menubar_tp(fh, (menubar_t **) &(save_struc->menubar), value, line, hiteof)) { _cfsml_error("Token expected by read_menubar_tp() for menubar at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "status_bar_foreground")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->status_bar_foreground), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for status_bar_foreground at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "status_bar_background")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->status_bar_background), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for status_bar_background at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "seg_manager")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_SegManager(fh, (SegManager*) &(save_struc->seg_manager), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_SegManager() for seg_manager at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "classtable_size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->classtable_size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for classtable_size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "classtable")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -2973,11 +2973,11 @@ _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc, _cfsml_register_pointer(save_struc->classtable); } else save_struc->classtable = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -2996,13 +2996,13 @@ _cfsml_read_EngineState(Common::SeekableReadStream *fh, EngineState* save_struc, save_struc->classtable_size = max ; // Set array size accordingly } else if (!strcmp(token, "sound")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_sfx_state_t(fh, (sfx_state_t*) &(save_struc->sound), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_sfx_state_t() for sound at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("EngineState: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -3043,7 +3043,7 @@ _cfsml_write_SavegameMetadata(Common::WriteStream *fh, SavegameMetadata* save_st static int _cfsml_read_SavegameMetadata(Common::SeekableReadStream *fh, SavegameMetadata* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -3076,48 +3076,48 @@ _cfsml_read_SavegameMetadata(Common::SeekableReadStream *fh, SavegameMetadata* s return CFSML_FAILURE; } if (!strcmp(token, "savegame_name")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->savegame_name), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for savegame_name at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "savegame_version")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_version), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for savegame_version at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "game_version")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->game_version), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for game_version at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "version")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_sci_version(fh, (sci_version_t*) &(save_struc->version), value, line, hiteof)) { _cfsml_error("Token expected by read_sci_version() for version at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "savegame_date")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_date), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for savegame_date at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "savegame_time")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_time), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for savegame_time at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("SavegameMetadata: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -3162,7 +3162,7 @@ _cfsml_write_menu_t(Common::WriteStream *fh, menu_t* save_struc) static int _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -3195,34 +3195,34 @@ _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const cha return CFSML_FAILURE; } if (!strcmp(token, "title")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->title), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for title at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "title_width")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->title_width), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for title_width at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "width")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->width), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for width at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "items")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -3238,11 +3238,11 @@ _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const cha _cfsml_register_pointer(save_struc->items); } else save_struc->items = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -3260,7 +3260,7 @@ _cfsml_read_menu_t(Common::SeekableReadStream *fh, menu_t* save_struc, const cha } while (!done); save_struc->items_nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("menu_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -3308,7 +3308,7 @@ _cfsml_write_clone_table_t(Common::WriteStream *fh, clone_table_t* save_struc) static int _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -3341,41 +3341,41 @@ _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_st return CFSML_FAILURE; } if (!strcmp(token, "entries_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "first_free")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "entries_used")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "max_entry")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "table")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -3391,11 +3391,11 @@ _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_st _cfsml_register_pointer(save_struc->table); } else save_struc->table = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -3413,7 +3413,7 @@ _cfsml_read_clone_table_t(Common::SeekableReadStream *fh, clone_table_t* save_st } while (!done); save_struc->entries_nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("clone_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -3464,7 +3464,7 @@ _cfsml_write_clone_t(Common::WriteStream *fh, clone_t* save_struc) static int _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -3497,48 +3497,48 @@ _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const c return CFSML_FAILURE; } if (!strcmp(token, "flags")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "pos")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->pos), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for pos at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "variables_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->variables_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for variables_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "variable_names_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->variable_names_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for variable_names_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "methods_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->methods_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for methods_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "variables")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -3554,11 +3554,11 @@ _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const c _cfsml_register_pointer(save_struc->variables); } else save_struc->variables = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -3576,7 +3576,7 @@ _cfsml_read_clone_t(Common::SeekableReadStream *fh, clone_t* save_struc, const c } while (!done); save_struc->variables_nr = max ; // Set array size accordingly } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("clone_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -3605,7 +3605,7 @@ _cfsml_write_list_t(Common::WriteStream *fh, list_t* save_struc) static int _cfsml_read_list_t(Common::SeekableReadStream *fh, list_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -3638,20 +3638,20 @@ _cfsml_read_list_t(Common::SeekableReadStream *fh, list_t* save_struc, const cha return CFSML_FAILURE; } if (!strcmp(token, "first")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->first), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for first at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "last")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_reg_t(fh, (reg_t*) &(save_struc->last), value, line, hiteof)) { _cfsml_error("Token expected by read_reg_t() for last at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("list_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -3683,7 +3683,7 @@ _cfsml_write_sys_string_t(Common::WriteStream *fh, sys_string_t* save_struc) static int _cfsml_read_sys_string_t(Common::SeekableReadStream *fh, sys_string_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -3716,27 +3716,27 @@ _cfsml_read_sys_string_t(Common::SeekableReadStream *fh, sys_string_t* save_stru return CFSML_FAILURE; } if (!strcmp(token, "name")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->name), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for name at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "max_size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->max_size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for max_size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "value")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_string(fh, (char **) &(save_struc->value), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_string() for value at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("sys_string_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -3811,7 +3811,7 @@ _cfsml_write_script_t(Common::WriteStream *fh, script_t* save_struc) static int _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const char *lastval, int *line, int *hiteof) { -#line 541 "engines/sci/engine/savegame.cfsml" +#line 545 "engines/sci/engine/savegame.cfsml" char *token; int assignment, closed; @@ -3844,83 +3844,83 @@ _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const return CFSML_FAILURE; } if (!strcmp(token, "nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "buf_size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->buf_size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_size_t() for buf_size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "script_size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->script_size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_size_t() for script_size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "heap_size")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->heap_size), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_size_t() for heap_size at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "obj_indices")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (read_int_hash_map_tp(fh, (int_hash_map_t **) &(save_struc->obj_indices), value, line, hiteof)) { _cfsml_error("Token expected by read_int_hash_map_tp() for obj_indices at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "exports_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->exports_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for exports_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "synonyms_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->synonyms_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for synonyms_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "lockers")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->lockers), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for lockers at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "objects_allocated")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->objects_allocated), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for objects_allocated at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "objects_nr")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->objects_nr), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for objects_nr at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "objects")) { -#line 604 "engines/sci/engine/savegame.cfsml" +#line 608 "engines/sci/engine/savegame.cfsml" if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) { _cfsml_error("Opening brackets expected at line %d\n", *line); return CFSML_FAILURE; } int max,done,i; -#line 615 "engines/sci/engine/savegame.cfsml" +#line 619 "engines/sci/engine/savegame.cfsml" // Prepare to restore dynamic array max = strtol(value + 1, NULL, 0); if (max < 0) { @@ -3936,11 +3936,11 @@ _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const _cfsml_register_pointer(save_struc->objects); } else save_struc->objects = NULL; -#line 639 "engines/sci/engine/savegame.cfsml" +#line 643 "engines/sci/engine/savegame.cfsml" done = i = 0; do { if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) { -#line 647 "engines/sci/engine/savegame.cfsml" +#line 651 "engines/sci/engine/savegame.cfsml" _cfsml_error("Token expected at line %d\n", *line); return 1; } @@ -3959,27 +3959,27 @@ _cfsml_read_script_t(Common::SeekableReadStream *fh, script_t* save_struc, const save_struc->objects_allocated = max ; // Set array size accordingly } else if (!strcmp(token, "locals_offset")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->locals_offset), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for locals_offset at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "locals_segment")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->locals_segment), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for locals_segment at line %d\n", *line); return CFSML_FAILURE; } } else if (!strcmp(token, "marked_as_deleted")) { -#line 690 "engines/sci/engine/savegame.cfsml" +#line 694 "engines/sci/engine/savegame.cfsml" if (_cfsml_read_int(fh, (int*) &(save_struc->marked_as_deleted), value, line, hiteof)) { _cfsml_error("Token expected by _cfsml_read_int() for marked_as_deleted at line %d\n", *line); return CFSML_FAILURE; } } else -#line 699 "engines/sci/engine/savegame.cfsml" +#line 703 "engines/sci/engine/savegame.cfsml" { _cfsml_error("script_t: Assignment to invalid identifier '%s' in line %d\n", token, *line); return CFSML_FAILURE; @@ -4004,7 +4004,7 @@ void write_songlib_t(Common::WriteStream *fh, songlib_t *songlib) { WSprintf(fh, "[\n"); while (seeker) { seeker->restore_time = seeker->it->get_timepos(seeker->it); -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_song_t(fh, seeker); WSprintf(fh, "\n"); @@ -4034,17 +4034,19 @@ int read_songlib_t(Common::SeekableReadStream *fh, songlib_t *songlib, const cha song_lib_init(songlib); for (i = 0; i < songcount; i++) { // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" - int _cfsml_eof = 0, _cfsml_error; #line 778 "engines/sci/engine/savegame.cfsml" + int _cfsml_eof = 0, _cfsml_error; +#line 782 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = lastval; -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = read_song_tp(fh, &newsong, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = read_song_tp(fh, &newsong, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4091,7 +4093,7 @@ int mem_obj_string_to_enum(const char *str) { } void write_int_hash_map_tp(Common::WriteStream *fh, int_hash_map_t **foo) { -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_int_hash_map_t(fh, *foo); WSprintf(fh, "\n"); @@ -4100,7 +4102,7 @@ void write_int_hash_map_tp(Common::WriteStream *fh, int_hash_map_t **foo) { } void write_song_tp(Common::WriteStream *fh, song_t **foo) { -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_song_t(fh, *foo); WSprintf(fh, "\n"); @@ -4116,17 +4118,19 @@ int read_song_tp(Common::SeekableReadStream *fh, song_t **foo, const char *lastv *foo = (song_t*) malloc(sizeof(song_t)); token = _cfsml_get_identifier(fh, line, hiteof, &assignment); // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" - int _cfsml_eof = 0, _cfsml_error; #line 778 "engines/sci/engine/savegame.cfsml" + int _cfsml_eof = 0, _cfsml_error; +#line 782 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = token; -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_song_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_song_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4147,17 +4151,19 @@ int read_song_tp(Common::SeekableReadStream *fh, song_t **foo, const char *lastv int read_int_hash_map_tp(Common::SeekableReadStream *fh, int_hash_map_t **foo, const char *lastval, int *line, int *hiteof) { *foo = new int_hash_map_t; // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" - int _cfsml_eof = 0, _cfsml_error; #line 778 "engines/sci/engine/savegame.cfsml" + int _cfsml_eof = 0, _cfsml_error; +#line 782 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = lastval; -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_int_hash_map_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_int_hash_map_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4179,7 +4185,7 @@ void write_int_hash_map_node_tp(Common::WriteStream *fh, int_hash_map_t::node_t } else { WSprintf(fh,"[\n%d=>%d\n", (*foo)->name, (*foo)->value); if ((*foo)->next) { -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code write_int_hash_map_node_tp(fh, &((*foo)->next)); WSprintf(fh, "\n"); @@ -4229,7 +4235,7 @@ int read_int_hash_map_node_tp(Common::SeekableReadStream *fh, int_hash_map_t::no void write_menubar_tp(Common::WriteStream *fh, menubar_t **foo) { if (*foo) { -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_menubar_t(fh, (*foo)); WSprintf(fh, "\n"); @@ -4247,17 +4253,19 @@ int read_menubar_tp(Common::SeekableReadStream *fh, menubar_t **foo, const char } else { *foo = (menubar_t *) sci_malloc(sizeof(menubar_t)); // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" - int _cfsml_eof = 0, _cfsml_error; #line 778 "engines/sci/engine/savegame.cfsml" + int _cfsml_eof = 0, _cfsml_error; +#line 782 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = lastval; -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_menubar_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_menubar_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4275,7 +4283,7 @@ int read_menubar_tp(Common::SeekableReadStream *fh, menubar_t **foo, const char void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { WSprintf(fh, "%s\n", mem_obj_string_names[foo->type].name); -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_int(fh, &foo->segmgr_id); WSprintf(fh, "\n"); @@ -4283,7 +4291,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { #line 617 "engines/sci/engine/savegame.cfsml" switch (foo->type) { case MEM_OBJ_SCRIPT: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_script_t(fh, &foo->data.script); WSprintf(fh, "\n"); @@ -4291,7 +4299,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { #line 620 "engines/sci/engine/savegame.cfsml" break; case MEM_OBJ_CLONES: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_clone_table_t(fh, &foo->data.clones); WSprintf(fh, "\n"); @@ -4299,7 +4307,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { #line 623 "engines/sci/engine/savegame.cfsml" break; case MEM_OBJ_LOCALS: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_local_variables_t(fh, &foo->data.locals); WSprintf(fh, "\n"); @@ -4307,7 +4315,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { #line 626 "engines/sci/engine/savegame.cfsml" break; case MEM_OBJ_SYS_STRINGS: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_sys_strings_t(fh, &foo->data.sys_strings); WSprintf(fh, "\n"); @@ -4315,7 +4323,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { #line 629 "engines/sci/engine/savegame.cfsml" break; case MEM_OBJ_STACK: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_int(fh, &foo->data.stack.nr); WSprintf(fh, "\n"); @@ -4325,7 +4333,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { case MEM_OBJ_HUNK: break; case MEM_OBJ_LISTS: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_list_table_t(fh, &foo->data.lists); WSprintf(fh, "\n"); @@ -4333,7 +4341,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { #line 637 "engines/sci/engine/savegame.cfsml" break; case MEM_OBJ_NODES: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_node_table_t(fh, &foo->data.nodes); WSprintf(fh, "\n"); @@ -4341,7 +4349,7 @@ void write_mem_obj_t(Common::WriteStream *fh, mem_obj_t *foo) { #line 640 "engines/sci/engine/savegame.cfsml" break; case MEM_OBJ_DYNMEM: -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_dynmem_t(fh, &foo->data.dynmem); WSprintf(fh, "\n"); @@ -4361,18 +4369,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l } // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_int(fh, &foo->segmgr_id, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_int(fh, &foo->segmgr_id, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4387,18 +4398,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l switch (foo->type) { case MEM_OBJ_SCRIPT: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_script_t(fh, &foo->data.script, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_script_t(fh, &foo->data.script, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4413,18 +4427,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l break; case MEM_OBJ_CLONES: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_clone_table_t(fh, &foo->data.clones, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_clone_table_t(fh, &foo->data.clones, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4439,18 +4456,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l break; case MEM_OBJ_LOCALS: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_local_variables_t(fh, &foo->data.locals, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_local_variables_t(fh, &foo->data.locals, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4465,18 +4485,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l break; case MEM_OBJ_SYS_STRINGS: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_sys_strings_t(fh, &foo->data.sys_strings, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_sys_strings_t(fh, &foo->data.sys_strings, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4491,18 +4514,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l break; case MEM_OBJ_LISTS: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_list_table_t(fh, &foo->data.lists, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_list_table_t(fh, &foo->data.lists, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4517,18 +4543,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l break; case MEM_OBJ_NODES: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_node_table_t(fh, &foo->data.nodes, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_node_table_t(fh, &foo->data.nodes, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4543,18 +4572,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l break; case MEM_OBJ_STACK: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_int(fh, &foo->data.stack.nr, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_int(fh, &foo->data.stack.nr, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4573,18 +4605,21 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l break; case MEM_OBJ_DYNMEM: // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_dynmem_t(fh, &foo->data.dynmem, _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_dynmem_t(fh, &foo->data.dynmem, _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4606,7 +4641,7 @@ int read_mem_obj_t(Common::SeekableReadStream *fh, mem_obj_t *foo, const char *l void write_mem_obj_tp(Common::WriteStream *fh, mem_obj_t **foo) { if (*foo) { -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code write_mem_obj_t(fh, (*foo)); WSprintf(fh, "\n"); @@ -4623,17 +4658,19 @@ int read_mem_obj_tp(Common::SeekableReadStream *fh, mem_obj_t **foo, const char } else { *foo = (mem_obj_t *)sci_malloc(sizeof(mem_obj_t)); // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 774 "engines/sci/engine/savegame.cfsml" - int _cfsml_eof = 0, _cfsml_error; #line 778 "engines/sci/engine/savegame.cfsml" + int _cfsml_eof = 0, _cfsml_error; +#line 782 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = lastval; -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = read_mem_obj_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" + { +#line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = read_mem_obj_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" *hiteof = _cfsml_error; -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -4693,13 +4730,13 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename // Calculate the time spent with this game s->game_time = g_system->getMillis() / 1000; -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_SavegameMetadata(fh, meta); WSprintf(fh, "\n"); // End of auto-generated CFSML data writer code #line 756 "engines/sci/engine/savegame.cfsml" -#line 814 "engines/sci/engine/savegame.cfsml" +#line 823 "engines/sci/engine/savegame.cfsml" // Auto-generated CFSML data writer code _cfsml_write_EngineState(fh, s); WSprintf(fh, "\n"); @@ -4984,24 +5021,27 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { memset(meta, 0, sizeof(SavegameMetadata)); // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 766 "engines/sci/engine/savegame.cfsml" +#line 770 "engines/sci/engine/savegame.cfsml" int _cfsml_line_ctr = 0; -#line 771 "engines/sci/engine/savegame.cfsml" +#line 775 "engines/sci/engine/savegame.cfsml" struct _cfsml_pointer_refstruct **_cfsml_myptrrefptr = _cfsml_get_current_refpointer(); -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(_cfsml_line_ctr), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_SavegameMetadata(fh, meta, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" - read_eof = _cfsml_error; + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { #line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_SavegameMetadata(fh, meta, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" + read_eof = _cfsml_error; +#line 802 "engines/sci/engine/savegame.cfsml" _cfsml_free_pointer_references(_cfsml_myptrrefptr, _cfsml_error); -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -5036,24 +5076,27 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { retval->sound_volume = s->sound_volume; // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 766 "engines/sci/engine/savegame.cfsml" +#line 770 "engines/sci/engine/savegame.cfsml" int _cfsml_line_ctr = 0; -#line 771 "engines/sci/engine/savegame.cfsml" +#line 775 "engines/sci/engine/savegame.cfsml" struct _cfsml_pointer_refstruct **_cfsml_myptrrefptr = _cfsml_get_current_refpointer(); -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(fh, &(_cfsml_line_ctr), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_EngineState(fh, retval, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" - read_eof = _cfsml_error; + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { #line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_EngineState(fh, retval, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" + read_eof = _cfsml_error; +#line 802 "engines/sci/engine/savegame.cfsml" _cfsml_free_pointer_references(_cfsml_myptrrefptr, _cfsml_error); -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; @@ -5156,24 +5199,27 @@ bool get_savegame_metadata(Common::SeekableReadStream* stream, SavegameMetadata* int read_eof = 0; // Auto-generated CFSML data reader code -#line 763 "engines/sci/engine/savegame.cfsml" +#line 767 "engines/sci/engine/savegame.cfsml" { -#line 766 "engines/sci/engine/savegame.cfsml" +#line 770 "engines/sci/engine/savegame.cfsml" int _cfsml_line_ctr = 0; -#line 771 "engines/sci/engine/savegame.cfsml" +#line 775 "engines/sci/engine/savegame.cfsml" struct _cfsml_pointer_refstruct **_cfsml_myptrrefptr = _cfsml_get_current_refpointer(); -#line 774 "engines/sci/engine/savegame.cfsml" +#line 778 "engines/sci/engine/savegame.cfsml" int _cfsml_eof = 0, _cfsml_error; -#line 781 "engines/sci/engine/savegame.cfsml" +#line 786 "engines/sci/engine/savegame.cfsml" const char *_cfsml_inp = _cfsml_get_identifier(stream, &(_cfsml_line_ctr), &_cfsml_eof, 0); - -#line 785 "engines/sci/engine/savegame.cfsml" - _cfsml_error = _cfsml_read_SavegameMetadata(stream, meta, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof); -#line 789 "engines/sci/engine/savegame.cfsml" - read_eof = _cfsml_error; + if (!_cfsml_inp) { + _cfsml_error = CFSML_FAILURE; + } else { #line 793 "engines/sci/engine/savegame.cfsml" + _cfsml_error = _cfsml_read_SavegameMetadata(stream, meta, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof); + } +#line 798 "engines/sci/engine/savegame.cfsml" + read_eof = _cfsml_error; +#line 802 "engines/sci/engine/savegame.cfsml" _cfsml_free_pointer_references(_cfsml_myptrrefptr, _cfsml_error); -#line 796 "engines/sci/engine/savegame.cfsml" +#line 805 "engines/sci/engine/savegame.cfsml" if (_cfsml_last_value_retrieved) { free(_cfsml_last_value_retrieved); _cfsml_last_value_retrieved = NULL; |