Unbreak C++11 due to narrowing; use non-conflicting declaration FISH_COLORS instead of COLORS; remove deprecated register type.

This commit is contained in:
ridiculousfish
2014-02-05 16:20:09 -08:00
parent 35f2302352
commit fd10844c2b
3 changed files with 10 additions and 6 deletions

View File

@@ -52,7 +52,7 @@
/**
Number of color names in the col array
*/
#define COLORS (sizeof(col)/sizeof(wchar_t *))
#define FISH_COLORS (sizeof(col)/sizeof(wchar_t *))
static int writeb_internal(char c);
@@ -622,7 +622,7 @@ int output_color_code(const wcstring &val, bool is_background)
if (! color_name.empty())
{
for (i=0; i<COLORS; i++)
for (i=0; i<FISH_COLORS; i++)
{
if (wcscasecmp(col[i], color_name.c_str()) == 0)
{