[GRASS-SVN] r40641 - grass/branches/releasebranch_6_4/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 25 02:24:29 EST 2010
Author: neteler
Date: 2010-01-25 02:24:25 -0500 (Mon, 25 Jan 2010)
New Revision: 40641
Modified:
grass/branches/releasebranch_6_4/lib/gis/gdal.c
Log:
formatted code with indent rules
Modified: grass/branches/releasebranch_6_4/lib/gis/gdal.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/gdal.c 2010-01-25 05:49:24 UTC (rev 40640)
+++ grass/branches/releasebranch_6_4/lib/gis/gdal.c 2010-01-25 07:24:25 UTC (rev 40641)
@@ -23,16 +23,18 @@
# define CPL_STDCALL
#endif
-static void CPL_STDCALL (*pGDALAllRegister)(void);
-static void CPL_STDCALL (*pGDALClose)(GDALDatasetH);
-static GDALRasterBandH CPL_STDCALL (*pGDALGetRasterBand)(GDALDatasetH, int);
-static GDALDatasetH CPL_STDCALL (*pGDALOpen)(
- const char *pszFilename, GDALAccess eAccess);
-static CPLErr CPL_STDCALL (*pGDALRasterIO)(
- GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
- int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
- void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
- int nPixelSpace, int nLineSpace);
+static void CPL_STDCALL(*pGDALAllRegister) (void);
+static void CPL_STDCALL(*pGDALClose) (GDALDatasetH);
+static GDALRasterBandH CPL_STDCALL(*pGDALGetRasterBand) (GDALDatasetH, int);
+static GDALDatasetH CPL_STDCALL(*pGDALOpen) (const char *pszFilename,
+ GDALAccess eAccess);
+static CPLErr CPL_STDCALL(*pGDALRasterIO) (GDALRasterBandH hRBand,
+ GDALRWFlag eRWFlag, int nDSXOff,
+ int nDSYOff, int nDSXSize,
+ int nDSYSize, void *pBuffer,
+ int nBXSize, int nBYSize,
+ GDALDataType eBDataType,
+ int nPixelSpace, int nLineSpace);
#if GDAL_DYNAMIC
# if defined(__unix) && !defined(__unix__)
@@ -70,7 +72,7 @@
static void load_library(void)
{
- static const char * const candidates[] = {
+ static const char *const candidates[] = {
# ifdef __unix__
"libgdal.1.1.so",
"gdal.1.0.so",
@@ -102,22 +104,22 @@
{
load_library();
- pGDALAllRegister = get_symbol("GDALAllRegister");
- pGDALOpen = get_symbol("GDALOpen");
- pGDALClose = get_symbol("GDALClose");
+ pGDALAllRegister = get_symbol("GDALAllRegister");
+ pGDALOpen = get_symbol("GDALOpen");
+ pGDALClose = get_symbol("GDALClose");
pGDALGetRasterBand = get_symbol("GDALGetRasterBand");
- pGDALRasterIO = get_symbol("GDALRasterIO");
+ pGDALRasterIO = get_symbol("GDALRasterIO");
}
#else /* GDAL_DYNAMIC */
static void init_gdal(void)
{
- pGDALAllRegister = &GDALAllRegister;
- pGDALOpen = &GDALOpen;
- pGDALClose = &GDALClose;
+ pGDALAllRegister = &GDALAllRegister;
+ pGDALOpen = &GDALOpen;
+ pGDALClose = &GDALClose;
pGDALGetRasterBand = &GDALGetRasterBand;
- pGDALRasterIO = &GDALRasterIO;
+ pGDALRasterIO = &GDALRasterIO;
}
#endif /* GDAL_DYNAMIC */
@@ -206,17 +208,17 @@
if (!initialized) {
init_gdal();
- (*pGDALAllRegister)();
+ (*pGDALAllRegister) ();
initialized = 1;
}
- data = (*pGDALOpen)(filename, GA_ReadOnly);
+ data = (*pGDALOpen) (filename, GA_ReadOnly);
if (!data)
return NULL;
- band = (*pGDALGetRasterBand)(data, band_num);
+ band = (*pGDALGetRasterBand) (data, band_num);
if (!band) {
- (*pGDALClose)(data);
+ (*pGDALClose) (data);
return NULL;
}
#endif
@@ -238,22 +240,20 @@
void G_close_gdal_link(struct GDAL_link *gdal)
{
#ifdef GDAL_LINK
- (*pGDALClose)(gdal->data);
+ (*pGDALClose) (gdal->data);
#endif
G_free(gdal->filename);
G_free(gdal);
}
#ifdef GDAL_LINK
-CPLErr G_gdal_raster_IO(
- GDALRasterBandH band, GDALRWFlag rw_flag,
- int x_off, int y_off, int x_size, int y_size,
- void *buffer, int buf_x_size, int buf_y_size, GDALDataType buf_type,
- int pixel_size, int line_size)
+CPLErr G_gdal_raster_IO(GDALRasterBandH band, GDALRWFlag rw_flag,
+ int x_off, int y_off, int x_size, int y_size,
+ void *buffer, int buf_x_size, int buf_y_size,
+ GDALDataType buf_type, int pixel_size, int line_size)
{
- return (*pGDALRasterIO)(
- band, rw_flag, x_off, y_off, x_size, y_size,
- buffer, buf_x_size, buf_y_size, buf_type,
- pixel_size, line_size);
+ return (*pGDALRasterIO) (band, rw_flag, x_off, y_off, x_size, y_size,
+ buffer, buf_x_size, buf_y_size, buf_type,
+ pixel_size, line_size);
}
#endif
More information about the grass-commit
mailing list