Ignore:
Timestamp:
Oct 31, 2006, 3:04:22 PM (14 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.
Location:
libcaca/trunk/caca
Files:
2 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
  • libcaca/trunk/caca/caca0.h

    r1267 r1269  
    4040          unsigned long int, unsigned long int);
    4141extern void __caca0_free_bitmap(cucul_dither_t *);
     42extern char const *__caca0_get_color_name(unsigned char);
    4243
    4344/* These variables are needed to emulate old non-thread safe behaviour */
     
    134135#define caca_get_fg_color() __caca0_fg
    135136#define caca_get_bg_color() __caca0_bg
    136 #define caca_get_color_name cucul_ansi_to_str
     137#define caca_get_color_name __caca0_get_color_name
    137138#define caca_putchar(x, y, c) cucul_putchar(__caca0_cv, x, y, c)
    138139#define caca_putstr(x, y, s) cucul_putstr(__caca0_cv, x, y, s)
Note: See TracChangeset for help on using the changeset viewer.