1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

pgindent run over code.

This commit is contained in:
Bruce Momjian
1999-05-25 16:15:34 +00:00
parent 4b04b01aaa
commit 07842084fe
413 changed files with 11723 additions and 10769 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.10 1999/02/13 23:15:34 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.11 1999/05/25 16:08:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -20,20 +20,20 @@
*/
/*
* FixedItemIsValid
* FixedItemIsValid
* True iff item is valid.
*/
#define FixedItemIsValid(item) PointerIsValid(item)
/*
* FixedStackGetItemBase
* FixedStackGetItemBase
* Returns base of enclosing structure.
*/
#define FixedStackGetItemBase(stack, item) \
((Pointer)((char *)(item) - (stack)->offset))
/*
* FixedStackGetItem
* FixedStackGetItem
* Returns item of given pointer to enclosing structure.
*/
#define FixedStackGetItem(stack, pointer) \
@ -84,7 +84,7 @@ FixedStackPush(FixedStack stack, Pointer pointer)
#ifdef USE_ASSERT_CHECKING
/*
* FixedStackContains
* FixedStackContains
* True iff ordered stack contains given element.
*
* Note:

View File

@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: stringinfo.c,v 1.15 1999/04/25 03:19:25 tgl Exp $
* $Id: stringinfo.c,v 1.16 1999/05/25 16:08:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -67,17 +67,18 @@ initStringInfo(StringInfo str)
static void
enlargeStringInfo(StringInfo str, int needed)
{
int newlen;
char *newdata;
int newlen;
char *newdata;
needed += str->len + 1; /* total space required now */
if (needed <= str->maxlen)
return; /* got enough space already */
/*
* We don't want to allocate just a little more space with each append;
* for efficiency, double the buffer size each time it overflows.
* Actually, we might need to more than double it if 'needed' is big...
* We don't want to allocate just a little more space with each
* append; for efficiency, double the buffer size each time it
* overflows. Actually, we might need to more than double it if
* 'needed' is big...
*/
newlen = 2 * str->maxlen;
while (needed > newlen)
@ -86,7 +87,7 @@ enlargeStringInfo(StringInfo str, int needed)
newdata = palloc(newlen);
if (newdata == NULL)
elog(ERROR,
"enlargeStringInfo: Out of memory (%d bytes requested)", newlen);
"enlargeStringInfo: Out of memory (%d bytes requested)", newlen);
/* OK, transfer data into new buffer, and release old buffer */
memcpy(newdata, str->data, str->len + 1);
@ -107,11 +108,11 @@ enlargeStringInfo(StringInfo str, int needed)
* generated in a single call (not on the total string length).
*/
void
appendStringInfo(StringInfo str, const char *fmt, ...)
appendStringInfo(StringInfo str, const char *fmt,...)
{
va_list args;
char buffer[1024];
int buflen;
va_list args;
char buffer[1024];
int buflen;
Assert(str != NULL);
@ -164,7 +165,8 @@ appendBinaryStringInfo(StringInfo str, const char *data, int datalen)
memcpy(str->data + str->len, data, datalen);
str->len += datalen;
/* Keep a trailing null in place, even though it's probably useless
/*
* Keep a trailing null in place, even though it's probably useless
* for binary data...
*/
str->data[str->len] = '\0';