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

Commit1ccd423

Browse files
committed
Massive commit to run PGINDENT on all *.c and *.h files.
1 parent8fecd4f commit1ccd423

File tree

687 files changed

+152235
-138348
lines changed

Some content is hidden

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

687 files changed

+152235
-138348
lines changed

‎contrib/array/array_iterator.c

Lines changed: 172 additions & 149 deletions
Large diffs are not rendered by default.

‎contrib/datetime/datetime_functions.c

Lines changed: 63 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,86 +13,99 @@
1313
#include"utils/datetime.h"
1414

1515

16-
TimeADT*time_difference(TimeADT*time1,TimeADT*time2)
16+
TimeADT*
17+
time_difference(TimeADT*time1,TimeADT*time2)
1718
{
18-
TimeADT*result= (TimeADT*)palloc(sizeof(TimeADT));
19-
*result=*time1-*time2;
20-
return (result);
19+
TimeADT*result= (TimeADT*)palloc(sizeof(TimeADT));
20+
21+
*result=*time1-*time2;
22+
return (result);
2123
}
2224

23-
TimeADT*currenttime()
25+
TimeADT*
26+
currenttime()
2427
{
25-
time_tcurrent_time;
26-
structtm*tm;
27-
TimeADT*result= (TimeADT*)palloc(sizeof(TimeADT));
28-
29-
current_time=time(NULL);
30-
tm=localtime(&current_time);
31-
*result= ((((tm->tm_hour*60)+tm->tm_min)*60)+tm->tm_sec);
32-
return (result);
28+
time_tcurrent_time;
29+
structtm*tm;
30+
TimeADT*result= (TimeADT*)palloc(sizeof(TimeADT));
31+
32+
current_time=time(NULL);
33+
tm=localtime(&current_time);
34+
*result= ((((tm->tm_hour*60)+tm->tm_min)*60)+tm->tm_sec);
35+
return (result);
3336
}
34-
DateADTcurrentdate()
37+
DateADT
38+
currentdate()
3539
{
36-
time_tcurrent_time;
37-
structtm*tm;
38-
DateADTresult;
39-
current_time=time(NULL);
40-
tm=localtime(&current_time);
41-
42-
result=date2j(tm->tm_year,tm->tm_mon+1,tm->tm_mday)-
43-
date2j(100,1,1);
44-
return (result);
40+
time_tcurrent_time;
41+
structtm*tm;
42+
DateADTresult;
43+
44+
current_time=time(NULL);
45+
tm=localtime(&current_time);
46+
47+
result=date2j(tm->tm_year,tm->tm_mon+1,tm->tm_mday)-
48+
date2j(100,1,1);
49+
return (result);
4550
}
46-
int4hours(TimeADT*time)
51+
int4
52+
hours(TimeADT*time)
4753
{
48-
return(*time / (60*60));
54+
return(*time / (60*60));
4955
}
5056

51-
int4minutes(TimeADT*time)
57+
int4
58+
minutes(TimeADT*time)
5259
{
53-
return(((int) (*time /60)) %60);
60+
return(((int) (*time /60)) %60);
5461
}
5562

56-
int4seconds(TimeADT*time)
63+
int4
64+
seconds(TimeADT*time)
5765
{
58-
return(((int)*time) %60);
66+
return(((int)*time) %60);
5967
}
60-
int4day(DateADT*date)
68+
int4
69+
day(DateADT*date)
6170
{
62-
structtmtm;
71+
structtmtm;
6372

64-
j2date((*date+date2j(2000,1,1)),
65-
&tm.tm_year,&tm.tm_mon,&tm.tm_mday);
73+
j2date((*date+date2j(2000,1,1)),
74+
&tm.tm_year,&tm.tm_mon,&tm.tm_mday);
6675

67-
return (tm.tm_mday);
76+
return (tm.tm_mday);
6877
}
69-
int4month(DateADT*date)
78+
int4
79+
month(DateADT*date)
7080
{
71-
structtmtm;
81+
structtmtm;
7282

73-
j2date((*date+date2j(2000,1,1)),
74-
&tm.tm_year,&tm.tm_mon,&tm.tm_mday);
83+
j2date((*date+date2j(2000,1,1)),
84+
&tm.tm_year,&tm.tm_mon,&tm.tm_mday);
7585

76-
return (tm.tm_mon);
86+
return (tm.tm_mon);
7787
}
78-
int4year(DateADT*date)
88+
int4
89+
year(DateADT*date)
7990
{
80-
structtmtm;
91+
structtmtm;
8192

82-
j2date((*date+date2j(2000,1,1)),
83-
&tm.tm_year,&tm.tm_mon,&tm.tm_mday);
93+
j2date((*date+date2j(2000,1,1)),
94+
&tm.tm_year,&tm.tm_mon,&tm.tm_mday);
8495

85-
return (tm.tm_year);
96+
return (tm.tm_year);
8697
}
87-
int4asminutes(TimeADT*time)
98+
int4
99+
asminutes(TimeADT*time)
88100
{
89-
intseconds= (int)*time;
101+
intseconds= (int)*time;
90102

91-
return (seconds /60);
103+
return (seconds /60);
92104
}
93-
int4asseconds(TimeADT*time)
105+
int4
106+
asseconds(TimeADT*time)
94107
{
95-
intseconds= (int)*time;
108+
intseconds= (int)*time;
96109

97-
return (seconds);
110+
return (seconds);
98111
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp