/* hwalk_r() Walk all of the entries in the hash, calling the callback for each one. this allows some generic operation to be performed on each element.  */
int hwalk_r(struct hsearch_data *htab, int(*callback)(struct env_entry *entry))
/* hwalk_r() Walk all of the entries in the hash, calling the callback for each one. this allows some generic operation to be performed on each element.  */
int hwalk_r(struct hsearch_data *htab, int(*callback)(struct env_entry *entry))
{
	int i;
	int retval;
	for (i = 1; i <= htab->size; ++i) {
		if (htab->table[i].used > 0) {
			retval = callback(&htab->table[i].entry);
			if (retval)
				return retval;
		}
	}
	return 0;
}