/* Parse the flags string from a .flags attribute list into the vartype enum.  */
enum env_flags_vartype env_flags_parse_vartype(const char *flags)
/* Parse the flags string from a .flags attribute list into the vartype enum.  */
enum env_flags_vartype env_flags_parse_vartype(const char *flags)
{
	char *type;
	if (strlen(flags) <= ENV_FLAGS_VARTYPE_LOC)
		return env_flags_vartype_string;
	type = strchr(env_flags_vartype_rep,
		flags[ENV_FLAGS_VARTYPE_LOC]);
	if (type != NULL)
		return (enum env_flags_vartype)
			(type - &env_flags_vartype_rep[0]);
	printf("## Warning: Unknown environment variable type '%c'\n",
		flags[ENV_FLAGS_VARTYPE_LOC]);
	return env_flags_vartype_string;
}