continue; } argv[flags_pos++] = flag; } argv[flags_pos] = NULL; } /* * User config file handling. */ static const struct enum_map_entry color_map[] = { #define COLOR_MAP(name) ENUM_MAP_ENTRY(#name, COLOR_##name) COLOR_MAP(DEFAULT), COLOR_MAP(BLACK), COLOR_MAP(BLUE), COLOR_MAP(CYAN), COLOR_MAP(GREEN), COLOR_MAP(MAGENTA), COLOR_MAP(RED), COLOR_MAP(WHITE), COLOR_MAP(YELLOW), }; static const struct enum_map_entry attr_map[] = { #define ATTR_MAP(name) ENUM_MAP_ENTRY(#name, A_##name) ATTR_MAP(NORMAL), ATTR_MAP(BLINK), ATTR_MAP(BOLD),
WEAPON_MAP(WEAPON) #undef WEAPON }; static const char *file_items[] = { #define ITEM(id,name) name, MENU_FILE_ITEMS(ITEM) #undef ITEM }; static const char *edit_items[] = { #define ITEM(id,name) name, MENU_EDIT_ITEMS(ITEM) #undef ITEM }; static const char *colors[] = { #define COLOR(name) #name, COLOR_MAP(COLOR) #undef COLOR }; /* ================================================================= * * CUSTOM WIDGET * * ================================================================= */ /* ----------------------------------------------------------------- * TREE WIDGET * ----------------------------------------------------------------- */ struct tree_node { gui_state state; const char *name;