trunk/src/mess/machine/ti99/gromport.c
| r30890 | r30891 | |
| 2202 | 2202 | |
| 2203 | 2203 | // and unzip file from the zip file |
| 2204 | 2204 | 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 | } |
| 2206 | 2210 | |
| 2207 | 2211 | // check for sha1 |
| 2208 | 2212 | sha1 = xml_get_attribute_string(rom_resource_node, "sha1", NULL); |
| r30890 | r30891 | |
| 2341 | 2345 | |
| 2342 | 2346 | /* uncompress the layout text */ |
| 2343 | 2347 | 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 | } |
| 2345 | 2353 | |
| 2346 | 2354 | layout_text[header->uncompressed_length] = '\0'; // Null-terminate |
| 2347 | 2355 | |