Previous 199869 Revisions Next

r30891 Sunday 8th June, 2014 at 18:54:59 UTC by Michael Zapf
(MESS) ti99: Added a new error message for RPK. (nw)
[src/mess/machine/ti99]gromport.c gromport.h

trunk/src/mess/machine/ti99/gromport.c
r30890r30891
22022202
22032203   // and unzip file from the zip file
22042204   ziperr = zip_file_decompress(zip, contents, length);
2205   if (ziperr != ZIPERR_NONE) throw rpk_exception(RPK_ZIP_ERROR);
2205   if (ziperr != ZIPERR_NONE)
2206   {
2207      if (ziperr == ZIPERR_UNSUPPORTED) throw rpk_exception(RPK_ZIP_UNSUPPORTED);
2208      else throw rpk_exception(RPK_ZIP_ERROR);
2209   }
22062210
22072211   // check for sha1
22082212   sha1 = xml_get_attribute_string(rom_resource_node, "sha1", NULL);
r30890r30891
23412345
23422346      /* uncompress the layout text */
23432347      ziperr = zip_file_decompress(zipfile, layout_text, header->uncompressed_length);
2344      if (ziperr != ZIPERR_NONE) throw rpk_exception(RPK_ZIP_ERROR);
2348      if (ziperr != ZIPERR_NONE)
2349      {
2350         if (ziperr == ZIPERR_UNSUPPORTED) throw rpk_exception(RPK_ZIP_UNSUPPORTED);
2351         else throw rpk_exception(RPK_ZIP_ERROR);
2352      }
23452353
23462354      layout_text[header->uncompressed_length] = '\0';  // Null-terminate
23472355
trunk/src/mess/machine/ti99/gromport.h
r30890r30891
469469   RPK_XML_ERROR,
470470   RPK_INVALID_FILE_REF,
471471   RPK_ZIP_ERROR,
472   RPK_ZIP_UNSUPPORTED,
472473   RPK_MISSING_RAM_LENGTH,
473474   RPK_INVALID_RAM_SPEC,
474475   RPK_UNKNOWN_RESOURCE_TYPE,
r30890r30891
479480   RPK_UNKNOWN_PCB_TYPE
480481};
481482
482static const char error_text[15][30] =
483static const char error_text[16][30] =
483484{
484485   "No error",
485486   "Not a RPK (zip) file",
r30890r30891
488489   "XML format error",
489490   "Invalid file reference",
490491   "Zip file error",
492   "Unsupported zip version",
491493   "Missing RAM length",
492494   "Invalid RAM specification",
493495   "Unknown resource type",

Previous 199869 Revisions Next


© 1997-2024 The MAME Team