[GRASS-SVN] r47591 - in grass/trunk: general/g.parser include lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 11 19:32:56 EDT 2011


Author: lucadelu
Date: 2011-08-11 16:32:56 -0700 (Thu, 11 Aug 2011)
New Revision: 47591

Modified:
   grass/trunk/general/g.parser/standard_option.c
   grass/trunk/include/gis.h
   grass/trunk/lib/gis/parser_standard_options.c
Log:
rename G_OPT_DIR to G_OPT_M_DIR

Modified: grass/trunk/general/g.parser/standard_option.c
===================================================================
--- grass/trunk/general/g.parser/standard_option.c	2011-08-11 22:32:25 UTC (rev 47590)
+++ grass/trunk/general/g.parser/standard_option.c	2011-08-11 23:32:56 UTC (rev 47591)
@@ -94,12 +94,12 @@
 	key = G_OPT_F_OUTPUT;
     else if (G_strcasecmp(name, "G_OPT_F_SEP") == 0)
 	key = G_OPT_F_SEP;
-    else if (G_strcasecmp(name, "G_OPT_DIR") == 0)
-        key = G_OPT_DIR;
     else if (G_strcasecmp(name, "G_OPT_C_FG") == 0)
 	key = G_OPT_C_FG;
     else if (G_strcasecmp(name, "G_OPT_C_BG") == 0)
 	key = G_OPT_C_BG;
+    else if (G_strcasecmp(name, "G_OPT_M_DIR") == 0)
+        key = G_OPT_M_DIR;
     else if (G_strcasecmp(name, "G_OPT_M_UNITS") == 0)
 	key = G_OPT_M_UNITS;
     else if (G_strcasecmp(name, "G_OPT_M_DATATYPE") == 0)

Modified: grass/trunk/include/gis.h
===================================================================
--- grass/trunk/include/gis.h	2011-08-11 22:32:25 UTC (rev 47590)
+++ grass/trunk/include/gis.h	2011-08-11 23:32:56 UTC (rev 47591)
@@ -215,8 +215,6 @@
     G_OPT_F_OUTPUT,		/* new output file */
     G_OPT_F_SEP,		/* data field separator */
 
-    G_OPT_DIR,                  /* directory input */
-
     G_OPT_C_FG,			/* foreground color */
     G_OPT_C_BG,			/* background color */
 
@@ -225,6 +223,7 @@
     G_OPT_M_MAPSET,             /* mapset */
     G_OPT_M_EN,                 /* coordinates */
     G_OPT_M_COLR,               /* color rules */
+    G_OPT_M_DIR,                /* directory input */    
 } STD_OPT;
 
 /* Message format */

Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c	2011-08-11 22:32:25 UTC (rev 47590)
+++ grass/trunk/lib/gis/parser_standard_options.c	2011-08-11 23:32:56 UTC (rev 47591)
@@ -10,7 +10,7 @@
   
   \author Original author CERL
   \author Soeren Gebbert added Dec. 2009 WPS process_description document
-  \author Luca Delucchi added Aug 2011 G_OPT_DIR
+  \author Luca Delucchi added Aug 2011 G_OPT_M_DIR
 */
 
 #include <grass/gis.h>
@@ -80,9 +80,6 @@
    - G_OPT_F_OUTPUT
    - G_OPT_F_SEP
    
-  - directory
-   - G_OPT_DIR
-   
   - colors
    - G_OPT_C_FG
    - G_OPT_C_BG
@@ -93,6 +90,7 @@
    - G_OPT_M_MAPSET
    - G_OPT_M_EN
    - G_OPT_M_COLR
+   - G_OPT_M_DIR
 
    \param opt type of Option struct to create
    
@@ -501,16 +499,6 @@
 	Opt->description = _("Special characters: newline, space, comma, tab");
 	break;
 
-        /* directory */
-    case G_OPT_DIR:
-        Opt->key = "input";
-        Opt->type = TYPE_STRING;
-        Opt->key_desc = "name";
-        Opt->required = YES;
-        Opt->gisprompt = "old,dir,input";
-        Opt->description = _("Name to input directory");
-        break;
-
 	/* colors */
     case G_OPT_C_FG:
 	Opt->key = "color";
@@ -535,6 +523,16 @@
 	break;
 
 	/* misc */
+
+    case G_OPT_M_DIR:
+        Opt->key = "input";
+        Opt->type = TYPE_STRING;
+        Opt->key_desc = "name";
+        Opt->required = YES;
+        Opt->gisprompt = "old,dir,input";
+        Opt->description = _("Name to input directory");
+        break;
+
     case G_OPT_M_UNITS:
 	Opt->key = "units";
 	Opt->type = TYPE_STRING;
@@ -583,6 +581,6 @@
 	Opt->description = _("Name of color table");
 	Opt->descriptions = G_color_rules_descriptions();
     }
-   
+
     return Opt;
 }



More information about the grass-commit mailing list