rem: DIR	*dPtr; struct dirent	*dp; struct stat		stat_buf;   if (stat(panel->configurationPath, &stat_buf)!=0) { if (mkdir(panel->configurationPath, S_IRWXU|S_IRGRP|S_IROTH|S_IXGRP|S_IXOTH)!=0) { wfatal("ColorPanel could not create directory %s needed to store configurations", panel->configurationPath); WMFreeColorPanel(panel); wAbort(); } return; }  dPtr = opendir(panel->configurationPath); while ((dp = readdir(dPtr)) != NULL) { if (dp->d_name[0] != '.') WMAddPopUpButtonItem(panel->customPaletteHistoryBtn, dp->d_name); } (void)closedir(dPtr);
add: DIR    *dPtr; struct dirent    *dp; struct stat        stat_buf;   if (stat(panel->configurationPath, &stat_buf)!=0) { if (mkdir(panel->configurationPath, S_IRWXU|S_IRGRP|S_IROTH|S_IXGRP|S_IXOTH)!=0) { wsyserror("ColorPanel could not create directory %s needed to store configurations", panel->configurationPath); WMFreeColorPanel(panel); wAbort(); } return; }  dPtr = opendir(panel->configurationPath); while ((dp = readdir(dPtr)) != NULL) { if (dp->d_name[0] != '.') WMAddPopUpButtonItem(panel->customPaletteHistoryBtn, dp->d_name); } (void)closedir(dPtr);
context: readConfiguration(W_ColorPanel *panel){	/* XXX Doesn't take care of "invalid" files */	DIR	*dPtr;	struct dirent	*dp;	struct stat		stat_buf;	if (stat(panel->configurationPath, &stat_buf)!=0) {		if (mkdir(panel->configurationPath, S_IRWXU|S_IRGRP|S_IROTH|S_IXGRP|S_IXOTH)!=0) {				wfatal("ColorPanel could not create directory %s needed to store configurations", panel->configurationPath);				WMFreeColorPanel(panel);				wAbort();		}		return;	}		dPtr = opendir(panel->configurationPath);	while ((dp = readdir(dPtr)) != NULL) {		if (dp->d_name[0] != '.')			WMAddPopUpButtonItem(panel->customPaletteHistoryBtn, dp->d_name);	}	(void)closedir(dPtr);}