First stab at builtin set_color. Moved set_color.cpp to builtin_set_color.cpp and taught fish about it.

This commit is contained in:
ridiculousfish
2013-02-14 15:50:24 -08:00
parent db5eebd372
commit 8d95d0834d
11 changed files with 249 additions and 431 deletions

View File

@@ -170,6 +170,18 @@ static const named_color_t named_colors[11] =
{L"normal", 8, {0xFF, 0xFF, 0XFF}}
};
wcstring_list_t rgb_color_t::named_color_names(void)
{
size_t count = sizeof named_colors / sizeof *named_colors;
wcstring_list_t result;
result.reserve(count);
for (size_t i=0; i < count; i++)
{
result.push_back(named_colors[i].name);
}
return result;
}
bool rgb_color_t::try_parse_named(const wcstring &str)
{
bzero(&data, sizeof data);