Bläddra i källkod

* Fix broken Imlib2 support in cacaview.

tags/v0.99.beta14
Sam Hocevar sam 18 år sedan
förälder
incheckning
d1f55fbe8f
3 ändrade filer med 7 tillägg och 6 borttagningar
  1. +1
    -0
      configure.ac
  2. +1
    -1
      src/cacaview.c
  3. +5
    -5
      src/common-image.c

+ 1
- 0
configure.ac Visa fil

@@ -278,6 +278,7 @@ if test "${enable_imlib2}" != "no"; then
if test "${IMLIB2}" = no; then
AC_MSG_ERROR([[cannot find Imlib2 development files. Without Imlib2, cacaview will only open BMP files; if this is really what you want, re-run configure with '--disable-imlib2'.]])
fi
AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
fi

# Build development tools?


+ 1
- 1
src/cacaview.c Visa fil

@@ -334,7 +334,7 @@ int main(int argc, char **argv)
}
else if(!im)
{
#if defined(HAVE_IMLIB2_H)
#if defined(USE_IMLIB2)
# define ERROR_STRING " Error loading `%s'. "
#else
# define ERROR_STRING " Error loading `%s'. Only BMP is supported. "


+ 5
- 5
src/common-image.c Visa fil

@@ -20,7 +20,7 @@
# include <stdlib.h>
#endif

#if defined(HAVE_IMLIB2_H)
#if defined(USE_IMLIB2)
# include <Imlib2.h>
#else
# if !defined(__KERNEL__)
@@ -31,7 +31,7 @@
#include "cucul.h"
#include "common-image.h"

#if !defined(HAVE_IMLIB2_H)
#if !defined(USE_IMLIB2)
static unsigned int u32fread(FILE *);
static unsigned int u16fread(FILE *);
static unsigned int u8fread(FILE *);
@@ -42,7 +42,7 @@ struct image * load_image(char const * name)
struct image * im = malloc(sizeof(struct image));
unsigned int depth, bpp, rmask, gmask, bmask, amask;

#if defined(HAVE_IMLIB2_H)
#if defined(USE_IMLIB2)
Imlib_Image image;

/* Load the new image */
@@ -264,7 +264,7 @@ struct image * load_image(char const * name)

void unload_image(struct image * im)
{
#if defined(HAVE_IMLIB2_H)
#if defined(USE_IMLIB2)
/* Imlib_Image image = (Imlib_Image)im->priv; */
imlib_free_image();
#else
@@ -273,7 +273,7 @@ void unload_image(struct image * im)
cucul_free_dither(im->dither);
}

#if !defined(HAVE_IMLIB2_H)
#if !defined(USE_IMLIB2)
static unsigned int u32fread(FILE *fp)
{
unsigned char buffer[4];


Laddar…
Avbryt
Spara