-#ifdef USE_SLANG_CURSES
-static char *get_color_name (char *dest, size_t destlen, int val)
-{
- static char *missing[3] = { "brown", "lightgray", "default" };
- int i;
-
- switch (val) {
- case COLOR_YELLOW:
- m_strcpy(dest, destlen, missing[0]);
- return dest;
-
- case COLOR_WHITE:
- m_strcpy(dest, destlen, missing[1]);
- return dest;
-
- case COLOR_DEFAULT:
- m_strcpy(dest, destlen, missing[2]);
- return dest;
- }
-
- for (i = 0; Colors[i].name; i++) {
- if (Colors[i].value == val) {
- m_strcpy(dest, destlen, Colors[i].name);
- return dest;
- }
- }
-
- /* Sigh. If we got this far, the color is of the form 'colorN'
- * Slang can handle this itself, so just return 'colorN'
- */
-
- snprintf (dest, destlen, "color%d", val);
- return dest;
-}
-#endif
-