Commit 7ad3afaa authored by Alessandro Ghedini's avatar Alessandro Ghedini

Imported Upstream version 1.4.8

parent ad808484
......@@ -30,3 +30,4 @@ Nick Blievers <nickb@sgi.com>
Mike Castle <dalgoda@ix.netcom.com>
R.Ramkumar <andyetitmoves@gmail.com>
Dmitry Antipov <dmantipov@yandex.ru>
Laslo Hunhold <dev@frign.de>
***
*** Version 1.4.8 ***
***
Chloe Kudryavtsev (1):
add time.h include to common.h for time_t
FRIGN (1):
Add a Farbfeld loader
Kim Woelders (4):
Remove redundant config.h.
Add compile to MAINTAINERCLEANFILES.
Indent.
1.4.8.
Quentin Rameau (2):
Fix bz2 loader filename check
Fix zlib loader filename check
***
*** Version 1.4.7 ***
***
......@@ -42,6 +63,7 @@ Kim Woelders (20):
Enable visibility hiding by default.
Indent the remaining unindented files.
Generate a ChangeLog using git shortlog between existing tags.
1.4.7.
Michał Górny (1):
fix -I flags to support building out-of-source
......
......@@ -4,9 +4,10 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src data doc
MAINTAINERCLEANFILES = aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh \
ltmain.sh Makefile.in missing imlib2_docs.tar.gz
MAINTAINERCLEANFILES = aclocal.m4 compile \
config.guess config.h.in config.sub configure \
depcomp install-sh ltmain.sh missing Makefile.in \
imlib2_docs.tar.gz
bin_SCRIPTS = imlib2-config
......
......@@ -384,9 +384,10 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src data doc
MAINTAINERCLEANFILES = aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh \
ltmain.sh Makefile.in missing imlib2_docs.tar.gz
MAINTAINERCLEANFILES = aclocal.m4 compile \
config.guess config.h.in config.sub configure \
depcomp install-sh ltmain.sh missing Makefile.in \
imlib2_docs.tar.gz
bin_SCRIPTS = imlib2-config
EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN gendoc \
......
Imlib2 1.4.7
Imlib2 1.4.8
This is the Imlib 2 library - a library that does image file loading and
saving as well as rendering, manipulation, arbitrary polygon support, etc.
......@@ -36,7 +36,7 @@ BUILDING PACKAGES:
RPM: To build rpm packages:
sudo rpm -ta imlib2-1.4.7.tar.gz
sudo rpm -ta imlib2-1.4.8.tar.gz
You will find rpm packages in your system /usr/src/redhat/* dirs (note you may
not need to use sudo or root if you have your own ~/.rpmrc. see rpm documents
......@@ -44,11 +44,11 @@ for more details)
DEB: To build deb packages:
tar zvf imlib2-1.4.7.tar.gz
cd imlib2-1.4.7
tar zvf imlib2-1.4.8.tar.gz
cd imlib2-1.4.8
dpkg-buildpackage -us -uc -rfakeroot
cd ..
rm -rf imlib2-1.4.7
rm -rf imlib2-1.4.8
You will find all the debian source, binary etc. packages put in the directory
where you first untarred the source tarball.
This diff is collapsed.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for imlib2 1.4.7.
# Generated by GNU Autoconf 2.69 for imlib2 1.4.8.
#
# Report bugs to <enlightenment-devel@lists.sourceforge.net>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='imlib2'
PACKAGE_TARNAME='imlib2'
PACKAGE_VERSION='1.4.7'
PACKAGE_STRING='imlib2 1.4.7'
PACKAGE_VERSION='1.4.8'
PACKAGE_STRING='imlib2 1.4.8'
PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net'
PACKAGE_URL=''
......@@ -1383,7 +1383,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures imlib2 1.4.7 to adapt to many kinds of systems.
\`configure' configures imlib2 1.4.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1457,7 +1457,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of imlib2 1.4.7:";;
short | recursive ) echo "Configuration of imlib2 1.4.8:";;
esac
cat <<\_ACEOF
......@@ -1596,7 +1596,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
imlib2 configure 1.4.7
imlib2 configure 1.4.8
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1965,7 +1965,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by imlib2 $as_me 1.4.7, which was
It was created by imlib2 $as_me 1.4.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2902,7 +2902,7 @@ fi
# Define the identity of the package.
PACKAGE='imlib2'
VERSION='1.4.7'
VERSION='1.4.8'
cat >>confdefs.h <<_ACEOF
......@@ -13355,7 +13355,7 @@ CC=$lt_save_CC
VERSION_CUR=5
VERSION_REV=7
VERSION_REV=8
VERSION_AGE=4
lt_version=${VERSION_CUR}:${VERSION_REV}:${VERSION_AGE}
......@@ -16370,7 +16370,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by imlib2 $as_me 1.4.7, which was
This file was extended by imlib2 $as_me 1.4.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -16436,7 +16436,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
imlib2 config.status 1.4.7
imlib2 config.status 1.4.8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT([imlib2], [1.4.7], [enlightenment-devel@lists.sourceforge.net])
AC_INIT([imlib2], [1.4.8], [enlightenment-devel@lists.sourceforge.net])
AC_CONFIG_SRCDIR(configure.ac)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_BUILD
......@@ -23,7 +23,7 @@ define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
LT_INIT
VERSION_CUR=5
VERSION_REV=7
VERSION_REV=8
VERSION_AGE=4
lt_version=${VERSION_CUR}:${VERSION_REV}:${VERSION_AGE}
AC_SUBST(lt_version)
......
......@@ -338,9 +338,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign data/Makefile
$(AUTOMAKE) --gnu data/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -316,9 +316,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/fonts/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/fonts/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign data/fonts/Makefile
$(AUTOMAKE) --gnu data/fonts/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -330,9 +330,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/images/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/images/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign data/images/Makefile
$(AUTOMAKE) --gnu data/images/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -281,9 +281,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/Makefile
$(AUTOMAKE) --gnu doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
Summary: Powerful image loading and rendering library
Name: imlib2
Version: 1.4.7
Version: 1.4.8
Release: 0.%(date '+%Y%m%d')
License: BSD
Group: System Environment/Libraries
......@@ -72,6 +72,12 @@ Group: System Environment/Libraries
%description loader_bmp
BMP image loader/saver for Imlib2
%package loader_ff
Summary: Imlib2 Farbfeld loader
Group: System Environment/Libraries
%description loader_ff
Farbfeld image loader/saver for Imlib2
%package loader_gif
Summary: Imlib2 GIF loader
Group: System Environment/Libraries
......@@ -187,6 +193,9 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
%files loader_bmp
%attr(755,root,root) %{_libdir}/imlib2/loaders/bmp.so
%files loader_ff
%attr(755,root,root) %{_libdir}/imlib2/loaders/ff.so
%files loader_gif
%attr(755,root,root) %{_libdir}/imlib2/loaders/gif.so
......
......@@ -72,6 +72,12 @@ Group: System Environment/Libraries
%description loader_bmp
BMP image loader/saver for Imlib2
%package loader_ff
Summary: Imlib2 Farbfeld loader
Group: System Environment/Libraries
%description loader_ff
Farbfeld image loader/saver for Imlib2
%package loader_gif
Summary: Imlib2 GIF loader
Group: System Environment/Libraries
......@@ -187,6 +193,9 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
%files loader_bmp
%attr(755,root,root) %{_libdir}/imlib2/loaders/bmp.so
%files loader_ff
%attr(755,root,root) %{_libdir}/imlib2/loaders/ff.so
%files loader_gif
%attr(755,root,root) %{_libdir}/imlib2/loaders/gif.so
......
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
# Foundation, Inc.
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
......@@ -34,7 +33,7 @@ m4_define([_lt_join],
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59, which quotes differently.
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
......@@ -45,7 +44,7 @@ m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
......
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
# Foundation, Inc.
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
......@@ -12,7 +11,7 @@
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
......@@ -26,7 +25,7 @@
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
......
......@@ -338,9 +338,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
$(AUTOMAKE) --gnu src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -383,9 +383,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/bin/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/bin/Makefile
$(AUTOMAKE) --gnu src/bin/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -22,6 +22,8 @@
#endif
#endif
#ifndef X_DISPLAY_MISSING
#include <X11/Xlib.h>
#endif
......
......@@ -6,9 +6,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <config.h>
#include <string.h>
#include <math.h>
#include <time.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
......
......@@ -338,9 +338,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/modules/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/modules/Makefile
$(AUTOMAKE) --gnu src/modules/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -391,9 +391,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/modules/filters/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/filters/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/modules/filters/Makefile
$(AUTOMAKE) --gnu src/modules/filters/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -31,6 +31,7 @@ pkg_LTLIBRARIES = \
$(JPEG_L) \
$(PNG_L) \
$(TIFF_L) \
$(FF_L) \
$(GIF_L) \
$(ZLIB_L) \
$(BZ2_L) \
......@@ -38,6 +39,7 @@ $(ID3_L) \
pnm.la \
argb.la \
bmp.la \
ff.la \
xpm.la \
tga.la \
lbm.la
......@@ -60,6 +62,11 @@ tiff_la_LDFLAGS = -module -avoid-version
tiff_la_LIBADD = @TIFFLIBS@ $(top_builddir)/src/lib/libImlib2.la
tiff_la_LIBTOOLFLAGS = --tag=disable-static
ff_la_SOURCES = loader_ff.c
ff_la_LDFLAGS = -module -avoid-version
ff_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
ff_la_LIBTOOLFLAGS = --tag=disable-static
gif_la_SOURCES = loader_gif.c
gif_la_LDFLAGS = -module -avoid-version
gif_la_LIBADD = @GIFLIBS@ $(top_builddir)/src/lib/libImlib2.la
......
......@@ -154,6 +154,12 @@ bz2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(bz2_la_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(bz2_la_LDFLAGS) $(LDFLAGS) -o $@
@BUILD_BZ2_LOADER_TRUE@am_bz2_la_rpath = -rpath $(pkgdir)
ff_la_DEPENDENCIES = $(top_builddir)/src/lib/libImlib2.la
am_ff_la_OBJECTS = ff_la-loader_ff.lo
ff_la_OBJECTS = $(am_ff_la_OBJECTS)
ff_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ff_la_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(ff_la_LDFLAGS) $(LDFLAGS) -o $@
gif_la_DEPENDENCIES = $(top_builddir)/src/lib/libImlib2.la
am_gif_la_OBJECTS = gif_la-loader_gif.lo
gif_la_OBJECTS = $(am_gif_la_OBJECTS)
......@@ -255,15 +261,15 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(argb_la_SOURCES) $(bmp_la_SOURCES) $(bz2_la_SOURCES) \
$(gif_la_SOURCES) $(id3_la_SOURCES) $(jpeg_la_SOURCES) \
$(lbm_la_SOURCES) $(png_la_SOURCES) $(pnm_la_SOURCES) \
$(tga_la_SOURCES) $(tiff_la_SOURCES) $(xpm_la_SOURCES) \
$(zlib_la_SOURCES)
$(ff_la_SOURCES) $(gif_la_SOURCES) $(id3_la_SOURCES) \
$(jpeg_la_SOURCES) $(lbm_la_SOURCES) $(png_la_SOURCES) \
$(pnm_la_SOURCES) $(tga_la_SOURCES) $(tiff_la_SOURCES) \
$(xpm_la_SOURCES) $(zlib_la_SOURCES)
DIST_SOURCES = $(argb_la_SOURCES) $(bmp_la_SOURCES) $(bz2_la_SOURCES) \
$(gif_la_SOURCES) $(id3_la_SOURCES) $(jpeg_la_SOURCES) \
$(lbm_la_SOURCES) $(png_la_SOURCES) $(pnm_la_SOURCES) \
$(tga_la_SOURCES) $(tiff_la_SOURCES) $(xpm_la_SOURCES) \
$(zlib_la_SOURCES)
$(ff_la_SOURCES) $(gif_la_SOURCES) $(id3_la_SOURCES) \
$(jpeg_la_SOURCES) $(lbm_la_SOURCES) $(png_la_SOURCES) \
$(pnm_la_SOURCES) $(tga_la_SOURCES) $(tiff_la_SOURCES) \
$(xpm_la_SOURCES) $(zlib_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
......@@ -446,6 +452,7 @@ pkg_LTLIBRARIES = \
$(JPEG_L) \
$(PNG_L) \
$(TIFF_L) \
$(FF_L) \
$(GIF_L) \
$(ZLIB_L) \
$(BZ2_L) \
......@@ -453,6 +460,7 @@ $(ID3_L) \
pnm.la \
argb.la \
bmp.la \
ff.la \
xpm.la \
tga.la \
lbm.la
......@@ -471,6 +479,10 @@ tiff_la_SOURCES = loader_tiff.c
tiff_la_LDFLAGS = -module -avoid-version
tiff_la_LIBADD = @TIFFLIBS@ $(top_builddir)/src/lib/libImlib2.la
tiff_la_LIBTOOLFLAGS = --tag=disable-static
ff_la_SOURCES = loader_ff.c
ff_la_LDFLAGS = -module -avoid-version
ff_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
ff_la_LIBTOOLFLAGS = --tag=disable-static
gif_la_SOURCES = loader_gif.c
gif_la_LDFLAGS = -module -avoid-version
gif_la_LIBADD = @GIFLIBS@ $(top_builddir)/src/lib/libImlib2.la
......@@ -524,9 +536,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/modules/loaders/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/modules/loaders/Makefile
$(AUTOMAKE) --gnu src/modules/loaders/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......@@ -589,6 +601,9 @@ bmp.la: $(bmp_la_OBJECTS) $(bmp_la_DEPENDENCIES) $(EXTRA_bmp_la_DEPENDENCIES)
bz2.la: $(bz2_la_OBJECTS) $(bz2_la_DEPENDENCIES) $(EXTRA_bz2_la_DEPENDENCIES)
$(AM_V_CCLD)$(bz2_la_LINK) $(am_bz2_la_rpath) $(bz2_la_OBJECTS) $(bz2_la_LIBADD) $(LIBS)
ff.la: $(ff_la_OBJECTS) $(ff_la_DEPENDENCIES) $(EXTRA_ff_la_DEPENDENCIES)
$(AM_V_CCLD)$(ff_la_LINK) -rpath $(pkgdir) $(ff_la_OBJECTS) $(ff_la_LIBADD) $(LIBS)
gif.la: $(gif_la_OBJECTS) $(gif_la_DEPENDENCIES) $(EXTRA_gif_la_DEPENDENCIES)
$(AM_V_CCLD)$(gif_la_LINK) $(am_gif_la_rpath) $(gif_la_OBJECTS) $(gif_la_LIBADD) $(LIBS)
......@@ -628,6 +643,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argb_la-loader_argb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp_la-loader_bmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bz2_la-loader_bz2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ff_la-loader_ff.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif_la-loader_gif.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id3_la-loader_id3.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpeg_la-loader_jpeg.Plo@am__quote@
......@@ -681,6 +697,13 @@ bz2_la-loader_bz2.lo: loader_bz2.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(bz2_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bz2_la-loader_bz2.lo `test -f 'loader_bz2.c' || echo '$(srcdir)/'`loader_bz2.c
ff_la-loader_ff.lo: loader_ff.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(ff_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ff_la-loader_ff.lo -MD -MP -MF $(DEPDIR)/ff_la-loader_ff.Tpo -c -o ff_la-loader_ff.lo `test -f 'loader_ff.c' || echo '$(srcdir)/'`loader_ff.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ff_la-loader_ff.Tpo $(DEPDIR)/ff_la-loader_ff.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loader_ff.c' object='ff_la-loader_ff.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(ff_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ff_la-loader_ff.lo `test -f 'loader_ff.c' || echo '$(srcdir)/'`loader_ff.c
gif_la-loader_gif.lo: loader_gif.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gif_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gif_la-loader_gif.lo -MD -MP -MF $(DEPDIR)/gif_la-loader_gif.Tpo -c -o gif_la-loader_gif.lo `test -f 'loader_gif.c' || echo '$(srcdir)/'`loader_gif.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gif_la-loader_gif.Tpo $(DEPDIR)/gif_la-loader_gif.Plo
......
......@@ -52,8 +52,8 @@ load(ImlibImage * im, ImlibProgressFunction progress,
ImlibLoader *loader;
FILE *fp;
int dest, res;
char *file, tmp[] = "/tmp/imlib2_loader_bz2-XXXXXX", *p;
char real_ext[16];
char *file, *p, *q, tmp[] = "/tmp/imlib2_loader_bz2-XXXXXX";
char *real_ext;
assert(im);
......@@ -61,19 +61,8 @@ load(ImlibImage * im, ImlibProgressFunction progress,
* (e.g. "foo.png.bz2"
*/
p = strrchr(im->real_file, '.');
if (p && p != im->real_file)
{
if (strcasecmp(p + 1, "bz2"))
return 0;
}
else
return 0;
strncpy(real_ext, p - sizeof(real_ext) + 1, sizeof(real_ext));
real_ext[sizeof(real_ext) - 1] = '\0';
/* abort if there's no dot in the "real" filename */
if (!strrchr(real_ext, '.'))
q = strchr(im->real_file, '.');
if (!p || p == im->real_file || strcasecmp(p + 1, "bz2") || p == q)
return 0;
if (!(fp = fopen(im->real_file, "rb")))
......@@ -97,8 +86,12 @@ load(ImlibImage * im, ImlibProgressFunction progress,
return 0;
}
if (!(real_ext = strndup(im->real_file, p - im->real_file)))
return 0;
if (!(loader = __imlib_FindBestLoaderForFile(real_ext, 0)))
{
free(real_ext);
unlink(tmp);
return 0;
}
......@@ -112,6 +105,7 @@ load(ImlibImage * im, ImlibProgressFunction progress,
free(im->real_file);
im->real_file = file;
free(real_ext);
unlink(tmp);
return 1;
......
/* Farbfeld (http://tools.suckless.org/farbfeld) */
#include <arpa/inet.h>
#include <stdint.h>
#include "loader_common.h"
#define LEN(x) (sizeof((x)) / sizeof(*(x)))
char
load(ImlibImage * im, ImlibProgressFunction progress,
char progress_granularity, char immediate_load)
{
FILE *f;
size_t rowlen, i, j;
uint32_t hdr[2 + 1 + 1], w, h;
uint16_t *row;
uint8_t *dat;
/* open the file for reading */
if (!(f = fopen(im->real_file, "rb")))
{
return 0;
}
/* read and check the header */
if (!im->data)
{
if (fread(hdr, sizeof(uint32_t), LEN(hdr), f) != LEN(hdr) ||
memcmp("farbfeld", hdr, sizeof("farbfeld") - 1))
{
fclose(f);
return 0;
}
im->w = ntohl(hdr[2]);
im->h = ntohl(hdr[3]);
if (!IMAGE_DIMENSIONS_OK(im->w, im->h))
{
fclose(f);
return 0;
}
/* set format */
if (!im->loader)
{
if (!(im->format = strdup("ff")))
{
fclose(f);
return 0;
}
}
SET_FLAG(im->flags, F_HAS_ALPHA);
}
/* load the data */
if (im->loader || immediate_load || progress)
{
w = im->w;
h = im->h;
rowlen = w * (sizeof("RGBA") - 1);
free(im->data);
if (!(im->data = malloc(rowlen * h)) ||
!(row = malloc(rowlen * sizeof(uint16_t))))
{
free(im->data);
im->data = NULL;
free(row);
fclose(f);
return 0;
}
dat = (uint8_t *) im->data;
for (i = 0; i < h; i++, dat += rowlen)
{
if (fread(row, sizeof(uint16_t), rowlen, f) != rowlen)
{
free(im->data);
im->data = NULL;
free(row);
fclose(f);
return 0;
}
for (j = 0; j < rowlen; j += 4)
{
/*
* 16-Bit to 8-Bit (RGBA -> BGRA)
* 255 * 257 = 65535 = 2^16-1 = UINT16_MAX
*/
dat[j + 2] = ntohs(row[j + 0]) / 257;
dat[j + 1] = ntohs(row[j + 1]) / 257;
dat[j + 0] = ntohs(row[j + 2]) / 257;
dat[j + 3] = ntohs(row[j + 3]) / 257;
}
}
if (progress)
{
progress(im, 100, 0, 0, im->w, im->h);
}
free(row);
}
fclose(f);
return 1;
}
char
save(ImlibImage * im, ImlibProgressFunction progress, char progress_gran)
{
FILE *f;
size_t rowlen, i, j;
uint32_t tmp32;
uint16_t *row;
uint8_t *dat;
/* open the file for writing */
if (!(f = fopen(im->real_file, "wb")))
{
return 0;
}
/* write header */
fputs("farbfeld", f);
tmp32 = htonl(im->w);
if (fwrite(&tmp32, sizeof(uint32_t), 1, f) != 1)
{
fclose(f);
return 0;
}
tmp32 = htonl(im->h);
if (fwrite(&tmp32, sizeof(uint32_t), 1, f) != 1)
{
fclose(f);
return 0;
}