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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 25 06:38:31 EDT 2011


Author: martinl
Date: 2011-08-25 03:38:31 -0700 (Thu, 25 Aug 2011)
New Revision: 47877

Modified:
   grass/trunk/vector/v.external/main.c
Log:
v.external: message cosmetics


Modified: grass/trunk/vector/v.external/main.c
===================================================================
--- grass/trunk/vector/v.external/main.c	2011-08-25 10:34:44 UTC (rev 47876)
+++ grass/trunk/vector/v.external/main.c	2011-08-25 10:38:31 UTC (rev 47877)
@@ -4,16 +4,15 @@
  * MODULE:       v.external
  * 
  * AUTHOR(S):    Radim Blazek
- *               Updated by Martin Landa <landa.martin gmail.com> (2009)
+ *               Updated to GRASS 7 by Martin Landa <landa.martin gmail.com>
  *               
- * PURPOSE:      Create a new vector as a link to OGR layer (read-only)
+ * PURPOSE:      Create a new vector as a link to OGR layer
  *               
  * COPYRIGHT:    (C) 2003-2011 by the GRASS Development Team
  *
- *               This program is free software under the 
- *               GNU General Public License (>=v2). 
- *               Read the file COPYING that comes with GRASS
- *               for details.
+ *               This program is free software under the GNU General
+ *               Public License (>=v2). Read the file COPYING that
+ *               comes with GRASS for details.
  *
  **************************************************************/
 
@@ -25,7 +24,8 @@
 #include <grass/vector.h>
 #include <grass/glocale.h>
 
-#include "ogr_api.h"
+#include <ogr_api.h>
+
 #include "local_proto.h"
 
 int main(int argc, char *argv[])
@@ -89,9 +89,10 @@
     Vect_hist_command(&Map);
     Vect_close(&Map);
     
-    /* Vect_open_new created 'head', 'coor', 'hist' -> delete 'coor' and create 'frmt' */
-    sprintf(buf, "%s/%s/vector/%s/coor", G_location_path(), G_mapset(),
-	    output);
+    /* Vect_open_new created 'head', 'coor', 'hist'
+       -> delete 'coor' and create 'frmt' */
+    sprintf(buf, "%s/%s/%s/%s/coor", G_location_path(), G_mapset(),
+	    GV_DIRECTORY, output);
     G_debug(2, "Delete '%s'", buf);
     if (unlink(buf) == -1) {
 	Vect_delete(output);
@@ -103,7 +104,7 @@
     fd = G_fopen_new(buf, GV_FRMT_ELEMENT);
     if (fd == NULL) {
 	Vect_delete(output);
-	G_fatal_error("Unable to open file '%s'", buf);
+	G_fatal_error("Unable to create file '%s'", buf);
     }
     
     fprintf(fd, "FORMAT: ogr\n");



More information about the grass-commit mailing list