From cdc6c084bb902c6797640a27101f4321b8e2605c Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 30 Nov 2003 17:14:19 +0000 Subject: [PATCH] * examples/view.c: + Removed last endianness issue. --- examples/view.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/examples/view.c b/examples/view.c index 3dcc23b5..6336d65f 100644 --- a/examples/view.c +++ b/examples/view.c @@ -28,10 +28,6 @@ #include #include -#ifdef HAVE_ENDIAN_H -# include -#endif - #include #include "caca.h" @@ -40,7 +36,7 @@ Imlib_Image image = NULL; char *pixels = NULL; struct caca_bitmap *bitmap = NULL; int x, y, w, h; -unsigned int rmask, gmask, bmask; +const unsigned int rmask = 0x00ff0000, gmask = 0x0000ff00, bmask = 0x000000ff; int dithering = CACA_DITHERING_ORDERED4; @@ -54,20 +50,6 @@ int main(int argc, char **argv) char **list = NULL; int current = 0, items = 0, opts = 1; -#ifdef HAVE_ENDIAN_H - if(__BYTE_ORDER == __BIG_ENDIAN) -#else - rmask = 0x12345678; - if(*(char *)&rmask == 0x12) -#endif - { - rmask = 0x0000ff00; gmask = 0x00ff0000; bmask = 0xff000000; - } - else - { - rmask = 0x00ff0000; gmask = 0x0000ff00; bmask = 0x000000ff; - } - /* Initialise libcaca */ if(caca_init()) {