Changeset 250


Ignore:
Timestamp:
Dec 12, 2003, 5:19:44 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac debian/changelog: + Prepare for 0.3 release. + Check for strcasecmp().
  • src/caca.c: + Honor CACA_BACKGROUND, CACA_DITHERING and CACA_ANTIALIASING environment

variables.

Location:
libcaca/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r245 r250  
    77AC_CANONICAL_SYSTEM
    88
    9 AM_INIT_AUTOMAKE(libcaca, 0.2)
     9AM_INIT_AUTOMAKE(libcaca, 0.3)
    1010AM_CONFIG_HEADER(config.h)
    1111
     
    2626
    2727AC_CHECK_HEADERS(inttypes.h endian.h)
    28 AC_CHECK_FUNCS(vsnprintf getenv putenv)
     28AC_CHECK_FUNCS(vsnprintf getenv putenv strcasecmp)
    2929
    3030if test "${enable_conio}" = "yes"; then
  • libcaca/trunk/debian/changelog

    r242 r250  
     1libcaca (0.3-1) unstable; urgency=low
     2
     3  * XXX
     4
     5 -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 11 Dec 2003 22:10:45 +0100
     6
     7libcaca (0.2-2) unstable; urgency=low
     8
     9  * First Debian upload (Closes: #222753).
     10
     11 -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu,  4 Dec 2003 17:57:46 +0100
     12
    113libcaca (0.2-1) unstable; urgency=low
    214
  • libcaca/trunk/src/caca.c

    r249 r250  
    251251static void caca_init_features(void)
    252252{
     253    /* FIXME: if strcasecmp isn't available, use strcmp */
     254#if defined(HAVE_GETENV) && defined(HAVE_STRCASECMP)
     255    char *var;
     256#endif
     257
    253258    caca_set_feature(CACA_BACKGROUND);
    254259    caca_set_feature(CACA_ANTIALIASING);
    255260    caca_set_feature(CACA_DITHERING);
     261
     262#if defined(HAVE_GETENV) && defined(HAVE_STRCASECMP)
     263    if((var = getenv("CACA_BACKGROUND")))
     264    {
     265        if(!strcasecmp("black", var))
     266            caca_set_feature(CACA_BACKGROUND_BLACK);
     267        else if(!strcasecmp("solid", var))
     268            caca_set_feature(CACA_BACKGROUND_SOLID);
     269    }
     270
     271    if((var = getenv("CACA_ANTIALIASING")))
     272    {
     273        if(!strcasecmp("none", var))
     274            caca_set_feature(CACA_ANTIALIASING_NONE);
     275        else if(!strcasecmp("prefilter", var))
     276            caca_set_feature(CACA_ANTIALIASING_PREFILTER);
     277    }
     278
     279    if((var = getenv("CACA_DITHERING")))
     280    {
     281        if(!strcasecmp("none", var))
     282            caca_set_feature(CACA_DITHERING_NONE);
     283        else if(!strcasecmp("ordered2", var))
     284            caca_set_feature(CACA_DITHERING_ORDERED2);
     285        else if(!strcasecmp("ordered4", var))
     286            caca_set_feature(CACA_DITHERING_ORDERED4);
     287        else if(!strcasecmp("ordered8", var))
     288            caca_set_feature(CACA_DITHERING_ORDERED8);
     289        else if(!strcasecmp("random", var))
     290            caca_set_feature(CACA_DITHERING_RANDOM);
     291    }
     292#endif
    256293}
    257294
Note: See TracChangeset for help on using the changeset viewer.