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

Commit 319dbfa

Browse files
committed
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
1 parent a90f12f commit 319dbfa

File tree

632 files changed

+28319
-28238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

632 files changed

+28319
-28238
lines changed

contrib/array/array_iterator.c

+23-23
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@
4040
#include "utils/builtins.h"
4141
#include "utils/elog.h"
4242

43-
static int32
43+
static int32
4444
array_iterator(Oid elemtype, Oid proc, int and, ArrayType * array, Datum value)
4545
{
46-
HeapTuple typ_tuple;
47-
TypeTupleForm typ_struct;
48-
bool typbyval;
49-
int typlen;
50-
func_ptr proc_fn;
51-
int pronargs;
52-
int nitems,
53-
i,
54-
result;
55-
int ndim,
56-
*dim;
57-
char *p;
46+
HeapTuple typ_tuple;
47+
TypeTupleForm typ_struct;
48+
bool typbyval;
49+
int typlen;
50+
func_ptr proc_fn;
51+
int pronargs;
52+
int nitems,
53+
i,
54+
result;
55+
int ndim,
56+
*dim;
57+
char *p;
5858

5959
/* Sanity checks */
6060
if ((array == (ArrayType *) NULL)
@@ -101,16 +101,16 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType * array, Datum value)
101101
{
102102
switch (typlen)
103103
{
104-
case 1:
105-
result = (int) (*proc_fn) (*p, value);
106-
break;
107-
case 2:
108-
result = (int) (*proc_fn) (*(int16 *) p, value);
109-
break;
110-
case 3:
111-
case 4:
112-
result = (int) (*proc_fn) (*(int32 *) p, value);
113-
break;
104+
case 1:
105+
result = (int) (*proc_fn) (*p, value);
106+
break;
107+
case 2:
108+
result = (int) (*proc_fn) (*(int16 *) p, value);
109+
break;
110+
case 3:
111+
case 4:
112+
result = (int) (*proc_fn) (*(int32 *) p, value);
113+
break;
114114
}
115115
p += typlen;
116116
}

contrib/datetime/datetime_functions.c

+21-14
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,34 @@
1313
#include "utils/datetime.h"
1414

1515

16-
TimeADT *
16+
TimeADT *
1717
time_difference(TimeADT * time1, TimeADT * time2)
1818
{
19-
TimeADT *result = (TimeADT *) palloc(sizeof(TimeADT));
19+
TimeADT *result = (TimeADT *) palloc(sizeof(TimeADT));
2020

2121
*result = *time1 - *time2;
2222
return (result);
2323
}
2424

25-
TimeADT *
25+
TimeADT *
2626
currenttime()
2727
{
28-
time_t current_time;
29-
struct tm *tm;
30-
TimeADT *result = (TimeADT *) palloc(sizeof(TimeADT));
28+
time_t current_time;
29+
struct tm *tm;
30+
TimeADT *result = (TimeADT *) palloc(sizeof(TimeADT));
3131

3232
current_time = time(NULL);
3333
tm = localtime(&current_time);
3434
*result = ((((tm->tm_hour * 60) + tm->tm_min) * 60) + tm->tm_sec);
3535
return (result);
3636
}
37+
3738
DateADT
3839
currentdate()
3940
{
40-
time_t current_time;
41-
struct tm *tm;
42-
DateADT result;
41+
time_t current_time;
42+
struct tm *tm;
43+
DateADT result;
4344

4445
current_time = time(NULL);
4546
tm = localtime(&current_time);
@@ -48,6 +49,7 @@ currentdate()
4849
date2j(100, 1, 1);
4950
return (result);
5051
}
52+
5153
int4
5254
hours(TimeADT * time)
5355
{
@@ -65,47 +67,52 @@ seconds(TimeADT * time)
6567
{
6668
return (((int) *time) % 60);
6769
}
70+
6871
int4
6972
day(DateADT * date)
7073
{
71-
struct tm tm;
74+
struct tm tm;
7275

7376
j2date((*date + date2j(2000, 1, 1)),
7477
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
7578

7679
return (tm.tm_mday);
7780
}
81+
7882
int4
7983
month(DateADT * date)
8084
{
81-
struct tm tm;
85+
struct tm tm;
8286

8387
j2date((*date + date2j(2000, 1, 1)),
8488
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
8589

8690
return (tm.tm_mon);
8791
}
92+
8893
int4
8994
year(DateADT * date)
9095
{
91-
struct tm tm;
96+
struct tm tm;
9297

9398
j2date((*date + date2j(2000, 1, 1)),
9499
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
95100

96101
return (tm.tm_year);
97102
}
103+
98104
int4
99105
asminutes(TimeADT * time)
100106
{
101-
int seconds = (int) *time;
107+
int seconds = (int) *time;
102108

103109
return (seconds / 60);
104110
}
111+
105112
int4
106113
asseconds(TimeADT * time)
107114
{
108-
int seconds = (int) *time;
115+
int seconds = (int) *time;
109116

110117
return (seconds);
111118
}

0 commit comments

Comments
 (0)