Ignore:
Timestamp:
Jan 11, 2004, 2:45:57 AM (17 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac: + Check for gettimeofday().
  • src/time.c: + Created _caca_time(). + Ported _caca_getticks() to the Win32 API.
  • src/caca.c: + Properly builds on Win32.
  • test/event.c: + Added <stdlib.h> because we use malloc().
File:
1 edited

Legend:

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

    r331 r335  
    4848#if defined(USE_X11)
    4949#   include <X11/Xlib.h>
     50#endif
     51#if defined(USE_WIN32)
     52#   include <windows.h>
    5053#endif
    5154
     
    157160#endif
    158161#if defined(USE_X11)
    159     /* Nothing to do */
     162    if(_caca_driver == CACA_DRIVER_X11)
     163    {
     164        /* Nothing to do */
     165    }
     166    else
     167#endif
     168#if defined(USE_WIN32)
     169    if(_caca_driver == CACA_DRIVER_WIN32)
     170    {
     171        /* Nothing to do */
     172        printf("initialising win32 driver\n");
     173    }
     174    else
    160175#endif
    161176    {
     
    374389    else
    375390#endif
     391#if defined(USE_WIN32)
     392    if(_caca_driver == CACA_DRIVER_WIN32)
     393    {
     394        /* Nothing to do */
     395    }
     396    else
     397#endif
    376398    {
    377399        /* Dummy */
     
    391413    if(var && *var)
    392414    {
     415#if defined(USE_WIN32)
     416        if(!strcasecmp(var, "win32"))
     417            _caca_driver = CACA_DRIVER_WIN32;
     418        else
     419#endif
    393420#if defined(USE_CONIO)
    394421        if(!strcasecmp(var, "conio"))
     
    417444#endif
    418445
     446#if defined(USE_WIN32)
     447    _caca_driver = CACA_DRIVER_WIN32;
     448    return;
     449#endif
    419450#if defined(USE_CONIO)
    420451    _caca_driver = CACA_DRIVER_CONIO;
     
    488519static void caca_init_terminal(void)
    489520{
    490 #if defined(HAVE_GETENV) && defined(HAVE_PUTENV)
     521#if defined(HAVE_GETENV) && defined(HAVE_PUTENV) && \
     522     (defined(USE_SLANG) || defined(USE_NCURSES))
    491523    char *term, *colorterm, *other;
     524#endif
    492525
    493526#if defined(USE_SLANG)
     
    499532    return;
    500533
     534#if defined(HAVE_GETENV) && defined(HAVE_PUTENV) && \
     535     (defined(USE_SLANG) || defined(USE_NCURSES))
    501536    term = getenv("TERM");
    502537    colorterm = getenv("COLORTERM");
Note: See TracChangeset for help on using the changeset viewer.