--- ray/src/px/ximage.c 2003/02/22 02:07:28 2.9 +++ ray/src/px/ximage.c 2004/01/02 12:47:01 2.13 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ximage.c,v 2.9 2003/02/22 02:07:28 greg Exp $"; +static const char RCSid[] = "$Id: ximage.c,v 2.13 2004/01/02 12:47:01 schorsch Exp $"; #endif /* * ximage.c - driver for X-windows @@ -15,21 +15,15 @@ static const char RCSid[] = "$Id: ximage.c,v 2.9 2003/ #include #include - +#include #include - #include #include "color.h" - #include "resolu.h" - #include "xraster.h" - #include "view.h" - #include "pic.h" - #include "random.h" #define controlshift(e) (((XButtonEvent *)(e))->detail & (ShiftMask|ControlMask)) @@ -85,14 +79,15 @@ char *progname; char errmsg[128]; +static gethfunc headline; + main(argc, argv) int argc; char *argv[]; { extern char *getenv(); char *gv; - int headline(); int i; progname = argv[0]; @@ -164,9 +159,11 @@ userr: } -int -headline(s) /* get relevant info from header */ -char *s; +static int +headline( /* get relevant info from header */ + char *s, + void *p +) { char fmt[32]; @@ -597,7 +594,7 @@ colormap cmap; xr->cdefs[xr->ncolors].pixel = *p; xr->pmap[*p] = xr->ncolors++; } - xr->cdefs = (Color *)realloc((char *)xr->cdefs, xr->ncolors*sizeof(Color)); + xr->cdefs = (Color *)realloc((void *)xr->cdefs, xr->ncolors*sizeof(Color)); if (xr->cdefs == NULL) return(0); return(1); @@ -674,7 +671,7 @@ picwriteline(y, l) /* add 8-bit scanline to image */ int y; pixel *l; { - bcopy((char *)l, (char *)ourras->data.bz+BZPixmapSize(xmax,y), BZPixmapSize(xmax,1)); + memcpy((void *)ourras->data.bz+BZPixmapSize(xmax,y), (void *)l, BZPixmapSize(xmax,1)); }