Ignore:
Timestamp:
Nov 30, 2003, 6:14:19 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • examples/view.c: + Removed last endianness issue.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/examples/view.c

    r240 r241  
    2929#include <unistd.h>
    3030
    31 #ifdef HAVE_ENDIAN_H
    32 #   include <endian.h>
    33 #endif
    34 
    3531#include <Imlib2.h>
    3632
     
    4137struct caca_bitmap *bitmap = NULL;
    4238int x, y, w, h;
    43 unsigned int rmask, gmask, bmask;
     39const unsigned int rmask = 0x00ff0000, gmask = 0x0000ff00, bmask = 0x000000ff;
    4440
    4541int dithering = CACA_DITHERING_ORDERED4;
     
    5450    char **list = NULL;
    5551    int current = 0, items = 0, opts = 1;
    56 
    57 #ifdef HAVE_ENDIAN_H
    58     if(__BYTE_ORDER == __BIG_ENDIAN)
    59 #else
    60     rmask = 0x12345678;
    61     if(*(char *)&rmask == 0x12)
    62 #endif
    63     {
    64         rmask = 0x0000ff00; gmask = 0x00ff0000; bmask = 0xff000000;
    65     }
    66     else
    67     {
    68         rmask = 0x00ff0000; gmask = 0x0000ff00; bmask = 0x000000ff;
    69     }
    7052
    7153    /* Initialise libcaca */
Note: See TracChangeset for help on using the changeset viewer.