+#define CHOICE_GET(CHOICES, STR) \
+ unsigned int i; \
+ for (i = 0; i < sizeof(CHOICES); i++) \
+ if (strcmp(STR, CHOICES[i]) == 0) \
+ return i
+
+
+static const char *entry_line_wrap_choices[] = {"none", "char", "word",
+ "mixed", NULL};
+
+static Elm_Wrap_Type
+_entry_line_wrap_choices_setting_get(const char *line_wrap_str)
+{
+ assert(sizeof(entry_line_wrap_choices)/
+ sizeof(entry_line_wrap_choices[0]) == ELM_WRAP_LAST + 1);
+ CHOICE_GET(entry_line_wrap_choices, line_wrap_str);
+ return ELM_WRAP_LAST;
+}
+