Implementation of a disjoint set forest in C