[GRASS-SVN] r36622 - grass/branches/develbranch_6/vector/v.in.dxf

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


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

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

Modified: grass/branches/develbranch_6/vector/v.in.dxf/write_vect.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/write_vect.c	2009-04-08 03:08:19 UTC (rev 36621)
+++ grass/branches/develbranch_6/vector/v.in.dxf/write_vect.c	2009-04-08 03:09:19 UTC (rev 36622)
@@ -118,10 +118,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
@@ -129,6 +130,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