Lines Matching defs:oe

244 options_empty(struct options *oo, const struct options_table_entry *oe)
248 o = options_add(oo, oe->name);
249 o->tableentry = oe;
251 if (oe->flags & OPTIONS_TABLE_IS_ARRAY)
258 options_default(struct options *oo, const struct options_table_entry *oe)
264 o = options_empty(oo, oe);
267 if (oe->flags & OPTIONS_TABLE_IS_ARRAY) {
268 if (oe->default_arr == NULL) {
269 options_array_assign(o, oe->default_str, NULL);
272 for (i = 0; oe->default_arr[i] != NULL; i++)
273 options_array_set(o, i, oe->default_arr[i], 0, NULL);
277 switch (oe->type) {
279 ov->string = xstrdup(oe->default_str);
282 ov->number = oe->default_num;
289 options_default_to_string(const struct options_table_entry *oe)
293 switch (oe->type) {
296 s = xstrdup(oe->default_str);
299 xasprintf(&s, "%lld", oe->default_num);
302 s = xstrdup(key_string_lookup_key(oe->default_num, 0));
305 s = xstrdup(colour_tostring(oe->default_num));
308 s = xstrdup(oe->default_num ? "on" : "off");
311 s = xstrdup(oe->choices[oe->default_num]);
656 const struct options_table_entry *oe, *found;
673 for (oe = options_table; oe->name != NULL; oe++) {
674 if (strcmp(oe->name, name) == 0) {
675 found = oe;
678 if (strncmp(oe->name, name, namelen) == 0) {
684 found = oe;
810 const struct options_table_entry *oe;
816 for (oe = options_table; oe->name != NULL; oe++) {
817 if (strcmp(oe->name, name) == 0)
820 if (oe->name == NULL) {
824 switch (oe->scope) {
962 options_from_string_check(const struct options_table_entry *oe,
967 if (oe == NULL)
969 if (strcmp(oe->name, "default-shell") == 0 && !checkshell(value)) {
973 if (oe->pattern != NULL && fnmatch(oe->pattern, value, 0) != 0) {
977 if ((oe->flags & OPTIONS_TABLE_IS_STYLE) &&
1011 options_find_choice(const struct options_table_entry *oe, const char *value,
1017 for (cp = oe->choices; *cp != NULL; cp++) {
1030 options_from_string_choice(const struct options_table_entry *oe,
1040 choice = options_find_choice(oe, value, cause);
1049 options_from_string(struct options *oo, const struct options_table_entry *oe,
1058 if (oe != NULL) {
1060 oe->type != OPTIONS_TABLE_FLAG &&
1061 oe->type != OPTIONS_TABLE_CHOICE) {
1065 type = oe->type;
1080 if (options_from_string_check(oe, new, cause) != 0) {
1088 number = strtonum(value, oe->minimum, oe->maximum, &errstr);
1113 return (options_from_string_choice(oe, oo, name, value, cause));