Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 30ed71e

Browse files
committed
Indent C code in flex and bison files
In the style of pgindent, done semi-manually. Discussion: https://www.postgresql.org/message-id/flat/7d062ecc-7444-23ec-a159-acd8adf9b586%40enterprisedb.com
1 parent 0cf16cb commit 30ed71e

File tree

12 files changed

+1955
-1167
lines changed

12 files changed

+1955
-1167
lines changed

contrib/cube/cubeparse.y

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static NDBOX *write_point_as_box(int dim, char *str);
4545

4646
box: O_BRACKET paren_list COMMA paren_list C_BRACKET
4747
{
48-
int dim;
48+
int dim;
4949

5050
dim = item_count($2, ',');
5151
if (item_count($4, ',') != dim)
@@ -72,7 +72,7 @@ box: O_BRACKET paren_list COMMA paren_list C_BRACKET
7272

7373
| paren_list COMMA paren_list
7474
{
75-
int dim;
75+
int dim;
7676

7777
dim = item_count($1, ',');
7878
if (item_count($3, ',') != dim)
@@ -99,7 +99,7 @@ box: O_BRACKET paren_list COMMA paren_list C_BRACKET
9999

100100
| paren_list
101101
{
102-
int dim;
102+
int dim;
103103

104104
dim = item_count($1, ',');
105105
if (dim > CUBE_MAX_DIM)
@@ -117,7 +117,7 @@ box: O_BRACKET paren_list COMMA paren_list C_BRACKET
117117

118118
| list
119119
{
120-
int dim;
120+
int dim;
121121

122122
dim = item_count($1, ',');
123123
if (dim > CUBE_MAX_DIM)

contrib/seg/segparse.y

+12-10
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ static char strbuf[25] = {
3838
%expect 0
3939
%name-prefix="seg_yy"
4040

41-
%union {
42-
struct BND {
43-
float val;
44-
char ext;
45-
char sigd;
41+
%union
42+
{
43+
struct BND
44+
{
45+
float val;
46+
char ext;
47+
char sigd;
4648
} bnd;
47-
char * text;
49+
char *text;
4850
}
4951
%token <text> SEGFLOAT
5052
%token <text> RANGE
@@ -119,7 +121,7 @@ range: boundary PLUMIN deviation
119121
boundary: SEGFLOAT
120122
{
121123
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
122-
float val = seg_atof($1);
124+
float val = seg_atof($1);
123125

124126
$$.ext = '\0';
125127
$$.sigd = significant_digits($1);
@@ -128,7 +130,7 @@ boundary: SEGFLOAT
128130
| EXTENSION SEGFLOAT
129131
{
130132
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
131-
float val = seg_atof($2);
133+
float val = seg_atof($2);
132134

133135
$$.ext = $1[0];
134136
$$.sigd = significant_digits($2);
@@ -139,7 +141,7 @@ boundary: SEGFLOAT
139141
deviation: SEGFLOAT
140142
{
141143
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
142-
float val = seg_atof($1);
144+
float val = seg_atof($1);
143145

144146
$$.ext = '\0';
145147
$$.sigd = significant_digits($1);
@@ -153,7 +155,7 @@ deviation: SEGFLOAT
153155
static float
154156
seg_atof(const char *value)
155157
{
156-
Datum datum;
158+
Datum datum;
157159

158160
datum = DirectFunctionCall1(float4in, CStringGetDatum(value));
159161
return DatumGetFloat4(datum);

src/backend/bootstrap/bootparse.y

+10-9
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ Boot_CreateStmt:
167167
}
168168
RPAREN
169169
{
170-
TupleDesc tupdesc;
171-
bool shared_relation;
172-
bool mapped_relation;
170+
TupleDesc tupdesc;
171+
bool shared_relation;
172+
bool mapped_relation;
173173

174174
do_start();
175175

@@ -218,7 +218,7 @@ Boot_CreateStmt:
218218
}
219219
else
220220
{
221-
Oid id;
221+
Oid id;
222222

223223
id = heap_create_with_catalog($2,
224224
PG_CATALOG_NAMESPACE,
@@ -269,8 +269,8 @@ Boot_InsertStmt:
269269
Boot_DeclareIndexStmt:
270270
XDECLARE INDEX boot_ident oidspec ON boot_ident USING boot_ident LPAREN boot_index_params RPAREN
271271
{
272-
IndexStmt *stmt = makeNode(IndexStmt);
273-
Oid relationId;
272+
IndexStmt *stmt = makeNode(IndexStmt);
273+
Oid relationId;
274274

275275
elog(DEBUG4, "creating index \"%s\"", $3);
276276

@@ -321,8 +321,8 @@ Boot_DeclareIndexStmt:
321321
Boot_DeclareUniqueIndexStmt:
322322
XDECLARE UNIQUE INDEX boot_ident oidspec ON boot_ident USING boot_ident LPAREN boot_index_params RPAREN
323323
{
324-
IndexStmt *stmt = makeNode(IndexStmt);
325-
Oid relationId;
324+
IndexStmt *stmt = makeNode(IndexStmt);
325+
Oid relationId;
326326

327327
elog(DEBUG4, "creating unique index \"%s\"", $4);
328328

@@ -400,7 +400,8 @@ boot_index_params:
400400
boot_index_param:
401401
boot_ident boot_ident
402402
{
403-
IndexElem *n = makeNode(IndexElem);
403+
IndexElem *n = makeNode(IndexElem);
404+
404405
n->name = $1;
405406
n->expr = NULL;
406407
n->indexcolname = NULL;

0 commit comments

Comments
 (0)