Ignore:
Timestamp:
Oct 31, 2006, 3:04:22 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Got rid of cucul_ansi_to_str(), it's really useless.
  • Partial update of the C++ bindings.
  • Updated documentation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/caca0.c

    r1257 r1269  
    268268}
    269269
     270char const *__caca0_get_color_name(unsigned char color)
     271{
     272    static char const *color_names[] =
     273    {
     274        "black",
     275        "blue",
     276        "green",
     277        "cyan",
     278        "red",
     279        "magenta",
     280        "brown",
     281        "light gray",
     282        "dark gray",
     283        "light blue",
     284        "light green",
     285        "light cyan",
     286        "light red",
     287        "light magenta",
     288        "yellow",
     289        "white",
     290    };
     291
     292    if(color > 15)
     293        return "unknown";
     294
     295    return color_names[(unsigned int)color];
     296}
     297
Note: See TracChangeset for help on using the changeset viewer.