[MPlayer-cvslog] r33217 - trunk/gui/util/bitmap.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Apr 5 18:37:51 CEST 2011


On Tue, Apr 05, 2011 at 11:12:35AM +0200, ib wrote:
> Clean up and simplify fExist().
> 
> Replace fopen() to check file existence by access(), define variables
> differently and use FF_ARRAY_ELEMS macro in loop test expression.

This is really too many changes at once.

> -    unsigned char ext[][6] = { ".png\0", ".PNG\0" };
> +    unsigned char *ext[] = { "png", "PNG" };

These are not even remotely equivalent.
The first uses 12 bytes, the second between 16 and 24.
There are two ok ways of writing it, though the first
is rather preferable (8 bytes size instead of up to 24):
static const char ext[][4] = { "png", "PNG" };
or
static const char * const ext[] = { "png", "PNG" };


More information about the MPlayer-cvslog mailing list