Changeset 586 for libcaca/trunk
- Timestamp:
- Mar 10, 2006, 4:11:40 PM (15 years ago)
- Location:
- libcaca/trunk/caca
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/caca.c
r565 r586 115 115 #if defined(HAVE_GETENV) && defined(HAVE_STRCASECMP) 116 116 char *var = getenv("CACA_DRIVER"); 117 117 118 118 /* If the environment variable was set, use it */ 119 119 if(var && *var) 120 {120 { 121 121 #if defined(USE_WIN32) 122 122 if(!strcasecmp(var, "win32")) -
libcaca/trunk/caca/caca.h
r561 r586 93 93 * implementation dependent, but since it currently only works with the 94 94 * X11 driver, an X11 font name such as "fixed" or "5x7" is expected. 95 * 96 * \li \b CACA_NETWORK_PORT: set the port the network driver will listen on. 97 * Obviously only works when using CACA_DRIVER=network. 98 * Default to 7575 (KK in ASCII Dec) 95 99 */ 96 100 -
libcaca/trunk/caca/driver_network.c
r585 r586 78 78 { 79 79 int yes=1; 80 int net_port = 7575; 81 char *network_port; 82 80 83 81 84 kk->drv.p = malloc(sizeof(struct driver_private)); … … 83 86 return -1; 84 87 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 85 99 kk->drv.p->width = 80; 86 100 kk->drv.p->height = 23; // Avoid scrolling 87 kk->drv.p->port = 7575; // 75 75 decimal ASCII -> KK // FIXME, sadly88 101 kk->drv.p->client_count = 0; 89 102 kk->drv.p->fd_list = NULL; 90 103 kk->drv.p->port = net_port; 91 104 92 105 … … 266 279 } 267 280 281 268 282 #endif // USE_NETWORK 269 283
Note: See TracChangeset
for help on using the changeset viewer.