[GRASS-SVN] r61981 - in grass/branches/releasebranch_7_0: . raster/r.bitpattern
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 15 11:41:44 PDT 2014
Author: martinl
Date: 2014-09-15 11:41:44 -0700 (Mon, 15 Sep 2014)
New Revision: 61981
Modified:
grass/branches/releasebranch_7_0/
grass/branches/releasebranch_7_0/raster/r.bitpattern/main.c
Log:
r.bitpattern: remove -q (quiet) flag - replaced by standardized flag --q
(merge r61980 from trunk)
Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
- /grass/trunk:60289,60696,61269,61380,61420,61422,61480,61500,61764,61808,61829,61831,61851-61852,61854,61858,61888,61891,61905,61907,61913-61914,61916,61918,61921,61938,61967-61968,61975
+ /grass/trunk:60289,60696,61269,61380,61420,61422,61480,61500,61764,61808,61829,61831,61851-61852,61854,61858,61888,61891,61905,61907,61913-61914,61916,61918,61921,61938,61967-61968,61975,61980
Modified: grass/branches/releasebranch_7_0/raster/r.bitpattern/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.bitpattern/main.c 2014-09-15 18:39:43 UTC (rev 61980)
+++ grass/branches/releasebranch_7_0/raster/r.bitpattern/main.c 2014-09-15 18:41:44 UTC (rev 61981)
@@ -23,7 +23,7 @@
* binary: 0000 -> integer: 0 -> patval=0
* if value can be arbitray (0/1), then assume 0 value
*
- * COPYRIGHT: (C) 2002 by the GRASS Development Team
+ * COPYRIGHT: (C) 2002-2014 by the GRASS Development Team
*
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
@@ -50,12 +50,10 @@
int nrows, ncols;
int row, col;
int infd, outfd;
- int verbose;
RASTER_MAP_TYPE data_type;
int pat, patv;
struct GModule *module;
struct Option *input, *output, *pattern, *patval;
- struct Flag *flag1;
G_gisinit(argv[0]);
@@ -82,18 +80,11 @@
patval->required = YES;
patval->description = _("Bit pattern value");
- /* Define the different flags */
-
- flag1 = G_define_flag();
- flag1->key = 'q';
- flag1->description = _("Quiet");
-
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
name = input->answer;
result = output->answer;
- verbose = (!flag1->answer);
pat = atoi(pattern->answer);
patv = atoi(patval->answer);
@@ -117,8 +108,7 @@
for (row = 0; row < nrows; row++) {
CELL c;
- if (verbose)
- G_percent(row, nrows, 2);
+ G_percent(row, nrows, 2);
/* read input map */
Rast_get_row(infd, inrast, row, data_type);
@@ -137,11 +127,12 @@
Rast_put_row(outfd, outrast, data_type);
}
-
+ G_percent(1, 1, 1);
+
G_free(inrast);
G_free(outrast);
Rast_close(infd);
Rast_close(outfd);
- return (EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list