strncpy(s, colors[*pixels].string, cpp);
if(cpp > (data_size - (s - *dataptr))) return; strncpy(s, colors[*pixels].string, cpp);
CreatePixels(dataptr, width, height, cpp, pixels, colors)    char **dataptr;    unsigned int width;    unsigned int height;    unsigned int cpp;    unsigned int *pixels;    XpmColor *colors;{    char *s;    unsigned int x, y, h, offset;    h = height - 1;    offset = width * cpp + 1;    for (y = 0; y < h; y++, dataptr++) {	s = *dataptr;	for (x = 0; x < width; x++, pixels++) {	    strncpy(s, colors[*pixels].string, cpp);	    s += cpp;	}	*s = '\0';	*(dataptr + 1) = *dataptr + offset;    }    /* duplicate some code to avoid a test in the loop */    s = *dataptr;    for (x = 0; x < width; x++, pixels++) {	strncpy(s, colors[*pixels].string, cpp);	s += cpp;    }    *s = '\0';}