diff options
author | Marc G. Fournier <scrappy@hub.org> | 1996-08-28 07:27:54 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1996-08-28 07:27:54 +0000 |
commit | 870be9fa8e5ead7a9fec1b1cf539c701bba57d2a (patch) | |
tree | 0980ed1b45ec7974d2ceea9df3d0570c165804b6 /src/backend/lib | |
parent | 907c884fe8b88d3df5883c278cacb094a1cfc7ac (diff) | |
download | postgresql-870be9fa8e5ead7a9fec1b1cf539c701bba57d2a.tar.gz postgresql-870be9fa8e5ead7a9fec1b1cf539c701bba57d2a.zip |
Clean up th ecompile process by centralizing the include files
- code compile tested, but due to a yet unresolved problem with
parse.h's creation, compile not completed...
Diffstat (limited to 'src/backend/lib')
-rw-r--r-- | src/backend/lib/dllist.h | 72 | ||||
-rw-r--r-- | src/backend/lib/fstack.h | 113 | ||||
-rw-r--r-- | src/backend/lib/hasht.h | 23 | ||||
-rw-r--r-- | src/backend/lib/lispsort.h | 18 | ||||
-rw-r--r-- | src/backend/lib/qsort.h | 24 | ||||
-rw-r--r-- | src/backend/lib/stringinfo.h | 47 |
6 files changed, 0 insertions, 297 deletions
diff --git a/src/backend/lib/dllist.h b/src/backend/lib/dllist.h deleted file mode 100644 index cd9ac42a12f..00000000000 --- a/src/backend/lib/dllist.h +++ /dev/null @@ -1,72 +0,0 @@ -/*------------------------------------------------------------------------- - * - * dllist.h-- - * simple doubly linked list primitives - * the elements of the list are void* so the lists can contain - * anything - * Dlelem can only be in one list at a time - * - * - * Here's a small example of how to use Dllist's : - * - * Dllist *lst; - * Dlelem *elt; - * void *in_stuff; -- stuff to stick in the list - * void *out_stuff - * - * lst = DLNewList(); -- make a new dllist - * DLAddHead(lst, DLNewElem(in_stuff)); -- add a new element to the list - * with in_stuff as the value - * ... - * elt = DLGetHead(lst); -- retrieve the head element - * out_stuff = (void*)DLE_VAL(elt); -- get the stuff out - * DLRemove(elt); -- removes the element from its list - * DLFreeElem(elt); -- free the element since we don't - * use it anymore - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: dllist.h,v 1.1.1.1 1996/07/09 06:21:28 scrappy Exp $ - * - *------------------------------------------------------------------------- - */ - -#ifndef DLLIST_H -#define DLLIST_H - -#include "c.h" - -struct Dllist; -struct Dlelem; - -typedef struct Dlelem { - struct Dlelem *dle_next; /* next element */ - struct Dlelem *dle_prev; /* previous element */ - void *dle_val; /* value of the element */ - struct Dllist *dle_list; /* what list this element is in */ -} Dlelem; - -typedef struct Dllist { - Dlelem *dll_head; - Dlelem *dll_tail; -} Dllist; - -extern Dllist* DLNewList(); /* initialize a new list */ -extern void DLFreeList(Dllist*); /* free up a list and all the nodes in it*/ -extern Dlelem* DLNewElem(void* val); -extern void DLFreeElem(Dlelem*); -extern Dlelem* DLGetHead(Dllist*); -extern Dlelem* DLGetTail(Dllist*); -extern void* DLGetHeadVal(Dllist*); -extern void* DLGetTailVal(Dllist*); -extern Dlelem* DLGetPred(Dlelem*); /* get predecessor */ -extern Dlelem* DLGetSucc(Dlelem*); /* get successor */ -extern void DLRemove(Dlelem*); /* removes node from list*/ -extern void DLAddHead(Dllist* list, Dlelem* node); -extern void DLAddTail(Dllist* list, Dlelem* node); -extern Dlelem* DLRemHead(Dllist* list); /* remove and return the head */ -extern Dlelem* DLRemTail(Dllist* list); /* remove and return the tail */ - -#define DLE_VAL(x) (x->dle_val) - -#endif /* DLLIST_H */ diff --git a/src/backend/lib/fstack.h b/src/backend/lib/fstack.h deleted file mode 100644 index b0b1df00d83..00000000000 --- a/src/backend/lib/fstack.h +++ /dev/null @@ -1,113 +0,0 @@ -/*------------------------------------------------------------------------- - * - * fstack.h-- - * Fixed format stack definitions. - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: fstack.h,v 1.1.1.1 1996/07/09 06:21:29 scrappy Exp $ - * - *------------------------------------------------------------------------- - */ -/* - * Note: - * Fixed format stacks assist in the construction of FIFO stacks of - * fixed format structures. Structures which are to be stackable - * should contain a FixedItemData component. A stack is initilized - * with the offset of the FixedItemData component of the structure - * it will hold. By doing so, push and pop operations are simplified - * for the callers. All references to stackable items are pointers - * to the base of the structure instead of pointers to the - * FixedItemData component. - * - */ -#ifndef FSTACK_H -#define FSTACK_H - -#include "c.h" - -/* - * FixedItem -- - * Fixed format stackable item chain component. - * - * Note: - * Structures must contain one FixedItemData component per stack in - * which it will be an item. - */ -typedef struct FixedItemData FixedItemData; -typedef FixedItemData *FixedItem; - -struct FixedItemData { - FixedItem next; /* next item or NULL */ -}; - -/* - * FixedStack -- - * Fixed format stack. - */ -typedef struct FixedStackData { - FixedItem top; /* Top item on the stack or NULL */ - Offset offset; /* Offset from struct base to item */ - /* this could be signed short int! */ -} FixedStackData; - -typedef FixedStackData *FixedStack; - -/* - * FixedStackInit -- - * Iniitializes stack for structures with given fixed component offset. - * - * Exceptions: - * BadArg if stack is invalid pointer. - */ -extern void FixedStackInit(FixedStack stack, Offset offset); - -/* - * FixedStackPop -- - * Returns pointer to top structure on stack or NULL if empty stack. - * - * Exceptions: - * BadArg if stack is invalid. - */ -Pointer FixedStackPop(FixedStack stack); - -/* - * FixedStackPush -- - * Places structure associated with pointer onto top of stack. - * - * Exceptions: - * BadArg if stack is invalid. - * BadArg if pointer is invalid. - */ -extern void FixedStackPush(FixedStack stack, Pointer pointer); - -/* - * FixedStackGetTop -- - * Returns pointer to top structure of a stack. This item is not poped. - * - * Note: - * This is not part of the normal stack interface. It is intended for - * debugging use only. - * - * Exceptions: - * BadArg if stack is invalid. - */ -extern Pointer FixedStackGetTop(FixedStack stack); - -/* - * FixedStackGetNext -- - * Returns pointer to next structure after pointer of a stack. - * - * Note: - * This is not part of the normal stack interface. It is intended for - * debugging use only. - * - * Exceptions: - * BadArg if stack is invalid. - * BadArg if pointer is invalid. - * BadArg if stack does not contain pointer. - */ -extern Pointer FixedStackGetNext(FixedStack stack, Pointer pointer); - -#endif /* FSTACK_H */ diff --git a/src/backend/lib/hasht.h b/src/backend/lib/hasht.h deleted file mode 100644 index 543c8c95d84..00000000000 --- a/src/backend/lib/hasht.h +++ /dev/null @@ -1,23 +0,0 @@ -/*------------------------------------------------------------------------- - * - * hasht.h-- - * hash table related functions that are not directly supported - * under utils/hash. - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: hasht.h,v 1.1.1.1 1996/07/09 06:21:29 scrappy Exp $ - * - *------------------------------------------------------------------------- - */ -#ifndef HASHT_H -#define HASHT_H - -#include "utils/hsearch.h" - -typedef void (*HashtFunc)(); - -extern void HashTableWalk(HTAB *hashtable, HashtFunc function, int arg); - -#endif /* HASHT_H */ diff --git a/src/backend/lib/lispsort.h b/src/backend/lib/lispsort.h deleted file mode 100644 index e49ee543622..00000000000 --- a/src/backend/lib/lispsort.h +++ /dev/null @@ -1,18 +0,0 @@ -/*------------------------------------------------------------------------- - * - * lispsort.h-- - * - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: lispsort.h,v 1.1.1.1 1996/07/09 06:21:29 scrappy Exp $ - * - *------------------------------------------------------------------------- - */ -#ifndef LISPSORT_H -#define LISPSORT_H - -extern List *lisp_qsort(List *the_list, int (*compare)()); - -#endif /* LISPSORT_H */ diff --git a/src/backend/lib/qsort.h b/src/backend/lib/qsort.h deleted file mode 100644 index d81d4e2e070..00000000000 --- a/src/backend/lib/qsort.h +++ /dev/null @@ -1,24 +0,0 @@ -/*------------------------------------------------------------------------- - * - * qsort.h-- - * - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: qsort.h,v 1.1.1.1 1996/07/09 06:21:29 scrappy Exp $ - * - *------------------------------------------------------------------------- - */ -#ifndef QSORT_H -#define QSORT_H - -#include <sys/types.h> - -extern void pg_qsort(void *bot, - size_t nmemb, - size_t size, - int (*compar)(void *, void *)); - -#endif /* QSORT_H */ - diff --git a/src/backend/lib/stringinfo.h b/src/backend/lib/stringinfo.h deleted file mode 100644 index 717f2ad5985..00000000000 --- a/src/backend/lib/stringinfo.h +++ /dev/null @@ -1,47 +0,0 @@ -/*------------------------------------------------------------------------- - * - * stringinfo.h-- - * Declarations/definitons for "string" functions. - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: stringinfo.h,v 1.1.1.1 1996/07/09 06:21:29 scrappy Exp $ - * - *------------------------------------------------------------------------- - */ -#ifndef STRINGINFO_H -#define STRINGINFO_H - -/*#include "c.h" */ /* for 'String' */ - -/*------------------------- - * StringInfoData holds information about a string. - * 'data' is the string. - * 'len' is the current string length (as returned by 'strlen') - * 'maxlen' is the size in bytes of 'data', i.e. the maximum string - * size (includeing the terminating '\0' char) that we can - * currently store in 'data' without having to reallocate - * more space. - */ -typedef struct StringInfoData { - char *data; - int maxlen; - int len; -} StringInfoData; - -typedef StringInfoData *StringInfo; - -/*------------------------ - * makeStringInfo - * create a 'StringInfoData' & return a pointer to it. - */ -extern StringInfo makeStringInfo(void); - -/*------------------------ - * appendStringInfo - * similar to 'strcat' but reallocates more space if necessary... - */ -extern void appendStringInfo(StringInfo str, char *buffer); - -#endif /* STRINGINFO_H */ |