[GRASS-SVN] r62916 - grass/trunk/display/d.geodesic

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 25 01:21:00 PST 2014


Author: martinl
Date: 2014-11-25 01:21:00 -0800 (Tue, 25 Nov 2014)
New Revision: 62916

Modified:
   grass/trunk/display/d.geodesic/main.c
Log:
d.geodetic: use standardized options (#2409)


Modified: grass/trunk/display/d.geodesic/main.c
===================================================================
--- grass/trunk/display/d.geodesic/main.c	2014-11-25 09:15:43 UTC (rev 62915)
+++ grass/trunk/display/d.geodesic/main.c	2014-11-25 09:21:00 UTC (rev 62916)
@@ -47,28 +47,20 @@
 	"between two geographic points along a great circle, in "
 	"a longitude/latitude data set.");
 
-    parm.coor = G_define_option();
-    parm.coor->key = "coor";
+    parm.coor = G_define_standard_option(G_OPT_M_COORDS);
     parm.coor->key_desc = "lon1,lat1,lon2,lat2";
-    parm.coor->type = TYPE_STRING;
     parm.coor->required = YES;
     parm.coor->description = _("Starting and ending coordinates");
 
-    parm.lcolor = G_define_option();
-    parm.lcolor->key = "lcolor";
-    parm.lcolor->type = TYPE_STRING;
-    parm.lcolor->required = NO;
-    parm.lcolor->description = _("Line color");
-    parm.lcolor->gisprompt = "old_color,color,color";
-    parm.lcolor->answer = DEFAULT_FG_COLOR;
+    parm.lcolor = G_define_standard_option(G_OPT_C_FG);
+    parm.lcolor->key = "line_color";
+    parm.lcolor->label = _("Line color");
 
-    parm.tcolor = G_define_option();
-    parm.tcolor->key = "tcolor";
-    parm.tcolor->type = TYPE_STRING;
-    parm.tcolor->required = NO;
-    parm.tcolor->description = _("Text color or \"none\"");
-    parm.tcolor->gisprompt = "old_color,color,color";
-
+    parm.tcolor = G_define_standard_option(G_OPT_C_FG);
+    parm.tcolor->key = "text_color";
+    parm.tcolor->label = _("Text color or \"none\"");
+    parm.tcolor->answer = NULL;
+    
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 



More information about the grass-commit mailing list