comparison ppl.c @ 80:5cefa59baa9d

Better error messages.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 02 Oct 2012 05:55:28 +0300
parents 3b3908d28a4b
children 7a59611f9d4f
comparison
equal deleted inserted replaced
79:d6c2efa25aa4 80:5cefa59baa9d
356 return 1; 356 return 1;
357 } 357 }
358 358
359 if ((file = dmf_create_stdio(optFilename, "rb")) == NULL) 359 if ((file = dmf_create_stdio(optFilename, "rb")) == NULL)
360 { 360 {
361 dmError("Error opening file '%s', %d (%s)\n", 361 dmError("Error opening file '%s', %d: (%s)\n",
362 optFilename, errno, strerror(errno)); 362 optFilename, errno, strerror(errno));
363 return 1; 363 return 1;
364 } 364 }
365 365
366 // Initialize miniJSS 366 // Initialize miniJSS
407 goto error_exit; 407 goto error_exit;
408 } 408 }
409 409
410 if ((file = dmf_create_stdio(optFontFilename, "rb")) == NULL) 410 if ((file = dmf_create_stdio(optFontFilename, "rb")) == NULL)
411 { 411 {
412 dmError("Error opening input file '%s'. (%s)\n", 412 dmError("Error opening font file '%s', %d: %s\n",
413 optFontFilename, strerror(errno)); 413 optFontFilename, errno, strerror(errno));
414 goto error_exit; 414 goto error_exit;
415 } 415 }
416 SDL_Surface *fontbmap = dmLoadImage(file); 416 SDL_Surface *fontbmap = dmLoadImage(file);
417 dmf_close(file); 417 dmf_close(file);
418 if (fontbmap == NULL) 418 if (fontbmap == NULL)