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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Apr 10 04:06:21 EDT 2009


Author: hcho
Date: 2009-04-10 04:06:21 -0400 (Fri, 10 Apr 2009)
New Revision: 36668

Modified:
   grass/trunk/vector/v.in.dxf/add_3dface.c
   grass/trunk/vector/v.in.dxf/add_line.c
   grass/trunk/vector/v.in.dxf/add_lwpolyline.c
   grass/trunk/vector/v.in.dxf/add_point.c
   grass/trunk/vector/v.in.dxf/add_polyline.c
   grass/trunk/vector/v.in.dxf/add_text.c
   grass/trunk/vector/v.in.dxf/layer_list.c
   grass/trunk/vector/v.in.dxf/main.c
   grass/trunk/vector/v.in.dxf/write_vect.c
Log:
indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4
-nbbo -nbc -nbfda -nbfde -ncdb -ncdw -nce -nfca -npcs -nprs
-npsl -nsc -nsob -saf -sai -saw -sbi0 -ss -ts8 -ut


Modified: grass/trunk/vector/v.in.dxf/add_3dface.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_3dface.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/add_3dface.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -95,6 +95,7 @@
 	case 70:		/* 3dface flag */
 	    dface_flag = atoi(dxf_buf);
 	    /* TODO: what does 'invisible' mean here? */
+
 	    /*******************************************************************
 	     Invisible edge flags (optional; default = 0):
 	     1 = First edge is invisible

Modified: grass/trunk/vector/v.in.dxf/add_line.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_line.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/add_line.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -78,7 +78,7 @@
 	}
     }
 
-    if (arr_size == 2)	/* have both start and stop */
+    if (arr_size == 2)		/* have both start and stop */
 	write_vect(Map, layer, "LINE", handle, "", arr_size, GV_LINE);
 
     return;

Modified: grass/trunk/vector/v.in.dxf/add_lwpolyline.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_lwpolyline.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/add_lwpolyline.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -60,6 +60,7 @@
 	    bulge = atof(dxf_buf);
 	    break;
 	case 70:		/* polyline flag */
+
 	    /*******************************************************************
 	     Polyline flag (bit-coded); default is 0:
 	     1 = Closed; 128 = Plinegen

Modified: grass/trunk/vector/v.in.dxf/add_point.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_point.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/add_point.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -64,7 +64,7 @@
 	 * ypnts[1] = ypnts[0];
 	 * zpnts[1] = zpnts[0];
 	 */
-        write_vect(Map, layer, "POINT", handle, "", 1, GV_POINT);
+	write_vect(Map, layer, "POINT", handle, "", 1, GV_POINT);
     }
 
     return;

Modified: grass/trunk/vector/v.in.dxf/add_polyline.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_polyline.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/add_polyline.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -51,6 +51,7 @@
 	    break;
 	case 70:		/* polyline flag */
 	    polyline_flag = atoi(dxf_buf);
+
 	    /*******************************************************************
 	     Polyline flag (bit-coded); default is 0:
 	     1 = This is a closed polyline (or a polygon mesh closed in
@@ -69,7 +70,8 @@
 	    if (polyline_flag & (8 | 16 | 32))
 		if (warn_flag70) {
 		    if (!flag_list)
-			G_warning(_("3-d data in dxf file. Polyline_flag: %d"),
+			G_warning(_
+				  ("3-d data in dxf file. Polyline_flag: %d"),
 				  polyline_flag);
 		    warn_flag70 = 0;
 		}
@@ -93,7 +95,7 @@
 		    return;
 
 		switch (code) {
-		case 5:		/* entity handle */
+		case 5:	/* entity handle */
 		    strcpy(handle, dxf_buf);
 		    break;
 		case 8:	/* layer name */
@@ -109,7 +111,8 @@
 			 * (flag_invert == 1 && is_layer_in_list == 1)
 			 * )
 			 */
-			if (opt_layers && flag_invert == is_layer_in_list(dxf_buf))
+			if (opt_layers &&
+			    flag_invert == is_layer_in_list(dxf_buf))
 			    return;
 			strcpy(layer, dxf_buf);
 			layer_flag = 1;
@@ -137,6 +140,7 @@
 		    break;
 		case 70:	/* vertex flag */
 		    vertex_flag = atoi(dxf_buf);
+
 	    /*******************************************************************
 	     Vertex flags:
 	     1 = Extra vertex created by curve-fitting
@@ -202,9 +206,11 @@
 			    zpnts[arr_size] = zpnts[0];
 			    arr_size++;
 			    if (flag_frame)
-				write_vect(Map, layer, "POLYFACE FRAME", handle, "", arr_size, GV_LINE);
+				write_vect(Map, layer, "POLYFACE FRAME",
+					   handle, "", arr_size, GV_LINE);
 			    else
-				write_vect(Map, layer, "POLYFACE", handle, "", arr_size, GV_FACE);
+				write_vect(Map, layer, "POLYFACE", handle, "",
+					   arr_size, GV_FACE);
 			    arr_size = 0;
 			}
 			mesh_pnts = 0;
@@ -240,7 +246,7 @@
 }
 
 static void write_pnts(struct Map_info *Map, char *layer, char *handle,
-		int polyline_flag, int zflag, int arr_size)
+		       int polyline_flag, int zflag, int arr_size)
 {
     /* done reading vertices */
     if (polyline_flag & 1) {	/* only dealing with polyline_flag = 1 */

Modified: grass/trunk/vector/v.in.dxf/add_text.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_text.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/add_text.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -113,9 +113,9 @@
 	ypnts[3] = ypnts[0] + (length * sin(theta));
 	zpnts[3] = zpnts[0];
 
-        write_vect(Map, layer, "TEXT", handle, "", 5, GV_LINE);
+	write_vect(Map, layer, "TEXT", handle, "", 5, GV_LINE);
 #endif
-        write_vect(Map, layer, "TEXT", handle, label, 1, GV_POINT);
+	write_vect(Map, layer, "TEXT", handle, label, 1, GV_POINT);
     }
 
     return;

Modified: grass/trunk/vector/v.in.dxf/layer_list.c
===================================================================
--- grass/trunk/vector/v.in.dxf/layer_list.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/layer_list.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -13,8 +13,9 @@
     layers[num_layers] = G_store(layer);
     G_str_to_lower(layers[num_layers]);
     if (print) {
-        fprintf(stdout, _("Layer %d: %s\n"), num_layers+1, layers[num_layers]);
-        fflush(stdout);
+	fprintf(stdout, _("Layer %d: %s\n"), num_layers + 1,
+		layers[num_layers]);
+	fflush(stdout);
     }
     num_layers++;
     layers[num_layers] = NULL;

Modified: grass/trunk/vector/v.in.dxf/main.c
===================================================================
--- grass/trunk/vector/v.in.dxf/main.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/main.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -123,19 +123,20 @@
     opt_layers = opt.layers->answers;
 
     if (flag_invert && !opt_layers)
-        G_fatal_error(_("Please specify list of layers to exclude"));
+	G_fatal_error(_("Please specify list of layers to exclude"));
 
     /* open DXF file */
     if (!(dxf = dxf_open(opt.input->answer)))
 	G_fatal_error(_("Unable to open DXF file <%s>"), opt.input->answer);
 
     if (flag_list)
-	G_verbose_message(_("Layer number: layer name / GRASS compliant name"));
+	G_verbose_message(_
+			  ("Layer number: layer name / GRASS compliant name"));
     else {
 	int i;
 
-	if (opt_layers){
-	    for(i=0; opt_layers[i]; i++)
+	if (opt_layers) {
+	    for (i = 0; opt_layers[i]; i++)
 		add_layer_to_list(opt_layers[i], 0);
 	}
 

Modified: grass/trunk/vector/v.in.dxf/write_vect.c
===================================================================
--- grass/trunk/vector/v.in.dxf/write_vect.c	2009-04-10 08:04:56 UTC (rev 36667)
+++ grass/trunk/vector/v.in.dxf/write_vect.c	2009-04-10 08:06:21 UTC (rev 36668)
@@ -49,8 +49,8 @@
 
 	if (handle) {
 	    if (strlen(handle) > 16) {
-		    G_warning(_("Entity handle truncated to 16 characters."));
-		    handle[16] = 0;
+		G_warning(_("Entity handle truncated to 16 characters."));
+		handle[16] = 0;
 	    }
 	    db_set_string(&str, handle);
 	    db_double_quote_string(&str);
@@ -148,7 +148,7 @@
 	x = field_name[0];
     G_str_to_sql(field_name);
     if (x)
-        field_name[0] = x;
+	field_name[0] = x;
 
     for (i = 0; i < num_fields; i++) {
 	/* field name already exists */



More information about the grass-commit mailing list