comparison tools/64vw.c @ 1998:0d19d0a47faf

Improve error message for not being able to decode the file.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 02 Jul 2018 05:03:52 +0300
parents 8896d5676f1b
children 64730556fd94
comparison
equal deleted inserted replaced
1997:2f8506171064 1998:0d19d0a47faf
297 297
298 if ((ret = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK) 298 if ((ret = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK)
299 { 299 {
300 if (!optListOnly) 300 if (!optListOnly)
301 { 301 {
302 dmErrorMsg("Could not read image file '%s', %d: %s\n", 302 dmErrorMsg("Could not decode file '%s': %s\n",
303 filename, ret, dmErrorStr(ret)); 303 filename, dmErrorStr(ret));
304 } 304 }
305 } 305 }
306 else 306 else
307 if (optListOnly) 307 if (optListOnly)
308 { 308 {
450 surf = NULL; 450 surf = NULL;
451 } 451 }
452 452
453 if ((ret = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK) 453 if ((ret = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK)
454 { 454 {
455 dmErrorMsg("Failed to decode bitmap data %d: %s\n", ret, dmErrorStr(ret)); 455 dmErrorMsg("Could not decode file '%s': %s\n",
456 filename, dmErrorStr(ret));
456 goto fail; 457 goto fail;
457 } 458 }
458 459
459 if (fmt == NULL || cimage == NULL) 460 if (fmt == NULL || cimage == NULL)
460 { 461 {