#if DEBUG
# define MEM_ALLOC_FAIL(file, line) do { \
- fprintf (stderr, "memory allocation failure in source file %s, line %d\n", file, line); \
+ fprintf (stderr, "Memory allocation failure in source file %s, line %d\n", file, line); \
exit (2); \
} while (false);
#else
#endif
#define ABORT_TRACE() \
- fprintf (stderr, "aborting in source file %s, line %d\n", __FILE__, __LINE__); \
+ fprintf (stderr, "Aborting in source file %s, line %d\n", __FILE__, __LINE__); \
abort (); \
#define CHECK_COLORS_RANDOM(color1, color2) \
have_file = (*color != '\0');
if (have_file)
- vfprintf_fail (formats[FMT_GENERIC], "file must be preceeded by color string");
+ {
+ if (file_string)
+ vfprintf_fail (formats[FMT_GENERIC], "file cannot be used as color string");
+ else
+ vfprintf_fail (formats[FMT_GENERIC], "file must be preceeded by color string");
+ }
}
if ((p = strchr (color_string, '/')))