[GRASS-SVN] r36621 - grass/trunk/vector/v.in.dxf

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 7 23:08:19 EDT 2009


Author: hcho
Date: 2009-04-07 23:08:19 -0400 (Tue, 07 Apr 2009)
New Revision: 36621

Modified:
   grass/trunk/vector/v.in.dxf/write_vect.c
Log:
Don't change layer names

Modified: grass/trunk/vector/v.in.dxf/write_vect.c
===================================================================
--- grass/trunk/vector/v.in.dxf/write_vect.c	2009-04-08 02:43:14 UTC (rev 36620)
+++ grass/trunk/vector/v.in.dxf/write_vect.c	2009-04-08 03:08:19 UTC (rev 36621)
@@ -119,10 +119,11 @@
     return;
 }
 
-static int get_field_cat(struct Map_info *Map, char *field_name, int *field,
+static int get_field_cat(struct Map_info *Map, char *layer, int *field,
 			 int *cat)
 {
     int i, type;
+    char field_name[DXF_BUF_SIZE];
     char x = 0;
 
     /* make table name SQL compliant: Vect_default_field_info returns
@@ -130,6 +131,7 @@
      * Because layername is followed by mapname_, it (field_name here) can
      * start with [a-zA-Z0-9]. No need to change the first digit to 'x'.
      */
+    strcpy(field_name, layer);
     if (field_name[0] >= '0' && field_name[0] <= '9')
 	x = field_name[0];
     G_str_to_sql(field_name);



More information about the grass-commit mailing list