1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-21 16:02:15 +03:00

ODBC source code cleanup patch. Should match rest of PostgreSQL code better.

This commit is contained in:
Bruce Momjian
2001-05-08 17:06:18 +00:00
parent 062a79a990
commit 296e7ba2ba
24 changed files with 990 additions and 1182 deletions

View File

@ -1,20 +1,23 @@
/* Module: tuplelist.c
/*--------
* Module: tuplelist.c
*
* Description: This module contains functions for creating a manual result set
* (the TupleList) and retrieving data from it for a specific row/column.
* Description: This module contains functions for creating a manual
* result set (the TupleList) and retrieving data from
* it for a specific row/column.
*
* Classes: TupleListClass (Functions prefix: "TL_")
*
* API functions: none
*
* Comments: See "notice.txt" for copyright and license information.
*
*--------
*/
#include <stdlib.h>
#include "tuplelist.h"
#include "tuple.h"
TupleListClass *
TL_Constructor(UInt4 fieldcnt)
{
@ -25,7 +28,6 @@ TL_Constructor(UInt4 fieldcnt)
rv = (TupleListClass *) malloc(sizeof(TupleListClass));
if (rv)
{
rv->num_fields = fieldcnt;
rv->num_tuples = 0;
rv->list_start = NULL;
@ -39,6 +41,7 @@ TL_Constructor(UInt4 fieldcnt)
return rv;
}
void
TL_Destructor(TupleListClass *self)
{
@ -134,7 +137,6 @@ TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno)
}
else if (start_is_closer)
{
/*
* the shortest way is to start the search from the head of the
* list
@ -177,11 +179,9 @@ TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno)
}
char
TL_add_tuple(TupleListClass *self, TupleNode *new_field)
{
/*
* we append the tuple at the end of the doubly linked list of the
* tuples we have already read in
@ -200,7 +200,6 @@ TL_add_tuple(TupleListClass *self, TupleNode *new_field)
}
else
{
/*
* there is already an element in the list, so add the new one at
* the end of the list