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

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...
This commit is contained in:
Marc G. Fournier
1996-08-28 07:27:54 +00:00
parent 907c884fe8
commit 870be9fa8e
195 changed files with 97 additions and 13583 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */