nameserv.c: split add_domain_names() into three functions: