if ((img_info->bitmaps[IMG_BITMAP_STANDARD] = LoadImage(filename)) == NULL)
{
- Warn("cannot load image file '%s': LoadImage() failed: %s",
- filename, GetError());
+ Warn("cannot load image file '%s': LoadImage() failed", filename);
free(img_info);
}
-// ----------------------------------------------------------------------------
-// error handling functions
-// ----------------------------------------------------------------------------
-
-#define MAX_INTERNAL_ERROR_SIZE 1024
-
-// used by SetError() and GetError() to store internal error messages
-static char internal_error[MAX_INTERNAL_ERROR_SIZE];
-
-void SetError(char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- vsnprintf(internal_error, MAX_INTERNAL_ERROR_SIZE, format, ap);
- va_end(ap);
-}
-
-char *GetError(void)
-{
- return internal_error;
-}
-
-
// ----------------------------------------------------------------------------
// checked memory allocation and freeing functions
// ----------------------------------------------------------------------------
void (*print_usage_function)(void),
void (*print_version_function)(void));
-void SetError(char *, ...);
-char *GetError(void);
-
void *checked_malloc(unsigned int);
void *checked_calloc(unsigned int);
void *checked_realloc(void *, unsigned int);
Fail("LoadCustomImage(): cannot find file '%s'", basename);
if ((new_bitmap = LoadImage(filename)) == NULL)
- Fail("LoadImage('%s') failed: %s", basename, GetError());
+ Fail("LoadImage('%s') failed", basename);
return new_bitmap;
}
if ((new_bitmap = LoadImage(filename)) == NULL)
{
- Warn("LoadImage('%s') failed: %s", basename, GetError());
+ Warn("LoadImage('%s') failed", basename);
return;
}