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

Commit319dbfa

Browse files
committed
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
1 parenta90f12f commit319dbfa

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

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

43-
staticint32
43+
staticint32
4444
array_iterator(Oidelemtype,Oidproc,intand,ArrayType*array,Datumvalue)
4545
{
46-
HeapTupletyp_tuple;
47-
TypeTupleFormtyp_struct;
48-
booltypbyval;
49-
inttyplen;
50-
func_ptrproc_fn;
51-
intpronargs;
52-
intnitems,
53-
i,
54-
result;
55-
intndim,
56-
*dim;
57-
char*p;
46+
HeapTupletyp_tuple;
47+
TypeTupleFormtyp_struct;
48+
booltypbyval;
49+
inttyplen;
50+
func_ptrproc_fn;
51+
intpronargs;
52+
intnitems,
53+
i,
54+
result;
55+
intndim,
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-
case1:
105-
result= (int) (*proc_fn) (*p,value);
106-
break;
107-
case2:
108-
result= (int) (*proc_fn) (*(int16*)p,value);
109-
break;
110-
case3:
111-
case4:
112-
result= (int) (*proc_fn) (*(int32*)p,value);
113-
break;
104+
case1:
105+
result= (int) (*proc_fn) (*p,value);
106+
break;
107+
case2:
108+
result= (int) (*proc_fn) (*(int16*)p,value);
109+
break;
110+
case3:
111+
case4:
112+
result= (int) (*proc_fn) (*(int32*)p,value);
113+
break;
114114
}
115115
p+=typlen;
116116
}

‎contrib/datetime/datetime_functions.c

Lines changed: 21 additions & 14 deletions
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_tcurrent_time;
29-
structtm*tm;
30-
TimeADT*result= (TimeADT*)palloc(sizeof(TimeADT));
28+
time_tcurrent_time;
29+
structtm*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_tcurrent_time;
41-
structtm*tm;
42-
DateADTresult;
41+
time_tcurrent_time;
42+
structtm*tm;
43+
DateADTresult;
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-
structtmtm;
74+
structtmtm;
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-
structtmtm;
85+
structtmtm;
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-
structtmtm;
96+
structtmtm;
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-
intseconds= (int)*time;
107+
intseconds= (int)*time;
102108

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

110117
return (seconds);
111118
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp