Reimplementation of Pijul in C, for education, fun and absolutely no profit
#ifndef ANI_ATOM_H
#define ANI_ATOM_H

#define EDGE_FLAG_BLOCK 1
#define EDGE_FLAG_PSEUDO 4
#define EDGE_FLAG_FOLDER 16
#define EDGE_FLAG_PARENT 32
#define EDGE_FLAG_DELETED 128

enum atomtype {
	NEW_VERTEX,
	EDGE_MAP
};

struct edge {
	uint8_t previous;
	uint8_t flag;
	struct position from;
	struct vertex to;
	struct hash introducedby; /* FIXME Should be Option */
};

struct edgelist {
	size_t len;
	struct edge *entries;
};

struct newvertex {
	struct positionlist upcontext;
	struct positionlist downcontext;
	uint8_t flag;	/* EDGE_FLAG_* */
	uint64_t start; /* start, end: ChangePosition = L64 */
	uint64_t end;
	struct position inode;
};

struct edgemap {
	struct edgelist edges;
	struct position inode;
};

struct atom {
	enum atomtype atomtype;
	union {
		struct newvertex newvertex;
		struct edgemap edgemap;
	};
};

void atomfree(struct atom *);

#endif