summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorPeter Eisentraut2022-05-13 05:17:29 +0000
committerPeter Eisentraut2022-05-13 05:17:29 +0000
commit30ed71e423ee63b263730b86326da2a629a29f84 (patch)
treea9a45b929b38cbef8f99d05da6419ef2e56b5781 /contrib
parent0cf16cb8ca4853b084c40eca310c4c9c3ebf7e2a (diff)
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
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cube/cubeparse.y8
-rw-r--r--contrib/seg/segparse.y22
2 files changed, 16 insertions, 14 deletions
diff --git a/contrib/cube/cubeparse.y b/contrib/cube/cubeparse.y
index deb2efdc0da..7577c4515c6 100644
--- a/contrib/cube/cubeparse.y
+++ b/contrib/cube/cubeparse.y
@@ -45,7 +45,7 @@ static NDBOX *write_point_as_box(int dim, char *str);
box: O_BRACKET paren_list COMMA paren_list C_BRACKET
{
- int dim;
+ int dim;
dim = item_count($2, ',');
if (item_count($4, ',') != dim)
@@ -72,7 +72,7 @@ box: O_BRACKET paren_list COMMA paren_list C_BRACKET
| paren_list COMMA paren_list
{
- int dim;
+ int dim;
dim = item_count($1, ',');
if (item_count($3, ',') != dim)
@@ -99,7 +99,7 @@ box: O_BRACKET paren_list COMMA paren_list C_BRACKET
| paren_list
{
- int dim;
+ int dim;
dim = item_count($1, ',');
if (dim > CUBE_MAX_DIM)
@@ -117,7 +117,7 @@ box: O_BRACKET paren_list COMMA paren_list C_BRACKET
| list
{
- int dim;
+ int dim;
dim = item_count($1, ',');
if (dim > CUBE_MAX_DIM)
diff --git a/contrib/seg/segparse.y b/contrib/seg/segparse.y
index 040cab39041..33e3a9f35f2 100644
--- a/contrib/seg/segparse.y
+++ b/contrib/seg/segparse.y
@@ -38,13 +38,15 @@ static char strbuf[25] = {
%expect 0
%name-prefix="seg_yy"
-%union {
- struct BND {
- float val;
- char ext;
- char sigd;
+%union
+{
+ struct BND
+ {
+ float val;
+ char ext;
+ char sigd;
} bnd;
- char * text;
+ char *text;
}
%token <text> SEGFLOAT
%token <text> RANGE
@@ -119,7 +121,7 @@ range: boundary PLUMIN deviation
boundary: SEGFLOAT
{
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
- float val = seg_atof($1);
+ float val = seg_atof($1);
$$.ext = '\0';
$$.sigd = significant_digits($1);
@@ -128,7 +130,7 @@ boundary: SEGFLOAT
| EXTENSION SEGFLOAT
{
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
- float val = seg_atof($2);
+ float val = seg_atof($2);
$$.ext = $1[0];
$$.sigd = significant_digits($2);
@@ -139,7 +141,7 @@ boundary: SEGFLOAT
deviation: SEGFLOAT
{
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
- float val = seg_atof($1);
+ float val = seg_atof($1);
$$.ext = '\0';
$$.sigd = significant_digits($1);
@@ -153,7 +155,7 @@ deviation: SEGFLOAT
static float
seg_atof(const char *value)
{
- Datum datum;
+ Datum datum;
datum = DirectFunctionCall1(float4in, CStringGetDatum(value));
return DatumGetFloat4(datum);