mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 14:42:29 +01:00
Kill redundant function
This commit is contained in:
committed by
Carlos R. Mafra
parent
e1d5ce7a51
commit
de881d9c03
11
src/dialog.c
11
src/dialog.c
@@ -181,9 +181,9 @@ static char *HistoryFileName(char *name)
|
|||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int matchString(void *str1, void *str2)
|
static int strmatch(const void *str1, const void *str2)
|
||||||
{
|
{
|
||||||
return (strcmp((char *)str1, (char *)str2) == 0 ? 1 : 0);
|
return !strcmp((const char *)str1, (const char *)str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WMArray *LoadHistory(char *filename, int max)
|
static WMArray *LoadHistory(char *filename, int max)
|
||||||
@@ -205,7 +205,7 @@ static WMArray *LoadHistory(char *filename, int max)
|
|||||||
|
|
||||||
for (i = 0; i < num; ++i) {
|
for (i = 0; i < num; ++i) {
|
||||||
plitem = WMGetFromPLArray(plhistory, i);
|
plitem = WMGetFromPLArray(plhistory, i);
|
||||||
if (WMIsPLString(plitem) && WMFindInArray(history, matchString,
|
if (WMIsPLString(plitem) && WMFindInArray(history, strmatch,
|
||||||
WMGetFromPLString(plitem)) == WANotFound)
|
WMGetFromPLString(plitem)) == WANotFound)
|
||||||
WMAddToArray(history, WMGetFromPLString(plitem));
|
WMAddToArray(history, WMGetFromPLString(plitem));
|
||||||
}
|
}
|
||||||
@@ -228,11 +228,6 @@ static void SaveHistory(WMArray * history, char *filename)
|
|||||||
WMReleasePropList(plhistory);
|
WMReleasePropList(plhistory);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int strmatch(const char *str1, const char *str2)
|
|
||||||
{
|
|
||||||
return !strcmp(str1, str2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int pstrcmp(const char **str1, const char **str2)
|
static int pstrcmp(const char **str1, const char **str2)
|
||||||
{
|
{
|
||||||
return strcmp(*str1, *str2);
|
return strcmp(*str1, *str2);
|
||||||
|
|||||||
Reference in New Issue
Block a user