shithub: squint

ref: 0c8f9f3968acc8b277f5aea3ac3c568fde1a3631
dir: /squint.h/

View raw version
enum
{
	TMAX = 1000,
	STK = 2048
};

int threadcount;
int verbose;

typedef struct Rat	Rat;
typedef struct Node	Node;
typedef struct Lifo Lifo;

struct Rat{
	vlong num;
	vlong den;
};

struct Node{
	Rat		val;
	Node	*link;
};

struct Lifo{
	Node	*front;
	Node	*rear;
};

Lifo	*mklifo(void);
int		insert(Lifo*, Rat);
int		delete(Lifo*, Rat*);