Browse Source

* Changed port environment variable to "CACA_PORT". No need to mention it's

a network port, we could have guessed.
tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
31229fae80
2 changed files with 4 additions and 5 deletions
  1. +2
    -3
      caca/caca.h
  2. +2
    -2
      caca/driver_network.c

+ 2
- 3
caca/caca.h View File

@@ -93,9 +93,8 @@
* implementation dependent, but since it currently only works with the
* X11 driver, an X11 font name such as "fixed" or "5x7" is expected.
*
* \li \b CACA_NETWORK_PORT: set the port the network driver will listen on.
* Obviously only works when using CACA_DRIVER=network.
* Default to 7575 (KK in ASCII Dec)
* \li \b CACA_PORT: set the port the network driver will listen on, when
* the output driver is "network". Default port is 51914 (0xCACA).
*/

#ifndef __CACA_H__


+ 2
- 2
caca/driver_network.c View File

@@ -98,7 +98,7 @@ ssize_t nonblock_write(int fd, char *buf, size_t len);
static int network_init_graphics(caca_t *kk)
{
int yes = 1, flags;
int port = 51914;
int port = 0xCACA; /* 51914 */
char *network_port, *tmp;

kk->drv.p = malloc(sizeof(struct driver_private));
@@ -106,7 +106,7 @@ static int network_init_graphics(caca_t *kk)
return -1;

#if defined(HAVE_GETENV)
network_port = getenv("CACA_NETWORK_PORT");
network_port = getenv("CACA_PORT");
if(network_port && *network_port)
{
int new_port = atoi(network_port);


Loading…
Cancel
Save