| @@ -104,7 +104,7 @@ static int gl_init_graphics(caca_t *kk) | |||||
| gl_kk = kk; | gl_kk = kk; | ||||
| geometry = getenv("CACA_GEOMETRY"); | geometry = getenv("CACA_GEOMETRY"); | ||||
| if(geometry && *(geometry)) | |||||
| if(geometry && *geometry) | |||||
| sscanf(geometry, "%ux%u", &width, &height); | sscanf(geometry, "%ux%u", &width, &height); | ||||
| if(width && height) | if(width && height) | ||||
| @@ -411,7 +411,7 @@ static RETSIGTYPE sigwinch_handler(int sig) | |||||
| { | { | ||||
| sigwinch_kk->resize.resized = 1; | sigwinch_kk->resize.resized = 1; | ||||
| signal(SIGWINCH, sigwinch_handler);; | |||||
| signal(SIGWINCH, sigwinch_handler); | |||||
| } | } | ||||
| #endif | #endif | ||||
| @@ -93,7 +93,7 @@ static int x11_init_graphics(caca_t *kk) | |||||
| kk->drv.p = malloc(sizeof(struct driver_private)); | kk->drv.p = malloc(sizeof(struct driver_private)); | ||||
| geometry = getenv("CACA_GEOMETRY"); | geometry = getenv("CACA_GEOMETRY"); | ||||
| if(geometry && *(geometry)) | |||||
| if(geometry && *geometry) | |||||
| sscanf(geometry, "%ux%u", &width, &height); | sscanf(geometry, "%ux%u", &width, &height); | ||||
| if(width && height) | if(width && height) | ||||
| @@ -165,10 +165,10 @@ static void create_ball(void) | |||||
| for(y = 0; y < METASIZE; y++) | for(y = 0; y < METASIZE; y++) | ||||
| for(x = 0; x < METASIZE; x++) | for(x = 0; x < METASIZE; x++) | ||||
| { | { | ||||
| distance = ((METASIZE/2) - x) * ((METASIZE/2) - x) | |||||
| distance = ((METASIZE/2) - x) * ((METASIZE/2) - x) | |||||
| + ((METASIZE/2) - y) * ((METASIZE/2) - y); | + ((METASIZE/2) - y) * ((METASIZE/2) - y); | ||||
| distance = sqrt(distance) * 64 / METASIZE; | distance = sqrt(distance) * 64 / METASIZE; | ||||
| metaball[x + y * METASIZE] = distance > 15 ? 0 : (255 - distance) * 15; | |||||
| metaball[x + y * METASIZE] = distance > 15 ? 0 : (255 - distance) * 15; | |||||
| } | } | ||||
| } | } | ||||