[MPlayer-cvslog] r33798 - in trunk/gui/util: bitmap.c bitmap.h
reimar
subversion at mplayerhq.hu
Sun Jul 3 01:12:46 CEST 2011
Author: reimar
Date: Sun Jul 3 01:12:45 2011
New Revision: 33798
Log:
Clean up some function prototypes.
Use const where possible and plain "char" instead of
"unsigned char" for filenames.
Fixes some clang compiler warnings.
Modified:
trunk/gui/util/bitmap.c
trunk/gui/util/bitmap.h
Modified: trunk/gui/util/bitmap.c
==============================================================================
--- trunk/gui/util/bitmap.c Sun Jul 3 00:59:40 2011 (r33797)
+++ trunk/gui/util/bitmap.c Sun Jul 3 01:12:45 2011 (r33798)
@@ -30,7 +30,7 @@
#include "libvo/fastmemcpy.h"
#include "mp_msg.h"
-static int pngRead(unsigned char *fname, guiImage *bf)
+static int pngRead(const char *fname, guiImage *bf)
{
FILE *file;
long len;
@@ -165,10 +165,10 @@ static int Convert24to32(guiImage *bf)
return 1;
}
-static unsigned char *fExist(unsigned char *fname)
+static const char *fExist(const char *fname)
{
static const char ext[][4] = { "png", "PNG" };
- static unsigned char buf[512];
+ static char buf[512];
unsigned int i;
if (access(fname, R_OK) == 0)
@@ -184,7 +184,7 @@ static unsigned char *fExist(unsigned ch
return NULL;
}
-int bpRead(char *fname, guiImage *bf)
+int bpRead(const char *fname, guiImage *bf)
{
int r;
@@ -217,7 +217,7 @@ void bpFree(guiImage *bf)
memset(bf, 0, sizeof(*bf));
}
-int bpRenderMask(guiImage *in, guiImage *out)
+int bpRenderMask(const guiImage *in, guiImage *out)
{
uint32_t *buf;
unsigned long i;
Modified: trunk/gui/util/bitmap.h
==============================================================================
--- trunk/gui/util/bitmap.h Sun Jul 3 00:59:40 2011 (r33797)
+++ trunk/gui/util/bitmap.h Sun Jul 3 01:12:45 2011 (r33798)
@@ -34,7 +34,7 @@ typedef struct {
} guiImage;
void bpFree(guiImage *bf);
-int bpRead(char *fname, guiImage *bf);
-int bpRenderMask(guiImage *in, guiImage *out);
+int bpRead(const char *fname, guiImage *bf);
+int bpRenderMask(const guiImage *in, guiImage *out);
#endif /* MPLAYER_GUI_BITMAP_H */
More information about the MPlayer-cvslog
mailing list