summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2023-04-05feh.t: Adjust for magic=1 and imlib2 1.8+Daniel Friesel-1/+4
2023-02-15Add --sort=noneDaniel Friesel-2/+9
2023-02-15Use `grep` instead of `fgrep`a1346054-1/+1
No need to use `grep -F` here
2023-01-22src: Fix build with clang 16orbea-18/+17
These are no longer supported in upcoming clang versions. warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] Reference: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
2022-08-22Release v3.9.13.9.1Daniel Friesel-0/+6
2022-08-22winwidget: do not add an inotify watch if file is a urlAnthony Iliopoulos-1/+1
inotify_add_watch calls fail when the file is a url, since it does not correspond to an actual on-disk path. The temporary file path fetched by curl could be kept and monitored, but since this is unlikely to change just avoid monitoring files opened via a url.
2022-08-21README: Add libXt to list of dependenciesDaniel Friesel-0/+1
Closes #665
2022-06-13Set libcurl user agentDaniel Friesel-0/+1
The default user agent is empty, which is not that friendly. Closes #660
2022-06-12update tests for magic=0Daniel Friesel-1/+1
2022-06-12changelog: add an attribution. whoops.Daniel Friesel-1/+1
2022-06-12release v3.93.9Daniel Friesel-0/+20
2022-06-12feh(1), --version: Document libmagic compile flagDaniel Friesel-9/+20
2022-06-10MotionNotify handler: only call generic handler if winwid != NULLDaniel Friesel-10/+12
Closes #656
2022-06-10do not enable libmagic by defaultDaniel Friesel-3/+6
2022-04-27add heic supportMichael-1/+1
2022-02-10Merge pull request #645 from eworm-de/magicDaniel Friesel-82/+85
use libmagic to detect valid file formats
2022-02-10Run init_magic before init_parse_optionsDaniel Friesel-4/+5
init_parse_options calls feh_prepare_filelist, which in turn calls feh_file_info_preload if opt.preload is set. This function will load all images in the filelist to determine their attributes, so we need to initialize libmagic before calling init_parse_options.
2022-02-08global initialization for libmagicChristian Hesse-40/+66
Add a global `magic_t magic` and initialize it just once. Also `feh_is_image()` now calls itself to check compressed files, saving some duplicate code.
2022-02-08use libmagic to detect valid file formatsChristian Hesse-83/+59
Writing our own magic bytes detection is prone to errors and an everlasting catch-up-game. Let's use libmagic to get things right, this is less code and makes things more reliable. Building without libmagic is still possible. That will make the code act like specifying FEH_SKIP_MAGIC=1, effectively passing everything to imlib2.
2022-01-21Define _DARWIN_C_SOURCE for mkdtemp and mkstempsRyan Schmidt-1/+1
When _POSIX_C_SOURCE is defined, macOS hides the definitions of mkdtemp and mkstemps, among others. Define _DARWIN_C_SOURCE to counteract that.
2022-01-16remove local getopt_long() implementationGuilherme Janczak-1256/+1
getopt_long() is widely supported these days, removing it from the source tree should be okay. Here's documentation or the implementation of getopt_long on many systems: All the BSDs: https://man.netbsd.org/NetBSD-9.2-STABLE/getopt_long.3 https://man.openbsd.org/OpenBSD-7.0/getopt_long https://www.freebsd.org/cgi/man.cgi?query=getopt_long https://leaf.dragonflybsd.org/cgi/web-man?command=getopt_long Illumos (OpenSolaris fork): https://illumos.org/man/3c/getopt_long The musl, newlib, and uclibc-ng libcs: https://gogs.waldemar-brodkorb.de/oss/uclibc-ng/src/master/libc/unistd/getopt_long-simple.c#L49-L52 https://git.musl-libc.org/cgit/musl/tree/src/misc/getopt_long.c#n140 https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/stdlib/getopt.c;h=d4f225a7a735dc741d2874eb6c131b6fce2967c5;hb=HEAD#l475 Mingw-w64: https://github.com/mirror/mingw-w64/blob/master/mingw-w64-crt/misc/getopt.c#L542-L549 Mac OS X: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/getopt_long.3.html
2022-01-03Release v3.83.8Daniel Friesel-0/+13
Closes #642
2022-01-03Fix spellinga1346054-9/+9
2022-01-03Trim trailing whitespacea1346054-32/+31
2021-12-24Disable --auto-rotate in feh builds compiled wiht Imlib2 1.7.5+Daniel Friesel-1/+10
Imlib2 v1.7.5 introduces automatic (and transparent) orientation adjustment based on EXIF orientation tags. This makes feh's --auto-rotate function both superfluous and erroneous: It doesn't know about Imlib2's adjustments, so it rotates an image which is already correctly oriented, leading to incorrect orientation. I am not aware of a simple run-time check for detecting whethen running Imlib2 < 1.7.5 or ≥ 1.7.5. For now, feh disables --auto-rotate entirely when compiled on a system with Imlib2 1.7.5+ and outputs a warning when the option is used. Rationale: The Imlib2 version available at run-time should in most cases be at least as recent as the Imlib2 version used at compile-time. So, while there may be cases where feh was compiled with Imlib2 1.7.4 and exhibits erroneous auto-rotate behaviour on an Imlib2 1.7.5 system, the inverse case (a feh with disabled auto-rotate support running on Imlib2 1.7.4) should be sufficiently rare. If it does occur, it can be remedied by compiling feh from source locally. Possible caveat: Imlib2 only adjusts for EXIF orientation when loading JPEG and TIFF images. If there are additional EXIF-aware file formats supported by feh, but not Imlib2, they lose auto-rotate support. Reference: GitHub issue #642
2021-12-24feh(1): Note that --auto-rotate is obsolete with Imlib2 v1.7.5+Daniel Friesel-2/+16
See GitHub issue #642
2021-11-20--window-id: support hexadecimal IDsDaniel Friesel-1/+1
Closes #639
2021-11-13Add bindable button "0" for mouse movementDaniel Friesel-0/+18
Useful to make feh quit (or execute actions) on mouse movement Closes #568
2021-09-25make install: Add missing dependenciesDaniel Friesel-4/+4
2021-09-25Release v3.7.2Daniel Friesel-0/+6
2021-09-23feh(1): Add known bug related to imlib2 < 1.7.4Daniel Friesel-0/+7
2021-09-21Fix crash when X11 is connected via FD 0.Daniel Friesel-3/+9
If stdin is not connected, the X11 connection may use FD 0, which is traditionally used for STDIN. Do not attempt reads from fd 0 unless it _really_ is connected to a terminal on stdin. Reported by https://github.com/pvanstam, thanks a lot! Closes #631 Closes #632
2021-09-21Do not hardcode STDIN_FILENO == 0Daniel Friesel-2/+2
2021-09-09feh_http_load_image: Use mkstemps to save image with correct suffixDaniel Friesel-4/+31
This allows feh to load .gif images via libcurl, as some imlib2 versions only load gif images if the suffix is correct. It's also more convenient when using --keep-http. To achieve this, feh needs to use mkstemps. mkstemps is a non-standard extension that is available on several systems. Compile feh with "mkstemps=0" to use mkstemp instead. Closes #630
2021-07-25Set correct window size when applying --zoom outside of -. / -FDaniel Friesel-3/+18
Needs further testing
2021-07-24Release v3.7.13.7.1Daniel Friesel-0/+7
2021-07-24Fix implicit definition of `strverscmp`.Olof-Joachim Frahm (欧雅福)-8/+4
2021-07-23Fix memory leak on error pathTobias Stoeckmann-1/+1
The snprintf string argument should not be duplicated. It is not needed and also not released afterwards.
2021-07-23Fix out of boundary access on illegal argumentTobias Stoeckmann-1/+1
Calling feh with an empty argument leads to out of boundary access. This can be seen best when compiled with asan: $ feh ""
2021-07-23feh_draw_exif: Fix out of bounds array access when handling long linesDaniel Friesel-4/+3
2021-07-23Fix out of boundary access with exif (#617)Tobias Stoeckmann-15/+15
* Fix out of boundary access The while-loop is not finished when pos is set to EXIF_MAX_DATA. Instead, the loop continues and therefore tries to access data outside of the array. This is triggered when compiled with exif=1 and asan: $ feh --draw-exif image.jpg * Fixed formatting No functional change but makes previous commit easier verifiable (independent of tab space setup). * Call break; instead of setting pos2 to a magic value This is in line with the following else clause * Another cosmetic adjustment Co-authored-by: Daniel Friesel <derf@finalrewind.org>
2021-06-21Merge pull request #615 from DavidBuchanan314/masterDaniel Friesel-2/+12
Fix feh_is_image for tiny (<16 byte) image files
2021-06-21Fix feh_is_image for tiny filesDavid Buchanan-1/+3
2021-06-21Add test case for tiny PBM fileDavid Buchanan-1/+9
2021-06-09Add JPEG XL to supported file formatsAlistair-0/+5
Note that Imlib2 does not support JXL images out of the box. However, the imlib2-jxl loader (https://github.com/alistair7/imlib2-jxl) does.
2021-05-09Release v3.73.7Daniel Friesel-3/+7
2021-05-09Merge branch 'simplify-exif'Daniel Friesel-98/+179
2021-05-08rename --zoom-rate to --zoom-step and switch to percentDaniel Friesel-10/+10
This is consistent with --scroll-step (option name) and --zoom (percentage)
2021-05-08getopt.c: Add missing string.h include (#530)Daniel Friesel-0/+1
2021-05-02feh(1): Xinerama: Refer to monitors, not screensDaniel Friesel-13/+13
"screen" and "display" are different X11 terms; we're actually talking about "monitors"