[GRASS-SVN] r52756 - grass/trunk/vector/v.out.pov

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 20 02:43:05 PDT 2012


Author: neteler
Date: 2012-08-20 02:43:04 -0700 (Mon, 20 Aug 2012)
New Revision: 52756

Modified:
   grass/trunk/vector/v.out.pov/main.c
Log:
be sure to have an empty string

Modified: grass/trunk/vector/v.out.pov/main.c
===================================================================
--- grass/trunk/vector/v.out.pov/main.c	2012-08-20 09:42:16 UTC (rev 52755)
+++ grass/trunk/vector/v.out.pov/main.c	2012-08-20 09:43:04 UTC (rev 52756)
@@ -7,7 +7,7 @@
  * *               
  * * PURPOSE:      Export vector to renderers' format (PovRay)
  * *               
- * * COPYRIGHT:    (C) 2001-2009 by the GRASS Development Team
+ * * COPYRIGHT:    (C) 2001-2012 by the GRASS Development Team
  * *
  * *               This program is free software under the 
  * *               GNU General Public License (>=v2). 
@@ -71,7 +71,6 @@
     zmod_opt->key = "zmod";
     zmod_opt->type = TYPE_STRING;
     zmod_opt->required = NO;
-    zmod_opt->answer = "";
     zmod_opt->description = _("Modifier for z coordinates");
     zmod_opt->description = _("This string is appended to each z coordinate. "
 			      "Examples: '*10', '+1000', '*10+100', '*exaggeration'");
@@ -80,7 +79,6 @@
     objmod_opt->key = "objmod";
     objmod_opt->type = TYPE_STRING;
     objmod_opt->required = NO;
-    objmod_opt->answer = "";
     objmod_opt->label = _("Object modifier (OBJECT_MODIFIER in POV-Ray documentation)");
     objmod_opt->description = _("Example: \"pigment { color red 0 green 1 blue 0 }\"");
     
@@ -105,6 +103,11 @@
 	G_fatal_error(_("Unable to create output file <%s>"), out_opt->answer);
     }
 
+    if (zmod_opt->answer == NULL)
+	    zmod_opt->answer = G_store("");
+    if (objmod_opt->answer == NULL)
+	    objmod_opt->answer = G_store("");
+
     nlines = Vect_get_num_lines(&In);
     nareas = Vect_get_num_areas(&In);
     count = 0;



More information about the grass-commit mailing list