summaryrefslogtreecommitdiff
path: root/src/backend/lib
diff options
context:
space:
mode:
authorBruce Momjian1999-05-25 16:15:34 +0000
committerBruce Momjian1999-05-25 16:15:34 +0000
commit07842084fe3e11041f83563c851236395f481470 (patch)
treeab9960e67325bec5a97b8b4dd4b2075ce60cc420 /src/backend/lib
parent4b04b01aaa460f1e52980f24173dc7a4535efd2d (diff)
pgindent run over code.
Diffstat (limited to 'src/backend/lib')
-rw-r--r--src/backend/lib/fstack.c10
-rw-r--r--src/backend/lib/stringinfo.c26
2 files changed, 19 insertions, 17 deletions
diff --git a/src/backend/lib/fstack.c b/src/backend/lib/fstack.c
index 7b05dbd8fd8..1f2beafa922 100644
--- a/src/backend/lib/fstack.c
+++ b/src/backend/lib/fstack.c
@@ -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:
diff --git a/src/backend/lib/stringinfo.c b/src/backend/lib/stringinfo.c
index 3ded7799749..12d0f8625c2 100644
--- a/src/backend/lib/stringinfo.c
+++ b/src/backend/lib/stringinfo.c
@@ -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';