aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/nodes')
-rw-r--r--src/backend/nodes/copyfuncs.c18
-rw-r--r--src/backend/nodes/equalfuncs.c14
-rw-r--r--src/backend/nodes/list.c150
-rw-r--r--src/backend/nodes/outfuncs.c17
-rw-r--r--src/backend/nodes/params.c14
-rw-r--r--src/backend/nodes/print.c10
-rw-r--r--src/backend/nodes/read.c19
7 files changed, 123 insertions, 119 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index a67c669c83f..fe74495781e 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.291 2004/08/29 04:12:32 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.292 2004/08/29 05:06:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -942,7 +942,7 @@ _copyArrayExpr(ArrayExpr *from)
static RowExpr *
_copyRowExpr(RowExpr *from)
{
- RowExpr *newnode = makeNode(RowExpr);
+ RowExpr *newnode = makeNode(RowExpr);
COPY_NODE_FIELD(args);
COPY_SCALAR_FIELD(row_typeid);
@@ -1402,7 +1402,7 @@ _copyTypeName(TypeName *from)
static SortBy *
_copySortBy(SortBy *from)
{
- SortBy *newnode = makeNode(SortBy);
+ SortBy *newnode = makeNode(SortBy);
COPY_SCALAR_FIELD(sortby_kind);
COPY_NODE_FIELD(useOp);
@@ -2499,9 +2499,9 @@ _copyDeallocateStmt(DeallocateStmt *from)
static List *
_copyList(List *from)
{
- List *new;
- ListCell *curr_old;
- ListCell *prev_new;
+ List *new;
+ ListCell *curr_old;
+ ListCell *prev_new;
Assert(list_length(from) >= 1);
@@ -2779,10 +2779,10 @@ copyObject(void *from)
case T_List:
retval = _copyList(from);
break;
+
/*
- * Lists of integers and OIDs don't need to be
- * deep-copied, so we perform a shallow copy via
- * list_copy()
+ * Lists of integers and OIDs don't need to be deep-copied, so
+ * we perform a shallow copy via list_copy()
*/
case T_IntList:
case T_OidList:
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 6e494a34d76..22c94cb4af2 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.230 2004/08/29 04:12:32 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.231 2004/08/29 05:06:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1680,19 +1680,19 @@ _equalFkConstraint(FkConstraint *a, FkConstraint *b)
static bool
_equalList(List *a, List *b)
{
- ListCell *item_a;
- ListCell *item_b;
+ ListCell *item_a;
+ ListCell *item_b;
/*
- * Try to reject by simple scalar checks before grovelling through
- * all the list elements...
+ * Try to reject by simple scalar checks before grovelling through all
+ * the list elements...
*/
COMPARE_SCALAR_FIELD(type);
COMPARE_SCALAR_FIELD(length);
/*
- * We place the switch outside the loop for the sake of
- * efficiency; this may not be worth doing...
+ * We place the switch outside the loop for the sake of efficiency;
+ * this may not be worth doing...
*/
switch (a->type)
{
diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c
index 69278c272e3..e008cfa989b 100644
--- a/src/backend/nodes/list.c
+++ b/src/backend/nodes/list.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/list.c,v 1.61 2004/08/29 04:12:32 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/list.c,v 1.62 2004/08/29 05:06:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,9 +50,10 @@ check_list_invariants(List *list)
Assert(list->head->next == list->tail);
Assert(list->tail->next == NULL);
}
+
#else
#define check_list_invariants(l)
-#endif /* USE_ASSERT_CHECKING */
+#endif /* USE_ASSERT_CHECKING */
/*
* Return a freshly allocated List. Since empty non-NIL lists are
@@ -62,8 +63,8 @@ check_list_invariants(List *list)
static List *
new_list(NodeTag type)
{
- List *new_list;
- ListCell *new_head;
+ List *new_list;
+ ListCell *new_head;
new_head = (ListCell *) palloc(sizeof(*new_head));
new_head->next = NULL;
@@ -88,7 +89,7 @@ new_list(NodeTag type)
static void
new_head_cell(List *list)
{
- ListCell *new_head;
+ ListCell *new_head;
new_head = (ListCell *) palloc(sizeof(*new_head));
new_head->next = list->head;
@@ -107,7 +108,7 @@ new_head_cell(List *list)
static void
new_tail_cell(List *list)
{
- ListCell *new_tail;
+ ListCell *new_tail;
new_tail = (ListCell *) palloc(sizeof(*new_tail));
new_tail->next = NULL;
@@ -142,7 +143,7 @@ lappend(List *list, void *datum)
/*
* Append an integer to the specified list. See lappend()
*/
-List *
+List *
lappend_int(List *list, int datum)
{
Assert(IsIntegerList(list));
@@ -160,7 +161,7 @@ lappend_int(List *list, int datum)
/*
* Append an OID to the specified list. See lappend()
*/
-List *
+List *
lappend_oid(List *list, Oid datum)
{
Assert(IsOidList(list));
@@ -184,7 +185,7 @@ lappend_oid(List *list, Oid datum)
static ListCell *
add_new_cell(List *list, ListCell *prev_cell)
{
- ListCell *new_cell;
+ ListCell *new_cell;
new_cell = (ListCell *) palloc(sizeof(*new_cell));
/* new_cell->data is left undefined! */
@@ -208,7 +209,7 @@ add_new_cell(List *list, ListCell *prev_cell)
ListCell *
lappend_cell(List *list, ListCell *prev, void *datum)
{
- ListCell *new_cell;
+ ListCell *new_cell;
Assert(IsPointerList(list));
@@ -221,7 +222,7 @@ lappend_cell(List *list, ListCell *prev, void *datum)
ListCell *
lappend_cell_int(List *list, ListCell *prev, int datum)
{
- ListCell *new_cell;
+ ListCell *new_cell;
Assert(IsIntegerList(list));
@@ -234,7 +235,7 @@ lappend_cell_int(List *list, ListCell *prev, int datum)
ListCell *
lappend_cell_oid(List *list, ListCell *prev, Oid datum)
{
- ListCell *new_cell;
+ ListCell *new_cell;
Assert(IsOidList(list));
@@ -291,7 +292,7 @@ lcons_int(int datum, List *list)
/*
* Prepend an OID to the list. See lcons()
*/
-List *
+List *
lcons_oid(Oid datum, List *list)
{
Assert(IsOidList(list));
@@ -349,18 +350,18 @@ list_concat(List *list1, List *list2)
List *
list_truncate(List *list, int new_size)
{
- ListCell *cell;
- int n;
+ ListCell *cell;
+ int n;
if (new_size <= 0)
- return NIL; /* truncate to zero length */
+ return NIL; /* truncate to zero length */
/* If asked to effectively extend the list, do nothing */
if (new_size >= list_length(list))
return list;
n = 1;
- foreach (cell, list)
+ foreach(cell, list)
{
if (n == new_size)
{
@@ -385,7 +386,7 @@ list_truncate(List *list, int new_size)
static ListCell *
list_nth_cell(List *list, int n)
{
- ListCell *match;
+ ListCell *match;
Assert(list != NIL);
Assert(n >= 0);
@@ -443,12 +444,12 @@ list_nth_oid(List *list, int n)
bool
list_member(List *list, void *datum)
{
- ListCell *cell;
+ ListCell *cell;
Assert(IsPointerList(list));
check_list_invariants(list);
- foreach (cell, list)
+ foreach(cell, list)
{
if (equal(lfirst(cell), datum))
return true;
@@ -464,12 +465,12 @@ list_member(List *list, void *datum)
bool
list_member_ptr(List *list, void *datum)
{
- ListCell *cell;
+ ListCell *cell;
Assert(IsPointerList(list));
check_list_invariants(list);
- foreach (cell, list)
+ foreach(cell, list)
{
if (lfirst(cell) == datum)
return true;
@@ -484,12 +485,12 @@ list_member_ptr(List *list, void *datum)
bool
list_member_int(List *list, int datum)
{
- ListCell *cell;
+ ListCell *cell;
Assert(IsIntegerList(list));
check_list_invariants(list);
- foreach (cell, list)
+ foreach(cell, list)
{
if (lfirst_int(cell) == datum)
return true;
@@ -504,12 +505,12 @@ list_member_int(List *list, int datum)
bool
list_member_oid(List *list, Oid datum)
{
- ListCell *cell;
+ ListCell *cell;
Assert(IsOidList(list));
check_list_invariants(list);
- foreach (cell, list)
+ foreach(cell, list)
{
if (lfirst_oid(cell) == datum)
return true;
@@ -543,8 +544,8 @@ list_delete_cell(List *list, ListCell *cell, ListCell *prev)
/*
* Otherwise, adjust the necessary list links, deallocate the
- * particular node we have just removed, and return the list we
- * were given.
+ * particular node we have just removed, and return the list we were
+ * given.
*/
list->length--;
@@ -567,14 +568,14 @@ list_delete_cell(List *list, ListCell *cell, ListCell *prev)
List *
list_delete(List *list, void *datum)
{
- ListCell *cell;
- ListCell *prev;
+ ListCell *cell;
+ ListCell *prev;
Assert(IsPointerList(list));
check_list_invariants(list);
prev = NULL;
- foreach (cell, list)
+ foreach(cell, list)
{
if (equal(lfirst(cell), datum))
return list_delete_cell(list, cell, prev);
@@ -590,14 +591,14 @@ list_delete(List *list, void *datum)
List *
list_delete_ptr(List *list, void *datum)
{
- ListCell *cell;
- ListCell *prev;
+ ListCell *cell;
+ ListCell *prev;
Assert(IsPointerList(list));
check_list_invariants(list);
prev = NULL;
- foreach (cell, list)
+ foreach(cell, list)
{
if (lfirst(cell) == datum)
return list_delete_cell(list, cell, prev);
@@ -613,14 +614,14 @@ list_delete_ptr(List *list, void *datum)
List *
list_delete_int(List *list, int datum)
{
- ListCell *cell;
- ListCell *prev;
+ ListCell *cell;
+ ListCell *prev;
Assert(IsIntegerList(list));
check_list_invariants(list);
prev = NULL;
- foreach (cell, list)
+ foreach(cell, list)
{
if (lfirst_int(cell) == datum)
return list_delete_cell(list, cell, prev);
@@ -636,14 +637,14 @@ list_delete_int(List *list, int datum)
List *
list_delete_oid(List *list, Oid datum)
{
- ListCell *cell;
- ListCell *prev;
+ ListCell *cell;
+ ListCell *prev;
Assert(IsOidList(list));
check_list_invariants(list);
prev = NULL;
- foreach (cell, list)
+ foreach(cell, list)
{
if (lfirst_oid(cell) == datum)
return list_delete_cell(list, cell, prev);
@@ -693,8 +694,8 @@ list_delete_first(List *list)
List *
list_union(List *list1, List *list2)
{
- List *result;
- ListCell *cell;
+ List *result;
+ ListCell *cell;
Assert(IsPointerList(list1));
Assert(IsPointerList(list2));
@@ -717,8 +718,8 @@ list_union(List *list1, List *list2)
List *
list_union_ptr(List *list1, List *list2)
{
- List *result;
- ListCell *cell;
+ List *result;
+ ListCell *cell;
Assert(IsPointerList(list1));
Assert(IsPointerList(list2));
@@ -740,8 +741,8 @@ list_union_ptr(List *list1, List *list2)
List *
list_union_int(List *list1, List *list2)
{
- List *result;
- ListCell *cell;
+ List *result;
+ ListCell *cell;
Assert(IsIntegerList(list1));
Assert(IsIntegerList(list2));
@@ -763,8 +764,8 @@ list_union_int(List *list1, List *list2)
List *
list_union_oid(List *list1, List *list2)
{
- List *result;
- ListCell *cell;
+ List *result;
+ ListCell *cell;
Assert(IsOidList(list1));
Assert(IsOidList(list2));
@@ -792,8 +793,8 @@ list_union_oid(List *list1, List *list2)
List *
list_difference(List *list1, List *list2)
{
- ListCell *cell;
- List *result = NIL;
+ ListCell *cell;
+ List *result = NIL;
Assert(IsPointerList(list1));
Assert(IsPointerList(list2));
@@ -801,7 +802,7 @@ list_difference(List *list1, List *list2)
if (list2 == NIL)
return list_copy(list1);
- foreach (cell, list1)
+ foreach(cell, list1)
{
if (!list_member(list2, lfirst(cell)))
result = lappend(result, lfirst(cell));
@@ -818,8 +819,8 @@ list_difference(List *list1, List *list2)
List *
list_difference_ptr(List *list1, List *list2)
{
- ListCell *cell;
- List *result = NIL;
+ ListCell *cell;
+ List *result = NIL;
Assert(IsPointerList(list1));
Assert(IsPointerList(list2));
@@ -827,7 +828,7 @@ list_difference_ptr(List *list1, List *list2)
if (list2 == NIL)
return list_copy(list1);
- foreach (cell, list1)
+ foreach(cell, list1)
{
if (!list_member_ptr(list2, lfirst(cell)))
result = lappend(result, lfirst(cell));
@@ -843,8 +844,8 @@ list_difference_ptr(List *list1, List *list2)
List *
list_difference_int(List *list1, List *list2)
{
- ListCell *cell;
- List *result = NIL;
+ ListCell *cell;
+ List *result = NIL;
Assert(IsIntegerList(list1));
Assert(IsIntegerList(list2));
@@ -852,7 +853,7 @@ list_difference_int(List *list1, List *list2)
if (list2 == NIL)
return list_copy(list1);
- foreach (cell, list1)
+ foreach(cell, list1)
{
if (!list_member_int(list2, lfirst_int(cell)))
result = lappend_int(result, lfirst_int(cell));
@@ -868,8 +869,8 @@ list_difference_int(List *list1, List *list2)
List *
list_difference_oid(List *list1, List *list2)
{
- ListCell *cell;
- List *result = NIL;
+ ListCell *cell;
+ List *result = NIL;
Assert(IsOidList(list1));
Assert(IsOidList(list2));
@@ -877,7 +878,7 @@ list_difference_oid(List *list1, List *list2)
if (list2 == NIL)
return list_copy(list1);
- foreach (cell, list1)
+ foreach(cell, list1)
{
if (!list_member_oid(list2, lfirst_oid(cell)))
result = lappend_oid(result, lfirst_oid(cell));
@@ -891,14 +892,14 @@ list_difference_oid(List *list1, List *list2)
static void
list_free_private(List *list, bool deep)
{
- ListCell *cell;
+ ListCell *cell;
check_list_invariants(list);
cell = list_head(list);
while (cell != NULL)
{
- ListCell *tmp = cell;
+ ListCell *tmp = cell;
cell = lnext(cell);
if (deep)
@@ -948,9 +949,9 @@ list_free_deep(List *list)
List *
list_copy(List *oldlist)
{
- List *newlist;
- ListCell *newlist_prev;
- ListCell *oldlist_cur;
+ List *newlist;
+ ListCell *newlist_prev;
+ ListCell *oldlist_cur;
if (oldlist == NIL)
return NIL;
@@ -968,7 +969,7 @@ list_copy(List *oldlist)
oldlist_cur = oldlist->head->next;
while (oldlist_cur)
{
- ListCell *newlist_cur;
+ ListCell *newlist_cur;
newlist_cur = (ListCell *) palloc(sizeof(*newlist_cur));
newlist_cur->data = oldlist_cur->data;
@@ -991,9 +992,9 @@ list_copy(List *oldlist)
List *
list_copy_tail(List *oldlist, int nskip)
{
- List *newlist;
- ListCell *newlist_prev;
- ListCell *oldlist_cur;
+ List *newlist;
+ ListCell *newlist_prev;
+ ListCell *oldlist_cur;
if (nskip < 0)
nskip = 0; /* would it be better to elog? */
@@ -1012,8 +1013,8 @@ list_copy_tail(List *oldlist, int nskip)
oldlist_cur = oldlist_cur->next;
/*
- * Copy over the data in the first remaining cell; new_list() has already
- * allocated the head cell itself
+ * Copy over the data in the first remaining cell; new_list() has
+ * already allocated the head cell itself
*/
newlist->head->data = oldlist_cur->data;
@@ -1021,7 +1022,7 @@ list_copy_tail(List *oldlist, int nskip)
oldlist_cur = oldlist_cur->next;
while (oldlist_cur)
{
- ListCell *newlist_cur;
+ ListCell *newlist_cur;
newlist_cur = (ListCell *) palloc(sizeof(*newlist_cur));
newlist_cur->data = oldlist_cur->data;
@@ -1063,8 +1064,7 @@ list_length(List *l)
{
return l ? l->length : 0;
}
-
-#endif /* ! __GNUC__ */
+#endif /* ! __GNUC__ */
/*
* Temporary compatibility functions
@@ -1082,7 +1082,7 @@ list_length(List *l)
* list_length() macro in order to avoid the overhead of a function
* call.
*/
-int length(List *list);
+int length(List *list);
int
length(List *list)
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 246e390a92a..b80cee4944c 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.242 2004/08/29 04:12:33 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.243 2004/08/29 05:06:43 momjian Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -138,7 +138,7 @@ _outToken(StringInfo str, char *s)
static void
_outList(StringInfo str, List *node)
{
- ListCell *lc;
+ ListCell *lc;
appendStringInfoChar(str, '(');
@@ -147,12 +147,12 @@ _outList(StringInfo str, List *node)
else if (IsA(node, OidList))
appendStringInfoChar(str, 'o');
- foreach (lc, node)
+ foreach(lc, node)
{
/*
* For the sake of backward compatibility, we emit a slightly
- * different whitespace format for lists of nodes vs. other
- * types of lists. XXX: is this necessary?
+ * different whitespace format for lists of nodes vs. other types
+ * of lists. XXX: is this necessary?
*/
if (IsA(node, List))
{
@@ -165,8 +165,8 @@ _outList(StringInfo str, List *node)
else if (IsA(node, OidList))
appendStringInfo(str, " %u", lfirst_oid(lc));
else
- elog(ERROR, "unrecognized list node type: %d",
- (int) node->type);
+ elog(ERROR, "unrecognized list node type: %d",
+ (int) node->type);
}
appendStringInfoChar(str, ')');
@@ -1450,6 +1450,7 @@ _outValue(StringInfo str, Value *value)
appendStringInfo(str, "%ld", value->val.ival);
break;
case T_Float:
+
/*
* We assume the value is a valid numeric literal and so does
* not need quoting.
@@ -1595,7 +1596,7 @@ _outNode(StringInfo str, void *obj)
{
if (obj == NULL)
appendStringInfo(str, "<>");
- else if (IsA(obj, List) || IsA(obj, IntList) || IsA(obj, OidList))
+ else if (IsA(obj, List) ||IsA(obj, IntList) || IsA(obj, OidList))
_outList(str, obj);
else if (IsA(obj, Integer) ||
IsA(obj, Float) ||
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 47be6bc8a36..fe308845ccc 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/params.c,v 1.2 2004/08/29 04:12:33 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/params.c,v 1.3 2004/08/29 05:06:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,7 +28,8 @@ ParamListInfo
copyParamList(ParamListInfo from)
{
ParamListInfo retval;
- int i, size;
+ int i,
+ size;
if (from == NULL)
return NULL;
@@ -39,7 +40,8 @@ copyParamList(ParamListInfo from)
retval = (ParamListInfo) palloc0((size + 1) * sizeof(ParamListInfoData));
- for (i = 0; i < size; i++) {
+ for (i = 0; i < size; i++)
+ {
/* copy metadata */
retval[i].kind = from[i].kind;
if (from[i].kind == PARAM_NAMED)
@@ -51,12 +53,12 @@ copyParamList(ParamListInfo from)
retval[i].isnull = from[i].isnull;
if (from[i].isnull)
{
- retval[i].value = from[i].value; /* nulls just copy */
+ retval[i].value = from[i].value; /* nulls just copy */
}
else
{
- int16 typLen;
- bool typByVal;
+ int16 typLen;
+ bool typByVal;
get_typlenbyval(from[i].ptype, &typLen, &typByVal);
retval[i].value = datumCopy(from[i].value, typByVal, typLen);
diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c
index b8dac4e2e1e..96617cabcb7 100644
--- a/src/backend/nodes/print.c
+++ b/src/backend/nodes/print.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.70 2004/08/29 04:12:33 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.71 2004/08/29 05:06:43 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -194,17 +194,17 @@ pretty_format_node_dump(const char *dump)
j = indentDist - 1;
/* j will equal indentDist on next loop iteration */
/* suppress whitespace just after } */
- while (dump[i+1] == ' ')
+ while (dump[i + 1] == ' ')
i++;
break;
case ')':
/* force line break after ), unless another ) follows */
- if (dump[i+1] != ')')
+ if (dump[i + 1] != ')')
{
line[j + 1] = '\0';
appendStringInfo(&str, "%s\n", line);
j = indentDist - 1;
- while (dump[i+1] == ' ')
+ while (dump[i + 1] == ' ')
i++;
}
break;
@@ -360,7 +360,7 @@ print_expr(Node *expr, List *rtable)
outputstr = DatumGetCString(OidFunctionCall3(typoutput,
c->constvalue,
- ObjectIdGetDatum(typioparam),
+ ObjectIdGetDatum(typioparam),
Int32GetDatum(-1)));
printf("%s", outputstr);
pfree(outputstr);
diff --git a/src/backend/nodes/read.c b/src/backend/nodes/read.c
index ea0aa5214ad..185fefba292 100644
--- a/src/backend/nodes/read.c
+++ b/src/backend/nodes/read.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/read.c,v 1.44 2004/08/29 04:12:33 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/read.c,v 1.45 2004/08/29 05:06:43 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -50,7 +50,7 @@ stringToNode(char *str)
pg_strtok_ptr = str; /* point pg_strtok at the string to read */
- retval = nodeRead(NULL, 0); /* do the reading */
+ retval = nodeRead(NULL, 0); /* do the reading */
pg_strtok_ptr = save_strtok;
@@ -184,7 +184,7 @@ debackslash(char *token, int length)
#define RIGHT_PAREN (1000000 + 1)
#define LEFT_PAREN (1000000 + 2)
#define LEFT_BRACE (1000000 + 3)
-#define OTHER_TOKEN (1000000 + 4)
+#define OTHER_TOKEN (1000000 + 4)
/*
* nodeTokenType -
@@ -315,8 +315,8 @@ nodeRead(char *token, int tok_len)
/* List of integers */
for (;;)
{
- int val;
- char *endptr;
+ int val;
+ char *endptr;
token = pg_strtok(&tok_len);
if (token == NULL)
@@ -335,8 +335,8 @@ nodeRead(char *token, int tok_len)
/* List of OIDs */
for (;;)
{
- Oid val;
- char *endptr;
+ Oid val;
+ char *endptr;
token = pg_strtok(&tok_len);
if (token == NULL)
@@ -369,7 +369,7 @@ nodeRead(char *token, int tok_len)
}
case RIGHT_PAREN:
elog(ERROR, "unexpected right parenthesis");
- result = NULL; /* keep compiler happy */
+ result = NULL; /* keep compiler happy */
break;
case OTHER_TOKEN:
if (tok_len == 0)
@@ -384,6 +384,7 @@ nodeRead(char *token, int tok_len)
}
break;
case T_Integer:
+
/*
* we know that the token terminates on a char atol will stop
* at
@@ -415,7 +416,7 @@ nodeRead(char *token, int tok_len)
}
default:
elog(ERROR, "unrecognized node type: %d", (int) type);
- result = NULL; /* keep compiler happy */
+ result = NULL; /* keep compiler happy */
break;
}