Browse Source

* examples/view.c:

+ Removed last endianness issue.
tags/v0.99.beta14
Sam Hocevar sam 21 years ago
parent
commit
cdc6c084bb
1 changed files with 1 additions and 19 deletions
  1. +1
    -19
      examples/view.c

+ 1
- 19
examples/view.c View File

@@ -28,10 +28,6 @@
#include <malloc.h> #include <malloc.h>
#include <unistd.h> #include <unistd.h>


#ifdef HAVE_ENDIAN_H
# include <endian.h>
#endif

#include <Imlib2.h> #include <Imlib2.h>


#include "caca.h" #include "caca.h"
@@ -40,7 +36,7 @@ Imlib_Image image = NULL;
char *pixels = NULL; char *pixels = NULL;
struct caca_bitmap *bitmap = NULL; struct caca_bitmap *bitmap = NULL;
int x, y, w, h; int x, y, w, h;
unsigned int rmask, gmask, bmask;
const unsigned int rmask = 0x00ff0000, gmask = 0x0000ff00, bmask = 0x000000ff;


int dithering = CACA_DITHERING_ORDERED4; int dithering = CACA_DITHERING_ORDERED4;


@@ -54,20 +50,6 @@ int main(int argc, char **argv)
char **list = NULL; char **list = NULL;
int current = 0, items = 0, opts = 1; 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 */ /* Initialise libcaca */
if(caca_init()) if(caca_init())
{ {


Loading…
Cancel
Save