Index: trunk/src_plugins/export_png/draw_png.c =================================================================== --- trunk/src_plugins/export_png/draw_png.c (revision 36225) +++ trunk/src_plugins/export_png/draw_png.c (revision 36226) @@ -32,7 +32,6 @@ #include "conf_core.h" #include -#include #include #include #include @@ -139,7 +138,7 @@ format_error = rnd_true; if (format_error) - fprintf(stderr, "Error: Invalid graphic file format." " This is a bug. Please report it.\n"); + rnd_message(RND_MSG_ERROR, "Invalid graphic file format. This is a bug. Please report it.\n"); } void rnd_png_uninit(rnd_png_t *pctx) @@ -192,7 +191,7 @@ if (dpi_in != 0) { pctx->dpi = dpi_in; if (pctx->dpi < 0) { - fprintf(stderr, "ERROR: dpi may not be < 0\n"); + rnd_message(RND_MSG_ERROR, "dpi may not be < 0\n"); return -1; } } @@ -216,7 +215,7 @@ } if (pctx->xmax < 0 || pctx->ymax < 0) { - fprintf(stderr, "ERROR: xmax and ymax may not be < 0\n"); + rnd_message(RND_MSG_ERROR, "xmax and ymax may not be < 0\n"); return -1; } @@ -233,7 +232,7 @@ pctx->h = rnd_round(pctx->h / pctx->scale) - PNG_SCALE_HACK1; } else if (pctx->xmax == 0 && pctx->ymax == 0) { - fprintf(stderr, "ERROR: You may not set both xmax, ymax, and xy-max to zero\n"); + rnd_message(RND_MSG_ERROR, "You may not set both xmax, ymax, and xy-max to zero\n"); return -1; } else { @@ -405,7 +404,7 @@ } } else { - fprintf(stderr, "WE SHOULD NOT BE HERE!!!\n"); + rnd_message(RND_MSG_ERROR, "WE SHOULD NOT BE HERE!!!\n"); gc->color = pctx->black; } } @@ -463,7 +462,7 @@ } if (agc->me_pointer != &rnd_png_me) { - fprintf(stderr, "Fatal: GC from another HID passed to draw_png\n"); + rnd_message(RND_MSG_ERROR, "GC from another HID passed to draw_png\n"); abort(); } @@ -764,8 +763,8 @@ points = (gdPoint *) malloc(n_coords * sizeof(gdPoint)); if (points == NULL) { - fprintf(stderr, "ERROR: png_fill_polygon(): malloc failed\n"); - exit(1); + rnd_message(RND_MSG_ERROR, "png_fill_polygon(): malloc failed\n"); + abort(); } use_gc(pctx, im, gc);