C program for topology measurements in lattice gauge theories