add: }  if (!(context->attribs->flags & RC_ScalingFilter)) { context->attribs->flags |= RC_ScalingFilter; context->attribs->scaling_filter = RMitchellFilter;
context: RCreateContext(Display *dpy, int screen_number, RContextAttributes *attribs){    RContext *context;    XGCValues gcv;        context = malloc(sizeof(RContext));    if (!context) {	RErrorCode = RERR_NOMEMORY;	return NULL;    }    memset(context, 0, sizeof(RContext));    context->dpy = dpy;        context->screen_number = screen_number;        context->attribs = malloc(sizeof(RContextAttributes));    if (!context->attribs) {	free(context);	RErrorCode = RERR_NOMEMORY;	return NULL;    }    if (!attribs)	*context->attribs = DEFAULT_CONTEXT_ATTRIBS;    else	*context->attribs = *attribs;    if (!(context->attribs->flags & RC_StandardColormap)) {	context->attribs->standard_colormap_mode = RUseStdColormap;    }    /* get configuration from environment variables */    gatherconfig(context, screen_number);#ifndef BENCH    _wraster_change_filter(context->attribs->scaling_filter);#endif    if ((context->attribs->flags & RC_VisualID)) {	XVisualInfo *vinfo, templ;	int nret;	    	templ.screen = screen_number;	templ.visualid = context->attribs->visualid;	vinfo = XGetVisualInfo(context->dpy, VisualIDMask|VisualScreenMask,			       &templ, &nret);	if (!vinfo || nret==0) {	    free(context);	    RErrorCode = RERR_BADVISUALID;	    return NULL;	}	if (vinfo[0].visual == DefaultVisual(dpy, screen_number)) {	    context->attribs->flags |= RC_DefaultVisual;	} else {	    XSetWindowAttributes attr;	    unsigned long mask;			    context->visual = vinfo[0].visual;	    context->depth = vinfo[0].depth;	    context->vclass = vinfo[0].class;	    getColormap(context, screen_number);	    attr.colormap = context->cmap;	    attr.override_redirect = True;	    attr.border_pixel = 0;	    attr.background_pixel = 0;	    mask = CWBorderPixel|CWColormap|CWOverrideRedirect|CWBackPixel;	    context->drawable =		XCreateWindow(dpy, RootWindow(dpy, screen_number), 1, 1, 			      1, 1, 0, context->depth, CopyFromParent,			      context->visual, mask, &attr);	    /*		XSetWindowColormap(dpy, context->drawable, attr.colormap);*/	}	XFree(vinfo);    }    /* use default */    if (!context->visual) {	if ((context->attribs->flags & RC_DefaultVisual)	    || !bestContext(dpy, screen_number, context)) {	    context->visual = DefaultVisual(dpy, screen_number);	    context->depth = DefaultDepth(dpy, screen_number);	    context->cmap = DefaultColormap(dpy, screen_number);	    context->drawable = RootWindow(dpy, screen_number);	    context->black = BlackPixel(dpy, screen_number);	    context->white = WhitePixel(dpy, screen_number);	    context->vclass = context->visual->class;	}    }        gcv.function = GXcopy;    gcv.graphics_exposures = False;    context->copy_gc = XCreateGC(dpy, context->drawable, GCFunction				 |GCGraphicsExposures, &gcv);    if (context->vclass == PseudoColor || context->vclass == StaticColor) {		if (!setupPseudoColorColormap(context)) {	    return NULL;	}        } else if (context->vclass == GrayScale || context->vclass == StaticGray) {	context->colors = allocateGrayScale(context);	if (!context->colors) {	    return NULL;	}    } else if (context->vclass == TrueColor) {    	/* calc offsets to create a TrueColor pixel */	context->red_offset = count_offset(context->visual->red_mask);	context->green_offset = count_offset(context->visual->green_mask);	context->blue_offset = count_offset(context->visual->blue_mask);	/* disable dithering on 24 bits visuals */	if (context->depth >= 24)	    context->attribs->render_mode = RBestMatchRendering;    }        /* check avaiability of MIT-SHM */#ifdef XSHM    if (!(context->attribs->flags & RC_UseSharedMemory)) {	context->attribs->flags |= RC_UseSharedMemory;	context->attribs->use_shared_memory = True;    }    if (context->attribs->use_shared_memory) {	int major, minor;	Bool sharedPixmaps;	context->flags.use_shared_pixmap = 0;	if (!XShmQueryVersion(context->dpy, &major, &minor, &sharedPixmaps)) {	    context->attribs->use_shared_memory = False;	} else {	    if (XShmPixmapFormat(context->dpy)==ZPixmap)	    	context->flags.use_shared_pixmap = sharedPixmaps;	}    } #endif    return context;}