[GRASS-SVN] r31825 - grass/trunk/imagery/i.smap/shapiro
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 23 09:21:26 EDT 2008
Author: neteler
Date: 2008-06-23 09:21:26 -0400 (Mon, 23 Jun 2008)
New Revision: 31825
Modified:
grass/trunk/imagery/i.smap/shapiro/main.c
grass/trunk/imagery/i.smap/shapiro/parse.c
Log:
exit codes; parser simplification
Modified: grass/trunk/imagery/i.smap/shapiro/main.c
===================================================================
--- grass/trunk/imagery/i.smap/shapiro/main.c 2008-06-23 13:03:20 UTC (rev 31824)
+++ grass/trunk/imagery/i.smap/shapiro/main.c 2008-06-23 13:21:26 UTC (rev 31825)
@@ -47,8 +47,6 @@
segment (&S, &parms, &files);
closefiles(&parms, &files);
- exit(0);
+ exit(EXIT_SUCCESS);
}
-
-
Modified: grass/trunk/imagery/i.smap/shapiro/parse.c
===================================================================
--- grass/trunk/imagery/i.smap/shapiro/parse.c 2008-06-23 13:03:20 UTC (rev 31824)
+++ grass/trunk/imagery/i.smap/shapiro/parse.c 2008-06-23 13:21:26 UTC (rev 31825)
@@ -12,38 +12,25 @@
struct Flag *quiet;
struct Flag *ml;
- group = G_define_option();
- group->key = "group";
- group->description = _("imagery group");
- group->required = YES;
- group->type = TYPE_STRING;
- group->gisprompt = "old,group,group";
+ group = G_define_standard_option(G_OPT_I_GROUP);
- subgroup = G_define_option();
- subgroup->key = "subgroup";
- subgroup->description = _("imagery subgroup");
- subgroup->required = YES;
- subgroup->type = TYPE_STRING;
+ subgroup = G_define_standard_option(G_OPT_I_SUBGROUP);
sigfile = G_define_option();
sigfile->key = "signaturefile";
- sigfile->description = _("imagery signaturefile");
+ sigfile->description = _("Name of imagery signaturefile");
+ sigfile->key_desc = "name";
sigfile->required = YES;
sigfile->type = TYPE_STRING;
blocksize = G_define_option();
blocksize->key = "blocksize";
- blocksize->description = _("size of submatrix to process at one time");
+ blocksize->description = _("Size of submatrix to process at one time");
blocksize->required = NO;
blocksize->type = TYPE_INTEGER;
blocksize->answer = "128";
- output = G_define_option();
- output->key = "output";
- output->description = _("output raster map");
- output->required = YES;
- output->type = TYPE_STRING;
- output->gisprompt = "new,cell,raster";
+ output = G_define_standard_option(G_OPT_R_OUTPUT);
ml = G_define_flag();
ml->key = 'm';
@@ -53,7 +40,7 @@
quiet->key = 'q';
quiet->description = _("Run quietly");
- if (G_parser(argc,argv)) exit(1);
+ if (G_parser(argc,argv)) exit(EXIT_FAILURE);
parms->quiet = quiet->answer;
parms->ml = ml->answer;
More information about the grass-commit
mailing list