diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-08-28 20:55:23 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-08-28 20:55:23 +0000 |
commit | 03d39ce08056b1b69b6ba2350cfc5963c96056c6 (patch) | |
tree | 3a8995574da75882b3fa2eb8d60d016c71faccde /src/backend/tioga/Varray.h | |
parent | fbb1966cf3125f07220a546bf424df73327fe47f (diff) |
Remove TIOGA files from CVS current; they remain in repositiry.
Diffstat (limited to 'src/backend/tioga/Varray.h')
-rw-r--r-- | src/backend/tioga/Varray.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/backend/tioga/Varray.h b/src/backend/tioga/Varray.h deleted file mode 100644 index cf7173159c0..00000000000 --- a/src/backend/tioga/Varray.h +++ /dev/null @@ -1,48 +0,0 @@ -/* ******************************************************************** - * - * Varray.h -- header file for varray.c which provides a generic - * set of functions to handle variable sized arrays. - * - * originally by Jiang Wu - * ********************************************************************/ - -#ifndef _VARRAY_H_ -#define _VARRAY_H_ - -typedef struct _varray -{ - size_t nobj; /* number of objects in this array */ - size_t maxObj; /* max. number of objects in this array */ - size_t size; /* size of each element in the array */ - void *val; /* array of elements */ -} Varray; - -/* type for custom copying function */ -typedef void (*CopyingFunct) (void *from, void *to); - -#define VARRAY_INITIAL_SIZE 32 - -#define ENLARGE_VARRAY(ARRAY, INC) \ -( \ - (ARRAY)->maxObj += (INC), \ - (ARRAY)->val = (void *) realloc((ARRAY)->val, \ - (ARRAY)->size * (ARRAY)->maxObj) \ -) - -#define VARRAY_NTH(VAL, SIZE, N) (((char *) (VAL)) + (SIZE) * (N)) - -#define FreeVarray(ARRAY) \ - if ((ARRAY) != NULL) { free((ARRAY)->val); free((ARRAY)); (ARRAY) = NULL ; } - -#define ModifyVarray(ARRAY, N, NEW, COPY) \ - if ((N) < (ARRAY)->nobj) \ - (COPY)(VARRAY_NTH((ARRAY)->val, (ARRAY)->size, (N)), (NEW)) - -#define GetVarray(ARRAY, N) \ - ((N) < (ARRAY)->nobj ? VARRAY_NTH((ARRAY)->val, (ARRAY)->size, (N)) \ - : NULL) - -extern Varray *NewVarray(size_t nobj, size_t size); -extern int AppendVarray(Varray * array, void *value, CopyingFunct copy); - -#endif /* _VARRAY_H_ */ |