Преглед на файлове

Indent

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34914 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements преди 16 години
родител
ревизия
38f9025b89
променени са 2 файла, в които са добавени 21 реда и са изтрити 19 реда
  1. 13 11
      raster/r.out.gdal/export_band.c
  2. 8 8
      raster/r.out.gdal/main.c

+ 13 - 11
raster/r.out.gdal/export_band.c

@@ -1,3 +1,4 @@
+
 /****************************************************************************
 /****************************************************************************
 *
 *
 * MODULE:       r.out.gdal
 * MODULE:       r.out.gdal
@@ -62,8 +63,8 @@ int export_band(GDALDatasetH hMEMDS, int band, const char *name,
 	G_get_fp_range_min_max(&sRange, &dfCellMin, &dfCellMax);
 	G_get_fp_range_min_max(&sRange, &dfCellMin, &dfCellMax);
     }
     }
 
 
-/* TODO: if data range exceeds export TYPE range exit with an error.
-   Otherwise the module doesn't know what to write for those values */
+    /* TODO: if data range exceeds export TYPE range exit with an error.
+       Otherwise the module doesn't know what to write for those values */
 
 
     /* suppress useless warnings */
     /* suppress useless warnings */
     CPLPushErrorHandler(CPLQuietErrorHandler);
     CPLPushErrorHandler(CPLQuietErrorHandler);
@@ -106,22 +107,23 @@ int export_band(GDALDatasetH hMEMDS, int band, const char *name,
 	G_debug(3, "dfCellMin: %f, dfCellMax: %f, maxcolor: %d", dfCellMin,
 	G_debug(3, "dfCellMin: %f, dfCellMax: %f, maxcolor: %d", dfCellMin,
 		dfCellMax, maxcolor);
 		dfCellMax, maxcolor);
 
 
-	if(!suppress_main_colortable) {
+	if (!suppress_main_colortable) {
 	    hCT = GDALCreateColorTable(GPI_RGB);
 	    hCT = GDALCreateColorTable(GPI_RGB);
 
 
 	    for (iColor = 0; iColor <= maxcolor; iColor++) {
 	    for (iColor = 0; iColor <= maxcolor; iColor++) {
 		int nRed, nGreen, nBlue;
 		int nRed, nGreen, nBlue;
 		GDALColorEntry sColor;
 		GDALColorEntry sColor;
 
 
-		if (G_get_color(iColor, &nRed, &nGreen, &nBlue, &sGrassColors)) {
+		if (G_get_color
+		    (iColor, &nRed, &nGreen, &nBlue, &sGrassColors)) {
 		    sColor.c1 = nRed;
 		    sColor.c1 = nRed;
 		    sColor.c2 = nGreen;
 		    sColor.c2 = nGreen;
 		    sColor.c3 = nBlue;
 		    sColor.c3 = nBlue;
 		    sColor.c4 = 255;
 		    sColor.c4 = 255;
 
 
 		    G_debug(3,
 		    G_debug(3,
-			"G_get_color: Y, rcount %d, nRed %d, nGreen %d, nBlue %d",
-			rcount, nRed, nGreen, nBlue);
+			    "G_get_color: Y, rcount %d, nRed %d, nGreen %d, nBlue %d",
+			    rcount, nRed, nGreen, nBlue);
 		    GDALSetColorEntry(hCT, iColor, &sColor);
 		    GDALSetColorEntry(hCT, iColor, &sColor);
 		}
 		}
 		else {
 		else {
@@ -131,8 +133,8 @@ int export_band(GDALDatasetH hMEMDS, int band, const char *name,
 		    sColor.c4 = 0;
 		    sColor.c4 = 0;
 
 
 		    G_debug(3,
 		    G_debug(3,
-			"G_get_color: N, rcount %d, nRed %d, nGreen %d, nBlue %d",
-			rcount, nRed, nGreen, nBlue);
+			    "G_get_color: N, rcount %d, nRed %d, nGreen %d, nBlue %d",
+			    rcount, nRed, nGreen, nBlue);
 		    GDALSetColorEntry(hCT, iColor, &sColor);
 		    GDALSetColorEntry(hCT, iColor, &sColor);
 		}
 		}
 	    }
 	    }
@@ -160,11 +162,11 @@ int export_band(GDALDatasetH hMEMDS, int band, const char *name,
 	    GDALSetMetadataItem(hBand, key, value, NULL);
 	    GDALSetMetadataItem(hBand, key, value, NULL);
 	}
 	}
 
 
-	if(!suppress_main_colortable)
+	if (!suppress_main_colortable)
 	    GDALSetRasterColorTable(hBand, hCT);
 	    GDALSetRasterColorTable(hBand, hCT);
     }
     }
     else {
     else {
-	if(!suppress_main_colortable) {
+	if (!suppress_main_colortable) {
 	    hCT = GDALCreateColorTable(GPI_RGB);
 	    hCT = GDALCreateColorTable(GPI_RGB);
 	    GDALSetMetadataItem(hBand, "COLOR_TABLE_RULES_COUNT", "0", NULL);
 	    GDALSetMetadataItem(hBand, "COLOR_TABLE_RULES_COUNT", "0", NULL);
 	    GDALSetRasterColorTable(hBand, hCT);
 	    GDALSetRasterColorTable(hBand, hCT);
@@ -284,7 +286,7 @@ int export_band(GDALDatasetH hMEMDS, int band, const char *name,
 	}
 	}
     }
     }
 
 
-    if (n_nulls > 0) {  /* TODO: && nodata_param NOT specified */
+    if (n_nulls > 0) {		/* TODO: && nodata_param NOT specified */
 	if (maptype == CELL_TYPE)
 	if (maptype == CELL_TYPE)
 	    G_warning(_("Input raster map contains cells with NULL-value (no-data). "
 	    G_warning(_("Input raster map contains cells with NULL-value (no-data). "
 		       "The value %d was used to represent no-data values in the input map. "
 		       "The value %d was used to represent no-data values in the input map. "

+ 8 - 8
raster/r.out.gdal/main.c

@@ -189,8 +189,7 @@ int main(int argc, char *argv[])
     metaopt = G_define_option();
     metaopt = G_define_option();
     metaopt->key = "metaopt";
     metaopt->key = "metaopt";
     metaopt->type = TYPE_STRING;
     metaopt->type = TYPE_STRING;
-    metaopt->label =
-	_("Metadata key(s) and value(s) to include");
+    metaopt->label = _("Metadata key(s) and value(s) to include");
     metaopt->description =
     metaopt->description =
 	_("In the form of \"META-TAG=VALUE\", separate multiple entries "
 	_("In the form of \"META-TAG=VALUE\", separate multiple entries "
 	  "with a comma. Not supported by all output format drivers.");
 	  "with a comma. Not supported by all output format drivers.");
@@ -376,7 +375,7 @@ int main(int argc, char *argv[])
 		    nodataval = (double)(short)0x8000;
 		    nodataval = (double)(short)0x8000;
 		}
 		}
 		else {
 		else {
-		    datatype = GDT_Int32;  /* need to fine tune this more? */
+		    datatype = GDT_Int32;	/* need to fine tune this more? */
 		    nodataval = (double)(int)0x80000000;
 		    nodataval = (double)(int)0x80000000;
 		}
 		}
 	    }
 	    }
@@ -388,10 +387,10 @@ int main(int argc, char *argv[])
 	nodataval = atof(nodataopt->answer);
 	nodataval = atof(nodataopt->answer);
     }
     }
 
 
-/* TODO:
-    if( nodata_used && nodataval is out_of_type_range )
-	G_fatal_error(_("No-data value out of range for type %s"), type->answer);
-*/
+    /* TODO:
+       if( nodata_used && nodataval is out_of_type_range )
+       G_fatal_error(_("No-data value out of range for type %s"), type->answer);
+     */
 
 
     G_debug(3, "Input map datatype=%s\n",
     G_debug(3, "Input map datatype=%s\n",
 	    (maptype == CELL_TYPE ? "CELL" :
 	    (maptype == CELL_TYPE ? "CELL" :
@@ -472,7 +471,8 @@ int main(int argc, char *argv[])
 	}
 	}
 	if (export_band
 	if (export_band
 	    (hCurrDS, band + 1, ref.file[band].name, ref.file[band].mapset,
 	    (hCurrDS, band + 1, ref.file[band].name, ref.file[band].mapset,
-	     &cellhead, maptype, nodataval, nodataopt->key, flag_c->answer) < 0)
+	     &cellhead, maptype, nodataval, nodataopt->key,
+	     flag_c->answer) < 0)
 	    G_warning(_("Unable to export raster map <%s>"),
 	    G_warning(_("Unable to export raster map <%s>"),
 		      ref.file[band].name);
 		      ref.file[band].name);
     }
     }