Changeset 241 for libcaca/trunk/examples
- Timestamp:
- Nov 30, 2003, 6:14:19 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/examples/view.c
r240 r241 29 29 #include <unistd.h> 30 30 31 #ifdef HAVE_ENDIAN_H32 # include <endian.h>33 #endif34 35 31 #include <Imlib2.h> 36 32 … … 41 37 struct caca_bitmap *bitmap = NULL; 42 38 int x, y, w, h; 43 unsigned int rmask, gmask, bmask;39 const unsigned int rmask = 0x00ff0000, gmask = 0x0000ff00, bmask = 0x000000ff; 44 40 45 41 int dithering = CACA_DITHERING_ORDERED4; … … 54 50 char **list = NULL; 55 51 int current = 0, items = 0, opts = 1; 56 57 #ifdef HAVE_ENDIAN_H58 if(__BYTE_ORDER == __BIG_ENDIAN)59 #else60 rmask = 0x12345678;61 if(*(char *)&rmask == 0x12)62 #endif63 {64 rmask = 0x0000ff00; gmask = 0x00ff0000; bmask = 0xff000000;65 }66 else67 {68 rmask = 0x00ff0000; gmask = 0x0000ff00; bmask = 0x000000ff;69 }70 52 71 53 /* Initialise libcaca */
Note: See TracChangeset
for help on using the changeset viewer.