浏览代码

update several modules: G_make_location() doesn't call G_fatal_error()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55611 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父节点
当前提交
ab75d039bf
共有 4 个文件被更改,包括 18 次插入9 次删除
  1. 3 3
      general/g.proj/create.c
  2. 5 2
      raster/r.in.gdal/main.c
  3. 5 2
      vector/v.in.lidar/main.c
  4. 5 2
      vector/v.in.ogr/main.c

+ 3 - 3
general/g.proj/create.c

@@ -10,14 +10,14 @@ void create_location(char *location)
 {
     int ret;
 
-    ret = G__make_location(location, &cellhd, projinfo, projunits, NULL);
+    ret = G_make_location(location, &cellhd, projinfo, projunits);
     if (ret == 0)
 	G_message(_("Location <%s> created"), location);
     else if (ret == -1)
 	G_fatal_error(_("Unable to create location <%s>: %s"),
-		    location, strerror(errno));
+                      location, strerror(errno));
     else if (ret == -2)
-	G_fatal_error(_("Unable to create projection files: %s"),
+        G_fatal_error(_("Unable to create projection files: %s"),
 		    strerror(errno));
     else
 	/* Shouldn't happen */

+ 5 - 2
raster/r.in.gdal/main.c

@@ -344,8 +344,11 @@ int main(int argc, char *argv[])
 			    "format; cannot create new location."));
 	}
 	else {
-	    G_make_location(parm.outloc->answer, &cellhd,
-			    proj_info, proj_units, NULL);
+            if (0 != G_make_location(parm.outloc->answer, &cellhd,
+                                     proj_info, proj_units)) {
+                G_fatal_error(_("Unable to create new location <%s>"),
+                              parm.outloc->answer);
+            }
 	    G_message(_("Location <%s> created"), parm.outloc->answer);
 	}
 

+ 5 - 2
vector/v.in.lidar/main.c

@@ -339,8 +339,11 @@ int main(int argc, char *argv[])
 			    "format; cannot create new location."));
 	}
 	else {
-	    G_make_location(outloc_opt->answer, &cellhd,
-			    proj_info, proj_units, NULL);
+            if (0 != G_make_location(outloc_opt->answer, &cellhd,
+                                     proj_info, proj_units)) {
+                G_fatal_error(_("Unable to create new location <%s>"),
+                              outloc_opt->answer);
+            }
 	    G_message(_("Location <%s> created"), outloc_opt->answer);
 	}
 

+ 5 - 2
vector/v.in.ogr/main.c

@@ -614,8 +614,11 @@ int main(int argc, char *argv[])
 			    "format; cannot create new location."));
 	}
 	else {
-	    G_make_location(param.outloc->answer, &cellhd,
-			    proj_info, proj_units, NULL);
+            if (0 != G_make_location(param.outloc->answer, &cellhd,
+                                     proj_info, proj_units)) {
+                G_fatal_error(_("Unable to create new location <%s>"),
+                              param.outloc->answer);
+            }
 	    G_message(_("Location <%s> created"), param.outloc->answer);
 	}