diff --git a/WINGs/WINGs/WINGs.h b/WINGs/WINGs/WINGs.h index 9b99c92a..3d2b2627 100644 --- a/WINGs/WINGs/WINGs.h +++ b/WINGs/WINGs/WINGs.h @@ -1324,7 +1324,7 @@ void WMSortBrowserColumnWithComparer(WMBrowser *bPtr, int column, WMCompareDataProc *func); /* Don't free the returned string. */ -char* WMSetBrowserPath(WMBrowser *bPtr, char *path); +const char* WMSetBrowserPath(WMBrowser *bPtr, const char *path); /* free the returned string */ char* WMGetBrowserPath(WMBrowser *bPtr); @@ -1876,7 +1876,7 @@ void WMSetFilePanelCanChooseFiles(WMFilePanel *panel, Bool flag); void WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag); -void WMSetFilePanelDirectory(WMFilePanel *panel, char *path); +void WMSetFilePanelDirectory(WMFilePanel *panel, const char *path); /* you can free the returned string */ char* WMGetFilePanelFileName(WMFilePanel *panel); @@ -1884,7 +1884,7 @@ char* WMGetFilePanelFileName(WMFilePanel *panel); void WMFreeFilePanel(WMFilePanel *panel); int WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner, - char *path, const char *name, char **fileTypes); + const char *path, const char *name, char **fileTypes); void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view); diff --git a/WINGs/WINGs/WUtil.h b/WINGs/WINGs/WUtil.h index fd1d1694..0410c4f2 100644 --- a/WINGs/WINGs/WUtil.h +++ b/WINGs/WINGs/WUtil.h @@ -249,7 +249,7 @@ char* wexpandpath(const char *path); int wcopy_file(const char *toPath, const char *srcFile, const char *destFile); /* don't free the returned string */ -char* wgethomedir(void); +const char* wgethomedir(void); /* ---[ WINGs/proplist.c ]------------------------------------------------ */ diff --git a/WINGs/findfile.c b/WINGs/findfile.c index 0726105b..bb2ce7f0 100644 --- a/WINGs/findfile.c +++ b/WINGs/findfile.c @@ -39,7 +39,7 @@ #endif -char *wgethomedir() +const char *wgethomedir(void) { static char *home = NULL; char *tmp; diff --git a/WINGs/menuparser.c b/WINGs/menuparser.c index a2c96785..de7516f9 100644 --- a/WINGs/menuparser.c +++ b/WINGs/menuparser.c @@ -536,7 +536,7 @@ found_end_define_fname: while (*src != '\0') { idx = 0; if (*src == '~') { - char *home = wgethomedir(); + const char *home = wgethomedir(); while (*home != '\0') { if (idx < sizeof(buffer) - 2) buffer[idx++] = *home; diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c index cef542e4..6eb372c2 100644 --- a/WINGs/userdefaults.c +++ b/WINGs/userdefaults.c @@ -51,7 +51,8 @@ const char *wusergnusteppath() { static const char subdir[] = "/GNUstep"; static char *path = NULL; - char *gspath, *h; + char *gspath; + const char *h; int pathlen; if (path) diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c index d49ce1f9..4465b73c 100644 --- a/WINGs/wbrowser.c +++ b/WINGs/wbrowser.c @@ -619,11 +619,12 @@ void WMSetBrowserHasScroller(WMBrowser * bPtr, int hasScroller) bPtr->flags.hasScroller = hasScroller; } -char *WMSetBrowserPath(WMBrowser * bPtr, char *path) +const char *WMSetBrowserPath(WMBrowser * bPtr, const char *path) { int i; char *str; - char *tmp, *retPtr = NULL; + char *tmp; + const char *retPtr = NULL; int item; WMListItem *listItem; diff --git a/WINGs/wfilepanel.c b/WINGs/wfilepanel.c index d3cee19d..c1cb16ac 100644 --- a/WINGs/wfilepanel.c +++ b/WINGs/wfilepanel.c @@ -343,7 +343,7 @@ void WMFreeFilePanel(WMFilePanel * panel) } int -WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *path, const char *name, char **fileTypes) +WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, const char *path, const char *name, char **fileTypes) { WMScreen *scr = WMWidgetScreen(panel->win); @@ -387,12 +387,12 @@ WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *pat return (panel->flags.canceled ? False : True); } -void WMSetFilePanelDirectory(WMFilePanel * panel, char *path) +void WMSetFilePanelDirectory(WMFilePanel * panel, const char *path) { WMList *list; WMListItem *item; int col; - char *rest; + const char *rest; rest = WMSetBrowserPath(panel->browser, path); if (strcmp(path, "/") == 0) @@ -761,7 +761,7 @@ static void goFloppy(WMWidget *widget, void *p_panel) static void goHome(WMWidget *widget, void *p_panel) { WMFilePanel *panel = p_panel; - char *home; + const char *home; /* Parameter not used, but tell the compiler that it is ok */ (void) widget;