rem: int update=0, cpc=4, render_mode=RM_DITHER, obey_user=0;
add: int update=0, cpc=4, render_mode=RDitheredRendering, obey_user=0;
context: main(int argc, char **argv){    int i;    int helperMode = 0;    RContext *rc;    RContextAttributes rattr;    char *style = "spixmap";    char *back_color = "gray20";    char *image_name = NULL;    char *domain = "WindowMaker";    int update=0, cpc=4, render_mode=RM_DITHER, obey_user=0;    char *texture = NULL;    int workspace = -1;        signal(SIGINT, SIG_DFL);    signal(SIGTERM, SIG_DFL);    signal(SIGQUIT, SIG_DFL);    signal(SIGSEGV, SIG_DFL);    signal(SIGBUS, SIG_DFL);    signal(SIGFPE, SIG_DFL);    signal(SIGABRT, SIG_DFL);    signal(SIGHUP, SIG_DFL);    signal(SIGPIPE, SIG_DFL);    signal(SIGCHLD, SIG_DFL);        WMInitializeApplication("wmsetbg", &argc, argv);        for (i=1; i<argc; i++) {	if (strcmp(argv[i], "-helper")==0) {	    helperMode = 1;	} else if (strcmp(argv[i], "-display")==0) {	    i++;	    if (i>=argc) {		wfatal("too few arguments for %s\n", argv[i-1]);		exit(1);	    }	    display = argv[i];	} else if (strcmp(argv[i], "-s")==0		   || strcmp(argv[i], "--scale")==0) {	    style = "spixmap";	} else if (strcmp(argv[i], "-t")==0		   || strcmp(argv[i], "--tile")==0) {	    style = "tpixmap";	} else if (strcmp(argv[i], "-e")==0		   || strcmp(argv[i], "--center")==0) {	    style = "cpixmap";	} else if (strcmp(argv[i], "-a")==0		   || strcmp(argv[i], "--maxscale")==0) {	    style = "mpixmap";	    	} else if (strcmp(argv[i], "-d")==0		   || strcmp(argv[i], "--dither")==0) {	    render_mode = RM_DITHER;	    obey_user++;	} else if (strcmp(argv[i], "-m")==0		   || strcmp(argv[i], "--match")==0) {	    render_mode = RM_MATCH;	    obey_user++;	} else if (strcmp(argv[i], "-S")==0		   || strcmp(argv[i], "--smooth")==0) {	    smooth = True;	} else if (strcmp(argv[i], "-u")==0		   || strcmp(argv[i], "--update-wmaker")==0) {	    update++;	} else if (strcmp(argv[i], "-D")==0		   || strcmp(argv[i], "--update-domain")==0) {	    update++;	    i++;	    if (i>=argc) {		wfatal("too few arguments for %s\n", argv[i-1]);		exit(1);	    }	    domain = wstrdup(argv[i]);	} else if (strcmp(argv[i], "-c")==0		   || strcmp(argv[i], "--colors")==0) {	    i++;	    if (i>=argc) {		wfatal("too few arguments for %s\n", argv[i-1]);		exit(1);	    }	    if (sscanf(argv[i], "%i", &cpc)!=1) {		wfatal("bad value for colors per channel: \"%s\"\n", argv[i]);		exit(1);	    }	} else if (strcmp(argv[i], "-b")==0		   || strcmp(argv[i], "--back-color")==0) {	    i++;	    if (i>=argc) {		wfatal("too few arguments for %s\n", argv[i-1]);		exit(1);	    }	    back_color = argv[i];	} else if (strcmp(argv[i], "-p")==0		   || strcmp(argv[i], "--parse")==0) {	    i++;	    if (i>=argc) {		wfatal("too few arguments for %s\n", argv[i-1]);		exit(1);	    }	    texture = argv[i];	} else if (strcmp(argv[i], "-w")==0		   || strcmp(argv[i], "--workspace")==0) {	    i++;	    if (i>=argc) {		wfatal("too few arguments for %s\n", argv[i-1]);		exit(1);	    }	    if (sscanf(argv[i], "%i", &workspace)!=1) {		wfatal("bad value for workspace number: \"%s\"", 			argv[i]);		exit(1);	    }	} else if (strcmp(argv[i], "--version")==0) {	    printf(PROG_VERSION);	    exit(0);	} else if (strcmp(argv[i], "--help")==0) {	    print_help(argv[0]);	    exit(0);	} else if (argv[i][0] != '-') {	    image_name = argv[i];	} else {	    printf("%s: invalid argument '%s'\n", argv[0], argv[i]);	    printf("Try '%s --help' for more information\n", argv[0]);	    exit(1);	}    }    if (!image_name && !texture && !helperMode) {	printf("%s: you must specify a image file name or a texture\n", 	       argv[0]);	printf("Try '%s --help' for more information\n", argv[0]);	exit(1);    }        PixmapPath = getPixmapPath(domain);    dpy = XOpenDisplay(display);    if (!dpy) {	wfatal("could not open display");	exit(1);    }#if 0    XSynchronize(dpy, 1);#endif    root = DefaultRootWindow(dpy);    scr = DefaultScreen(dpy);        scrWidth = WidthOfScreen(DefaultScreenOfDisplay(dpy));    scrHeight = HeightOfScreen(DefaultScreenOfDisplay(dpy));    if (!obey_user && DefaultDepth(dpy, scr) <= 8)        render_mode = RM_DITHER;    rattr.flags = RC_RenderMode | RC_ColorsPerChannel | RC_DefaultVisual;    rattr.render_mode = render_mode;    rattr.colors_per_channel = cpc;    rc = RCreateContext(dpy, scr, &rattr);    if (helperMode) {	/* lower priority, so that it wont use all the CPU */	nice(1000);	helperLoop(rc);    } else {	BackgroundTexture *tex;	char buffer[4098];	if (!texture) {	    sprintf(buffer, "(%s, \"%s\", %s)", style, image_name, back_color);	    texture = (char*)buffer;	}	if (update && workspace < 0) {	    updateDomain(domain, "WorkspaceBack", texture);	}	tex = parseTexture(rc, texture);	if (!tex)	    exit(1);	if (workspace<0)	    changeTexture(tex);	else {	    /* always update domain */	    changeTextureForWorkspace(domain, texture, workspace-1);	}    }    return 0;}