[GRASS-SVN] r72258 - in grass/trunk: raster/r.external raster/r.in.gdal vector/v.external vector/v.in.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 21 00:40:03 PST 2018


Author: mmetz
Date: 2018-02-21 00:40:03 -0800 (Wed, 21 Feb 2018)
New Revision: 72258

Modified:
   grass/trunk/raster/r.external/proj.c
   grass/trunk/raster/r.in.gdal/proj.c
   grass/trunk/vector/v.external/proj.c
   grass/trunk/vector/v.in.ogr/proj.c
Log:
r.in.gdal/r.external/v.in.ogr/v.external: sync projection check

Modified: grass/trunk/raster/r.external/proj.c
===================================================================
--- grass/trunk/raster/r.external/proj.c	2018-02-20 20:51:54 UTC (rev 72257)
+++ grass/trunk/raster/r.external/proj.c	2018-02-21 08:40:03 UTC (rev 72258)
@@ -254,19 +254,21 @@
 				proj_units->value[i_value]);
 		}
 	    }
-	    strcat(error_msg,
-		   _("\nIn case of no significant differences in the projection definitions,"
-		     " use the -o flag to ignore them and use"
-		     " current location definition.\n"));
-	    strcat(error_msg,
-		   _("Consider generating a new location from the input dataset using "
-		    "the 'location' parameter.\n"));
+            if (!check_only) {
+		strcat(error_msg,
+		       _("\nIn case of no significant differences in the projection definitions,"
+			 " use the -o flag to ignore them and use"
+			 " current location definition.\n"));
+		strcat(error_msg,
+		       _("Consider generating a new location from the input dataset using "
+			"the 'location' parameter.\n"));
+	    }
 
 	    if (check_only)
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		GDALClose(hDS);
 		exit(EXIT_FAILURE);

Modified: grass/trunk/raster/r.in.gdal/proj.c
===================================================================
--- grass/trunk/raster/r.in.gdal/proj.c	2018-02-20 20:51:54 UTC (rev 72257)
+++ grass/trunk/raster/r.in.gdal/proj.c	2018-02-21 08:40:03 UTC (rev 72258)
@@ -268,7 +268,7 @@
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		GDALClose(hDS);
 		exit(EXIT_FAILURE);

Modified: grass/trunk/vector/v.external/proj.c
===================================================================
--- grass/trunk/vector/v.external/proj.c	2018-02-20 20:51:54 UTC (rev 72257)
+++ grass/trunk/vector/v.external/proj.c	2018-02-21 08:40:03 UTC (rev 72258)
@@ -347,19 +347,21 @@
 				proj_units->value[i_value]);
 		}
 	    }
-	    strcat(error_msg,
-		   _("\nIn case of no significant differences in the projection definitions,"
-		     " use the -o flag to ignore them and use"
-		     " current location definition.\n"));
-	    strcat(error_msg,
-		   _("Consider generating a new location from the input dataset using "
-		    "the 'location' parameter.\n"));
+            if (!check_only) {
+		strcat(error_msg,
+		       _("\nIn case of no significant differences in the projection definitions,"
+			 " use the -o flag to ignore them and use"
+			 " current location definition.\n"));
+		strcat(error_msg,
+		       _("Consider generating a new location from the input dataset using "
+			"the 'location' parameter.\n"));
+	    }
 
 	    if (check_only)
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		ds_close(hDS);
 		exit(EXIT_FAILURE);

Modified: grass/trunk/vector/v.in.ogr/proj.c
===================================================================
--- grass/trunk/vector/v.in.ogr/proj.c	2018-02-20 20:51:54 UTC (rev 72257)
+++ grass/trunk/vector/v.in.ogr/proj.c	2018-02-21 08:40:03 UTC (rev 72258)
@@ -462,19 +462,21 @@
 				proj_units->value[i_value]);
 		}
 	    }
-	    strcat(error_msg,
-		   _("\nIn case of no significant differences in the projection definitions,"
-		     " use the -o flag to ignore them and use"
-		     " current location definition.\n"));
-	    strcat(error_msg,
-		   _("Consider generating a new location from the input dataset using "
-		    "the 'location' parameter.\n"));
+            if (!check_only) {
+		strcat(error_msg,
+		       _("\nIn case of no significant differences in the projection definitions,"
+			 " use the -o flag to ignore them and use"
+			 " current location definition.\n"));
+		strcat(error_msg,
+		       _("Consider generating a new location from the input dataset using "
+			"the 'location' parameter.\n"));
+	    }
 
 	    if (check_only)
 		msg_fn = G_warning;
 	    else
 		msg_fn = G_fatal_error;
-	    msg_fn(error_msg);
+	    msg_fn("%s", error_msg);
 	    if (check_only) {
 		ds_close(hDS);
 		exit(EXIT_FAILURE);



More information about the grass-commit mailing list