Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit30ed71e

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 parent0cf16cb commit30ed71e

File tree

12 files changed

+1955
-1167
lines changed

12 files changed

+1955
-1167
lines changed

‎contrib/cube/cubeparse.y

Lines changed: 4 additions & 4 deletions
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_BRACKETparen_listCOMMAparen_listC_BRACKET
4747
{
48-
intdim;
48+
intdim;
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_listCOMMAparen_list
7474
{
75-
intdim;
75+
intdim;
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-
intdim;
102+
intdim;
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-
intdim;
120+
intdim;
121121

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

‎contrib/seg/segparse.y

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ static char strbuf[25] = {
3838
%expect0
3939
%name-prefix="seg_yy"
4040

41-
%union {
42-
structBND {
43-
float val;
44-
char ext;
45-
char sigd;
41+
%union
42+
{
43+
structBND
44+
{
45+
floatval;
46+
charext;
47+
charsigd;
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-
floatval = seg_atof($1);
124+
floatval = seg_atof($1);
123125

124126
$$.ext ='\0';
125127
$$.sigd = significant_digits($1);
@@ -128,7 +130,7 @@ boundary: SEGFLOAT
128130
|EXTENSIONSEGFLOAT
129131
{
130132
/* temp variable avoids a gcc 3.3.x bug on Sparc64*/
131-
floatval = seg_atof($2);
133+
floatval = 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-
floatval = seg_atof($1);
144+
floatval = seg_atof($1);
143145

144146
$$.ext ='\0';
145147
$$.sigd = significant_digits($1);
@@ -153,7 +155,7 @@ deviation: SEGFLOAT
153155
staticfloat
154156
seg_atof(constchar *value)
155157
{
156-
Datumdatum;
158+
Datumdatum;
157159

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

‎src/backend/bootstrap/bootparse.y

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ Boot_CreateStmt:
167167
}
168168
RPAREN
169169
{
170-
TupleDesctupdesc;
171-
boolshared_relation;
172-
boolmapped_relation;
170+
TupleDesctupdesc;
171+
boolshared_relation;
172+
boolmapped_relation;
173173

174174
do_start();
175175

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

223223
id = heap_create_with_catalog($2,
224224
PG_CATALOG_NAMESPACE,
@@ -269,8 +269,8 @@ Boot_InsertStmt:
269269
Boot_DeclareIndexStmt:
270270
XDECLAREINDEXboot_identoidspecONboot_identUSINGboot_identLPARENboot_index_paramsRPAREN
271271
{
272-
IndexStmt *stmt = makeNode(IndexStmt);
273-
OidrelationId;
272+
IndexStmt*stmt = makeNode(IndexStmt);
273+
OidrelationId;
274274

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

@@ -321,8 +321,8 @@ Boot_DeclareIndexStmt:
321321
Boot_DeclareUniqueIndexStmt:
322322
XDECLAREUNIQUEINDEXboot_identoidspecONboot_identUSINGboot_identLPARENboot_index_paramsRPAREN
323323
{
324-
IndexStmt *stmt = makeNode(IndexStmt);
325-
OidrelationId;
324+
IndexStmt*stmt = makeNode(IndexStmt);
325+
OidrelationId;
326326

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

@@ -400,7 +400,8 @@ boot_index_params:
400400
boot_index_param:
401401
boot_identboot_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)

[8]ページ先頭

©2009-2025 Movatter.jp