rem: on_exit(saveDefaultsChanges,0);
add: on_exit(saveDefaultsChanges, (void*)NULL);
context: WMGetStandardUserDefaults(void){        if (!sharedUserDefaults) {	WMUserDefaults *defaults;		proplist_t domain;	proplist_t key;	char *path;	int i;	defaults = wmalloc(sizeof(WMUserDefaults));	memset(defaults, 0, sizeof(WMUserDefaults));	defaults->defaults = PLMakeDictionaryFromEntries(NULL, NULL, NULL);	defaults->searchList = wmalloc(sizeof(proplist_t)*3);		/* application domain */	key = PLMakeString(WMGetApplicationName());	defaults->searchList[0] = key;	/* temporary kluge */	if (strcmp(WMGetApplicationName(), "WindowMaker")==0) {	    domain = NULL; 	    path = NULL;	} else {	    path = wdefaultspathfordomain(PLGetString(key));		    domain = PLGetProplistWithPath(path);	}	if (!domain) {	    proplist_t p;	    domain = PLMakeDictionaryFromEntries(NULL, NULL, NULL);	    if (path) {		p = PLMakeString(path);		PLSetFilename(domain, p);		PLRelease(p);	    }	}	if (path)	    free(path);	defaults->appDomain = domain;	if (domain)	    PLInsertDictionaryEntry(defaults->defaults, key, domain);	PLRelease(key);	/* global domain */	key = PLMakeString("WMGLOBAL");	defaults->searchList[1] = key;	path = wdefaultspathfordomain(PLGetString(key));	domain = PLGetProplistWithPath(path);    	free(path);	if (!domain)	    domain = PLMakeDictionaryFromEntries(NULL, NULL, NULL);	if (domain)	    PLInsertDictionaryEntry(defaults->defaults, key, domain);	PLRelease(key);		/* terminate list */	defaults->searchList[2] = NULL;	defaults->searchListArray=PLMakeArrayFromElements(NULL,NULL);		i = 0;	while (defaults->searchList[i]) {	    PLAppendArrayElement(defaults->searchListArray, 				 defaults->searchList[i]);	    i++;	}	sharedUserDefaults = defaults;		/* set to save changes in defaults when program is exited */#ifndef HAVE_ATEXIT	on_exit(saveDefaultsChanges,0);#else	atexit(saveDefaultsChanges);#endif    }    return sharedUserDefaults;}