Skip to content

Commit 7629f79

Browse files
committed
pgindent - first step towards PostgreSQL coding style.
1 parent 8451b10 commit 7629f79

33 files changed

+14046
-12243
lines changed

box.c

Lines changed: 1596 additions & 1306 deletions
Large diffs are not rendered by default.

box.h

Lines changed: 318 additions & 394 deletions
Large diffs are not rendered by default.

circle.c

Lines changed: 411 additions & 326 deletions
Large diffs are not rendered by default.

circle.h

Lines changed: 128 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -3,229 +3,190 @@
33

44
#include "euler.h"
55

6-
/*! \file
7-
\brief Spherical circle declarations
6+
/*
7+
* ! \file \brief Spherical circle declarations
88
*/
9-
10-
/*!
11-
\brief Spherical circle.
9+
10+
/*
11+
* ! \brief Spherical circle.
1212
*/
13-
typedef struct {
14-
SPoint center; //!< the center of circle
15-
float8 radius; //!< the circle radius in radians
16-
} SCIRCLE;
13+
typedef struct
14+
{
15+
SPoint center;
16+
/* !<the center of circle */
17+
float8 radius;
18+
/* !<the circle radius in radians */
19+
} SCIRCLE;
1720

18-
/*!
19-
\brief Checks whether two circles are equal.
20-
\param c1 pointer to first circle
21-
\param c2 pointer to second circle
22-
\return true, if equal
21+
/*
22+
* ! \brief Checks whether two circles are equal. \param c1 pointer to first
23+
* circle \param c2 pointer to second circle \return true, if equal
2324
*/
24-
bool scircle_eq ( const SCIRCLE * c1 , const SCIRCLE * c2 );
25+
bool scircle_eq(const SCIRCLE *c1, const SCIRCLE *c2);
2526

26-
/*!
27-
\brief checks whether circle contains point
28-
\param p pointer to point
29-
\param c pointer to circle
30-
\return true, if circle contains point
27+
/*
28+
* ! \brief checks whether circle contains point \param p pointer to point
29+
* \param c pointer to circle \return true, if circle contains point
3130
*/
32-
bool spoint_in_circle ( const SPoint * p, const SCIRCLE * c );
31+
bool spoint_in_circle(const SPoint *p, const SCIRCLE *c);
3332

34-
/*!
35-
\brief transforms a circle using Euler transformation
36-
\param out pointer to transformed circle
37-
\param in pointer to circle
38-
\param se pointer to Euler transformation
39-
\return pointer to transformed circle
33+
/*
34+
* ! \brief transforms a circle using Euler transformation \param out pointer
35+
* to transformed circle \param in pointer to circle \param se pointer to
36+
* Euler transformation \return pointer to transformed circle
4037
*/
41-
SCIRCLE * euler_scircle_trans ( SCIRCLE * out , const SCIRCLE * in , const SEuler * se );
38+
SCIRCLE *euler_scircle_trans(SCIRCLE *out, const SCIRCLE *in, const SEuler *se);
4239

43-
/*!
44-
Takes the input and stores it as spherical
45-
circle.
46-
\brief a circle input function
47-
\return a spherical circle datum
48-
\note PostgreSQL function
40+
/*
41+
* ! Takes the input and stores it as spherical circle. \brief a circle input
42+
* function \return a spherical circle datum \note PostgreSQL function
4943
*/
50-
Datum spherecircle_in (PG_FUNCTION_ARGS);
44+
Datum spherecircle_in(PG_FUNCTION_ARGS);
5145

52-
/*!
53-
Checks whether two circles are equal.
54-
\brief equality of two circles
55-
\return boolean datum
56-
\note PostgreSQL function
46+
/*
47+
* ! Checks whether two circles are equal. \brief equality of two circles
48+
* \return boolean datum \note PostgreSQL function
5749
*/
58-
Datum spherecircle_equal (PG_FUNCTION_ARGS);
50+
Datum spherecircle_equal(PG_FUNCTION_ARGS);
5951

60-
/*!
61-
Checks whether two circles are not equal.
62-
\brief Checks whether two circles are not equal
63-
\return boolean datum
64-
\note PostgreSQL function
52+
/*
53+
* ! Checks whether two circles are not equal. \brief Checks whether two
54+
* circles are not equal \return boolean datum \note PostgreSQL function
6555
*/
66-
Datum spherecircle_equal_neg (PG_FUNCTION_ARGS);
56+
Datum spherecircle_equal_neg(PG_FUNCTION_ARGS);
6757

68-
/*!
69-
Calculate the distance of two circles.
70-
If overlapping, this function returns 0.0.
71-
\brief distance of two circles
72-
\return float8 datum
73-
\note PostgreSQL function
58+
/*
59+
* ! Calculate the distance of two circles. If overlapping, this function
60+
* returns 0.0. \brief distance of two circles \return float8 datum \note
61+
* PostgreSQL function
7462
*/
75-
Datum spherecircle_distance (PG_FUNCTION_ARGS);
63+
Datum spherecircle_distance(PG_FUNCTION_ARGS);
7664

77-
/*!
78-
Calculate the distance of circle and point.
79-
If circle contains point, this function returns 0.0.
80-
\brief distance of circle and point
81-
\return float8 datum
82-
\note PostgreSQL function
83-
\see spherecircle_point_distance_com(PG_FUNCTION_ARGS)
65+
/*
66+
* ! Calculate the distance of circle and point. If circle contains point,
67+
* this function returns 0.0. \brief distance of circle and point \return
68+
* float8 datum \note PostgreSQL function \see
69+
* spherecircle_point_distance_com(PG_FUNCTION_ARGS)
8470
*/
85-
Datum spherecircle_point_distance (PG_FUNCTION_ARGS);
71+
Datum spherecircle_point_distance(PG_FUNCTION_ARGS);
8672

87-
/*!
88-
Calculate the distance of point and circle.
89-
If circle contains point, this function returns 0.0.
90-
\brief distance of point and circle
91-
\return float8 datum
92-
\note PostgreSQL function
93-
\see spherecircle_point_distance(PG_FUNCTION_ARGS)
73+
/*
74+
* ! Calculate the distance of point and circle. If circle contains point,
75+
* this function returns 0.0. \brief distance of point and circle \return
76+
* float8 datum \note PostgreSQL function \see
77+
* spherecircle_point_distance(PG_FUNCTION_ARGS)
9478
*/
95-
Datum spherecircle_point_distance_com (PG_FUNCTION_ARGS);
79+
Datum spherecircle_point_distance_com(PG_FUNCTION_ARGS);
9680

97-
/*!
98-
\brief Checks whether circle contains point
99-
\return boolean datum
100-
\note PostgreSQL function
81+
/*
82+
* ! \brief Checks whether circle contains point \return boolean datum \note
83+
* PostgreSQL function
10184
*/
102-
Datum spherepoint_in_circle (PG_FUNCTION_ARGS);
85+
Datum spherepoint_in_circle(PG_FUNCTION_ARGS);
10386

104-
/*!
105-
\brief Checks whether circle doesn't contain point
106-
\return boolean datum
107-
\note PostgreSQL function
87+
/*
88+
* ! \brief Checks whether circle doesn't contain point \return boolean datum
89+
* \note PostgreSQL function
10890
*/
109-
Datum spherepoint_in_circle_neg (PG_FUNCTION_ARGS);
91+
Datum spherepoint_in_circle_neg(PG_FUNCTION_ARGS);
11092

111-
/*!
112-
\brief Checks whether circle contains point
113-
\return boolean datum
114-
\note PostgreSQL function
93+
/*
94+
* ! \brief Checks whether circle contains point \return boolean datum \note
95+
* PostgreSQL function
11596
*/
116-
Datum spherepoint_in_circle_com (PG_FUNCTION_ARGS);
97+
Datum spherepoint_in_circle_com(PG_FUNCTION_ARGS);
11798

118-
/*!
119-
\brief Checks whether circle doesn't contain point
120-
\return boolean datum
121-
\note PostgreSQL function
99+
/*
100+
* ! \brief Checks whether circle doesn't contain point \return boolean datum
101+
* \note PostgreSQL function
122102
*/
123-
Datum spherepoint_in_circle_com_neg (PG_FUNCTION_ARGS);
103+
Datum spherepoint_in_circle_com_neg(PG_FUNCTION_ARGS);
124104

125-
/*!
126-
\brief Checks whether circle is contained by other circle
127-
\return boolean datum
128-
\note PostgreSQL function
105+
/*
106+
* ! \brief Checks whether circle is contained by other circle \return
107+
* boolean datum \note PostgreSQL function
129108
*/
130-
Datum spherecircle_in_circle (PG_FUNCTION_ARGS);
109+
Datum spherecircle_in_circle(PG_FUNCTION_ARGS);
131110

132-
/*!
133-
\brief Checks whether circle is not contained by other circle
134-
\return boolean datum
135-
\note PostgreSQL function
111+
/*
112+
* ! \brief Checks whether circle is not contained by other circle \return
113+
* boolean datum \note PostgreSQL function
136114
*/
137-
Datum spherecircle_in_circle_neg (PG_FUNCTION_ARGS);
115+
Datum spherecircle_in_circle_neg(PG_FUNCTION_ARGS);
138116

139-
/*!
140-
\brief Checks whether circle contains other circle
141-
\return boolean datum
142-
\note PostgreSQL function
117+
/*
118+
* ! \brief Checks whether circle contains other circle \return boolean datum
119+
* \note PostgreSQL function
143120
*/
144-
Datum spherecircle_in_circle_com (PG_FUNCTION_ARGS);
121+
Datum spherecircle_in_circle_com(PG_FUNCTION_ARGS);
145122

146-
/*!
147-
\brief Checks whether circle does not contain other circle
148-
\return boolean datum
149-
\note PostgreSQL function
123+
/*
124+
* ! \brief Checks whether circle does not contain other circle \return
125+
* boolean datum \note PostgreSQL function
150126
*/
151-
Datum spherecircle_in_circle_com_neg (PG_FUNCTION_ARGS);
127+
Datum spherecircle_in_circle_com_neg(PG_FUNCTION_ARGS);
152128

153-
/*!
154-
\brief Checks whether two circle overlap
155-
\return boolean datum
156-
\note PostgreSQL function
129+
/*
130+
* ! \brief Checks whether two circle overlap \return boolean datum \note
131+
* PostgreSQL function
157132
*/
158-
Datum spherecircle_overlap (PG_FUNCTION_ARGS);
133+
Datum spherecircle_overlap(PG_FUNCTION_ARGS);
159134

160-
/*!
161-
\brief Checks whether two circle overlap
162-
\return boolean datum
163-
\note PostgreSQL function
135+
/*
136+
* ! \brief Checks whether two circle overlap \return boolean datum \note
137+
* PostgreSQL function
164138
*/
165-
Datum spherecircle_overlap_neg (PG_FUNCTION_ARGS);
139+
Datum spherecircle_overlap_neg(PG_FUNCTION_ARGS);
166140

167-
/*!
168-
\brief returns the center of circle
169-
\return spherical point datum
170-
\note PostgreSQL function
141+
/*
142+
* ! \brief returns the center of circle \return spherical point datum \note
143+
* PostgreSQL function
171144
*/
172-
Datum spherecircle_center (PG_FUNCTION_ARGS);
145+
Datum spherecircle_center(PG_FUNCTION_ARGS);
173146

174-
/*!
175-
\brief returns the radius of circle
176-
\return float8 datum
177-
\note PostgreSQL function
147+
/*
148+
* ! \brief returns the radius of circle \return float8 datum \note
149+
* PostgreSQL function
178150
*/
179-
Datum spherecircle_radius (PG_FUNCTION_ARGS);
151+
Datum spherecircle_radius(PG_FUNCTION_ARGS);
180152

181-
/*!
182-
\brief converts a point to a circle
183-
\return spherical circle datum
184-
\note PostgreSQL function
153+
/*
154+
* ! \brief converts a point to a circle \return spherical circle datum \note
155+
* PostgreSQL function
185156
*/
186-
Datum spherepoint_to_circle (PG_FUNCTION_ARGS);
157+
Datum spherepoint_to_circle(PG_FUNCTION_ARGS);
187158

188-
/*!
189-
\brief Creates a circle from center and radius
190-
\return spherical circle datum
191-
\note PostgreSQL function
159+
/*
160+
* ! \brief Creates a circle from center and radius \return spherical circle
161+
* datum \note PostgreSQL function
192162
*/
193-
Datum spherecircle_by_center (PG_FUNCTION_ARGS);
163+
Datum spherecircle_by_center(PG_FUNCTION_ARGS);
194164

195-
/*!
196-
Calculates the area of a circle in square
197-
radians
198-
\brief calculate the area of a circle
199-
\return float8 datum
200-
\note PostgreSQL function
165+
/*
166+
* ! Calculates the area of a circle in square radians \brief calculate the
167+
* area of a circle \return float8 datum \note PostgreSQL function
201168
*/
202-
Datum spherecircle_area (PG_FUNCTION_ARGS);
169+
Datum spherecircle_area(PG_FUNCTION_ARGS);
203170

204-
/*!
205-
Calculates the circumference of a circle in
206-
radians.
207-
\brief calculate the circumference of a circle
208-
\return float8 datum
209-
\note PostgreSQL function
171+
/*
172+
* ! Calculates the circumference of a circle in radians. \brief calculate
173+
* the circumference of a circle \return float8 datum \note PostgreSQL
174+
* function
210175
*/
211-
Datum spherecircle_circ (PG_FUNCTION_ARGS);
176+
Datum spherecircle_circ(PG_FUNCTION_ARGS);
212177

213-
/*!
214-
Transforms a circle using Euler transformation
215-
\brief transforms a circle
216-
\return spherical circle datum
217-
\note PostgreSQL function
178+
/*
179+
* ! Transforms a circle using Euler transformation \brief transforms a
180+
* circle \return spherical circle datum \note PostgreSQL function
218181
*/
219-
Datum spheretrans_circle (PG_FUNCTION_ARGS);
182+
Datum spheretrans_circle(PG_FUNCTION_ARGS);
220183

221-
/*!
222-
Invers transformation of a circle
223-
using Euler transformation
224-
\brief inverse transformation of a circle
225-
\return spherical circle datum
226-
\note PostgreSQL function
184+
/*
185+
* ! Invers transformation of a circle using Euler transformation \brief
186+
* inverse transformation of a circle \return spherical circle datum \note
187+
* PostgreSQL function
227188
*/
228-
Datum spheretrans_circle_inverse (PG_FUNCTION_ARGS);
189+
Datum spheretrans_circle_inverse(PG_FUNCTION_ARGS);
229190

230191

231192

0 commit comments

Comments
 (0)