/* cStash.h */

#ifndef CSTASH_H
#define CSTASH_H


typedef struct _CStash {
  int size;                 // Size of each space
  int quantity;             // Number of storage spaces
  int next;                 // Next empty space

  unsigned char* storage;   // Dynamically allocated array of bytes:
} CStash;


void initialize(CStash *s, int size);
void cleanup(CStash *s);
int add(CStash *s, const void *element);
void *fetch(CStash *s, int index);
int count(CStash *s);
void inflate(CStash *s, int increase);

#endif
