Changeset 274


Ignore:
Timestamp:
Dec 24, 2003, 4:43:45 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • src/graphics.c: + Replace CACA_WIDTH and CACA_HEIGHT with CACA_GEOMETRY.
  • src/caca.c: + Documented the CACA_GEOMETRY environment variable.
Location:
libcaca/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/NEWS

    r270 r274  
    66  * preliminary X11 graphics driver
    77  * support for simultaneously compiled-in drivers
    8   * honour the CACA_DRIVER, CACA_WIDTH, CACA_HEIGHT and CACA_FONT environment
    9     variables
     8  * honour the CACA_DRIVER, CACA_GEOMETRY and CACA_FONT environment variables
    109  * more documentation
    1110
  • libcaca/trunk/src/caca.h

    r268 r274  
    6262 *      - \c slang uses the S-Lang library.
    6363 *      - \c x11 uses the native X11 driver.
     64 *
     65 *  \li \b CACA_GEOMETRY: set the video display size. The format of this
     66 *      variable must be XxY, with X and Y being integer values. This option
     67 *      currently only works with the X11 driver.
    6468 *
    6569 *  \li \b CACA_BACKGROUND: set the background type.
  • libcaca/trunk/src/graphics.c

    r273 r274  
    521521        int i;
    522522
    523         if(getenv("CACA_WIDTH"))
    524             _caca_width = atoi(getenv("CACA_WIDTH"));
     523        if(getenv("CACA_GEOMETRY"))
     524            sscanf(getenv("CACA_GEOMETRY"),
     525                   "%ux%u", &_caca_width, &_caca_height);
     526
    525527        if(!_caca_width)
    526528            _caca_width = 80;
    527 
    528         if(getenv("CACA_HEIGHT"))
    529             _caca_height = atoi(getenv("CACA_HEIGHT"));
    530529        if(!_caca_height)
    531530            _caca_height = 32;
Note: See TracChangeset for help on using the changeset viewer.