From: Christophe CURIS <[email protected]>

Name of file is, as usual, a read-only parameter.
---
 src/dialog.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/dialog.c b/src/dialog.c
index 91a3d83..a3e7e7e 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -167,7 +167,7 @@ typedef struct _WMInputPanelWithHistory {
        int varpos;
 } WMInputPanelWithHistory;
 
-static char *HistoryFileName(char *name)
+static char *HistoryFileName(const char *name)
 {
        char *filename = NULL;
 
@@ -185,7 +185,7 @@ static int strmatch(const void *str1, const void *str2)
        return !strcmp((const char *)str1, (const char *)str2);
 }
 
-static WMArray *LoadHistory(char *filename, int max)
+static WMArray *LoadHistory(const char *filename, int max)
 {
        WMPropList *plhistory;
        WMPropList *plitem;
@@ -195,7 +195,7 @@ static WMArray *LoadHistory(char *filename, int max)
        history = WMCreateArrayWithDestructor(1, wfree);
        WMAddToArray(history, wstrdup(""));
 
-       plhistory = WMReadPropListFromFile((char *)filename);
+       plhistory = WMReadPropListFromFile(filename);
 
        if (plhistory && WMIsPLArray(plhistory)) {
                num = WMGetPropListItemCount(plhistory);
@@ -213,7 +213,7 @@ static WMArray *LoadHistory(char *filename, int max)
        return history;
 }
 
-static void SaveHistory(WMArray * history, char *filename)
+static void SaveHistory(WMArray * history, const char *filename)
 {
        int i;
        WMPropList *plhistory;
@@ -223,7 +223,7 @@ static void SaveHistory(WMArray * history, char *filename)
        for (i = 0; i < WMGetArrayItemCount(history); ++i)
                WMAddToPLArray(plhistory, 
WMCreatePLString(WMGetFromArray(history, i)));
 
-       WMWritePropListToFile(plhistory, (char *)filename);
+       WMWritePropListToFile(plhistory, filename);
        WMReleasePropList(plhistory);
 }
 
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to