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

Commit77e4fd8

Browse files
committed
Fix indenting for 'extern "C"' cases.
1 parente8192dc commit77e4fd8

File tree

17 files changed

+737
-731
lines changed

17 files changed

+737
-731
lines changed

‎src/backend/port/darwin/system.c

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
* modification, are permitted provided that the following conditions
77
* are met:
88
* 1. Redistributions of source code must retain the above copyright
9-
* notice, this list of conditions and the following disclaimer.
9+
* notice, this list of conditions and the following disclaimer.
1010
* 2. Redistributions in binary form must reproduce the above copyright
11-
* notice, this list of conditions and the following disclaimer in the
12-
* documentation and/or other materials provided with the distribution.
11+
* notice, this list of conditions and the following disclaimer in the
12+
* documentation and/or other materials provided with the distribution.
1313
* 3. All advertising materials mentioning features or use of this software
14-
* must display the following acknowledgement:
14+
* must display the following acknowledgement:
1515
*This product includes software developed by the University of
1616
*California, Berkeley and its contributors.
1717
* 4. Neither the name of the University nor the names of its contributors
18-
* may be used to endorse or promote products derived from this software
19-
* without specific prior written permission.
18+
* may be used to endorse or promote products derived from this software
19+
* without specific prior written permission.
2020
*
2121
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2222
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2323
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24-
* ARE DISCLAIMED.IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24+
* ARE DISCLAIMED.IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2525
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2626
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2727
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -35,7 +35,7 @@
3535

3636
#if defined(LIBC_SCCS)&& !defined(lint)
3737
staticcharsccsid[]="@(#)system.c8.1 (Berkeley) 6/4/93";
38-
#endif/* LIBC_SCCS and not lint */
38+
#endif/* LIBC_SCCS and not lint */
3939

4040
#include<sys/types.h>
4141
#include<sys/wait.h>
@@ -46,51 +46,57 @@ static char sccsid[] = "@(#)system.c8.1 (Berkeley) 6/4/93";
4646
#include<paths.h>
4747
#include<errno.h>
4848

49-
intsystem(constchar*command);
49+
intsystem(constchar*command);
5050

5151
int
5252
system(constchar*command)
5353
{
54-
pid_tpid;
55-
intpstat;
56-
structsigactionign,intact,quitact;
57-
sigset_tnewsigblock,oldsigblock;
54+
pid_tpid;
55+
intpstat;
56+
structsigactionign,
57+
intact,
58+
quitact;
59+
sigset_tnewsigblock,
60+
oldsigblock;
5861

59-
if (!command)/* just checking... */
60-
return(1);
62+
if (!command)/* just checking... */
63+
return(1);
6164

6265
/*
63-
* Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save
64-
*existingsignal dispositions.
66+
* Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save existing
67+
* signal dispositions.
6568
*/
6669
ign.sa_handler=SIG_IGN;
67-
(void)sigemptyset(&ign.sa_mask);
70+
(void)sigemptyset(&ign.sa_mask);
6871
ign.sa_flags=0;
69-
(void)sigaction(SIGINT,&ign,&intact);
70-
(void)sigaction(SIGQUIT,&ign,&quitact);
71-
(void)sigemptyset(&newsigblock);
72-
(void)sigaddset(&newsigblock,SIGCHLD);
73-
(void)sigprocmask(SIG_BLOCK,&newsigblock,&oldsigblock);
74-
switch(pid=fork()) {
75-
case-1:/* error */
76-
break;
77-
case0:/* child */
78-
/*
79-
* Restore original signal dispositions and exec the command.
80-
*/
81-
(void)sigaction(SIGINT,&intact,NULL);
82-
(void)sigaction(SIGQUIT,&quitact,NULL);
83-
(void)sigprocmask(SIG_SETMASK,&oldsigblock,NULL);
84-
execl(_PATH_BSHELL,"sh","-c",command, (char*)NULL);
85-
_exit(127);
86-
default:/* parent */
87-
do {
88-
pid=wait4(pid,&pstat,0, (structrusage*)0);
89-
}while (pid==-1&&errno==EINTR);
90-
break;
72+
(void)sigaction(SIGINT,&ign,&intact);
73+
(void)sigaction(SIGQUIT,&ign,&quitact);
74+
(void)sigemptyset(&newsigblock);
75+
(void)sigaddset(&newsigblock,SIGCHLD);
76+
(void)sigprocmask(SIG_BLOCK,&newsigblock,&oldsigblock);
77+
switch (pid=fork())
78+
{
79+
case-1:/* error */
80+
break;
81+
case0:/* child */
82+
83+
/*
84+
* Restore original signal dispositions and exec the command.
85+
*/
86+
(void)sigaction(SIGINT,&intact,NULL);
87+
(void)sigaction(SIGQUIT,&quitact,NULL);
88+
(void)sigprocmask(SIG_SETMASK,&oldsigblock,NULL);
89+
execl(_PATH_BSHELL,"sh","-c",command, (char*)NULL);
90+
_exit(127);
91+
default:/* parent */
92+
do
93+
{
94+
pid=wait4(pid,&pstat,0, (structrusage*)0);
95+
}while (pid==-1&&errno==EINTR);
96+
break;
9197
}
92-
(void)sigaction(SIGINT,&intact,NULL);
93-
(void)sigaction(SIGQUIT,&quitact,NULL);
94-
(void)sigprocmask(SIG_SETMASK,&oldsigblock,NULL);
95-
return(pid==-1 ?-1 :pstat);
98+
(void)sigaction(SIGINT,&intact,NULL);
99+
(void)sigaction(SIGQUIT,&quitact,NULL);
100+
(void)sigprocmask(SIG_SETMASK,&oldsigblock,NULL);
101+
return(pid==-1 ?-1 :pstat);
96102
}

‎src/backend/port/dynloader/aix.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Id: aix.h,v 1.9 2001/11/05 17:46:27 momjian Exp $
2+
* $Id: aix.h,v 1.10 2001/11/08 20:37:52 momjian Exp $
33
*
44
* @(#)dlfcn.h1.4 revision of 95/04/25 09:36:52
55
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
@@ -31,23 +31,23 @@ extern"C"
3131
* To be able to intialize, a library may provide a dl_info structure
3232
* that contains functions to be called to initialize and terminate.
3333
*/
34-
structdl_info
35-
{
36-
void(*init) (void);
37-
void(*fini) (void);
38-
};
34+
structdl_info
35+
{
36+
void(*init) (void);
37+
void(*fini) (void);
38+
};
3939

4040
#if__STDC__|| defined(_IBMR2)
41-
void*dlopen(constchar*path,intmode);
42-
void*dlsym(void*handle,constchar*symbol);
43-
char*dlerror(void);
44-
intdlclose(void*handle);
41+
void*dlopen(constchar*path,intmode);
42+
void*dlsym(void*handle,constchar*symbol);
43+
char*dlerror(void);
44+
intdlclose(void*handle);
4545

4646
#else
47-
void*dlopen();
48-
void*dlsym();
49-
char*dlerror();
50-
intdlclose();
47+
void*dlopen();
48+
void*dlsym();
49+
char*dlerror();
50+
intdlclose();
5151
#endif
5252

5353
#ifdef__cplusplus

‎src/backend/port/qnx4/sem.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.h,v 1.6 2001/11/05 17:46:27 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.h,v 1.7 2001/11/08 20:37:52 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -38,28 +38,28 @@ extern"C"
3838
*There is one semaphore structure for each semaphore in the system.
3939
*/
4040

41-
structsem
42-
{
43-
ushort_tsemval;/* semaphore text map address*/
44-
pid_tsempid;/* pid of last operation*/
45-
ushort_tsemncnt;/* # awaiting semval > cval */
46-
ushort_tsemzcnt;/* # awaiting semval = 0*/
47-
};
41+
structsem
42+
{
43+
ushort_tsemval;/* semaphore text map address*/
44+
pid_tsempid;/* pid of last operation*/
45+
ushort_tsemncnt;/* # awaiting semval > cval */
46+
ushort_tsemzcnt;/* # awaiting semval = 0*/
47+
};
4848

4949
/*
5050
* User semaphore template for semop system calls.
5151
*/
5252

53-
structsembuf
54-
{
55-
ushort_tsem_num;/* semaphore #*/
56-
shortsem_op;/* semaphore operation*/
57-
shortsem_flg;/* operation flags*/
58-
};
53+
structsembuf
54+
{
55+
ushort_tsem_num;/* semaphore #*/
56+
shortsem_op;/* semaphore operation*/
57+
shortsem_flg;/* operation flags*/
58+
};
5959

60-
externintsemctl(intsemid,intsemnum,intcmd,/* ... */unionsemunarg);
61-
externintsemget(key_tkey,intnsems,intsemflg);
62-
externintsemop(intsemid,structsembuf*sops,size_tnsops);
60+
externintsemctl(intsemid,intsemnum,intcmd,/* ... */unionsemunarg);
61+
externintsemget(key_tkey,intnsems,intsemflg);
62+
externintsemop(intsemid,structsembuf*sops,size_tnsops);
6363

6464
#ifdef__cplusplus
6565
}

‎src/backend/port/qnx4/shm.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.h,v 1.6 2001/11/05 17:46:27 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.h,v 1.7 2001/11/08 20:37:52 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -25,16 +25,16 @@ extern"C"
2525
#defineSHM_R0400/* read permission */
2626
#defineSHM_W0200/* write permission */
2727

28-
structshmid_ds
29-
{
30-
intdummy;
31-
intshm_nattch;
32-
};
33-
34-
externvoid*shmat(intshmid,constvoid*shmaddr,intshmflg);
35-
externintshmdt(constvoid*addr);
36-
externintshmctl(intshmid,intcmd,structshmid_ds*buf);
37-
externintshmget(key_tkey,size_tsize,intflags);
28+
structshmid_ds
29+
{
30+
intdummy;
31+
intshm_nattch;
32+
};
33+
34+
externvoid*shmat(intshmid,constvoid*shmaddr,intshmflg);
35+
externintshmdt(constvoid*addr);
36+
externintshmctl(intshmid,intcmd,structshmid_ds*buf);
37+
externintshmget(key_tkey,size_tsize,intflags);
3838

3939
#ifdef__cplusplus
4040
}

‎src/backend/storage/lmgr/proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.115 2001/11/06 00:38:26 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.116 2001/11/08 20:37:52 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -125,7 +125,7 @@ InitProcGlobal(int maxBackends)
125125
/*
126126
* Compute size for ProcGlobal structure. Note we need one more sema
127127
* besides those used for regular backends; this is accounted for in
128-
* the PROC_SEM_MAP_ENTRIES macro.(We do it that way so that other
128+
* the PROC_SEM_MAP_ENTRIES macro.(We do it that way so that other
129129
* modules that use PROC_SEM_MAP_ENTRIES(maxBackends) to size data
130130
* structures don't have to know about this explicitly.)
131131
*/

‎src/backend/tioga/tgRecipe.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: tgRecipe.h,v 1.21 2001/11/05 17:46:28 momjian Exp $
15+
* $Id: tgRecipe.h,v 1.22 2001/11/08 20:37:52 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -29,6 +29,7 @@ typedef struct
2929
y;
3030
}Point;/* this should match whatever is in
3131
32+
*
3233
*
3334
*
3435
* geo-decls.h */

‎src/include/executor/spi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* spi.h
44
*
5-
* $Id: spi.h,v 1.32 2001/11/05 19:41:56 tgl Exp $
5+
* $Id: spi.h,v 1.33 2001/11/08 20:37:52 momjian Exp $
66
*
77
*-------------------------------------------------------------------------
88
*/
@@ -90,7 +90,7 @@ extern intSPI_freeplan(void *plan);
9090
externHeapTupleSPI_copytuple(HeapTupletuple);
9191
externTupleDescSPI_copytupledesc(TupleDesctupdesc);
9292
externTupleTableSlot*SPI_copytupleintoslot(HeapTupletuple,
93-
TupleDesctupdesc);
93+
TupleDesctupdesc);
9494
externHeapTupleSPI_modifytuple(Relationrel,HeapTupletuple,intnatts,
9595
int*attnum,Datum*Values,char*Nulls);
9696
externintSPI_fnumber(TupleDesctupdesc,char*fname);

‎src/include/port/darwin/sem.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/include/port/darwin/Attic/sem.h,v 1.5 2001/11/05 17:46:35 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/include/port/darwin/Attic/sem.h,v 1.6 2001/11/08 20:37:52 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -44,28 +44,28 @@ extern"C"
4444
*There is one semaphore structure for each semaphore in the system.
4545
*/
4646

47-
structsem
48-
{
49-
ushort_tsemval;/* semaphore text map address*/
50-
pid_tsempid;/* pid of last operation*/
51-
ushort_tsemncnt;/* # awaiting semval > cval */
52-
ushort_tsemzcnt;/* # awaiting semval = 0*/
53-
};
47+
structsem
48+
{
49+
ushort_tsemval;/* semaphore text map address*/
50+
pid_tsempid;/* pid of last operation*/
51+
ushort_tsemncnt;/* # awaiting semval > cval */
52+
ushort_tsemzcnt;/* # awaiting semval = 0*/
53+
};
5454

5555
/*
5656
* User semaphore template for semop system calls.
5757
*/
5858

59-
structsembuf
60-
{
61-
ushort_tsem_num;/* semaphore #*/
62-
shortsem_op;/* semaphore operation*/
63-
shortsem_flg;/* operation flags*/
64-
};
59+
structsembuf
60+
{
61+
ushort_tsem_num;/* semaphore #*/
62+
shortsem_op;/* semaphore operation*/
63+
shortsem_flg;/* operation flags*/
64+
};
6565

66-
externintsemctl(intsemid,intsemnum,intcmd,/* ... */unionsemunarg);
67-
externintsemget(key_tkey,intnsems,intsemflg);
68-
externintsemop(intsemid,structsembuf*sops,size_tnsops);
66+
externintsemctl(intsemid,intsemnum,intcmd,/* ... */unionsemunarg);
67+
externintsemget(key_tkey,intnsems,intsemflg);
68+
externintsemop(intsemid,structsembuf*sops,size_tnsops);
6969

7070
#ifdef__cplusplus
7171
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp