Modify htab_add to have a generic core.