X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fswirl.c;h=93f0c0a63da6721ffdeb3d0e8b4064680de2b171;hb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;hp=5ea1598c54efe007530ea299307c6151fe22f471;hpb=ce3185de9d9705e259f2b60dd4b5509007fa17d4;p=xscreensaver diff --git a/hacks/swirl.c b/hacks/swirl.c index 5ea1598c..93f0c0a6 100644 --- a/hacks/swirl.c +++ b/hacks/swirl.c @@ -1,7 +1,7 @@ /* -*- Mode: C; tab-width: 4 -*- * swirl --- swirly color-cycling patterns. */ -#if !defined( lint ) && !defined( SABER ) +#if 0 static const char sccsid[] = "@(#)swirl.c 4.00 97/01/01 xlockmore"; #endif @@ -224,9 +224,7 @@ initialise_swirl(ModeInfo * mi, SWIRL_P swirl) #endif /* !STANDALONE */ -#ifdef STANDALONE -# define MI_COLORMAP MI_WIN_COLORMAP -#else /* !STANDALONE */ +#ifndef STANDALONE swirl->fg = MI_FG_COLOR(mi); swirl->bg = MI_BG_COLOR(mi); swirl->fgcol.pixel = swirl->fg; @@ -270,8 +268,9 @@ initialise_image(ModeInfo * mi, SWIRL_P swirl) swirl->ximage = XCreateImage(dpy, swirl->visual, swirl->rdepth, ZPixmap, 0, 0, swirl->width, swirl->height, 8, 0); - swirl->ximage->data = swirl->image = - (char *) calloc(swirl->height, swirl->ximage->bytes_per_line); + swirl->image = (unsigned char *) + calloc(swirl->height, swirl->ximage->bytes_per_line); + swirl->ximage->data = (char *) swirl->image; } }