[GRASS-SVN] r68196 - grass/branches/releasebranch_7_0/lib/pngdriver
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 1 03:57:04 PDT 2016
Author: martinl
Date: 2016-04-01 03:57:04 -0700 (Fri, 01 Apr 2016)
New Revision: 68196
Modified:
grass/branches/releasebranch_7_0/lib/pngdriver/write_png.c
Log:
png driver: i18n cosmetics (write) (merge r68195 from trunk)
Modified: grass/branches/releasebranch_7_0/lib/pngdriver/write_png.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/pngdriver/write_png.c 2016-04-01 10:56:14 UTC (rev 68195)
+++ grass/branches/releasebranch_7_0/lib/pngdriver/write_png.c 2016-04-01 10:57:04 UTC (rev 68196)
@@ -16,6 +16,8 @@
#include <png.h>
#include <grass/gis.h>
+#include <grass/glocale.h>
+
#include "pngdriver.h"
@@ -34,7 +36,7 @@
check = fwrite(data, 1, length, fp);
if (check != length)
- G_fatal_error("PNG: Write Error");
+ G_fatal_error(_("Unable to write PNG"));
}
static void output_flush(png_structp png_ptr)
@@ -66,18 +68,18 @@
png_ptr =
png_create_write_struct(PNG_LIBPNG_VER_STRING, &jbuf, NULL, NULL);
if (!png_ptr)
- G_fatal_error("PNG: couldn't allocate PNG structure");
+ G_fatal_error(_("Unable to allocate PNG structure"));
info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr)
- G_fatal_error("PNG: couldn't allocate PNG structure");
+ G_fatal_error(_("Unable to allocate PNG structure"));
if (setjmp(png_jmpbuf(png_ptr)))
- G_fatal_error("error writing PNG file");
+ G_fatal_error(_("Unable to write PNG file"));
output = fopen(png.file_name, "wb");
if (!output)
- G_fatal_error("PNG: couldn't open output file %s", png.file_name);
+ G_fatal_error(_("Unable to open output PNG file <%s>"), png.file_name);
png_set_write_fn(png_ptr, output, write_data, output_flush);
More information about the grass-commit
mailing list