[GRASS-SVN] r51159 - grass/trunk/vector/v.external.out

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 26 02:52:14 EDT 2012


Author: martinl
Date: 2012-03-25 23:52:14 -0700 (Sun, 25 Mar 2012)
New Revision: 51159

Modified:
   grass/trunk/vector/v.external.out/status.c
Log:
v.external.out: print `format` explicitly for PostGIS links
		print all creation options in shell script style output


Modified: grass/trunk/vector/v.external.out/status.c
===================================================================
--- grass/trunk/vector/v.external.out/status.c	2012-03-23 21:16:11 UTC (rev 51158)
+++ grass/trunk/vector/v.external.out/status.c	2012-03-26 06:52:14 UTC (rev 51159)
@@ -24,11 +24,11 @@
 
 void print_key_value(const char *key, const char *value, int shell)
 {
-    if (!value)
+    if (!value && !shell)
 	return;
     
     if (shell)
-	fprintf(stdout, "%s=%s\n", key, value);
+	fprintf(stdout, "%s=%s\n", key, value ? value : "");
     else 
 	fprintf(stdout, "%s: %s\n", key, value);
 }
@@ -71,6 +71,9 @@
 	    G_fatal_error(_("PG connection info (conninfo) not defined"));
 	print_key_value("conninfo", p, shell);
 
+	/* format (hardcoded) */
+	print_key_value("format", "PostGIS", shell);
+
 	/* schema */
 	p = G_find_key_value("schema", key_val);
 	print_key_value("schema", p, shell);



More information about the grass-commit mailing list