mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-28 01:12:30 +01:00
WUtil: Added 'const' attribute to parameters for file related API
As a side note, in 'wfindfileinlist' the first argument should be: const char * const *path_list However, due to limited support for const in plain C, that would introduce warnings in user code. For compatibility issues, this was not implemented.
This commit is contained in:
committed by
Carlos R. Mafra
parent
bbf84eb0e8
commit
ea9d3e643f
@@ -193,15 +193,15 @@ void __wmessage(const char *func, const char *file, int line, int type, const ch
|
||||
|
||||
/* ---[ WINGs/findfile.c ]------------------------------------------------ */
|
||||
|
||||
char* wfindfile(char *paths, char *file);
|
||||
char* wfindfile(const char *paths, const char *file);
|
||||
|
||||
char* wfindfileinlist(char **path_list, char *file);
|
||||
char* wfindfileinlist(char *const *path_list, const char *file);
|
||||
|
||||
char* wfindfileinarray(WMPropList* array, char *file);
|
||||
char* wfindfileinarray(WMPropList* array, const char *file);
|
||||
|
||||
char* wexpandpath(char *path);
|
||||
char* wexpandpath(const char *path);
|
||||
|
||||
int wcopy_file(char *toPath, char *srcFile, char *destFile);
|
||||
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
|
||||
|
||||
/* don't free the returned string */
|
||||
char* wgethomedir(void);
|
||||
|
||||
Reference in New Issue
Block a user