mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
WindowMaker: Clean curly brackets
This patch removes the unneeded curly brackets in multiple files. It also add some comments in the code. In usermenu.c removes some variables not used.
This commit is contained in:
committed by
Carlos R. Mafra
parent
afe2e5d9d6
commit
761fd37e51
@@ -296,7 +296,7 @@ static void legalPanelCommand(WMenu * menu, WMenuEntry * entry)
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
static char *getLocalizedMenuFile(char *menu)
|
||||
static char * getLocalizedMenuFile(char *menu)
|
||||
{
|
||||
char *buffer, *ptr, *locale;
|
||||
int len;
|
||||
@@ -309,9 +309,8 @@ static char *getLocalizedMenuFile(char *menu)
|
||||
|
||||
/* try menu.locale_name */
|
||||
snprintf(buffer, len, "%s.%s", menu, Locale);
|
||||
if (access(buffer, F_OK) == 0) {
|
||||
if (access(buffer, F_OK) == 0)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/* position of locale in our buffer */
|
||||
locale = buffer + strlen(menu) + 1;
|
||||
@@ -320,17 +319,16 @@ static char *getLocalizedMenuFile(char *menu)
|
||||
ptr = strchr(locale, '.');
|
||||
if (ptr) {
|
||||
*ptr = 0;
|
||||
if (access(buffer, F_OK) == 0) {
|
||||
if (access(buffer, F_OK) == 0)
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
/* now check for aa */
|
||||
ptr = strchr(locale, '_');
|
||||
if (ptr) {
|
||||
*ptr = 0;
|
||||
if (access(buffer, F_OK) == 0) {
|
||||
if (access(buffer, F_OK) == 0)
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
wfree(buffer);
|
||||
|
||||
Reference in New Issue
Block a user