[GRASS-SVN] r62437 - grass/trunk/lib/cairodriver

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 28 06:50:10 PDT 2014


Author: martinl
Date: 2014-10-28 06:50:10 -0700 (Tue, 28 Oct 2014)
New Revision: 62437

Modified:
   grass/trunk/lib/cairodriver/raster.c
Log:
libcairo: improve error message when unable to create surface


Modified: grass/trunk/lib/cairodriver/raster.c
===================================================================
--- grass/trunk/lib/cairodriver/raster.c	2014-10-28 13:32:06 UTC (rev 62436)
+++ grass/trunk/lib/cairodriver/raster.c	2014-10-28 13:50:10 UTC (rev 62437)
@@ -68,10 +68,15 @@
     src_surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, src_w, src_h);
     status = cairo_surface_status(src_surf);
     if (status != CAIRO_STATUS_SUCCESS)
-	G_fatal_error("Cairo_begin_raster(): %s (%s). Using rows: %d, cols: %d ",
+#ifdef HAVE_LONG_LONG_INT
+        G_fatal_error("Cairo_begin_raster(): %s - %s. Using rows: %d, cols: %d, cells: %lld.",
                       _("Failed to create surface"),
-                      cairo_status_to_string (status), src_b, src_r);
-
+                      cairo_status_to_string (status), src_b, src_r, (long long) src_b * src_r);
+#else
+        G_fatal_error("Cairo_begin_raster(): %s - %s. Using rows: %d, cols: %d, cells: %ld.",
+                      _("Failed to create surface"),
+                      cairo_status_to_string (status), src_b, src_r, (long) src_b * src_r);
+#endif
     src_data = cairo_image_surface_get_data(src_surf);
     src_stride = cairo_image_surface_get_stride(src_surf);
 }



More information about the grass-commit mailing list