[GRASS-SVN] r64075 - in grass/branches/releasebranch_7_0: . display/d.extract display/d.path display/d.vect.chart general/manage/lister raster/r.carve raster/r.contour raster/r.random raster/r.sim/r.sim.sediment raster/r.sim/simlib raster/r.stream.extract raster/r.to.vect raster/r.volume vector/v.buffer vector/v.build vector/v.build.polylines vector/v.class vector/v.clean vector/v.clean/test vector/v.colors vector/v.colors.out vector/v.db.connect vector/v.delaunay vector/v.drape vector/v.external vector/v.extract vector/v.extrude vector/v.generalize vector/v.in.db vector/v.in.dwg vector/v.in.lidar vector/v.in.ogr vector/v.in.region vector/v.kernel vector/v.label vector/v.label.sa vector/v.lrs/v.lrs.create vector/v.lrs/v.lrs.label vector/v.lrs/v.lrs.segment vector/v.lrs/v.lrs.where vector/v.neighbors vector/v.net.alloc vector/v.net.iso vector/v.net.path vector/v.net.salesman vector/v.net.steiner vector/v.normal vector/v.out.dxf vector/v.out.ogr vector/v.out.pov vector/v.out.svg v ector/v.overlay vector/v.parallel vector/v.patch vector/v.perturb vector/v.proj vector/v.qcount vector/v.reclass vector/v.rectify vector/v.sample vector/v.segment vector/v.select vector/v.split vector/v.surf.idw vector/v.surf.rst vector/v.to.db vector/v.to.points vector/v.to.rast vector/v.to.rast3 vector/v.transform vector/v.type vector/v.univar vector/v.vect.stats vector/v.vol.rst vector/v.voronoi vector/v.what.rast vector/v.what.rast3

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 12 03:19:08 PST 2015


Author: neteler
Date: 2015-01-12 03:19:08 -0800 (Mon, 12 Jan 2015)
New Revision: 64075

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/display/d.extract/main.c
   grass/branches/releasebranch_7_0/display/d.path/main.c
   grass/branches/releasebranch_7_0/display/d.vect.chart/main.c
   grass/branches/releasebranch_7_0/general/manage/lister/vector.c
   grass/branches/releasebranch_7_0/raster/r.carve/main.c
   grass/branches/releasebranch_7_0/raster/r.carve/vect.c
   grass/branches/releasebranch_7_0/raster/r.contour/main.c
   grass/branches/releasebranch_7_0/raster/r.random/random.c
   grass/branches/releasebranch_7_0/raster/r.random/support.c
   grass/branches/releasebranch_7_0/raster/r.sim/r.sim.sediment/main.c
   grass/branches/releasebranch_7_0/raster/r.sim/simlib/output.c
   grass/branches/releasebranch_7_0/raster/r.stream.extract/close.c
   grass/branches/releasebranch_7_0/raster/r.to.vect/main.c
   grass/branches/releasebranch_7_0/raster/r.volume/main.c
   grass/branches/releasebranch_7_0/vector/v.buffer/main.c
   grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c
   grass/branches/releasebranch_7_0/vector/v.build/main.c
   grass/branches/releasebranch_7_0/vector/v.class/main.c
   grass/branches/releasebranch_7_0/vector/v.clean/main.c
   grass/branches/releasebranch_7_0/vector/v.clean/test/topocheck.c
   grass/branches/releasebranch_7_0/vector/v.colors.out/make_colors.c
   grass/branches/releasebranch_7_0/vector/v.colors.out/scan_cats.c
   grass/branches/releasebranch_7_0/vector/v.colors/main.c
   grass/branches/releasebranch_7_0/vector/v.db.connect/main.c
   grass/branches/releasebranch_7_0/vector/v.delaunay/main.c
   grass/branches/releasebranch_7_0/vector/v.drape/main.c
   grass/branches/releasebranch_7_0/vector/v.external/main.c
   grass/branches/releasebranch_7_0/vector/v.extract/main.c
   grass/branches/releasebranch_7_0/vector/v.extrude/main.c
   grass/branches/releasebranch_7_0/vector/v.generalize/main.c
   grass/branches/releasebranch_7_0/vector/v.in.db/main.c
   grass/branches/releasebranch_7_0/vector/v.in.dwg/main.c
   grass/branches/releasebranch_7_0/vector/v.in.lidar/main.c
   grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c
   grass/branches/releasebranch_7_0/vector/v.in.region/main.c
   grass/branches/releasebranch_7_0/vector/v.kernel/main.c
   grass/branches/releasebranch_7_0/vector/v.label.sa/labels.c
   grass/branches/releasebranch_7_0/vector/v.label/main.c
   grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.create/main.c
   grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.label/main.c
   grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c
   grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c
   grass/branches/releasebranch_7_0/vector/v.neighbors/main.c
   grass/branches/releasebranch_7_0/vector/v.net.alloc/main.c
   grass/branches/releasebranch_7_0/vector/v.net.iso/main.c
   grass/branches/releasebranch_7_0/vector/v.net.path/main.c
   grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c
   grass/branches/releasebranch_7_0/vector/v.net.steiner/main.c
   grass/branches/releasebranch_7_0/vector/v.normal/main.c
   grass/branches/releasebranch_7_0/vector/v.out.dxf/main.c
   grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c
   grass/branches/releasebranch_7_0/vector/v.out.pov/main.c
   grass/branches/releasebranch_7_0/vector/v.out.svg/main.c
   grass/branches/releasebranch_7_0/vector/v.overlay/main.c
   grass/branches/releasebranch_7_0/vector/v.parallel/main.c
   grass/branches/releasebranch_7_0/vector/v.patch/main.c
   grass/branches/releasebranch_7_0/vector/v.perturb/main.c
   grass/branches/releasebranch_7_0/vector/v.proj/main.c
   grass/branches/releasebranch_7_0/vector/v.qcount/main.c
   grass/branches/releasebranch_7_0/vector/v.reclass/main.c
   grass/branches/releasebranch_7_0/vector/v.rectify/main.c
   grass/branches/releasebranch_7_0/vector/v.sample/main.c
   grass/branches/releasebranch_7_0/vector/v.segment/main.c
   grass/branches/releasebranch_7_0/vector/v.select/main.c
   grass/branches/releasebranch_7_0/vector/v.split/main.c
   grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c
   grass/branches/releasebranch_7_0/vector/v.surf.rst/main.c
   grass/branches/releasebranch_7_0/vector/v.to.db/main.c
   grass/branches/releasebranch_7_0/vector/v.to.points/main.c
   grass/branches/releasebranch_7_0/vector/v.to.rast/support.c
   grass/branches/releasebranch_7_0/vector/v.to.rast/vect2rast.c
   grass/branches/releasebranch_7_0/vector/v.to.rast3/main.c
   grass/branches/releasebranch_7_0/vector/v.transform/main.c
   grass/branches/releasebranch_7_0/vector/v.type/main.c
   grass/branches/releasebranch_7_0/vector/v.univar/main.c
   grass/branches/releasebranch_7_0/vector/v.vect.stats/main.c
   grass/branches/releasebranch_7_0/vector/v.vol.rst/main.c
   grass/branches/releasebranch_7_0/vector/v.voronoi/main.c
   grass/branches/releasebranch_7_0/vector/v.what.rast/main.c
   grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c
Log:
Vect_open_*() return checks backported (trunk, r60054); some minor space sync


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:59626,59671,60497,60563-60566,60817,60922,60976,61046,61096,61141,61994,62026,62036,62085,62105,62179-62180,62182,62190,62403,62422,62424,62429,62437,62466,62469,62484,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750-62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62828,62831,62838,62845,62847,62850,62856,62879,62881,62886,62904,62907-62908,62910,62912,62914,62916,62918,62920,62925,62932-62933,62935,62940,62942,62944-62946,62949,62955-62956,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,63047,
 63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,63076,63079,63081,63083,63085,63087,63089,63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63160,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63275-63276,63279,63281,63283,63287,63290,63292,63297,63302,63304-63307,63315,63319,63327,63330,63332,63339,63342,63345,63361-63363,63367,63369,63379,63389,63391,63393,63402,63408-63409,63416-63417,63425,63427,63429,63431,63433,63448,63451,63453,63457,63459,63461,63464-63470,63473,63482,63497,63505,63508,63510,63515,63521-63524,63526,63528,63536-63537,63551-63552,63554,63556,63558-63559,63562,63570,63576,63582,63589-63593,63602,63604,63608-63610,63616,63618,63624,63626,63628,63630,63634,63639,63642,63644,63650,63652,63656,63679,63685
 ,63689,63691,63693,63695,63698,63700-63702,63704,63706-63707,63709,63711,63713,63715,63717-63718,63721-63727,63731,63733,63736,63740-63742,63744-63749,63751-63752,63756,63758,63760-63761,63767,63777,63780,63783,63787,63793,63796-63798,63801,63803,63807-63808,63812,63814,63816,63821,63823-63824,63827-63828,63830-63831,63834-63835,63837-63839,63841,63843-63844,63846-63847,63849,63851,63853,63855-63856,63858-63859,63862,63865,63869,63871,63882,63884,63889-63890,63892-63895,63897-63898,63900,63902-63903,63905,63907,63909-63911,63913-63914,63927,63930-63931,63940-63941,63945,63954-63955,63960,63965,63967,63976-63983,63995,64026,64030,64040,64056,64062
   + /grass/trunk:59626,59671,60054,60497,60563-60566,60817,60922,60976,61046,61096,61141,61994,62026,62036,62085,62105,62179-62180,62182,62190,62403,62422,62424,62429,62437,62466,62469,62484,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750-62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62828,62831,62838,62845,62847,62850,62856,62879,62881,62886,62904,62907-62908,62910,62912,62914,62916,62918,62920,62925,62932-62933,62935,62940,62942,62944-62946,62949,62955-62956,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,
 63047,63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,63076,63079,63081,63083,63085,63087,63089,63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63160,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63275-63276,63279,63281,63283,63287,63290,63292,63297,63302,63304-63307,63315,63319,63327,63330,63332,63339,63342,63345,63361-63363,63367,63369,63379,63389,63391,63393,63402,63408-63409,63416-63417,63425,63427,63429,63431,63433,63448,63451,63453,63457,63459,63461,63464-63470,63473,63482,63497,63505,63508,63510,63515,63521-63524,63526,63528,63536-63537,63551-63552,63554,63556,63558-63559,63562,63570,63576,63582,63589-63593,63602,63604,63608-63610,63616,63618,63624,63626,63628,63630,63634,63639,63642,63644,63650,63652,63656,63679
 ,63685,63689,63691,63693,63695,63698,63700-63702,63704,63706-63707,63709,63711,63713,63715,63717-63718,63721-63727,63731,63733,63736,63740-63742,63744-63749,63751-63752,63756,63758,63760-63761,63767,63777,63780,63783,63787,63793,63796-63798,63801,63803,63807-63808,63812,63814,63816,63821,63823-63824,63827-63828,63830-63831,63834-63835,63837-63839,63841,63843-63844,63846-63847,63849,63851,63853,63855-63856,63858-63859,63862,63865,63869,63871,63882,63884,63889-63890,63892-63895,63897-63898,63900,63902-63903,63905,63907,63909-63911,63913-63914,63927,63930-63931,63940-63941,63945,63954-63955,63960,63965,63967,63976-63983,63995,64026,64030,64040,64056,64062

Modified: grass/branches/releasebranch_7_0/display/d.extract/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.extract/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/display/d.extract/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -98,8 +98,13 @@
 	G_fatal_error(_("Vector map <%s> not found"), input->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&In, input->answer, mapset);
-    Vect_open_new(&Out, output->answer, Vect_is_3d(&In));
+
+    if (Vect_open_old(&In, input->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), input->answer);
+
+    if (Vect_open_new(&Out, output->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), output->answer);
+
     Vect_copy_head_data(&In, &Out);
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);

Modified: grass/branches/releasebranch_7_0/display/d.path/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.path/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/display/d.path/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -181,7 +181,8 @@
 	geo = 0;
 
     Vect_set_open_level(2);
-    Vect_open_old(&Map, map->answer, "");
+    if (Vect_open_old(&Map, map->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map->answer);
 
     D_setup(0);
 

Modified: grass/branches/releasebranch_7_0/display/d.vect.chart/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.vect.chart/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/display/d.vect.chart/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -236,7 +236,8 @@
 
     /* open vector */
     Vect_set_open_level(2);
-    Vect_open_old(&Map, map_opt->answer, "");
+    if (Vect_open_old(&Map, map_opt->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map_opt->answer);
 
     ctype = CTYPE_PIE;
     if (ctype_opt->answer[0] == 'b')

Modified: grass/branches/releasebranch_7_0/general/manage/lister/vector.c
===================================================================
--- grass/branches/releasebranch_7_0/general/manage/lister/vector.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/general/manage/lister/vector.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -2,6 +2,7 @@
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/vector.h>
+#include <grass/glocale.h>
 
 int main(int argc, char *argv[])
 {
@@ -27,7 +28,8 @@
 
     *title = 0;
     if (*name) {
-	Vect_open_old_head(&Map, name, mapset);
+	if (Vect_open_old_head(&Map, name, mapset) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), name);
 	strcpy(title, Vect_get_map_name(&Map));
 	Vect_close(&Map);
     }

Modified: grass/branches/releasebranch_7_0/raster/r.carve/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.carve/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.carve/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -158,7 +158,8 @@
 	G_fatal_error(_("Vector map <%s> not found"), parm.invect->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&Map, parm.invect->answer, vmapset);
+    if (Vect_open_old(&Map, parm.invect->answer, vmapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), parm.invect->answer);
 
     if ((rmapset = G_find_file2("cell", parm.inrast->answer, "")) == NULL)
 	G_fatal_error(_("Raster map <%s> not found"), parm.inrast->answer);

Modified: grass/branches/releasebranch_7_0/raster/r.carve/vect.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.carve/vect.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.carve/vect.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -19,6 +19,7 @@
 
 #include <stdio.h>
 #include <grass/gis.h>
+#include <grass/glocale.h>
 #include "enforce.h"
 
 
@@ -27,7 +28,9 @@
  */
 int open_new_vect(struct Map_info *map, char *vect)
 {
-    Vect_open_new(map, vect, 1);
+    if (Vect_open_new(map, vect, 1) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), vect);
+
     Vect_set_map_name(map, vect);
     Vect_set_comment(map, G_recreate_command());
     Vect_hist_command(map);

Modified: grass/branches/releasebranch_7_0/raster/r.contour/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.contour/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.contour/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -152,7 +152,9 @@
     /* get window info */
     G_get_window(&Wind);
 
-    Vect_open_new(&Map, vect->answer, 1);
+    if (Vect_open_new(&Map, vect->answer, 1) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), vect->answer);
+
     Vect_hist_command(&Map);
 
     if (!notable->answer) {

Modified: grass/branches/releasebranch_7_0/raster/r.random/random.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.random/random.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.random/random.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -59,10 +59,9 @@
     }
 
     if (theState->outvector) {
-	if (theState->z_geometry)
-	    Vect_open_new(&Out, theState->outvector, 1);
-	else
-	    Vect_open_new(&Out, theState->outvector, 0);
+	if (Vect_open_new(&Out, theState->outvector, theState->z_geometry) < 0)
+	    G_fatal_error(_("Unable to create vector map <%s>"),
+			    theState->outvector);
 	Vect_hist_command(&Out);
 
 	fi = Vect_default_field_info(&Out, 1, NULL, GV_1TABLE);

Modified: grass/branches/releasebranch_7_0/raster/r.random/support.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.random/support.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.random/support.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -1,6 +1,7 @@
 #include <grass/gis.h>
 #include <grass/raster.h>
 #include <grass/vector.h>
+#include <grass/glocale.h>
 #include "local_proto.h"
 
 
@@ -58,7 +59,9 @@
     if (theState->outvector) {
 	struct Map_info map;
 
-	Vect_open_old(&map, theState->outvector, G_mapset());
+	if (Vect_open_old(&map, theState->outvector, G_mapset()) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"),
+			    theState->outvector);
 	Vect_hist_command(&map);
 	Vect_close(&map);
     }

Modified: grass/branches/releasebranch_7_0/raster/r.sim/r.sim.sediment/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.sim/r.sim.sediment/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.sim/r.sim.sediment/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -101,7 +101,6 @@
 {
     int ii;
     int ret_val;
-    double x_orig, y_orig;
     static int rand1 = 12345;
 
     G_gisinit(argv[0]);
@@ -274,8 +273,6 @@
     step = (stepx + stepy) / 2.;
     mx = cellhd.cols;
     my = cellhd.rows;
-    x_orig = cellhd.west * conv;
-    y_orig = cellhd.south * conv;	/* do we need this? */
     xmin = 0.;
     ymin = 0.;
     xp0 = xmin + stepx / 2.;
@@ -330,9 +327,9 @@
 
     /* Recompute timesec from user input in minutes
      * to real timesec in seconds */
-    timesec = timesec * 60.0;
-    iterout = iterout * 60.0;
-    if ((timesec / iterout) > 100.0)
+    timesec = timesec * 60;
+    iterout = iterout * 60;
+    if ((timesec / iterout) > 100)
 	G_message(_("More than 100 files are going to be created !!!!!"));
 
     /* compute how big the raster is and set this to appr 2 walkers per cell */

Modified: grass/branches/releasebranch_7_0/raster/r.sim/simlib/output.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.sim/simlib/output.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.sim/simlib/output.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -34,11 +34,14 @@
 	if (ts == 1) {
 	    G_snprintf(buf, sizeof(buf), "%s_%.*d", outwalk, ndigit, tt_minutes);
 	    outwalk_time = G_store(buf);
-	    Vect_open_new(&Out, outwalk_time, WITH_Z);
+	    if (Vect_open_new(&Out, outwalk_time, WITH_Z) < 0)
+		G_fatal_error(_("Unable to create vector map <%s>"),
+				outwalk_time);
 	    G_message("Writing %i walker into vector file %s", nstack, outwalk_time);
 	}
 	else {
-	    Vect_open_new(&Out, outwalk, WITH_Z);
+	    if (Vect_open_new(&Out, outwalk, WITH_Z) < 0)
+		G_fatal_error(_("Unable to create vector map <%s>"), outwalk);
 	    G_message("Writing %i walker into vector file %s", nstack, outwalk);
 	}
 

Modified: grass/branches/releasebranch_7_0/raster/r.stream.extract/close.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.stream.extract/close.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.stream.extract/close.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -33,7 +33,8 @@
 
     G_message(_("Writing vector map <%s>..."), stream_vect);
 
-    Vect_open_new(&Out, stream_vect, 0);
+    if (Vect_open_new(&Out, stream_vect, 0) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), stream_vect);
     
     nodestack = (struct sstack *)G_malloc(stack_step * sizeof(struct sstack));
 

Modified: grass/branches/releasebranch_7_0/raster/r.to.vect/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.to.vect/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.to.vect/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -145,10 +145,8 @@
 	G_warning(_("Categories will be unique sequence, raster values will be lost."));
     }
 
-    if (z_flg->answer)
-	Vect_open_new(&Map, out_opt->answer, 1);
-    else
-	Vect_open_new(&Map, out_opt->answer, 0);
+    if (Vect_open_new(&Map, out_opt->answer, z_flg->answer) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
 
     Vect_hist_command(&Map);
 

Modified: grass/branches/releasebranch_7_0/raster/r.volume/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.volume/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/raster/r.volume/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -150,7 +150,8 @@
     
     /* initialize vector map (for centroids) if needed */
     if (centroidsmap) {
-	Vect_open_new(fd_centroids, centroidsmap, WITHOUT_Z);
+	if (Vect_open_new(fd_centroids, centroidsmap, WITHOUT_Z) < 0)
+	    G_fatal_error(_("Unable to create vector map <%s>"), centroidsmap);
         
         Points = Vect_new_line_struct();
         Cats = Vect_new_cats_struct();

Modified: grass/branches/releasebranch_7_0/vector/v.buffer/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.buffer/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.buffer/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -332,7 +332,10 @@
     Vect_check_input_output_name(in_opt->answer, out_opt->answer, G_FATAL_EXIT);
 
     Vect_set_open_level(2); /* topology required */
-    Vect_open_old2(&In, in_opt->answer, "", field_opt->answer);
+
+    if (Vect_open_old2(&In, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
+
     Vect_set_error_handler_io(&In, &Out);
 
     if (field_opt->answer)
@@ -383,7 +386,8 @@
 	G_verbose_message(_("The tolerance in map units = %g"), unit_tolerance);
     }
 
-    Vect_open_new(&Out, out_opt->answer, WITHOUT_Z);
+    if (Vect_open_new(&Out, out_opt->answer, WITHOUT_Z) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
     
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
@@ -391,9 +395,9 @@
     CCats = Vect_new_cats_struct();
     
     /* open tmp vector for buffers, needed for cleaning */
-    if (0 > Vect_open_tmp_new(&Buf, NULL, WITHOUT_Z)) {
-        G_fatal_error(_("Unable to create vector map"));
-    }
+    if (0 > Vect_open_tmp_new(&Buf, NULL, WITHOUT_Z))
+        G_fatal_error(_("Unable to create temporary vector map"));
+
     G_set_verbose(0);
     Vect_build_partial(&Buf, GV_BUILD_BASE); /* switch to level 2 */
     G_set_verbose(verbose);

Modified: grass/branches/releasebranch_7_0/vector/v.build/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.build/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.build/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -113,7 +113,9 @@
 	    }
 	}
 	Vect_set_open_level(1);
-	Vect_open_old(&Map, map_opt->answer, G_mapset());
+
+	if (Vect_open_old(&Map, map_opt->answer, G_mapset()) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), map_opt->answer);
         
 	Vect_build(&Map);
     }
@@ -121,7 +123,10 @@
     if (dump || sdump || cdump || fdump) {
 	if (!build) {
 	    Vect_set_open_level(2);
-	    Vect_open_old(&Map, map_opt->answer, "");
+
+	    if (Vect_open_old(&Map, map_opt->answer, "") < 0)
+		G_fatal_error(_("Unable to open vector map <%s>"),
+				map_opt->answer);
 	}
 	if (dump)
 	    Vect_topo_dump(&Map, stdout);
@@ -145,7 +150,9 @@
 	Points = Vect_new_line_struct();
 	Cats = Vect_new_cats_struct();
 
-	Vect_open_new(&Err, err_opt->answer, Vect_is_3d(&Map));
+	if (Vect_open_new(&Err, err_opt->answer, Vect_is_3d(&Map)) < 0)
+	    G_fatal_error(_("Unable to create vector map <%s>"),
+			    err_opt->answer);
 
 	nlines = Vect_get_num_lines(&Map);
 

Modified: grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -147,11 +147,13 @@
 
     /* Open binary vector map at level 2 */
     Vect_set_open_level(2);
-    Vect_open_old(&map, input->answer, "");
+    if (Vect_open_old(&map, input->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), input->answer);
 
     /* Open new vector */
     G_find_vector2(output->answer, "");
-    Vect_open_new(&Out, output->answer, Vect_is_3d(&map));
+    if (Vect_open_new(&Out, output->answer, Vect_is_3d(&map)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), output->answer);
 
     /* Copy header info. */
     Vect_copy_head_data(&map, &Out);

Modified: grass/branches/releasebranch_7_0/vector/v.class/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.class/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.class/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -98,7 +98,8 @@
     
     /* open input vector */
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, map_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&Map, map_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map_opt->answer);
 
     ofield = Vect_get_field_number(&Map, field_opt->answer);
 

Modified: grass/branches/releasebranch_7_0/vector/v.clean/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.clean/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.clean/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -279,16 +279,21 @@
      * virtual centroids (shapefile/OGR) and level 1 is better if input is too big 
      * and build in previous module (like v.in.ogr or other call to v.clean) would take 
      * a long time */
-    Vect_open_old2(&In, opt.in->answer, "", opt.field->answer);
+    if (Vect_open_old2(&In, opt.in->answer, "", opt.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), opt.in->answer);
 
     with_z = Vect_is_3d(&In);
     
-    Vect_open_new(&Out, opt.out->answer, with_z);
+    if (Vect_open_new(&Out, opt.out->answer, with_z) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), opt.out->answer);
+
     Vect_set_error_handler_io(&In, &Out);
 
     if (opt.err->answer) {
 	Vect_set_open_level(2);
-	Vect_open_new(&Err, opt.err->answer, with_z);
+	if (Vect_open_new(&Err, opt.err->answer, with_z) < 0)
+	    G_fatal_error(_("Unable to create vector map <%s>"),
+			    opt.err->answer);
         G_add_error_handler(error_handler_err, &Err);
 	pErr = &Err;
     }

Modified: grass/branches/releasebranch_7_0/vector/v.clean/test/topocheck.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.clean/test/topocheck.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.clean/test/topocheck.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -63,7 +63,8 @@
 	G_fatal_error(_("Vector map <%s> not found"), in_opt->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&In, in_opt->answer, mapset);
+    if (Vect_open_old(&In, in_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
 
     with_z = Vect_is_3d(&In);
 
@@ -82,7 +83,8 @@
 	Vect_close(&In);
 	Vect_close(&Out);
 
-	Vect_open_update(&Out, out_opt->answer, G_mapset());
+	if (Vect_open_update(&Out, out_opt->answer, G_mapset()) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), out_opt->answer);
 
 	/* Count number of areas and total area in input */
 	nareas1 = Vect_get_num_areas(&Out);

Modified: grass/branches/releasebranch_7_0/vector/v.colors/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.colors/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.colors/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -260,7 +260,9 @@
 
     /* open map and get min/max values */
     Vect_set_open_level(1); /* no topology required */
-    Vect_open_old2(&Map, name, mapset, opt.field->answer);
+    if (Vect_open_old2(&Map, name, mapset, opt.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), name);
+
     Vect_set_error_handler_io(&Map, NULL);
     if (use == USE_Z && !Vect_is_3d(&Map))
         G_fatal_error(_("Vector map <%s> is not 3D"), Vect_get_full_name(&Map));

Modified: grass/branches/releasebranch_7_0/vector/v.colors.out/make_colors.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.colors.out/make_colors.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.colors.out/make_colors.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -19,7 +19,8 @@
     dbCatVal *cv;
     
     Vect_set_open_level(1); /* no topology required */
-    Vect_open_old2(&Map, name, "", layer);
+    if (Vect_open_old2(&Map, name, "", layer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), name);
 
     field = Vect_get_field_number(&Map, layer);
     if (field < 1)

Modified: grass/branches/releasebranch_7_0/vector/v.colors.out/scan_cats.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.colors.out/scan_cats.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.colors.out/scan_cats.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -16,7 +16,9 @@
     *cmin = *cmax = -1;
 
     Vect_set_open_level(1); /* no topology required */
-    Vect_open_old2(&Map, name, "", layer);
+    if (Vect_open_old2(&Map, name, "", layer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), name);
+
     ilayer = Vect_get_field_number(&Map, layer);
     if (ilayer < 1)
 	G_fatal_error(_("Layer <%s> not found"), layer);

Modified: grass/branches/releasebranch_7_0/vector/v.db.connect/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.db.connect/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.db.connect/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -150,7 +150,8 @@
 
     Vect_set_open_level(1); /* no topology needed */
     if (print->answer || shell_print->answer || columns->answer) {
-	Vect_open_old2(&Map, inopt->answer, "", field_opt->answer);
+	if (Vect_open_old2(&Map, inopt->answer, "", field_opt->answer) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), inopt->answer);
     }
     else {
 	if (Vect_open_update_head(&Map, inopt->answer, G_mapset()) < 1)

Modified: grass/branches/releasebranch_7_0/vector/v.delaunay/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.delaunay/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.delaunay/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -116,7 +116,8 @@
     Cats = Vect_new_cats_struct();
     
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&In, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
 
     /* check if we have a 3D input points map */
     mode3d = Vect_is_3d(&In);

Modified: grass/branches/releasebranch_7_0/vector/v.drape/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.drape/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.drape/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -137,7 +137,10 @@
     
     /* open input vector map */
     Vect_set_open_level(2); /* topology required ? */
-    Vect_open_old2(&In, opt.input->answer, "", opt.layer->answer);
+
+    if (Vect_open_old2(&In, opt.input->answer, "", opt.layer->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), opt.input->answer);
+
     Vect_set_error_handler_io(&In, &Out);
     
     /* get layer number */
@@ -150,7 +153,9 @@
     }
 
     /* create output */
-    Vect_open_new(&Out, opt.output->answer, WITH_Z);
+    if (Vect_open_new(&Out, opt.output->answer, WITH_Z) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"),
+			opt.output->answer);
 
     Vect_copy_head_data(&In, &Out);
     Vect_hist_copy(&In, &Out);

Modified: grass/branches/releasebranch_7_0/vector/v.external/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.external/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.external/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -142,7 +142,8 @@
     
     /* create new vector map */
     putenv("GRASS_VECTOR_EXTERNAL_IGNORE=1");
-    Vect_open_new(&Map, output, WITHOUT_Z); /* dimension is set later from data source */
+    if (Vect_open_new(&Map, output, WITHOUT_Z) < 0) /* dimension is set later from data source */
+	G_fatal_error(_("Unable to create vector map <%s>"), output);
     Vect_set_error_handler_io(NULL, &Map);
     
     Vect_hist_command(&Map);
@@ -186,7 +187,8 @@
     
     if (!flags.topo->answer) {
         Vect_set_open_level(1);
-        Vect_open_old(&Map, output, G_mapset());
+        if (Vect_open_old(&Map, output, G_mapset()) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), output);
         Vect_build(&Map);
         Vect_close(&Map);
     }

Modified: grass/branches/releasebranch_7_0/vector/v.extract/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.extract/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.extract/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -183,7 +183,9 @@
 
     /* Do initial read of input file */
     Vect_set_open_level(2); /* topology required */
-    Vect_open_old2(&In, input, "", opt.field->answer);
+
+    if (Vect_open_old2(&In, input, "", opt.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), input);
     
     field = Vect_get_field_number(&In, opt.field->answer);
     
@@ -337,7 +339,9 @@
 	qsort(cat_array, cat_count, sizeof(int), cmp);
     }
 
-    Vect_open_new(&Out, output, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, output, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), output);
+
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);
 

Modified: grass/branches/releasebranch_7_0/vector/v.extrude/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.extrude/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.extrude/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -184,12 +184,17 @@
     Cats = Vect_new_cats_struct();
 
     Vect_set_open_level(2); /* topology required for input */
+
     /* opening input vector map */
-    Vect_open_old2(&In, opt.input->answer, "", opt.field->answer);
+    if (Vect_open_old2(&In, opt.input->answer, "", opt.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), opt.input->answer);
+
     Vect_set_error_handler_io(&In, &Out);
 
     /* creating output vector map */
-    Vect_open_new(&Out, opt.output->answer, WITH_Z);
+    if (Vect_open_new(&Out, opt.output->answer, WITH_Z) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"),
+			opt.output->answer);
 
     field = Vect_get_field_number(&In, opt.field->answer);
 

Modified: grass/branches/releasebranch_7_0/vector/v.generalize/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.generalize/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.generalize/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -550,7 +550,7 @@
 	    if (Points->n_points < 2) {
 		after = APoints->n_points;
 		n_oversimplified++;
-                if(error_out->answer)
+                if (error_out->answer)
 		    Vect_write_line(&Error, type, APoints, Cats);
 	    }
 	    /* check for topology corruption */
@@ -558,7 +558,7 @@
 		if (!check_topo(&Out, i, APoints, Points, Cats)) {
 		    after = APoints->n_points;
 		    not_modified_boundaries++;
-                    if(error_out->answer)
+                    if (error_out->answer)
 		        Vect_write_line(&Error, type, APoints, Cats);
 		}
 		else
@@ -582,17 +582,17 @@
 
 	/* make sure that clean topo is built at the end */
 	Vect_build_partial(&Out, GV_BUILD_NONE);
-        if(error_out->answer)
+        if (error_out->answer)
 	    Vect_build_partial(&Error, GV_BUILD_NONE);
     }
 
     Vect_build(&Out);
-    if(error_out->answer)
+    if (error_out->answer)
         Vect_build(&Error);
 
     Vect_close(&In);
     Vect_close(&Out);
-    if(error_out->answer)
+    if (error_out->answer)
         Vect_close(&Error);
 
     G_message("-----------------------------------------------------");

Modified: grass/branches/releasebranch_7_0/vector/v.in.db/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.db/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.in.db/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -116,7 +116,41 @@
     Cats = Vect_new_cats_struct();
     db_init_string(&sql);
 
-    Vect_open_new(&Map, outvect->answer, with_z);
+    if (G_get_overwrite()) {
+	/* We don't want to delete the input table when overwriting the output
+	 * vector. */
+	char name[GNAME_MAX], mapset[GMAPSET_MAX];
+
+	if (!G_name_is_fully_qualified(outvect->answer, name, mapset)) {
+	    strcpy(name, outvect->answer);
+	    strcpy(mapset, G_mapset());
+	}
+
+	Vect_set_open_level(1); /* no topo needed */
+
+	if (strcmp(mapset, G_mapset()) == 0 && G_find_vector2(name, mapset) &&
+	    Vect_open_old(&Map, name, mapset) >= 0) {
+	    int num_dblinks;
+
+	    num_dblinks = Vect_get_num_dblinks(&Map);
+	    for (i = 0; i < num_dblinks; i++) {
+		if ((fi = Vect_get_dblink(&Map, i)) != NULL &&
+		    strcmp(fi->driver, driver_opt->answer) == 0 &&
+		    strcmp(fi->database, database_opt->answer) == 0 &&
+		    strcmp(fi->table, table_opt->answer) == 0)
+		    G_fatal_error(_("Vector map <%s> cannot be overwritten "
+				    "because input table <%s> is linked to "
+				    "this map."),
+				    outvect->answer, table_opt->answer);
+	    }
+	    Vect_close(&Map);
+	}
+    }
+
+    if (Vect_open_new(&Map, outvect->answer, with_z) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"),
+			outvect->answer);
+
     Vect_set_error_handler_io(NULL, &Map);
     
     Vect_hist_command(&Map);
@@ -137,7 +171,8 @@
 	    outvect->answer, db_get_default_driver_name(),
 	    db_get_default_database_name());
 
-    if (db_table_exists(db_get_default_driver_name(),
+    if (!same_table_flag->answer &&
+	db_table_exists(db_get_default_driver_name(),
 			db_get_default_database_name(), outvect->answer) == 1)
 	G_fatal_error(_("Output vector map, table <%s> (driver: <%s>, database: <%s>) "
 		       "already exists"), outvect->answer,

Modified: grass/branches/releasebranch_7_0/vector/v.in.dwg/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.dwg/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.in.dwg/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -196,7 +196,8 @@
 
 
     /* open output vector */
-    Vect_open_new(&Map, out_opt->answer, z_flag->answer);
+    if (Vect_open_new(&Map, out_opt->answer, z_flag->answer) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
 
     Vect_hist_command(&Map);
 

Modified: grass/branches/releasebranch_7_0/vector/v.in.lidar/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.lidar/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.in.lidar/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -496,7 +496,8 @@
     sprintf(buf, "%s", out_opt->answer);
     /* strip any @mapset from vector output name */
     G_find_vector(buf, G_mapset());
-    Vect_open_new(&Map, out_opt->answer, 1);
+    if (Vect_open_new(&Map, out_opt->answer, 1) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
 
     Vect_hist_command(&Map);
     

Modified: grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.in.ogr/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -1193,7 +1193,7 @@
 			}
 #endif
 			else if (Ogr_ftype == OFTString ||
-				 Ogr_ftype == OFTStringList ||
+			         Ogr_ftype == OFTStringList ||
 				 Ogr_ftype == OFTIntegerList) {
 			    db_set_string(&strval, (char *)
 					  OGR_F_GetFieldAsString(Ogr_feature,
@@ -1219,7 +1219,7 @@
 			}
 #endif
 			else if (Ogr_ftype == OFTString ||
-				 Ogr_ftype == OFTStringList ||
+			         Ogr_ftype == OFTStringList ||
 				 Ogr_ftype == OFTIntegerList) {
 			    sprintf(buf, ", ''");
 			}

Modified: grass/branches/releasebranch_7_0/vector/v.in.region/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.region/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.in.region/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -71,7 +71,9 @@
     mid_long = (window.west + window.east) / 2;
 
     /* Open output segments */
-    Vect_open_new(&Out, out_opt->answer, 0);
+    if (Vect_open_new(&Out, out_opt->answer, 0) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
+
     Vect_hist_command(&Out);
 
     /* Rectangle */

Modified: grass/branches/releasebranch_7_0/vector/v.kernel/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.kernel/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.kernel/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -306,7 +306,8 @@
     
     /* Open input vector */
     Vect_set_open_level(2);
-    Vect_open_old(&In, in_opt->answer, "");
+    if (Vect_open_old(&In, in_opt->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
 
     if (net_opt->answer) {
 	int nlines, line;
@@ -317,11 +318,16 @@
 	dimension = 1.;
 	/* Open input network */
 	Vect_set_open_level(2);
-	Vect_open_old(&Net, net_opt->answer, "");
+
+	if (Vect_open_old(&Net, net_opt->answer, "") < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), net_opt->answer);
+
 	Vect_net_build_graph(&Net, GV_LINES, 0, 0, NULL, NULL, NULL, 0, 0);
 
 	if (!flag_q->answer) {
-	    Vect_open_new(&Out, out_opt->answer, 0);
+	    if (Vect_open_new(&Out, out_opt->answer, 0) < 0)
+		G_fatal_error(_("Unable to create vector map <%s>"),
+				out_opt->answer);
 	    Vect_hist_command(&Out);
 	}
 

Modified: grass/branches/releasebranch_7_0/vector/v.label/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.label/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.label/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -264,7 +264,8 @@
     }
 
     /* open vector */
-    Vect_open_old(&Map, Vectfile->answer, "");
+    if (Vect_open_old(&Map, Vectfile->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), Vectfile->answer);
 
     /* open database */
     field = atoi(Fieldopt->answer);

Modified: grass/branches/releasebranch_7_0/vector/v.label.sa/labels.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.label.sa/labels.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.label.sa/labels.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -54,7 +54,8 @@
     legal_types = Vect_option_to_types(p->type);
 
     /* open vector for read only */
-    Vect_open_old(&Map, p->map->answer, "");
+    if (Vect_open_old(&Map, p->map->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), p->map->answer);
 
     label_sz = Vect_get_num_primitives(&Map, legal_types);
 

Modified: grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.create/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.create/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.create/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -250,21 +250,29 @@
     if (mapset == NULL)
 	G_fatal_error(_("Vector map <%s> not found"), in_lines_opt->answer);
 
-    Vect_open_old(&In, in_lines_opt->answer, mapset);
+    if (Vect_open_old(&In, in_lines_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"),
+			in_lines_opt->answer);
 
     /* Open input ipoints */
     mapset = G_find_vector2(points_opt->answer, NULL);
     if (mapset == NULL)
 	G_fatal_error(_("Vector map <%s> not found"), points_opt->answer);
 
-    Vect_open_old(&PMap, points_opt->answer, mapset);
+    if (Vect_open_old(&PMap, points_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), points_opt->answer);
 
     /* Open output lines */
-    Vect_open_new(&Out, out_lines_opt->answer, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, out_lines_opt->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"),
+			out_lines_opt->answer);
 
     /* Open output error map */
-    if (err_opt->answer)
-	Vect_open_new(&EMap, err_opt->answer, Vect_is_3d(&In));
+    if (err_opt->answer) {
+	if (Vect_open_new(&EMap, err_opt->answer, Vect_is_3d(&In)) < 0)
+	    G_fatal_error(_("Unable to create vector map <%s>"),
+			    err_opt->answer);
+    }
 
     /* Because the line feature identified by one id (lidcol) may be split
      *  to more line parts, and milepost may be in threshold for more such parts,

Modified: grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.label/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.label/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.label/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -268,10 +268,12 @@
 	G_fatal_error(_("Vector map <%s> not found"), in_opt->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&In, in_opt->answer, mapset);
+    if (Vect_open_old(&In, in_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
 
     /* Open output segments */
-    Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
 
     /* open labels */
     labels = NULL;

Modified: grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -140,10 +140,12 @@
 	G_fatal_error(_("Vector map <%s> not found"), in_opt->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&In, in_opt->answer, mapset);
+    if (Vect_open_old(&In, in_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
 
     /* Open output segments */
-    Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
 
     db_init_handle(&rshandle);
     db_init_string(&rsstmt);

Modified: grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -127,7 +127,8 @@
 	G_fatal_error(_("Vector map <%s> not found"), lines_opt->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&LMap, lines_opt->answer, mapset);
+    if (Vect_open_old(&LMap, lines_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), lines_opt->answer);
 
     /* Open input points */
     mapset = G_find_vector2(points_opt->answer, NULL);
@@ -135,7 +136,8 @@
 	G_fatal_error(_("Vector map <%s> not found"), points_opt->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&PMap, points_opt->answer, mapset);
+    if (Vect_open_old(&PMap, points_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), points_opt->answer);
 
     db_init_handle(&rshandle);
     db_init_string(&rsstmt);

Modified: grass/branches/releasebranch_7_0/vector/v.neighbors/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.neighbors/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.neighbors/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -84,7 +84,9 @@
 
     /* open input vector */
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&In, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
+
     field = Vect_get_field_number(&In, field_opt->answer);
 
     G_get_set_window(&region);

Modified: grass/branches/releasebranch_7_0/vector/v.net.alloc/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net.alloc/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.net.alloc/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -142,7 +142,8 @@
 	geo = 0;
 
     Vect_set_open_level(2);
-    Vect_open_old(&Map, map->answer, "");
+    if (Vect_open_old(&Map, map->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map->answer);
 
     afield = Vect_get_field_number(&Map, afield_opt->answer);
     nfield = Vect_get_field_number(&Map, nfield_opt->answer);
@@ -243,7 +244,9 @@
     G_percent(1, 1, 1);
 
     /* Write arcs to new map */
-    Vect_open_new(&Out, output->answer, Vect_is_3d(&Map));
+    if (Vect_open_new(&Out, output->answer, Vect_is_3d(&Map)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), output->answer);
+
     Vect_hist_command(&Out);
 
     nlines = Vect_get_num_lines(&Map);

Modified: grass/branches/releasebranch_7_0/vector/v.net.iso/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net.iso/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.net.iso/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -182,8 +182,10 @@
 	geo = 0;
 
     Vect_set_open_level(2);
-    Vect_open_old(&Map, map->answer, "");
 
+    if (Vect_open_old(&Map, map->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map->answer);
+
     /* Build graph */
     Vect_net_build_graph(&Map, type, afield, nfield, afcol->answer,
 			 abcol->answer, ncol->answer, geo, 0);
@@ -279,7 +281,9 @@
     }
 
     /* Write arcs to new map */
-    Vect_open_new(&Out, output->answer, Vect_is_3d(&Map));
+    if (Vect_open_new(&Out, output->answer, Vect_is_3d(&Map)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), output->answer);
+
     Vect_hist_command(&Out);
 
     G_message("Generating isolines...");

Modified: grass/branches/releasebranch_7_0/vector/v.net.path/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net.path/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.net.path/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -129,7 +129,8 @@
 				 G_FATAL_EXIT);
 
     Vect_set_open_level(2);
-    Vect_open_old(&In, input_opt->answer, "");
+    if (Vect_open_old(&In, input_opt->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), input_opt->answer);
 
     if (1 > Vect_open_new(&Out, output_opt->answer, Vect_is_3d(&In))) {
 	Vect_close(&In);

Modified: grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.net.salesman/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -219,7 +219,10 @@
     Vect_check_input_output_name(map->answer, output->answer, G_FATAL_EXIT);
 
     Vect_set_open_level(2);
-    Vect_open_old(&Map, map->answer, "");
+
+    if (Vect_open_old(&Map, map->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map->answer);
+
     nnodes = Vect_get_num_nodes(&Map);
     nlines = Vect_get_num_lines(&Map);
 
@@ -485,7 +488,9 @@
     }
 
     /* Write arcs to new map */
-    Vect_open_new(&Out, output->answer, Vect_is_3d(&Map));
+    if (Vect_open_new(&Out, output->answer, Vect_is_3d(&Map)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), output->answer);
+
     Vect_hist_command(&Out);
 
     G_verbose_message(_("Cycle with total cost %.3f"), cost);

Modified: grass/branches/releasebranch_7_0/vector/v.net.steiner/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net.steiner/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.net.steiner/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -426,7 +426,10 @@
     Vect_check_input_output_name(map->answer, output->answer, G_FATAL_EXIT);
 
     Vect_set_open_level(2);
-    Vect_open_old(&Map, map->answer, "");
+
+    if (Vect_open_old(&Map, map->answer, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map->answer);
+
     nnodes = Vect_get_num_nodes(&Map);
     nlines = Vect_get_num_lines(&Map);
 
@@ -595,7 +598,9 @@
 	fprintf(stdout, "\nSteiner tree costs = %f\n", cost);
 
     /* Write arcs to new map */
-    Vect_open_new(&Out, output->answer, Vect_is_3d(&Map));
+    if (Vect_open_new(&Out, output->answer, Vect_is_3d(&Map)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), output->answer);
+
     Vect_hist_command(&Out);
 
     fprintf(stdout, "\nSteiner tree:\n");

Modified: grass/branches/releasebranch_7_0/vector/v.normal/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.normal/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.normal/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -106,7 +106,9 @@
 
     /* Open input */
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, parm.input->answer, "", parm.layer->answer);
+    if (Vect_open_old2(&Map, parm.input->answer, "", parm.layer->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), parm.input->answer);
+
     field = Vect_get_field_number(&Map, parm.layer->answer);
     
     /* Read attributes */

Modified: grass/branches/releasebranch_7_0/vector/v.out.dxf/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.dxf/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.out.dxf/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -76,7 +76,8 @@
     dxf_file = G_store(output->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old2(&In, input->answer, "", field->answer);
+    if (Vect_open_old2(&In, input->answer, "", field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), input->answer);
 
     dxf_open(dxf_file);		/* open output */
 

Modified: grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -124,7 +124,10 @@
     if (!flags.new->answer) {
 	/* open input vector (topology required) */
 	Vect_set_open_level(2);
-	Vect_open_old2(&In, options.input->answer, "", options.field->answer);
+	if (Vect_open_old2(&In, options.input->answer, "",
+				options.field->answer) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"),
+			    options.input->answer);
 
 	if (strcmp(options.type->answer, "auto") == 0) {
 	    G_debug(2, "Automatic type determination.");

Modified: grass/branches/releasebranch_7_0/vector/v.out.pov/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.pov/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.out.pov/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -93,7 +93,8 @@
 
     /* open input vector */
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&In, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
     
     field = Vect_get_field_number(&In, field_opt->answer);
     

Modified: grass/branches/releasebranch_7_0/vector/v.out.svg/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.svg/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.out.svg/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -135,7 +135,8 @@
 
     /* open input vector */
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&In, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
 
     /* parse field number */
     field = Vect_get_field_number(&In, field_opt->answer);

Modified: grass/branches/releasebranch_7_0/vector/v.overlay/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.overlay/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.overlay/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -174,7 +174,9 @@
 
     for (input = 0; input < 2; input++) {
         Vect_set_open_level(2);
-        Vect_open_old2(&(In[input]), in_opt[input]->answer, "", field_opt[input]->answer);
+        if (Vect_open_old2(&(In[input]), in_opt[input]->answer, "", field_opt[input]->answer) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"),
+			    in_opt[input]->answer);
 	field[input] = Vect_get_field_number(&(In[input]), field_opt[input]->answer);
     }
     if (type[0] == 0) { /* atype=auto */
@@ -204,12 +206,15 @@
     Cats = Vect_new_cats_struct();
 
     /* Open output */
-    Vect_open_new(&Out, out_opt->answer, WITHOUT_Z);
+    if (Vect_open_new(&Out, out_opt->answer, WITHOUT_Z) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
+
     Vect_set_map_name(&Out, "Output from v.overlay");
     Vect_set_person(&Out, G_whoami());
     Vect_hist_command(&Out);
     
-    Vect_open_tmp_new(&Tmp, NULL, WITHOUT_Z);
+    if (Vect_open_tmp_new(&Tmp, NULL, WITHOUT_Z) < 0)
+	G_fatal_error(_("Unable to create temporary vector map"));
 
     /* Create dblinks */
     if (ofield[0] > 0) {

Modified: grass/branches/releasebranch_7_0/vector/v.parallel/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.parallel/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.parallel/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -143,10 +143,14 @@
 	side = 0;
 
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", layer_opt->answer);
+
+    if (Vect_open_old2(&In, in_opt->answer, "", layer_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
+
     layer = Vect_get_field_number(&In, layer_opt->answer);
 
-    Vect_open_new(&Out, out_opt->answer, 0);
+    if (Vect_open_new(&Out, out_opt->answer, 0) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
     
     Vect_copy_head_data(&In, &Out);
     Vect_hist_copy(&In, &Out);

Modified: grass/branches/releasebranch_7_0/vector/v.patch/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.patch/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.patch/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -110,7 +110,8 @@
 	Vect_check_input_output_name(in_name, new->answer, G_FATAL_EXIT);
 
 	Vect_set_open_level(2);
-	Vect_open_old_head(&InMap, in_name, "");
+	if (Vect_open_old_head(&InMap, in_name, "") < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), in_name);
 
 	if (out_is_3d != WITH_Z && Vect_is_3d(&InMap))
 	    out_is_3d = WITH_Z;
@@ -123,7 +124,8 @@
     if (do_table) {
 	if (append->answer) {
 	    Vect_set_open_level(1);
-	    Vect_open_old_head(&OutMap, out_name, G_mapset());
+	    if (Vect_open_old_head(&OutMap, out_name, G_mapset()) < 0)
+		G_fatal_error(_("Unable to open vector map <%s>"), out_name);
 
 	    fi_out = Vect_get_field(&OutMap, 1);
 	    if (fi_out) {
@@ -152,7 +154,8 @@
 	while (old->answers[i]) {
 	    in_name = old->answers[i];
 	    Vect_set_open_level(1);
-	    Vect_open_old_head(&InMap, in_name, "");
+	    if (Vect_open_old_head(&InMap, in_name, "") < 0)
+		G_fatal_error(_("Unable to open vector map <%s>"), in_name);
 
 	    fi_in = Vect_get_field(&InMap, 1);
 	    table_in = NULL;
@@ -247,18 +250,23 @@
     if (append->answer) {
 	if (no_topo->answer)
 	    Vect_set_open_level(1);
-	Vect_open_update(&OutMap, out_name, G_mapset());
+
+	if (Vect_open_update(&OutMap, out_name, G_mapset()) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), out_name);
+
 	if (out_is_3d == WITH_Z && !Vect_is_3d(&OutMap)) {
 	    G_warning(_("The output map is not 3D"));
 	}
 	maxcat = max_cat(&OutMap, 1);
     }
     else {
-	Vect_open_new(&OutMap, out_name, out_is_3d);
+	if (Vect_open_new(&OutMap, out_name, out_is_3d) < 0)
+	    G_fatal_error(_("Unable to create vector map <%s>"), out_name);
     }
 
     if (bbox_name) {
-	Vect_open_new(&BBoxMap, bbox_name, out_is_3d);	/* TODO 3D */
+	if (Vect_open_new(&BBoxMap, bbox_name, out_is_3d) < 0)	/* TODO 3D */
+	    G_fatal_error(_("Unable to create vector map <%s>"), bbox_name);
 	Vect_hist_command(&BBoxMap);
     }
 
@@ -320,7 +328,8 @@
 	    Vect_set_open_level(2);	/* needed for Vect_map_box() */
 	else
 	    Vect_set_open_level(1);
-	Vect_open_old(&InMap, in_name, "");
+	if (Vect_open_old(&InMap, in_name, "") < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), in_name);
 
 	/*first time around, copy first in head to out head */
 	if (i == 1)

Modified: grass/branches/releasebranch_7_0/vector/v.perturb/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.perturb/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.perturb/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -143,12 +143,14 @@
 
     /* Open input */
     Vect_set_open_level(2);
-    Vect_open_old_head2(&In, parm.in->answer, "", parm.field->answer);
+    if (Vect_open_old_head2(&In, parm.in->answer, "", parm.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), parm.in->answer);
     
     field = Vect_get_field_number(&In, parm.field->answer);
     
     /* Open output */
-    Vect_open_new(&Out, parm.out->answer, WITHOUT_Z);	/* TODO add z support ? */
+    if (Vect_open_new(&Out, parm.out->answer, WITHOUT_Z) < 0)	/* TODO add z support ? */
+	G_fatal_error(_("Unable to create vector map <%s>"), parm.out->answer);
 
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);
@@ -166,7 +168,8 @@
     /* Close input, re-open on level 1 */
     Vect_close(&In);
     Vect_set_open_level(1);
-    Vect_open_old2(&In, parm.in->answer, "", parm.field->answer);
+    if (Vect_open_old2(&In, parm.in->answer, "", parm.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), parm.in->answer);
 
     i = 0;
     line = 0;

Modified: grass/branches/releasebranch_7_0/vector/v.proj/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.proj/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.proj/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -236,7 +236,8 @@
 	Vect_set_open_level(1);
 	G_debug(1, "Open old: location: %s mapset : %s", G_location_path(),
 		G_mapset());
-	Vect_open_old(&Map, map_name, mapset);
+	if (Vect_open_old(&Map, map_name, mapset) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"), map_name);
     }
     else if (stat < 0)
     {				/* allow 0 (i.e. denied permission) */
@@ -377,7 +378,10 @@
 
     G_debug(1, "Open new: location: %s mapset : %s", G_location_path(),
 	    G_mapset());
-    Vect_open_new(&Out_Map, omap_name, Vect_is_3d(&Map));
+
+    if (Vect_open_new(&Out_Map, omap_name, Vect_is_3d(&Map)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), omap_name);
+
     Vect_set_error_handler_io(NULL, &Out_Map); /* register standard i/o error handler */
     
     Vect_copy_head_data(&Map, &Out_Map);

Modified: grass/branches/releasebranch_7_0/vector/v.qcount/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.qcount/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.qcount/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -97,7 +97,8 @@
 
     /* Open input */
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, parm.input->answer, "", parm.field->answer);
+    if (Vect_open_old2(&Map, parm.input->answer, "", parm.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), parm.input->answer);
 
     /* Get the quadrats */
     G_message(_("Finding quadrats..."));
@@ -122,7 +123,10 @@
 	Points = Vect_new_line_struct();
 	Cats = Vect_new_cats_struct();
 
-	Vect_open_new(&Out, parm.output->answer, 0);
+	if (Vect_open_new(&Out, parm.output->answer, 0) < 0)
+	    G_fatal_error(_("Unable to create vector map <%s>"),
+			    parm.output->answer);
+
 	Vect_hist_command(&Out);
 
 	for (i = 0; i < nquads; i++) {

Modified: grass/branches/releasebranch_7_0/vector/v.reclass/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.reclass/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.reclass/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -109,10 +109,13 @@
 				 G_FATAL_EXIT);
 
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&In, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
     field = Vect_get_field_number(&In, field_opt->answer);
 
-    Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
+
     Vect_copy_head_data(&In, &Out);
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);

Modified: grass/branches/releasebranch_7_0/vector/v.rectify/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.rectify/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.rectify/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -144,7 +144,8 @@
 		      MAXORDER);
 
     Vect_set_open_level(1);
-    Vect_open_old2(&In, in_opt->answer, "", "");
+    if (Vect_open_old2(&In, in_opt->answer, "", "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
     
     use3d = (Vect_is_3d(&In) &&
              (flag_use3d->answer || ortho->answer));
@@ -208,7 +209,10 @@
 	G_debug(1, "Overwriting OK");
 
     select_target_env();
-    Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In));
+
+    if (Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
+
     Vect_copy_head_data(&In, &Out);
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);

Modified: grass/branches/releasebranch_7_0/vector/v.sample/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.sample/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.sample/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -119,7 +119,10 @@
 
     /* Open input */
     Vect_set_open_level(2);
-    Vect_open_old2(&In, parm.input->answer, "", parm.field->answer);
+
+    if (Vect_open_old2(&In, parm.input->answer, "", parm.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), parm.input->answer);
+
     field = Vect_get_field_number(&In, parm.field->answer);
     
     fdrast = Rast_open_old(parm.rast->answer, "");
@@ -155,7 +158,10 @@
     db_close_database_shutdown_driver(Driver);
 
     /* Open output */
-    Vect_open_new(&Out, parm.output->answer, 0);
+    if (Vect_open_new(&Out, parm.output->answer, 0) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"),
+			parm.output->answer);
+
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);
 

Modified: grass/branches/releasebranch_7_0/vector/v.segment/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.segment/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.segment/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -103,11 +103,16 @@
 
     /* Open input lines */
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", lfield_opt->answer);
+
+    if (Vect_open_old2(&In, in_opt->answer, "", lfield_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
+
     lfield = Vect_get_field_number(&In, lfield_opt->answer);
 
     /* Open output segments */
-    Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
+
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);
 

Modified: grass/branches/releasebranch_7_0/vector/v.select/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.select/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.select/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -101,7 +101,12 @@
 				     G_FATAL_EXIT);
 
 	Vect_set_open_level(2);
-	Vect_open_old2(&(In[iopt]), parm.input[iopt]->answer, "", parm.field[iopt]->answer);
+
+	if (Vect_open_old2(&(In[iopt]), parm.input[iopt]->answer, "",
+				parm.field[iopt]->answer) < 0)
+	    G_fatal_error(_("Unable to open vector map <%s>"),
+			    parm.input[iopt]->answer);
+
 	ifield[iopt] = Vect_get_field_number(&(In[iopt]), parm.field[iopt]->answer);
     }
 
@@ -112,7 +117,10 @@
     IFi = Vect_get_field(&(In[0]), ifield[0]);
 
     /* Open output */
-    Vect_open_new(&Out, parm.output->answer, Vect_is_3d(&(In[0])));
+    if (Vect_open_new(&Out, parm.output->answer, Vect_is_3d(&(In[0]))) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"),
+			parm.output->answer);
+
     Vect_set_map_name(&Out, _("Output from v.select"));
     Vect_set_person(&Out, G_whoami());
     Vect_copy_head_data(&(In[0]), &Out);

Modified: grass/branches/releasebranch_7_0/vector/v.split/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.split/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.split/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -159,10 +159,14 @@
     nosplit = nosplit_flag->answer;
     
     Vect_set_open_level(2);
-    Vect_open_old2(&In, in_opt->answer, "", layer_opt->answer);
+
+    if (Vect_open_old2(&In, in_opt->answer, "", layer_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
+
     layer = Vect_get_field_number(&In, layer_opt->answer);
     
-    Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), out_opt->answer);
     
     Vect_copy_head_data(&In, &Out);
     Vect_hist_copy(&In, &Out);

Modified: grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -25,7 +25,9 @@
     struct line_cats *Cats;
 
     Vect_set_open_level(1);	/* without topology */
-    Vect_open_old2(&Map, name, "", field_name);
+    if (Vect_open_old2(&Map, name, "", field_name) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), name);
+
     field = Vect_get_field_number(&Map, field_name);
     with_z = col == NULL && Vect_is_3d(&Map); /* read z-coordinates
                                                  only when column is

Modified: grass/branches/releasebranch_7_0/vector/v.surf.rst/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.surf.rst/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.surf.rst/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -479,49 +479,49 @@
 
     az = G_alloc_vector(n_cols + 1);
     if (!az) {
-	G_fatal_error(_("Not enough memory for az"));
+	G_fatal_error(_("Not enough memory for %s"), "az");
     }
     if (cond1) {
 	adx = G_alloc_vector(n_cols + 1);
 	if (!adx) {
-	    G_fatal_error(_("Not enough memory for adx"));
+	    G_fatal_error(_("Not enough memory for %s"), "adx");
 	}
 	ady = G_alloc_vector(n_cols + 1);
 	if (!ady) {
-	    G_fatal_error(_("Not enough memory for ady"));
+	    G_fatal_error(_("Not enough memory for %s"), "ady");
 	}
 	if (cond2) {
 	    adxx = G_alloc_vector(n_cols + 1);
 	    if (!adxx) {
-		G_fatal_error(_("Not enough memory for adxx"));
+		G_fatal_error(_("Not enough memory for %s"), "adxx");
 	    }
 	    adyy = G_alloc_vector(n_cols + 1);
 	    if (!adyy) {
-		G_fatal_error(_("Not enough memory for adyy"));
+		G_fatal_error(_("Not enough memory for %s"), "adyy");
 	    }
 	    adxy = G_alloc_vector(n_cols + 1);
 	    if (!adxy) {
-		G_fatal_error(_("Not enough memory for adxy"));
+		G_fatal_error(_("Not enough memory for %s"), "adxy");
 	    }
 	}
     }
     if ((data =
 	 quad_data_new(x_orig, y_orig, xm, ym, n_rows, n_cols, 0,
 		       KMAX)) == NULL)
-	G_fatal_error(_("Cannot create quaddata"));
+	G_fatal_error(_("Unable to create %s"), "quaddata");
     if ((functions =
 	 MT_functions_new(quad_compare, quad_divide_data, quad_add_data,
 			  quad_intersect, quad_division_check,
 			  quad_get_points)) == NULL)
 
-	G_fatal_error(_("Cannot create quadfunc"));
+	G_fatal_error(_("Unable to create %s"), "quadfunc");
 
     if ((tree = MT_tree_new(data, NULL, NULL, 0)) == NULL)
-	G_fatal_error(_("Cannot create tree"));
+	G_fatal_error(_("Unable to create %s"), "tree");
     root = tree;
 
     if ((info = MT_tree_info_new(root, functions, dmin, KMAX)) == NULL)
-	G_fatal_error(_("Cannot create tree info"));
+	G_fatal_error(_("Unable to create %s"), "tree info");
 
     open_check = Vect_open_old2(&Map, input, "", parm.field->answer);
     if (open_check < 1)
@@ -562,10 +562,13 @@
 	Cats2 = Vect_new_cats_struct();
 	db_init_string(&sql2);
 
-	if (devi != NULL)
-	    Vect_open_new(&Map2, devi, 1);
-	else
-	    Vect_open_new(&Map2, cvdev, 1);
+	if (devi != NULL) {
+	    if (Vect_open_new(&Map2, devi, 1) < 0)
+		G_fatal_error(_("Unable to create vector map <%s>"), devi);
+	} else {
+	    if (Vect_open_new(&Map2, cvdev, 1) < 0)
+		G_fatal_error(_("Unable to create vector map <%s>"), cvdev);
+	}
 	Vect_hist_command(&Map2);
 	ff = Vect_default_field_info(&Map2, 1, NULL, GV_1TABLE);
 	Vect_map_add_dblink(&Map2, 1, NULL, ff->table, GV_KEY_COLUMN, ff->database,
@@ -586,7 +589,7 @@
         db_set_error_handler_driver(driver2);
 
 	if (db_execute_immediate(driver2, &sql2) != DB_OK) {
-	    G_fatal_error(_("Unable to create table: '%s'"),
+	    G_fatal_error(_("Unable to create table '%s'"),
 			  db_get_string(&sql2));
 	}
 	db_begin_transaction(driver2);

Modified: grass/branches/releasebranch_7_0/vector/v.to.db/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.to.db/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.to.db/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -55,7 +55,8 @@
 
     /* open map */
     Vect_set_open_level(2);
-    Vect_open_old(&Map, options.name, "");
+    if (Vect_open_old(&Map, options.name, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), options.name);
     Vect_set_error_handler_io(&Map, NULL);
    
     Fi = Vect_get_field(&Map, options.field);

Modified: grass/branches/releasebranch_7_0/vector/v.to.points/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.to.points/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.to.points/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -115,13 +115,19 @@
 
     /* Open input lines */
     Vect_set_open_level(2);
-    Vect_open_old2(&In, opt.input->answer, "", opt.lfield->answer);
+
+    if (Vect_open_old2(&In, opt.input->answer, "", opt.lfield->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), opt.input->answer);
+
     Vect_set_error_handler_io(&In, &Out);
     
     field = Vect_get_field_number(&In, opt.lfield->answer);
     
     /* Open output segments */
-    Vect_open_new(&Out, opt.output->answer, Vect_is_3d(&In));
+    if (Vect_open_new(&Out, opt.output->answer, Vect_is_3d(&In)) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"),
+			opt.output->answer);
+
     Vect_copy_head_data(&In, &Out);
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);

Modified: grass/branches/releasebranch_7_0/vector/v.to.rast/support.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.to.rast/support.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.to.rast/support.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -119,7 +119,8 @@
     Rast_init_colors(&colors);
 
     /* open vector map and database driver */
-    Vect_open_old(&Map, vector_map, "");
+    if (Vect_open_old(&Map, vector_map, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), vector_map);
 
     db_CatValArray_init(&cvarr);
     if ((Fi = Vect_get_field(&Map, field)) == NULL)
@@ -277,7 +278,8 @@
 
 	    /* open vector map and database driver */
 	    Vect_set_open_level(1);
-	    Vect_open_old(&Map, vector_map, G_find_vector2(vector_map, ""));
+	    if (Vect_open_old(&Map, vector_map, G_find_vector2(vector_map, "")) < 0)
+		G_fatal_error(_("Unable to open vector map <%s>"), vector_map);
 
 	    db_CatValArray_init(&cvarr);
 	    if (!(Fi = Vect_get_field(&Map, field)))
@@ -428,7 +430,9 @@
 
 		/* open vector map and database driver */
 		Vect_set_open_level(1);
-		Vect_open_old(&Map, vector_map, G_find_vector2(vector_map, ""));
+		if (Vect_open_old(&Map, vector_map, G_find_vector2(vector_map, "")) < 0)
+		    G_fatal_error(_("Unable to open vector map <%s>"),
+				    vector_map);
 
 		db_CatValArray_init(&cvarr);
 		if (!(Fi = Vect_get_field(&Map, field)))

Modified: grass/branches/releasebranch_7_0/vector/v.to.rast/vect2rast.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.to.rast/vect2rast.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.to.rast/vect2rast.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -35,7 +35,9 @@
 
     G_verbose_message(_("Loading data..."));
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, vector_map, "", field_name);
+    if (Vect_open_old2(&Map, vector_map, "", field_name) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), vector_map);
+
     field = Vect_get_field_number(&Map, field_name);
 
     if (field > 0)

Modified: grass/branches/releasebranch_7_0/vector/v.to.rast3/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.to.rast3/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.to.rast3/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -69,7 +69,9 @@
     Rast3d_get_window(&region);
 
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, in_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&Map, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
+
     field = Vect_get_field_number(&Map, field_opt->answer);
 
     db_CatValArray_init(&cvarr);

Modified: grass/branches/releasebranch_7_0/vector/v.transform/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.transform/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.transform/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -174,7 +174,8 @@
     Vect_check_input_output_name(vold->answer, vnew->answer, G_FATAL_EXIT);
 
     /* open input vector */
-    Vect_open_old2(&Old, vold->answer, "", field_opt->answer);
+    if (Vect_open_old2(&Old, vold->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), vold->answer);
 
     field = Vect_get_field_number(&Old, field_opt->answer);
     if (field < 1 && columns->answer) {
@@ -241,7 +242,8 @@
 	out3d = WITH_Z;
 
     /* open output vector */
-    Vect_open_new(&New, vnew->answer, out3d);
+    if (Vect_open_new(&New, vnew->answer, out3d) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), vnew->answer);
 
     /* copy and set header */
     Vect_copy_head_data(&Old, &New);

Modified: grass/branches/releasebranch_7_0/vector/v.type/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.type/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.type/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -127,7 +127,9 @@
 
     /* open input vector */
     Vect_set_open_level(1);
-    Vect_open_old2(&In, in_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&In, in_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), in_opt->answer);
+
     field = Vect_get_field_number(&In, field_opt->answer);
     
     if (0 > Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&In))) {

Modified: grass/branches/releasebranch_7_0/vector/v.univar/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.univar/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.univar/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -154,7 +154,9 @@
 
     /* open input vector */
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, map_opt->answer, "", field_opt->answer);
+    if (Vect_open_old2(&Map, map_opt->answer, "", field_opt->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), map_opt->answer);
+
     ofield = Vect_get_field_number(&Map, field_opt->answer);
     
     if ((otype & GV_POINT) && Vect_get_num_primitives(&Map, GV_POINT) == 0) {

Modified: grass/branches/releasebranch_7_0/vector/v.vect.stats/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.vect.stats/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.vect.stats/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -242,7 +242,8 @@
 	G_fatal_error(_("Vector map <%s> not found"), point_opt->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&PIn, point_opt->answer, mapset);
+    if (Vect_open_old(&PIn, point_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), point_opt->answer);
 
     /* Open areas vector */
     if ((mapset = G_find_vector2(area_opt->answer, "")) == NULL)
@@ -252,7 +253,8 @@
 		      area_opt->answer);
 
     Vect_set_open_level(2);
-    Vect_open_old(&AIn, area_opt->answer, mapset);
+    if (Vect_open_old(&AIn, area_opt->answer, mapset) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), area_opt->answer);
 
     method = -1;
     use_catno = 0;

Modified: grass/branches/releasebranch_7_0/vector/v.vol.rst/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.vol.rst/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.vol.rst/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -558,7 +558,8 @@
     }
 
     Vect_set_open_level(1);
-    Vect_open_old(&In, input, "");
+    if (Vect_open_old(&In, input, "") < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), input);
 
     if (!Vect_is_3d(&In))
 	G_warning(_("Vector is not 3D"));
@@ -576,10 +577,13 @@
 	Cats = Vect_new_cats_struct();
 	db_init_string(&sql);
 
-	if (devi != NULL)
-	    Vect_open_new(&Map, devi, 1);
-	else
-	    Vect_open_new(&Map, cvdev, 1);
+	if (devi != NULL) {
+	    if (Vect_open_new(&Map, devi, 1) < 0)
+		G_fatal_error(_("Unable to create vector map <%s>"), devi);
+	} else {
+	    if (Vect_open_new(&Map, cvdev, 1) < 0)
+		G_fatal_error(_("Unable to create vector map <%s>"), cvdev);
+	}
 	Vect_hist_command(&Map);
 	f = Vect_default_field_info(&Map, 1, NULL, GV_1TABLE);
 	Vect_map_add_dblink(&Map, 1, NULL, f->table, GV_KEY_COLUMN, f->database,

Modified: grass/branches/releasebranch_7_0/vector/v.voronoi/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.voronoi/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.voronoi/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -191,7 +191,8 @@
 
     /* open files */
     Vect_set_open_level(2);
-    Vect_open_old2(&In, opt.in->answer, "", opt.field->answer);
+    if (Vect_open_old2(&In, opt.in->answer, "", opt.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), opt.in->answer);
 
     Field = Vect_get_field_number(&In, opt.field->answer);
     
@@ -209,7 +210,8 @@
     else
 	readsites();
 
-    Vect_open_new(&Out, opt.out->answer, 0);
+    if (Vect_open_new(&Out, opt.out->answer, 0) < 0)
+	G_fatal_error(_("Unable to create vector map <%s>"), opt.out->answer);
 
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);

Modified: grass/branches/releasebranch_7_0/vector/v.what.rast/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.what.rast/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.what.rast/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -124,9 +124,10 @@
 
     /* Open vector */
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, opt.vect->answer,
+    if (Vect_open_old2(&Map, opt.vect->answer,
 		   print_flag->answer ? "" : G_mapset(),
-		   opt.field->answer);
+		   opt.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), opt.vect->answer);
 
     field = Vect_get_field_number(&Map, opt.field->answer);
 

Modified: grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c	2015-01-12 11:17:42 UTC (rev 64074)
+++ grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c	2015-01-12 11:19:08 UTC (rev 64075)
@@ -109,7 +109,8 @@
 
     /* Open vector */
     Vect_set_open_level(2);
-    Vect_open_old2(&Map, opt.vect->answer, "", opt.field->answer);
+    if (Vect_open_old2(&Map, opt.vect->answer, "", opt.field->answer) < 0)
+	G_fatal_error(_("Unable to open vector map <%s>"), opt.vect->answer);
 
     field = Vect_get_field_number(&Map, opt.field->answer);
 



More information about the grass-commit mailing list