mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 12:00:31 +01:00
Added 'const' attribute to the file name parameter to load/save
This name is not modified by the callee functions (and it should not be anyway), so let's make it official in the internal functions
This commit is contained in:
committed by
Carlos R. Mafra
parent
225c99a6ca
commit
d1e1c13fa3
@@ -68,7 +68,7 @@ static int RImageCacheMaxImage = -1; /* 0 = any size */
|
||||
static RCachedImage *RImageCache;
|
||||
|
||||
|
||||
static WRImgFormat identFile(char *path);
|
||||
static WRImgFormat identFile(const char *path);
|
||||
|
||||
|
||||
char **RSupportedFileFormats(void)
|
||||
@@ -123,7 +123,7 @@ static void init_cache()
|
||||
}
|
||||
}
|
||||
|
||||
RImage *RLoadImage(RContext * context, char *file, int index)
|
||||
RImage *RLoadImage(RContext * context, const char *file, int index)
|
||||
{
|
||||
RImage *image = NULL;
|
||||
int i;
|
||||
@@ -238,7 +238,7 @@ RImage *RLoadImage(RContext * context, char *file, int index)
|
||||
return image;
|
||||
}
|
||||
|
||||
char *RGetImageFileFormat(char *file)
|
||||
char *RGetImageFileFormat(const char *file)
|
||||
{
|
||||
switch (identFile(file)) {
|
||||
case IM_XPM:
|
||||
@@ -272,7 +272,7 @@ char *RGetImageFileFormat(char *file)
|
||||
}
|
||||
}
|
||||
|
||||
static WRImgFormat identFile(char *path)
|
||||
static WRImgFormat identFile(const char *path)
|
||||
{
|
||||
FILE *file;
|
||||
unsigned char buffer[32];
|
||||
|
||||
Reference in New Issue
Block a user