1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.

This commit is contained in:
Bruce Momjian
1997-09-08 02:41:22 +00:00
parent a90f12fd9d
commit 319dbfa736
632 changed files with 28301 additions and 28220 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.5 1997/09/07 04:53:11 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.6 1997/09/08 02:31:25 momjian Exp $
*
* NOTE
* This should eventually work with elog(), dlog(), etc.
@@ -28,8 +28,8 @@ ExceptionalCondition(char *conditionName,
char *fileName,
int lineNumber)
{
extern char *ExcFileName;/* XXX */
extern Index ExcLineNumber; /* XXX */
extern char *ExcFileName; /* XXX */
extern Index ExcLineNumber; /* XXX */
ExcFileName = fileName;
ExcLineNumber = lineNumber;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.18 1997/09/07 04:53:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.19 1997/09/08 02:31:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,11 +29,11 @@
#include "libpq/libpq.h"
#include "storage/proc.h"
static int Debugfile = -1;
static int Err_file = -1;
static int ElogDebugIndentLevel = 0;
static int Debugfile = -1;
static int Err_file = -1;
static int ElogDebugIndentLevel = 0;
extern char OutputFileName[];
extern char OutputFileName[];
/*
* elog --
@@ -42,24 +42,24 @@ extern char OutputFileName[];
void
elog(int lev, const char *fmt,...)
{
va_list ap;
char buf[ELOG_MAXLEN],
line[ELOG_MAXLEN];
register char *bp;
va_list ap;
char buf[ELOG_MAXLEN],
line[ELOG_MAXLEN];
register char *bp;
register const char *cp;
extern int errno,
sys_nerr;
extern int errno,
sys_nerr;
#ifndef PG_STANDALONE
extern FILE *Pfout;
extern FILE *Pfout;
#endif /* !PG_STANDALONE */
#ifdef ELOG_TIMESTAMPS
time_t tim;
time_t tim;
#endif
int len;
int i = 0;
int len;
int i = 0;
va_start(ap, fmt);
if (lev == DEBUG && Debugfile < 0)
@@ -68,31 +68,31 @@ elog(int lev, const char *fmt,...)
}
switch (lev)
{
case NOIND:
i = ElogDebugIndentLevel - 1;
if (i < 0)
i = 0;
if (i > 30)
i = i % 30;
cp = "DEBUG:";
break;
case DEBUG:
i = ElogDebugIndentLevel;
if (i < 0)
i = 0;
if (i > 30)
i = i % 30;
cp = "DEBUG:";
break;
case NOTICE:
cp = "NOTICE:";
break;
case WARN:
cp = "WARN:";
break;
default:
sprintf(line, "FATAL %d:", lev);
cp = line;
case NOIND:
i = ElogDebugIndentLevel - 1;
if (i < 0)
i = 0;
if (i > 30)
i = i % 30;
cp = "DEBUG:";
break;
case DEBUG:
i = ElogDebugIndentLevel;
if (i < 0)
i = 0;
if (i > 30)
i = i % 30;
cp = "DEBUG:";
break;
case NOTICE:
cp = "NOTICE:";
break;
case WARN:
cp = "WARN:";
break;
default:
sprintf(line, "FATAL %d:", lev);
cp = line;
}
#ifdef ELOG_TIMESTAMPS
time(&tim);
@@ -166,7 +166,7 @@ elog(int lev, const char *fmt,...)
if (lev == WARN)
{
extern int InWarn;
extern int InWarn;
ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */
if (!InWarn)
@@ -209,8 +209,8 @@ elog(int lev, const char *fmt,...)
int
DebugFileOpen(void)
{
int fd,
istty;
int fd,
istty;
Err_file = Debugfile = -1;
ElogDebugIndentLevel = 0;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.16 1997/09/07 04:53:16 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.17 1997/09/08 02:31:29 momjian Exp $
*
* NOTE
* XXX this code needs improvement--check for state violations and
@@ -34,16 +34,16 @@ ExcPrint(Exception * excP, ExcDetail detail, ExcData data,
/*
* Global Variables
*/
static bool ExceptionHandlingEnabled = false;
static bool ExceptionHandlingEnabled = false;
char *ExcFileName = NULL;
Index ExcLineNumber = 0;
char *ExcFileName = NULL;
Index ExcLineNumber = 0;
ExcFrame *ExcCurFrameP = NULL;
ExcFrame *ExcCurFrameP = NULL;
static ExcProc *ExcUnCaughtP = NULL;
extern char *ProgramName;
extern char *ProgramName;
/*
* Exported Functions
@@ -103,8 +103,8 @@ ExcPrint(Exception * excP,
ExcData data,
ExcMessage message)
{
extern int errno;
extern int sys_nerr;
extern int errno;
extern int sys_nerr;
#ifdef lint
data = data;
@@ -141,7 +141,7 @@ ExcPrint(Exception * excP,
}
#ifdef NOT_USED
ExcProc *
ExcProc *
ExcGetUnCaught(void)
{
return (ExcUnCaughtP);
@@ -150,10 +150,10 @@ ExcGetUnCaught(void)
#endif
#ifdef NOT_USED
ExcProc *
ExcProc *
ExcSetUnCaught(ExcProc * newP)
{
ExcProc *oldP = ExcUnCaughtP;
ExcProc *oldP = ExcUnCaughtP;
ExcUnCaughtP = newP;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excid.c,v 1.3 1997/09/07 04:53:19 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excid.c,v 1.4 1997/09/08 02:31:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,19 +25,19 @@
* FailedAssertion --
* Indicates an Assert(...) failed.
*/
Exception FailedAssertion = {"Failed Assertion"};
Exception FailedAssertion = {"Failed Assertion"};
/*
* BadState --
* Indicates a function call request is inconsistent with module state.
*/
Exception BadState = {"Bad State for Function Call"};
Exception BadState = {"Bad State for Function Call"};
/*
* BadArg --
* Indicates a function call argument or arguments is out-of-bounds.
*/
Exception BadArg = {"Bad Argument to Function Call"};
Exception BadArg = {"Bad Argument to Function Call"};
/*****************************************************************************
* Specific Recoverable Exceptions *
@@ -47,21 +47,21 @@ Exception BadArg = {"Bad Argument to Function Call"};
* BadAllocSize --
* Indicates that an allocation request is of unreasonable size.
*/
Exception BadAllocSize = {"Too Large Allocation Request"};
Exception BadAllocSize = {"Too Large Allocation Request"};
/*
* ExhaustedMemory --
* Indicates an dynamic memory allocation failed.
*/
Exception ExhaustedMemory = {"Memory Allocation Failed"};
Exception ExhaustedMemory = {"Memory Allocation Failed"};
/*
* Unimplemented --
* Indicates a function call request requires unimplemented code.
*/
Exception Unimplemented = {"Unimplemented Functionality"};
Exception Unimplemented = {"Unimplemented Functionality"};
Exception CatalogFailure = {"Catalog failure"}; /* XXX inconsistent */
Exception InternalError = {"Internal Error"}; /* XXX inconsistent */
Exception SemanticError = {"Semantic Error"}; /* XXX inconsistent */
Exception SystemError = {"System Error"}; /* XXX inconsistent */
Exception CatalogFailure = {"Catalog failure"}; /* XXX inconsistent */
Exception InternalError = {"Internal Error"}; /* XXX inconsistent */
Exception SemanticError = {"Semantic Error"}; /* XXX inconsistent */
Exception SystemError = {"System Error"}; /* XXX inconsistent */

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.4 1997/09/07 04:53:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.5 1997/09/08 02:31:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,17 +18,17 @@
#define FormMaxSize 1024
#define FormMinSize (FormMaxSize / 8)
static char FormBuf[FormMaxSize];
static char FormBuf[FormMaxSize];
/* ----------------
* form
* ----------------
*/
char *
char *
form(const char *fmt,...)
{
va_list args;
va_list args;
va_start(args, fmt);