C program for topology measurements in SU(N) lattice gauge theories