/*FUNCTION ssmapname: rename fields using a name map record */
void
ssmapname (r, map)
SSR 	*r;   /* the record in which the renaming will occur */
SSR 	*map; /* the record containing the remap name */
	{
	int 	i;
	char	*mapname;   /* the mapped new name of the field */
	/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
	assert (r != NULL);
	assert (map != NULL);
	/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
	for (i = 0; i < getnfields (r); i++)
		if (mapname = ssgetval (map, getname (r, i)))
			setname (r, i, strdup (mapname));
	}
