浏览代码

g.region: print projection and zone info in shell script output (it's useful when building GRASS_REGION string)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65224 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年之前
父节点
当前提交
b1647d32d7
共有 1 个文件被更改,包括 6 次插入17 次删除
  1. 6 17
      general/g.region/printwindow.c

+ 6 - 17
general/g.region/printwindow.c

@@ -83,23 +83,12 @@ void print_window(struct Cell_head *window, int print_flag)
 	prj = G_database_projection_name();
 	if (!prj)
 	    prj = "** unknown **";
-	/*
-	   please remove before GRASS 7 released
-	   backward compatibility issue
-
-	   if (print_flag & PRINT_SH)
-	   {
-	   fprintf(stdout, "projection=%d\n", window->proj);
-	   fprintf(stdout, "zone=%d\n", window->zone);
-	   }
-	   else
-	   {
-	   fprintf(stdout, "%-*s: %d (%s)\n", width, "projection", window->proj, prj);
-	   fprintf(stdout, "%-*s: %d\n", width, "zone", window->zone);
-	   }
-	 */
-
-	if (!(print_flag & PRINT_SH)) {
+
+	if (print_flag & PRINT_SH) {
+            fprintf(stdout, "projection=%d\n", window->proj);
+            fprintf(stdout, "zone=%d\n", window->zone);
+        }
+        else {
 	    fprintf(stdout, "%-*s %d (%s)\n", width, "projection:",
 		    window->proj, prj);
 	    fprintf(stdout, "%-*s %d\n", width, "zone:", window->zone);