longestflaglen
if ((string = (char *)malloc(nmappings * (longestflaglen + 1))) == NULL)
char name[longestflaglen + 1];