X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fbinaryring.c;h=3cbaec27ffac7959ccbe0d27a9c6999a78122b90;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=24320739d17bd6b778162d5a8c533bf9512e1eba;hpb=d5186197bc394e10a4402f7f6d23fbb14103bc50;p=xscreensaver diff --git a/hacks/binaryring.c b/hacks/binaryring.c index 24320739..3cbaec27 100644 --- a/hacks/binaryring.c +++ b/hacks/binaryring.c @@ -37,7 +37,7 @@ #define max(a,b) ((a)>(b)?(a):(b)) /* better if signed */ -typedef uint32_t pixel_t; +typedef unsigned long pixel_t; typedef struct { @@ -84,7 +84,7 @@ static void point2rgb(int depth, pixel_t c, int *r, int *g, int *b) switch(depth) { case 32: case 24: -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ /* This program idiotically does not go through a color map, so we have to hardcode in knowledge of how jwxyz.a packs pixels! Fix it to go through st->colors[st->ncolors] instead! @@ -118,7 +118,7 @@ static pixel_t rgb2point(int depth, int r, int g, int b) switch(depth) { case 32: case 24: -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ /* This program idiotically does not go through a color map, so we have to hardcode in knowledge of how jwxyz.a packs pixels! Fix it to go through st->colors[st->ncolors] instead! @@ -178,7 +178,7 @@ void draw_point ( struct state* st, void print_color ( struct state* st, pixel_t color ) { - int r, g, b; + int r=0, g=0, b=0; point2rgb(st->depth, color, &r, &g, &b); printf( "%d %d %d\n", r, g, b); } @@ -383,7 +383,7 @@ static void clamp ( int* value, int l, int h ) { } static pixel_t next_color ( struct state* st, pixel_t current ) { - int r, g, b; + int r=0, g=0, b=0; point2rgb(st->depth, current, &r, &g, &b); r += random() % 5 - 2;