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

/**
 * Position of a byte within a change.
 */
typedef uint64_t changepos;

#define CHANGE_POSITION_ROOT ((changepos)0)
#define CHANGE_POSITION_BOTTOM ((changepos)1)

/**
 * A byte identifier, a change together with a position
 *
 * Variants observed:
 *  - Hash
 *  - Option<Hash>
 *  - ChangeId
 */
struct position {
	struct hash change;
	changepos pos;
};

struct positionlist {
	size_t len;
	struct position
		first; /* Reserve space for the first Position, most changes appear to have just one */
	struct position *entries;
};

/**
 * A node in the repository graph, made of a change internal identifier, and a
 * line identifier in that change.
 */
struct vertex {
	struct hash change;
	changepos start, end; /* line identifier */
};

int vertexeq(struct vertex *v1, struct vertex *v2);

#endif