[GRASS-SVN] r40180 - grass/branches/develbranch_6/vector/v.in.ascii

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 2 05:29:03 EST 2010


Author: hamish
Date: 2010-01-02 05:29:02 -0500 (Sat, 02 Jan 2010)
New Revision: 40180

Modified:
   grass/branches/develbranch_6/vector/v.in.ascii/in.c
Log:
in=- reads from stdin (forward compatibility with grass7)

Modified: grass/branches/develbranch_6/vector/v.in.ascii/in.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.ascii/in.c	2010-01-02 06:40:59 UTC (rev 40179)
+++ grass/branches/develbranch_6/vector/v.in.ascii/in.c	2010-01-02 10:29:02 UTC (rev 40180)
@@ -199,7 +199,7 @@
     if (xcol+1 < 1 || ycol+1 < 1 || zcol+1 < 0 || catcol+1 < 0)
 	G_fatal_error(_("Column numbers must not be negative"));
 
-    if (old->answer != NULL) {
+    if ( (old->answer != NULL) && (strcmp(old->answer, "-") != 0) ) {
 	if ((ascii = fopen(old->answer, "r")) == NULL) {
 	    G_fatal_error(_("Unable to open ASCII file <%s>"), old->answer);
 	}



More information about the grass-commit mailing list