Unverified Commit 8b928d35 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

feh(1), --version: Document libmagic compile flag

parent 05a07126
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -72,6 +72,9 @@ endif
ifeq (${magic},1)
ifeq (${magic},1)
	CFLAGS += -DHAVE_LIBMAGIC
	CFLAGS += -DHAVE_LIBMAGIC
	LDLIBS += -lmagic
	LDLIBS += -lmagic
	MAN_MAGIC = enabled
else
	MAN_MAGIC = disabled
endif
endif


ifeq (${verscmp},1)
ifeq (${verscmp},1)
+1 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ all: ${TARGETS}
	-e 's/\$$MAN_DEBUG\$$/${MAN_DEBUG}/' \
	-e 's/\$$MAN_DEBUG\$$/${MAN_DEBUG}/' \
	-e 's/\$$MAN_EXIF\$$/${MAN_EXIF}/' \
	-e 's/\$$MAN_EXIF\$$/${MAN_EXIF}/' \
	-e 's/\$$MAN_INOTIFY\$$/${MAN_INOTIFY}/' \
	-e 's/\$$MAN_INOTIFY\$$/${MAN_INOTIFY}/' \
	-e 's/\$$MAN_MAGIC\$$/${MAN_MAGIC}/' \
	-e 's/\$$MAN_XINERAMA\$$/${MAN_XINERAMA}/' \
	-e 's/\$$MAN_XINERAMA\$$/${MAN_XINERAMA}/' \
	< ${@:.1=.pre} > $@
	< ${@:.1=.pre} > $@


+12 −9
Original line number Original line Diff line number Diff line
@@ -41,6 +41,9 @@ libexif builtin EXIF reader $MAN_EXIF$
.It
.It
inotify-based auto-reload of changed files $MAN_INOTIFY$
inotify-based auto-reload of changed files $MAN_INOTIFY$
.
.
.It
libmagic $MAN_MAGIC$
.
.El
.El
.
.
$MAN_DEBUG$
$MAN_DEBUG$
@@ -165,20 +168,20 @@ with a non-negative value to enable support for these formats.
.
.
.Pp
.Pp
.
.
As Imlib2 may take several seconds to determine whether it can load a file or
.Pq optional feature, $MAN_MAGIC$ in this build
not
.Nm
.Pq e.g. when attempting to open a large video ,
can use libmagic to only pass image files to Imlib2.
This feature is $MAN_MAGIC$ in this build.
When using
.Nm
.Nm
checks each file's header before loading it.
with lots of non-image files
If it looks like an image, it is passed on to Imlib2, otherwise, it is
.Pq especially with Imlib2 version 1.6.x or 1.7.0 ,
assumed to be unloadable.
this can speed up the detection of non-image files significantly.
This greatly improves performance when working in directories with mixed files
.Pq i.e., directories which do not exclusively contain image files .
If you think that Imlib2 can load a file which
If you think that Imlib2 can load a file which
.Nm
.Nm
has determined to be likely not an image, set the environment variable
has determined to be likely not an image, set the environment variable
.Qq FEH_SKIP_MAGIC
.Qq FEH_SKIP_MAGIC
to pass all files directly to Imlib2, bypassing the header check.
to pass all files directly to Imlib2, bypassing this check.
The environment variable's value does not matter, it just needs to be set.
The environment variable's value does not matter, it just needs to be set.
.
.
.Sh OPTIONS
.Sh OPTIONS
+4 −0
Original line number Original line Diff line number Diff line
@@ -976,6 +976,10 @@ static void show_version(void)
		"help "
		"help "
#endif
#endif


#ifdef HAVE_LIBMAGIC
		"magic "
#endif

#if _FILE_OFFSET_BITS == 64
#if _FILE_OFFSET_BITS == 64
		"stat64 "
		"stat64 "
#endif
#endif