Ignore:
Timestamp:
Mar 10, 2006, 4:11:40 PM (15 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Added CACA_NETWORK_PORT env and related documentation
File:
1 edited

Legend:

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

    r585 r586  
    7878{
    7979    int yes=1;
     80    int net_port = 7575;
     81    char *network_port;
     82
    8083
    8184    kk->drv.p = malloc(sizeof(struct driver_private));
     
    8386        return -1;
    8487
     88
     89#if defined(HAVE_GETENV)
     90    network_port = getenv("CACA_NETWORK_PORT");
     91    if(network_port && *network_port) {
     92        net_port = atoi(network_port);
     93        if(!net_port)
     94            net_port = 7575;
     95    }
     96#endif
     97   
     98
    8599    kk->drv.p->width = 80;
    86100    kk->drv.p->height = 23; // Avoid scrolling
    87     kk->drv.p->port = 7575; // 75 75 decimal ASCII -> KK   // FIXME, sadly
    88101    kk->drv.p->client_count = 0;
    89102    kk->drv.p->fd_list = NULL;
    90 
     103    kk->drv.p->port = net_port;
    91104
    92105
     
    266279}
    267280
     281
    268282#endif // USE_NETWORK
    269283
Note: See TracChangeset for help on using the changeset viewer.