# HG changeset patch # User reimar # Date 1309648365 0 # Node ID fd498969e72d235c79fece4795c76b6ac2c70c69 # Parent d7d1805204914ced83f29710a23b9ae7ff53629a Clean up some function prototypes. Use const where possible and plain "char" instead of "unsigned char" for filenames. Fixes some clang compiler warnings. diff -r d7d180520491 -r fd498969e72d gui/util/bitmap.c --- a/gui/util/bitmap.c Sat Jul 02 22:59:40 2011 +0000 +++ b/gui/util/bitmap.c Sat Jul 02 23:12:45 2011 +0000 @@ -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 @@ 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 @@ return NULL; } -int bpRead(char *fname, guiImage *bf) +int bpRead(const char *fname, guiImage *bf) { int r; @@ -217,7 +217,7 @@ memset(bf, 0, sizeof(*bf)); } -int bpRenderMask(guiImage *in, guiImage *out) +int bpRenderMask(const guiImage *in, guiImage *out) { uint32_t *buf; unsigned long i; diff -r d7d180520491 -r fd498969e72d gui/util/bitmap.h --- a/gui/util/bitmap.h Sat Jul 02 22:59:40 2011 +0000 +++ b/gui/util/bitmap.h Sat Jul 02 23:12:45 2011 +0000 @@ -34,7 +34,7 @@ } 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 */