diff.c: remove the_index dependency in textconv() functions