[GRASS-SVN] r71239 - grass-addons/grass7/imagery/i.spec.sam

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 4 04:11:34 PDT 2017


Author: neteler
Date: 2017-07-04 04:11:34 -0700 (Tue, 04 Jul 2017)
New Revision: 71239

Modified:
   grass-addons/grass7/imagery/i.spec.sam/main.c
Log:
i.spec.sam addon: fix obscure parser msg

Modified: grass-addons/grass7/imagery/i.spec.sam/main.c
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/main.c	2017-07-04 11:06:20 UTC (rev 71238)
+++ grass-addons/grass7/imagery/i.spec.sam/main.c	2017-07-04 11:11:34 UTC (rev 71239)
@@ -16,13 +16,8 @@
  *      ISBN 0 7315 1900 0
  *
  ********************************************************************/
-             
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <math.h>
-#include <omp.h>
 
+
 #include <grass/config.h>
 #ifndef HAVE_LIBBLAS
 #error GRASS is not configured with BLAS
@@ -31,6 +26,11 @@
 #error GRASS is not configured with LAPACK
 #endif
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
+#include <math.h>
+#include <omp.h>
 #include <grass/gis.h>
 #include <grass/raster.h>
 #include <grass/imagery.h>
@@ -81,6 +81,7 @@
     char *group;
     float spectangle; /*numerical value of the spectral angle*/
 
+    /* initialize GIS engine */
     G_gisinit (argv[0]);
 
     module = G_define_module();
@@ -91,7 +92,6 @@
 
 
     parm.group = G_define_standard_option(G_OPT_I_GROUP);
-    parm.group->description = "Imagery group to target for Spectral Mixture Analysis";
 
     parm.matrixfile = G_define_standard_option(G_OPT_F_INPUT);
     parm.matrixfile->description = "Matrix file containing spectral signatures";
@@ -103,7 +103,7 @@
     parm.output->description = "Raster map prefix to hold spectral angles";
 
     if (G_parser(argc,argv))
-	G_fatal_error("Parsing arguments error");
+	exit(EXIT_FAILURE);
 
     result_prefix = parm.output->answer;
 



More information about the grass-commit mailing list