[GRASS-SVN] r70500 - in grass/trunk: include lib/gis vector/v.out.ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 8 01:05:21 PST 2017
Author: martinl
Date: 2017-02-08 01:05:21 -0800 (Wed, 08 Feb 2017)
New Revision: 70500
Modified:
grass/trunk/include/gis.h
grass/trunk/lib/gis/parser.c
grass/trunk/lib/gis/parser_local_proto.h
grass/trunk/vector/v.out.ogr/args.c
grass/trunk/vector/v.out.ogr/main.c
Log:
v.out.ogr: Append mode broken in G 7.2.1svn and 7.3 (see #3270)
Modified: grass/trunk/include/gis.h
===================================================================
--- grass/trunk/include/gis.h 2017-02-07 19:55:18 UTC (rev 70499)
+++ grass/trunk/include/gis.h 2017-02-08 09:05:21 UTC (rev 70500)
@@ -540,6 +540,7 @@
char key; /*!< Key char used on command line */
char answer; /*!< Stores flag state: 0/1 */
char suppress_required; /*!< Suppresses checking of required options */
+ char suppress_overwrite; /*!< Suppresses checking of existing output */
const char *label; /*!< Optional short label, used in GUI as item label */
const char *description; /*!< String describing flag meaning */
const char *guisection; /*!< GUI Layout guidance: ';' delimited hierarchical tree position */
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2017-02-07 19:55:18 UTC (rev 70499)
+++ grass/trunk/lib/gis/parser.c 2017-02-08 09:05:21 UTC (rev 70500)
@@ -624,8 +624,10 @@
return -1;
}
- if (check_overwrite())
- return -1;
+ if (!st->suppress_overwrite) {
+ if (check_overwrite())
+ return -1;
+ }
return 0;
}
@@ -972,6 +974,8 @@
flag->answer = 1;
if (flag->suppress_required)
st->suppress_required = 1;
+ if (flag->suppress_overwrite)
+ st->suppress_overwrite = 1;
return;
}
flag = flag->next_flag;
Modified: grass/trunk/lib/gis/parser_local_proto.h
===================================================================
--- grass/trunk/lib/gis/parser_local_proto.h 2017-02-07 19:55:18 UTC (rev 70499)
+++ grass/trunk/lib/gis/parser_local_proto.h 2017-02-08 09:05:21 UTC (rev 70500)
@@ -21,6 +21,7 @@
int quiet;
int has_required;
int suppress_required;
+ int suppress_overwrite;
struct GModule module_info; /* general information on the corresponding module */
Modified: grass/trunk/vector/v.out.ogr/args.c
===================================================================
--- grass/trunk/vector/v.out.ogr/args.c 2017-02-07 19:55:18 UTC (rev 70499)
+++ grass/trunk/vector/v.out.ogr/args.c 2017-02-08 09:05:21 UTC (rev 70500)
@@ -86,6 +86,7 @@
flags->append->key = 'a';
flags->append->label = _("Append to existing layer");
flags->append->description = _("A new OGR layer is created if it does not exist");
+ flags->append->suppress_overwrite = YES;
flags->nocat = G_define_flag();
flags->nocat->key = 's';
Modified: grass/trunk/vector/v.out.ogr/main.c
===================================================================
--- grass/trunk/vector/v.out.ogr/main.c 2017-02-07 19:55:18 UTC (rev 70499)
+++ grass/trunk/vector/v.out.ogr/main.c 2017-02-08 09:05:21 UTC (rev 70500)
@@ -9,7 +9,7 @@
*
* PURPOSE: Converts GRASS vector to one of supported OGR vector formats.
*
- * COPYRIGHT: (C) 2001-2013 by the GRASS Development Team
+ * COPYRIGHT: (C) 2001-2017 by the GRASS Development Team
*
* This program is free software under the GNU General
* Public License (>=v2). Read the file COPYING that
More information about the grass-commit
mailing list