浏览代码

use G_define_standard_option()s

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56635 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 12 年之前
父节点
当前提交
ff3f74fd0e
共有 1 个文件被更改,包括 5 次插入9 次删除
  1. 5 9
      raster/r.in.gridatb/main.c

+ 5 - 9
raster/r.in.gridatb/main.c

@@ -45,24 +45,20 @@ int main(int argc, char **argv)
     G_add_keyword(_("raster"));
     G_add_keyword(_("import"));
     module->description =
-	_("Imports GRIDATB.FOR map file (TOPMODEL) into GRASS raster map");
+	_("Imports GRIDATB.FOR map file (TOPMODEL) into a GRASS raster map.");
 
-    params.input = G_define_option();
-    params.input->key = "input";
+    params.input = G_define_standard_option(G_OPT_F_INPUT);
     params.input->description = _("GRIDATB i/o map file");
-    params.input->type = TYPE_STRING;
     params.input->required = YES;
+    params.input->gisprompt = "old,file,file";
 
-    params.output = G_define_option();
-    params.output->key = "output";
-    params.output->description = _("Name for output raster map");
-    params.output->type = TYPE_STRING;
+    params.output = G_define_standard_option(G_OPT_R_OUTPUT);
     params.output->required = YES;
-    params.output->gisprompt = "new,cell,raster";
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
+
     file = params.input->answer;
     oname = params.output->answer;