[GRASS-SVN] r50522 - grass/trunk/vector/v.info

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 28 07:26:06 EST 2012


Author: martinl
Date: 2012-01-28 04:26:06 -0800 (Sat, 28 Jan 2012)
New Revision: 50522

Modified:
   grass/trunk/vector/v.info/print.c
Log:
v.info: fix map type detection also for shell style output


Modified: grass/trunk/vector/v.info/print.c
===================================================================
--- grass/trunk/vector/v.info/print.c	2012-01-28 12:02:07 UTC (rev 50521)
+++ grass/trunk/vector/v.info/print.c	2012-01-28 12:26:06 UTC (rev 50522)
@@ -167,7 +167,12 @@
 
 void print_shell(const struct Map_info *Map)
 {
-    if (Vect_maptype(Map) & (GV_FORMAT_OGR | GV_FORMAT_OGR_DIRECT)) {
+    int map_type;
+
+    map_type = Vect_maptype(Map);
+    
+    if (map_type == GV_FORMAT_OGR ||
+	map_type == GV_FORMAT_OGR_DIRECT) {
 	fprintf(stdout, "ogr_layer=%s\n",
 		Vect_get_ogr_layer_name(Map));
 	fprintf(stdout, "ogr_dsn=%s\n",
@@ -189,7 +194,8 @@
     fprintf(stdout, "scale=1:%d\n",
 	    Vect_get_scale(Map));
     
-    if (Vect_maptype(Map) & (GV_FORMAT_OGR | GV_FORMAT_OGR_DIRECT)) {	
+    if (map_type == GV_FORMAT_OGR ||
+	map_type == GV_FORMAT_OGR_DIRECT) {
 	fprintf(stdout, "format=%s,%s\n",
 		Vect_maptype_info(Map), Vect_get_ogr_format_info(Map));
     }



More information about the grass-commit mailing list