From da1819c629972c14146434e534d87e3ca9490221 Mon Sep 17 00:00:00 2001 From: "pnunn%netscape.com" Date: Tue, 11 Aug 1998 20:45:18 +0000 Subject: [PATCH] remove dependencies on jpeg files. Tom Lane, committed by pnunn. git-svn-id: svn://10.0.0.236/trunk@7771 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libimg/src/dither.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/mozilla/modules/libimg/src/dither.cpp b/mozilla/modules/libimg/src/dither.cpp index 622f79a59c6..2711007841b 100644 --- a/mozilla/modules/libimg/src/dither.cpp +++ b/mozilla/modules/libimg/src/dither.cpp @@ -19,10 +19,25 @@ #include "if.h" #include "il.h" -#include "jinclude.h" #include "jpeglib.h" -#include "jerror.h" -#include "jpegint.h" + + /* cope with brain-damaged compilers that don't make sizeof return a size_t */ + #ifdef SIZEOF + #undef SIZEOF + #endif + #define SIZEOF(object) ((size_t) sizeof(object)) + + /* just in case someone needs it */ + #ifdef RIGHT_SHIFT_IS_UNSIGNED + #define SHIFT_TEMPS INT32 shift_temp; + #define RIGHT_SHIFT(x,shft) \ + ((shift_temp = (x)) < 0 ? \ + (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ + (shift_temp >> (shft))) + #else + #define SHIFT_TEMPS + #define RIGHT_SHIFT(x,shft) ((x) >> (shft)) + #endif /* BEGIN code adapted from jpeg library */