diff options
author | Bruce Momjian | 2002-08-28 20:55:23 +0000 |
---|---|---|
committer | Bruce Momjian | 2002-08-28 20:55:23 +0000 |
commit | 03d39ce08056b1b69b6ba2350cfc5963c96056c6 (patch) | |
tree | 3a8995574da75882b3fa2eb8d60d016c71faccde /src/backend/tioga/Varray.c | |
parent | fbb1966cf3125f07220a546bf424df73327fe47f (diff) |
Remove TIOGA files from CVS current; they remain in repositiry.
Diffstat (limited to 'src/backend/tioga/Varray.c')
-rw-r--r-- | src/backend/tioga/Varray.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/backend/tioga/Varray.c b/src/backend/tioga/Varray.c deleted file mode 100644 index c211686c742..00000000000 --- a/src/backend/tioga/Varray.c +++ /dev/null @@ -1,48 +0,0 @@ -/* ************************************************************************ - * - * Varray.c - * - * routines to provide a generic set of functions to handle variable sized - * arrays. originally by Jiang Wu - * ************************************************************************/ - -#include <stdio.h> -#include <stdlib.h> -#include "Varray.h" - -Varray * -NewVarray(size_t nobj, size_t size) -/* - * NewVarray -- allocate a Varray to contain an array of val each of which - * is size valSize. Returns the Varray if successful, - * returns NULL otherwise. - */ -{ - Varray *result; - - if (nobj == 0) - nobj = VARRAY_INITIAL_SIZE; - result = (Varray *) malloc(sizeof(Varray)); - result->val = (void *) calloc(nobj, size); - if (result == NULL) - return NULL; - result->size = size; - result->nobj = 0; - result->maxObj = nobj; - return result; -} - -int -AppendVarray(Varray * array, void *value, CopyingFunct copy) -/* - * AppendVarray -- append value to the end of array. This function - * returns the size of the array after the addition of - * the new element. - */ -{ - copy(value, VARRAY_NTH(array->val, array->size, array->nobj)); - array->nobj++; - if (array->nobj >= array->maxObj) - ENLARGE_VARRAY(array, array->maxObj / 2); - return array->nobj; -} |