make astyle session
authorOlivier Courtin <olivier.courtin@camptocamp.com>
Sun, 21 Feb 2010 12:36:27 +0000 (12:36 +0000)
committerOlivier Courtin <olivier.courtin@camptocamp.com>
Sun, 21 Feb 2010 12:36:27 +0000 (12:36 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5274 b70326c6-7e19-0410-871a-916f4a2858ee

13 files changed:
extras/wkb_reader/readwkb.c
liblwgeom/g_ptarray.c
liblwgeom/lwalgorithm.c
liblwgeom/lwgeom_api.c
liblwgeom/lwgunparse.c
liblwgeom/lwsegmentize.c
liblwgeom/lwspheroid.c
postgis/geography_inout.c
postgis/lwgeom_gist.c
postgis/lwgeom_in_gml.c
postgis/lwgeom_in_kml.c
postgis/lwgeom_inout.c
postgis/lwgeom_ogc.c

index 8f6530160773039df8ff977bbc1fd8139a27db59..b22913b37d538dbf3d97e92f6b4f7d2ee8f2a271 100644 (file)
@@ -75,13 +75,13 @@ int find_WKB_typeid(PGconn  *conn)
 main()
 {
        char       *pghost,
-       *pgport,
-       *pgoptions,
-       *pgtty;
+          *pgport,
+          *pgoptions,
+          *pgtty;
        char       *dbName;
        int         nFields;
        int         row,
-       field;
+         field;
        PGconn     *conn;
        PGresult   *res;
        int     junk;
index fc444be41a0138afe1cf8e2cdd1af6ab44840f8d..310c0432ebe00941117d41fdd61acec97417eac9 100644 (file)
@@ -156,11 +156,13 @@ void gptarray_set_m(GPTARRAY *ptarray, int i, double m)
        assert(FLAGS_GET_M(ptarray->flags));
 
        if ( FLAGS_GET_Z(ptarray->flags))
-       {       /* Four coordinates */
+       {
+               /* Four coordinates */
                *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 3) = m;
        }
        else
-       {       /* Three coordinates */
+       {
+               /* Three coordinates */
                *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2) = m;
        }
 }
@@ -190,11 +192,13 @@ double gptarray_get_m(GPTARRAY *ptarray, int i)
        assert(FLAGS_GET_M(ptarray->flags));
 
        if ( FLAGS_GET_Z(ptarray->flags))
-       {       /* Four coordinates */
+       {
+               /* Four coordinates */
                return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 3);
        }
        else
-       {       /* Three coordinates */
+       {
+               /* Three coordinates */
                return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2);
        }
 }
index 29c74520254d58828565cf976d38848772fc1a34..4636e0c3911221e6c4312a50a6d69acd8cdbdb78 100644 (file)
@@ -392,7 +392,8 @@ LWCOLLECTION *lwmline_clip_to_ordinate_range(LWMLINE *mline, int ordinate, doubl
                {
                        col = lwline_clip_to_ordinate_range(mline->geoms[i], ordinate, from, to);
                        if ( col )
-                       { /* Something was left after the clip. */
+                       {
+                               /* Something was left after the clip. */
                                if ( lwgeom_out->ngeoms + col->ngeoms > geoms_size )
                                {
                                        geoms_size += 16;
index ce10845ddacbfcfdabf6f411dbc00bd2fff79fe0..ce8c38a0cf08bb140d265a60ea3aa87cca4489dd 100644 (file)
@@ -72,41 +72,50 @@ nextafterf_custom(float x, float y)
                return x+y;
        if (x==y) return y;              /* x=y, return y */
        if (ix==0)
-       {                             /* x == 0 */
+       {
+               /* x == 0 */
                SET_FLOAT_WORD(x,(hy&0x80000000)|1);/* return +-minsubnormal */
                y = x*x;
                if (y==x) return y;
                else return x;   /* raise underflow flag */
        }
        if (hx>=0)
-       {                             /* x > 0 */
+       {
+               /* x > 0 */
                if (hx>hy)
-               {                         /* x > y, x -= ulp */
+               {
+                       /* x > y, x -= ulp */
                        hx -= 1;
                }
                else
-               {                            /* x < y, x += ulp */
+               {
+                       /* x < y, x += ulp */
                        hx += 1;
                }
        }
        else
-       {                                /* x < 0 */
+       {
+               /* x < 0 */
                if (hy>=0||hx>hy)
-               {                   /* x < y, x -= ulp */
+               {
+                       /* x < y, x -= ulp */
                        hx -= 1;
                }
                else
-               {                            /* x > y, x += ulp */
+               {
+                       /* x > y, x += ulp */
                        hx += 1;
                }
        }
        hy = hx&0x7f800000;
        if (hy>=0x7f800000) return x+x;  /* overflow  */
        if (hy<0x00800000)
-       {             /* underflow */
+       {
+               /* underflow */
                y = x*x;
                if (y!=x)
-               {          /* raise underflow flag */
+               {
+                       /* raise underflow flag */
                        SET_FLOAT_WORD(y,hx);
                        return y;
                }
@@ -2177,8 +2186,9 @@ deparse_hex(uchar str, char *result)
        int     input_high;
        int  input_low;
        static char outchr[]=
-           {"0123456789ABCDEF"
-           };
+       {
+               "0123456789ABCDEF"
+       };
 
        input_high = (str>>4);
        input_low = (str & 0x0F);
index e438c4ff5029f4ffd45f3214b44cb707cd819367..c13c7217b18303e8d26ee424e30c76f36b2161ed 100644 (file)
@@ -734,8 +734,9 @@ unparse_WKT(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar* serialized, allo
 }
 
 static char outchr[]=
-    {"0123456789ABCDEF"
-    };
+{
+       "0123456789ABCDEF"
+};
 
 /* Write HEX bytes flipping */
 void
index 7c417004378b2c4bd9e41777fd0906607bdc1143..596a6675f8b1e4698af8c4248b5c5f4d091686b4 100644 (file)
@@ -157,9 +157,9 @@ lwcircle_segmentize(POINT4D *p1, POINT4D *p2, POINT4D *p3, uint32 perQuad)
 
        POINT4D *center;
        double radius = 0.0,
-                       sweep = 0.0,
-                               angle = 0.0,
-                                       increment = 0.0;
+              sweep = 0.0,
+              angle = 0.0,
+              increment = 0.0;
        double a1, a2, a3, i;
 
        LWDEBUG(2, "lwcircle_segmentize called. ");
index 0cabdc7af7e078a0b92d9ad1eff1fc98f4bd8b85..176a1e0bec22b275014a17ac4159b022ced37247 100644 (file)
@@ -270,8 +270,8 @@ int spheroid_project(const GEOGRAPHIC_POINT *r, const SPHEROID *spheroid, double
 
        lat2 = atan2((sin(u1) * cos(sigma) + cos(u1) * sin(sigma) *
                      cos(azimuth)), (omf * sqrt(POW2(sin_alpha) +
-                                                POW2(sin(u1) * sin(sigma) - cos(u1) * cos(sigma) *
-                                                     cos(azimuth)))));
+                                     POW2(sin(u1) * sin(sigma) - cos(u1) * cos(sigma) *
+                                          cos(azimuth)))));
        lambda = atan2((sin(sigma) * sin(azimuth)), (cos(u1) * cos(sigma) -
                       sin(u1) * sin(sigma) * cos(azimuth)));
        C = (spheroid->f / 16.0) * cos_alphasq * (4.0 + spheroid->f * (4.0 - 3.0 * cos_alphasq));
index f826428412dfc0a76b47c3b351c698957b98be2c..e71e72646563ded3ce8c837c14489aa5b6a717f5 100644 (file)
@@ -138,9 +138,9 @@ void geography_valid_typmod(LWGEOM *lwgeom, int32 typmod)
        if ( typmod_type > 0 &&
                /* GEOMETRYCOLLECTION column can hold any kind of collection */
                ((typmod_type == COLLECTIONTYPE && ! (lwgeom_type == COLLECTIONTYPE ||
-                                                     lwgeom_type == MULTIPOLYGONTYPE ||
-                                                     lwgeom_type == MULTIPOINTTYPE ||
-                                                     lwgeom_type == MULTILINETYPE )) ||
+                       lwgeom_type == MULTIPOLYGONTYPE ||
+                       lwgeom_type == MULTIPOINTTYPE ||
+                       lwgeom_type == MULTILINETYPE )) ||
                 /* Other types must be strictly equal. */
                 (typmod_type != lwgeom_type)) )
        {
index 0e18e15cbe7ecc7ebb4f71b8b9df0b7d859389fa..f2fc4f71d280fe784a2a44239ccc92d81c6df120 100644 (file)
@@ -799,9 +799,9 @@ Datum LWGEOM_gist_union(PG_FUNCTION_ARGS)
 
        int                *sizep = (int *) PG_GETARG_POINTER(1);
        int                     numranges,
-       i;
+               i;
        BOX2DFLOAT4 *cur,
-       *pageunion;
+                   *pageunion;
 
        POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_union called\n");
 
index 2b515506810fd491c440a6f2d83e1a0f9f22c0e5..8f4d795f8f7964dea1ac79352d5f23a3183fbb56 100644 (file)
@@ -1146,8 +1146,8 @@ static LWGEOM* parse_gml_curve(xmlNodePtr xnode, bool *hasz, int *root_srid)
                        if (i + 1 == lss) last = 1;
                        /* Check if segments are not disjoints */
                        if (i > 0 && memcmp(    getPoint_internal(pa, npoints),
-                                            getPoint_internal(ppa[i], 0),
-                                            *hasz?sizeof(POINT3D):sizeof(POINT2D)))
+                                               getPoint_internal(ppa[i], 0),
+                                               *hasz?sizeof(POINT3D):sizeof(POINT2D)))
                                lwerror("invalid GML representation");
 
                        /* Aggregate stuff */
@@ -1650,9 +1650,9 @@ static LWGEOM* parse_gml_coll(xmlNodePtr xnode, bool *hasz, int *root_srid)
                 * substitution group
                 */
                if (       !strcmp((char *) xa->name, "pointMember")
-                       || !strcmp((char *) xa->name, "lineStringMember")
-                       || !strcmp((char *) xa->name, "polygonMember")
-                       || !strcmp((char *) xa->name, "geometryMember"))
+                          || !strcmp((char *) xa->name, "lineStringMember")
+                          || !strcmp((char *) xa->name, "polygonMember")
+                          || !strcmp((char *) xa->name, "geometryMember"))
                {
 
                        if (xa->children == NULL) break;
index 6f68e5828feaeb6afcfe12a415585b54ea8e27bd..da386c6362bd24c3322cc03ad8caaaacdc4a7dd3 100644 (file)
@@ -463,9 +463,9 @@ static LWGEOM* parse_kml_multi(xmlNodePtr xnode, bool *hasz)
                if (!is_kml_namespace(xa, false)) continue;
 
                if (       !strcmp((char *) xa->name, "Point")
-                       || !strcmp((char *) xa->name, "LineString")
-                       || !strcmp((char *) xa->name, "Polygon")
-                       || !strcmp((char *) xa->name, "MultiGeometry"))
+                          || !strcmp((char *) xa->name, "LineString")
+                          || !strcmp((char *) xa->name, "Polygon")
+                          || !strcmp((char *) xa->name, "MultiGeometry"))
                {
 
                        if (xa->children == NULL) break;
index 78224b2e70ffa7f8451647d4725060b29db5c02b..f0bbd2e01521bce31a8df0af7fc5712accee3707 100644 (file)
@@ -220,7 +220,7 @@ Datum LWGEOMFromWKB(PG_FUNCTION_ARGS)
        if ( is_worth_caching_pglwgeom_bbox(lwgeom) )
        {
                lwgeom = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1(
-                                                         LWGEOM_addBBOX, PointerGetDatum(lwgeom)));
+                       LWGEOM_addBBOX, PointerGetDatum(lwgeom)));
        }
 
        PG_RETURN_POINTER(lwgeom);
@@ -593,7 +593,7 @@ Datum LWGEOM_from_bytea(PG_FUNCTION_ARGS)
        POSTGIS_DEBUG(2, "LWGEOM_from_bytea start");
 
        result = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1(
-                                                 LWGEOMFromWKB, PG_GETARG_DATUM(0)));
+               LWGEOMFromWKB, PG_GETARG_DATUM(0)));
 
        PG_RETURN_POINTER(result);
 }
index baeaccc6078248dd326dc7816e2be9dcafa9ec00..f8d6bd93b132223e17166ec2d2e8990539a7432d 100644 (file)
@@ -408,7 +408,8 @@ lwgeom_dimension_recursive(const uchar *serialized)
                }
 
                if ( dims == 2 )
-               { /* nothing can be higher */
+               {
+                       /* nothing can be higher */
                        lwinspected_release(inspected);
                        return 2;
                }