rem: buffer[0] = 0; } strcat(buffer, file);  prefix = malloc(strlen(buffer)+10); if (!prefix) { printf("%s: out of memory\n", ProgName); exit(1); } strcpy(prefix, buffer);  strcat(buffer, "/style");  style = PLGetProplistWithPath(buffer); if (!style) { perror(buffer); printf("%s:could not load style file.\n", ProgName); exit(1); }  hackPaths(style, prefix); free(prefix); } else { style = PLGetProplistWithPath(file); if (!style) { perror(file); printf("%s:could not load style file.\n", ProgName); exit(1);
add: style = PLGetProplistWithPath(file); if (!style) { perror(file); printf("%s:could not load style file.\n", ProgName); exit(1); }
context: main(int argc, char **argv){    proplist_t prop, style;    char *path;    char *file = NULL;    struct stat statbuf;    int i;    int ignoreCount = 0;    char *ignoreList[MAX_OPTIONS];    dpy = XOpenDisplay("");    ProgName = argv[0];        if (argc<2) {	printf("%s: missing argument\n", ProgName);	printf("Try '%s --help' for more information\n", ProgName);	exit(1);    }    for (i = 1; i < argc; i++) {	if (strcmp("--ignore", argv[i])==0) {	    i++;	    if (i == argc) {		printf("%s: missing argument for option --ignore", ProgName);		exit(1);	    }	    ignoreList[ignoreCount++] = argv[i];	} else if (strcmp("--no-fonts", argv[i])==0) {	    ignoreFonts = 1;	} else if (strcmp("--version", argv[i])==0) {	    puts(PROG_VERSION);	    exit(0);	} else if (strcmp("--help", argv[i])==0) {	    print_help();	    exit(0);	} else {	    if (file) {		printf("%s: invalid argument '%s'\n", ProgName, argv[i]);		printf("Try '%s --help' for more information\n", ProgName);		exit(1);	    }	    file = argv[i];	}    }    PLSetStringCmpHook(StringCompareHook);    path = defaultsPathForDomain("WindowMaker");    prop = PLGetProplistWithPath(path);    if (!prop) {	perror(path);	printf("%s:could not load WindowMaker configuration file.\n",	       ProgName);	exit(1);    }    if (stat(file, &statbuf) < 0) {	perror(file);	exit(1);    }    if (S_ISDIR(statbuf.st_mode)) {	char buffer[4018];	char *prefix;	if (*argv[argc-1] != '/') {	    if (!getcwd(buffer, 4000)) {		printf("%s: complete path for %s is too long\n", ProgName,		       file);		exit(1);	    }	    if (strlen(buffer) + strlen(file) > 4000) {		printf("%s: complete path for %s is too long\n", ProgName,		       file);		exit(1);	    }	    strcat(buffer, "/");	} else {	    buffer[0] = 0;	}	strcat(buffer, file);	prefix = malloc(strlen(buffer)+10);	if (!prefix) {	    printf("%s: out of memory\n", ProgName);	    exit(1);	}	strcpy(prefix, buffer);	strcat(buffer, "/style");		style = PLGetProplistWithPath(buffer);	if (!style) {	    perror(buffer);	    printf("%s:could not load style file.\n", ProgName);	    exit(1);	}	hackPaths(style, prefix);	free(prefix);    } else {	style = PLGetProplistWithPath(file);	if (!style) {	    perror(file);	    printf("%s:could not load style file.\n", ProgName);	    exit(1);	}    }        if (!PLIsDictionary(style)) {	printf("%s: '%s' is not a style file/theme\n", ProgName, file);	exit(1);    }    hackStyle(style);    if (ignoreCount > 0) {	for (i = 0; i < ignoreCount; i++) {	    PLRemoveDictionaryEntry(style, PLMakeString(ignoreList[i]));	}    }    PLMergeDictionaries(prop, style);    PLSave(prop, YES);    {	XEvent ev;		if (dpy) {	    int i;	    char *msg = "Reconfigure";	    memset(&ev, 0, sizeof(XEvent));	    	    ev.xclient.type = ClientMessage;	    ev.xclient.message_type = XInternAtom(dpy, "_WINDOWMAKER_COMMAND",						  False);	    ev.xclient.window = DefaultRootWindow(dpy);	    ev.xclient.format = 8;	    for (i = 0; i <= strlen(msg); i++) {		ev.xclient.data.b[i] = msg[i];	    }	    XSendEvent(dpy, DefaultRootWindow(dpy), False, 		       SubstructureRedirectMask, &ev);	    XFlush(dpy);	}    }    exit(0);}