Enhance str_remove_dup.c