mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -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)
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user