33
44#include "types.h"
55
6- /*
7- * Declarations of key build functions
8- */
6+ /* Declarations of key build functions */
97
108#define KEYSIZE 24 /* the key size for one entry */
119#define BPCKSIZE (KEYSIZE/6) /* the key size for one entry per coordinate */
1210
1311/*
1412 * The coordinate value has to be between -MAXCVALUE .. MAXCVALUE
1513 */
16- #define MAXCVALUE ( ( 1 << ( 8* BPCKSIZE - 2 ) ) - 1 )
14+ #define MAXCVALUE ( (1 << (8 * BPCKSIZE - 2) ) - 1 )
1715
1816typedef struct
1917{
20- int32 vl_len_ ;
18+ int32 vl_len_ ;
2119 union
2220 {
2321 struct
2422 {
25- float4 lat ,
26- lng ;
23+ float4 lat ,
24+ lng ;
2725 };
2826 struct
2927 {
30- int32 k [6 ];
28+ int32 k [6 ];
3129 };
3230 };
3331} GiSTSPointKey ;
@@ -45,129 +43,129 @@ typedef struct
4543} while (0) ;
4644
4745/*
48- * Union the both keys and returns it . Result is placed into kunion.
46+ * Returns the union of two keys . Result is placed into ' kunion' .
4947 */
5048void spherekey_union_two (int32 * kunion , const int32 * key );
5149
5250/*
53- * Intersect the both keys and returns it . Returns NULL if there is
54- * no intersection. Result is placed into kinter.
51+ * Returns the intersection of two keys . Returns NULL if there is
52+ * no intersection. Result is placed into ' kinter' .
5553 */
5654bool spherekey_inter_two (int32 * kinter , const int32 * key );
5755
5856/*
59- * Generate key value of spherical point and returns it. Result is placed
60- * into k .
57+ * Generates the key of a spherical point and returns it. Result is placed
58+ * into 'k' .
6159 */
6260void spherepoint_gen_key (int32 * k , const SPoint * sp );
6361
6462/*
65- * Generates circle's key and returns it. Result is placed into k .
63+ * Generates the circle's key and returns it. Result is placed into 'k' .
6664 */
6765void spherecircle_gen_key (int32 * k , const SCIRCLE * c );
6866
6967/*
70- * Returns the key of a spherical ellipse and returns it. Result is placed
71- * into k .
68+ * Generates the key of a spherical ellipse and returns it. Result is placed
69+ * into 'k' .
7270 */
7371void sphereellipse_gen_key (int32 * k , const SELLIPSE * e );
7472
7573/*
76- * Returns the key of a spherical line and returns it. Result is placed
77- * into k .
74+ * Generates the key of a spherical line and returns it. Result is placed
75+ * into 'k' .
7876 */
7977void sphereline_gen_key (int32 * k , const SLine * sl );
8078
8179/*
82- * Creates the key of polygon and returns it. Result is placed into "key" .
80+ * Generates the key of a polygon and returns it. Result is placed into 'k' .
8381 */
84- void spherepoly_gen_key (int32 * key , const SPOLY * sp );
82+ void spherepoly_gen_key (int32 * k , const SPOLY * sp );
8583
8684/*
87- * Creates the key of path and returns it. Result is placed into k .
85+ * Generates the key of a path and returns it. Result is placed into 'k' .
8886 */
8987void spherepath_gen_key (int32 * k , const SPATH * sp );
9088
9189/*
92- * Creates the key of box and returns it. Result is placed into k .
90+ * Generates the key of a box and returns it. Result is placed into 'k' .
9391 */
9492void spherebox_gen_key (int32 * key , const SBOX * box );
9593
9694/*
97- * Returns true, if first key is less than second key.
95+ * Returns true if the first key is less than the second key.
9896 */
9997Datum spherekey_lt (PG_FUNCTION_ARGS );
10098
10199/*
102- * Returns true, if first key is less or equal than second key.
100+ * Returns true if the first key is less or equal than the second key.
103101 */
104102Datum spherekey_le (PG_FUNCTION_ARGS );
105103
106104/*
107- * Returns true, if first keys are equal.
105+ * Returns true if two keys are equal.
108106 */
109107Datum spherekey_eq (PG_FUNCTION_ARGS );
110108
111109/*
112- * Returns true, if first keys are not equal.
110+ * Returns true if two keys are not equal.
113111 */
114112Datum spherekey_eq_neg (PG_FUNCTION_ARGS );
115113
116114/*
117- * Returns true, if first key is greater or equal than second key.
115+ * Returns true if the first key is greater or equal than the second key.
118116 */
119117Datum spherekey_ge (PG_FUNCTION_ARGS );
120118
121119/*
122- * Returns true, if first key is greater than second key.
120+ * Returns true if the first key is greater than the second key.
123121 */
124122Datum spherekey_gt (PG_FUNCTION_ARGS );
125123
126124/*
127125 * Returns relationship of two keys.
128- * ‘alls skey_cmp(const int32 *, const int32 *) for two keys.
126+ * Calls skey_cmp(const int32 *, const int32 *) for two keys.
129127 */
130128Datum spherekey_cmp (PG_FUNCTION_ARGS );
131129
132130/*
133131 * Returns relationship of keys of two spherical points.
134- * ‘alls skey_cmp(const int32 *, const int32 *) for two points.
132+ * Calls skey_cmp(const int32 *, const int32 *) for two points.
135133 */
136134Datum spherepoint_cmp (PG_FUNCTION_ARGS );
137135
138136/*
139137 * Returns relationship of keys of two spherical circles.
140- * ‘alls skey_cmp(const int32 *, const int32 *) for two circles.
138+ * Calls skey_cmp(const int32 *, const int32 *) for two circles.
141139 */
142140Datum spherecircle_cmp (PG_FUNCTION_ARGS );
143141
144142/*
145143 * Returns relationship of keys of two spherical ellipses.
146- * ‘alls skey_cmp(const int32 *, const int32 *) for two ellipses.
144+ * Calls skey_cmp(const int32 *, const int32 *) for two ellipses.
147145 */
148146Datum sphereellipse_cmp (PG_FUNCTION_ARGS );
149147
150148/*
151149 * Returns relationship of keys of two spherical lines.
152- * ‘alls skey_cmp(const int32 *, const int32 *) for two lines.
150+ * Calls skey_cmp(const int32 *, const int32 *) for two lines.
153151 */
154152Datum sphereline_cmp (PG_FUNCTION_ARGS );
155153
156154/*
157- * Returns relationship of keys of two spherical pathes .
158- * ‘alls skey_cmp(const int32 *, const int32 *) for two pathes .
155+ * Returns relationship of keys of two spherical paths .
156+ * Calls skey_cmp(const int32 *, const int32 *) for two paths .
159157 */
160158Datum spherepath_cmp (PG_FUNCTION_ARGS );
161159
162160/*
163161 * Returns relationship of keys of two spherical polygons.
164- * ‘alls skey_cmp(const int32 *, const int32 *) for two polygons.
162+ * Calls skey_cmp(const int32 *, const int32 *) for two polygons.
165163 */
166164Datum spherepoly_cmp (PG_FUNCTION_ARGS );
167165
168166/*
169167 * Returns relationship of keys of two spherical boxes.
170- * ‘alls skey_cmp(const int32 *, const int32 *) for two boxes.
168+ * Calls skey_cmp(const int32 *, const int32 *) for two boxes.
171169 */
172170Datum spherebox_cmp (PG_FUNCTION_ARGS );
173171
0 commit comments