From d8921dd4e6026e57f04b6429abaa05cf0f679c31 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 2 Jul 2012 11:24:23 -0700 Subject: [PATCH] cwebp: name InputFileFormat members consistently append an '_'. TIFF introduced TIFF_ to avoid a name clash. Change-Id: Iebe484d43aeb8e1912cd5bd10d36e1c5e66a4b42 --- examples/cwebp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/cwebp.c b/examples/cwebp.c index 35140ee5..fed84eb2 100644 --- a/examples/cwebp.c +++ b/examples/cwebp.c @@ -517,8 +517,8 @@ static int ReadTIFF(const char* const filename, #endif typedef enum { - PNG = 0, - JPEG, + PNG_ = 0, + JPEG_, TIFF_, // 'TIFF' clashes with libtiff UNSUPPORTED } InputFileFormat; @@ -535,9 +535,9 @@ static InputFileFormat GetImageType(FILE* in_file) { magic = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; if (magic == 0x89504E47U) { - format = PNG; + format = PNG_; } else if (magic >= 0xFFD8FF00U && magic <= 0xFFD8FFFFU) { - format = JPEG; + format = JPEG_; } else if (magic == 0x49492A00 || magic == 0x4D4D002A) { format = TIFF_; } @@ -556,9 +556,9 @@ static int ReadPicture(const char* const filename, WebPPicture* const pic, if (pic->width == 0 || pic->height == 0) { // If no size specified, try to decode it as PNG/JPEG (as appropriate). const InputFileFormat format = GetImageType(in_file); - if (format == PNG) { + if (format == PNG_) { ok = ReadPNG(in_file, pic, keep_alpha); - } else if (format == JPEG) { + } else if (format == JPEG_) { ok = ReadJPEG(in_file, pic); } else if (format == TIFF_) { ok = ReadTIFF(filename, pic, keep_alpha);