add: ptr = mygetenv("WRASTER_COLOR_RESOLUTION", screen_n); if (ptr) { int i; if (sscanf(ptr, "%d", &i)!=1 || i<2 || i>6) { printf("wrlib: invalid value for color resolution \"%s\"\n",ptr); } else { context->attribs->flags |= RC_ColorsPerChannel; context->attribs->colors_per_channel = i; } }
context: gatherconfig(RContext *context, int screen_n){    char *ptr;    ptr = mygetenv("WRASTER_GAMMA", screen_n);    if (ptr) {	float g1,g2,g3;	if (sscanf(ptr, "%f/%f/%f", &g1, &g2, &g3)!=3 	    || g1<=0.0 || g2<=0.0 || g3<=0.0) {	    printf("wrlib: invalid value(s) for gamma correction \"%s\"\n", 		   ptr);	} else {	    context->attribs->flags |= RC_GammaCorrection;	    context->attribs->rgamma = g1;	    context->attribs->ggamma = g2;	    context->attribs->bgamma = g3;	}    }}