[GRASS-SVN] r63747 - grass/trunk/lib/display
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 25 04:12:43 PST 2014
Author: glynn
Date: 2014-12-25 04:12:43 -0800 (Thu, 25 Dec 2014)
New Revision: 63747
Modified:
grass/trunk/lib/display/r_raster.c
Log:
Check for either MONITOR or GRASS_RENDER_IMMEDIATE
Modified: grass/trunk/lib/display/r_raster.c
===================================================================
--- grass/trunk/lib/display/r_raster.c 2014-12-25 11:59:12 UTC (rev 63746)
+++ grass/trunk/lib/display/r_raster.c 2014-12-25 12:12:43 UTC (rev 63747)
@@ -108,6 +108,7 @@
int D_open_driver(void)
{
const char *p, *m;
+ const struct driver *drv;
G_debug(1, "D_open_driver():");
p = getenv("GRASS_RENDER_IMMEDIATE");
@@ -116,7 +117,8 @@
if (m && G_strncasecmp(m, "wx", 2) == 0) {
/* wx monitors always use GRASS_RENDER_IMMEDIATE. */
p = NULL; /* use default display driver */
- } else if (m) {
+ }
+ else if (m) {
char *env;
const char *v;
char *u_m;
@@ -140,8 +142,14 @@
if (v)
read_env_file(v);
}
+ else if (!p)
+ G_fatal_error(_("Neither %s nor %s defined"),
+ "MONITOR", "GRASS_RENDER_IMMEDIATE");
+
+ if (p && G_strcasecmp(p, "default") == 0)
+ p = NULL;
- const struct driver *drv =
+ drv =
(p && G_strcasecmp(p, "png") == 0) ? PNG_Driver() :
(p && G_strcasecmp(p, "ps") == 0) ? PS_Driver() :
(p && G_strcasecmp(p, "html") == 0) ? HTML_Driver() :
More information about the grass-commit
mailing list