1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-09 13:09:39 +03:00

New pgindent run with fixes suggested by Tom. Patch manually reviewed,

initdb/regression tests pass.
This commit is contained in:
Bruce Momjian
2001-11-05 17:46:40 +00:00
parent 34153b2052
commit ea08e6cd55
503 changed files with 1648 additions and 1610 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.46 2001/10/25 05:49:41 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.47 2001/11/05 17:46:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,7 +47,7 @@ bmtrace *TraceBuf;
long *CurTraceBuf;
#define BMT_LIMIT 200
#endif /* BMTRACE */
#endif /* BMTRACE */
int ShowPinTrace = 0;
int Data_Descriptors;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.118 2001/10/25 05:49:41 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.119 2001/11/05 17:46:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -350,7 +350,7 @@ BufferAlloc(Relation reln,
}
#ifdef BMTRACE
_bm_trace((reln->rd_rel->relisshared ? 0 : MyDatabaseId), RelationGetRelid(reln), blockNum, BufferDescriptorGetBuffer(buf), BMT_ALLOCFND);
#endif /* BMTRACE */
#endif /* BMTRACE */
if (!(*foundPtr))
StartBufferIO(buf, true);
@@ -558,7 +558,7 @@ BufferAlloc(Relation reln,
#ifdef BMTRACE
_bm_trace((reln->rd_rel->relisshared ? 0 : MyDatabaseId), RelationGetRelid(reln), blockNum, BufferDescriptorGetBuffer(buf), BMT_ALLOCNOTFND);
#endif /* BMTRACE */
#endif /* BMTRACE */
LWLockRelease(BufMgrLock);
@@ -1881,7 +1881,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
kill(getpid(), SIGILL);
}
#endif /* BMTRACE */
#endif /* BMTRACE */
/*
* SetBufferCommitInfoNeedsSave

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.27 2001/10/28 06:25:49 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.28 2001/11/05 17:46:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,7 +68,7 @@ AddBufferToFreelist(BufferDesc *bf)
#ifdef BMTRACE
_bm_trace(bf->tag.relId.dbId, bf->tag.relId.relId, bf->tag.blockNum,
BufferDescriptorGetBuffer(bf), BMT_DEALLOC);
#endif /* BMTRACE */
#endif /* BMTRACE */
IsNotInQueue(bf);
/* change bf so it points to inFrontOfNew and its successor */

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.86 2001/10/28 06:25:49 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.87 2001/11/05 17:46:27 momjian Exp $
*
* NOTES:
*
@@ -313,7 +313,7 @@ pg_nofile(void)
#else
no_files = (long) max_files_per_process;
#endif
#endif /* HAVE_SYSCONF */
#endif /* HAVE_SYSCONF */
/*
* Some platforms return hopelessly optimistic values. Apply a
@@ -355,7 +355,7 @@ _dump_lru(void)
sprintf(buf + strlen(buf), "LEAST");
elog(DEBUG, buf);
}
#endif /* FDDEBUG */
#endif /* FDDEBUG */
static void
Delete(File file)

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.9 2001/10/28 06:25:49 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.10 2001/11/05 17:46:27 momjian Exp $
*
*
* NOTES:
@@ -1117,4 +1117,4 @@ DumpFreeSpace(void)
nChunks, FreeSpaceMap->numFreeChunks);
}
#endif /* FREESPACE_DEBUG */
#endif /* FREESPACE_DEBUG */

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.74 2001/10/30 05:38:55 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.75 2001/11/05 17:46:28 momjian Exp $
*
* NOTES
*
@@ -94,7 +94,7 @@ static struct ONEXIT
{
void (*function) ();
Datum arg;
} on_proc_exit_list[MAX_ON_EXITS], on_shmem_exit_list[MAX_ON_EXITS];
} on_proc_exit_list[MAX_ON_EXITS], on_shmem_exit_list[MAX_ON_EXITS];
static int on_proc_exit_index,
on_shmem_exit_index;

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/pmsignal.c,v 1.2 2001/11/05 01:34:37 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/pmsignal.c,v 1.3 2001/11/05 17:46:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,9 +24,9 @@
/*
* The postmaster is signaled by its children by sending SIGUSR1. The
* specific reason is communicated via flags in shared memory. We keep
* specific reason is communicated via flags in shared memory. We keep
* a boolean flag for each possible "reason", so that different reasons
* can be signaled by different backends at the same time. (However,
* can be signaled by different backends at the same time. (However,
* if the same reason is signaled more than once simultaneously, the
* postmaster will observe it only once.)
*
@@ -35,7 +35,7 @@
* values are atomic, allowing us to dispense with any explicit locking.
*/
static volatile sig_atomic_t * PMSignalFlags;
static volatile sig_atomic_t *PMSignalFlags;
/*

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.18 2001/10/28 06:25:50 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.19 2001/11/05 17:46:28 momjian Exp $
*
* NOTES
*
@@ -150,7 +150,7 @@ SHMQueueInsertAfter(SHM_QUEUE *queue, SHM_QUEUE *elem)
dumpQ(queue, "in SHMQueueInsertAfter: end");
#endif
}
#endif /* NOT_USED */
#endif /* NOT_USED */
/*--------------------
* SHMQueueNext -- Get the next element from a queue
@@ -254,4 +254,4 @@ dumpQ(SHM_QUEUE *q, char *s)
elog(SHMQUEUE_DEBUG_ELOG, "%s: %s", s, buf);
}
#endif /* SHMQUEUE_DEBUG */
#endif /* SHMQUEUE_DEBUG */

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.42 2001/11/04 19:55:31 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.43 2001/11/05 17:46:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -120,7 +120,7 @@ SIBackendInit(SISeg *segP)
#ifdef INVALIDDEBUG
elog(DEBUG, "SIBackendInit: backend id %d", MyBackendId);
#endif /* INVALIDDEBUG */
#endif /* INVALIDDEBUG */
/* mark myself active, with all extant messages already read */
stateP->nextMsgNum = segP->maxMsgNum;
@@ -205,9 +205,9 @@ SIInsertDataEntry(SISeg *segP, SharedInvalidationMessage *data)
* Try to prevent table overflow. When the table is 70% full send a
* WAKEN_CHILDREN request to the postmaster. The postmaster will send
* a SIGUSR2 signal (ordinarily a NOTIFY signal) to all the backends.
* This will force idle backends to execute a transaction to look through
* pg_listener for NOTIFY messages, and as a byproduct of the transaction
* start they will read SI entries.
* This will force idle backends to execute a transaction to look
* through pg_listener for NOTIFY messages, and as a byproduct of the
* transaction start they will read SI entries.
*
* This should never happen if all the backends are actively executing
* queries, but if a backend is sitting idle then it won't be starting

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.103 2001/10/30 05:38:55 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.104 2001/11/05 17:46:28 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -147,7 +147,7 @@ HOLDER_PRINT(const char *where, const HOLDER *holderP)
#define LOCK_PRINT(where, lock, type)
#define HOLDER_PRINT(where, holderP)
#endif /* not LOCK_DEBUG */
#endif /* not LOCK_DEBUG */
/*
@@ -589,7 +589,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
break;
}
}
#endif /* CHECK_DEADLOCK_RISK */
#endif /* CHECK_DEADLOCK_RISK */
}
/*
@@ -1464,4 +1464,4 @@ DumpAllLocks(void)
}
}
#endif /* LOCK_DEBUG */
#endif /* LOCK_DEBUG */

View File

@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.2 2001/10/25 05:49:42 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.3 2001/11/05 17:46:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -74,7 +74,7 @@ PRINT_LWDEBUG(const char *where, LWLockId lockid, const LWLock *lock)
#else /* not LOCK_DEBUG */
#define PRINT_LWDEBUG(a,b,c)
#endif /* LOCK_DEBUG */
#endif /* LOCK_DEBUG */
/*

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.4 2001/10/28 06:25:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.5 2001/11/05 17:46:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -109,7 +109,7 @@ _success: \n\
rts \n\
");
}
#endif /* __m68k__ */
#endif /* __m68k__ */
#if defined(__APPLE__) && defined(__ppc__)
/* used in darwin. */
@@ -138,7 +138,7 @@ success: \n\
blr \n\
");
}
#endif /* __APPLE__ && __ppc__ */
#endif /* __APPLE__ && __ppc__ */
#if defined(__powerpc__)
/* Note: need a nice gcc constrained asm version so it can be inlined */
@@ -162,7 +162,7 @@ success: \n\
blr \n\
");
}
#endif /* __powerpc__ */
#endif /* __powerpc__ */
#if defined(__mips__) && !defined(__sgi)
static void
@@ -186,7 +186,7 @@ fail: \n\
j $31 \n\
");
}
#endif /* __mips__ && !__sgi */
#endif /* __mips__ && !__sgi */
#else /* not __GNUC__ */
/***************************************************************************
@@ -217,7 +217,7 @@ tas_dummy() /* really means: extern int tas(slock_t
asm(" rts");
asm(" .data");
}
#endif /* sun3 */
#endif /* sun3 */
@@ -240,15 +240,15 @@ tas_dummy() /* really means: extern int tas(slock_t
asm("retl");
asm("nop");
}
#endif /* NEED_SPARC_TAS_ASM */
#endif /* NEED_SPARC_TAS_ASM */
#if defined(NEED_I386_TAS_ASM)
/* non gcc i386 based things */
#endif /* NEED_I386_TAS_ASM */
#endif /* not __GNUC__ */
#endif /* NEED_I386_TAS_ASM */
#endif /* not __GNUC__ */
@@ -291,4 +291,4 @@ main()
}
#endif /* S_LOCK_TEST */
#endif /* S_LOCK_TEST */

View File

@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/spin.c,v 1.6 2001/10/28 06:25:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/spin.c,v 1.7 2001/11/05 17:46:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -187,4 +187,4 @@ tas_sema(volatile slock_t *lock)
return !IpcSemaphoreTryLock(lock->semId, lock->sem);
}
#endif /* !HAS_TEST_AND_SET */
#endif /* !HAS_TEST_AND_SET */

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.29 2001/10/28 06:25:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.30 2001/11/05 17:46:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,7 +35,7 @@ typedef struct MMCacheTag
Oid mmct_dbid;
Oid mmct_relid;
BlockNumber mmct_blkno;
} MMCacheTag;
} MMCacheTag;
/*
* Shared-memory hash table for main memory relations contains
@@ -46,7 +46,7 @@ typedef struct MMHashEntry
{
MMCacheTag mmhe_tag;
int mmhe_bufno;
} MMHashEntry;
} MMHashEntry;
/*
* MMRelTag -- Unique identifier for each relation that is stored in the
@@ -57,7 +57,7 @@ typedef struct MMRelTag
{
Oid mmrt_dbid;
Oid mmrt_relid;
} MMRelTag;
} MMRelTag;
/*
* Shared-memory hash table for # blocks in main memory relations contains
@@ -68,7 +68,7 @@ typedef struct MMRelHashEntry
{
MMRelTag mmrhe_tag;
int mmrhe_nblocks;
} MMRelHashEntry;
} MMRelHashEntry;
#define MMNBUFFERS 10
#define MMNRELATIONS 2
@@ -562,4 +562,4 @@ MMShmemSize()
return size;
}
#endif /* STABLE_MEMORY_STORAGE */
#endif /* STABLE_MEMORY_STORAGE */