added regidx.c from new htslib