///////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2021 Wizardry and Steamworks - License: MIT          //
///////////////////////////////////////////////////////////////////////////
 
typedef struct {
	void *data;
	unsigned int size;
} stackElement;
 
/*
	* The stack structure with top being the index of the next element
	* to be inserted in stack (the top-most element to be found at top - 1).
	*/
typedef struct {
	int size;
	stackElement **store;
	int top;
} stack;
 
// Zero or one arguments for stackCreate_Internal.
#define stackIsEmpty(s) (s->top == 0)
#define stackSize(s) s->size
#define stackCount(s) s->top
 
extern stack* stackCreate(unsigned int size);
extern stack* stackClear(stack *s);
extern void stackPush(stack *s, void *e, unsigned int size);
extern void *stackPop(stack *s);
extern void stackDestroy(stack *s);
extern void stackPrint(stack *s);

fuss/c/data_structures/stacks/generic/stack.h.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.