Hello community,

here is the log from the commit of package feh for openSUSE:Factory checked in 
at 2018-02-01 21:31:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/feh (Old)
 and      /work/SRC/openSUSE:Factory/.feh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "feh"

Thu Feb  1 21:31:27 2018 rev:18 rq:571803 version:2.23.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/feh/feh.changes  2017-12-29 18:52:49.351931415 
+0100
+++ /work/SRC/openSUSE:Factory/.feh.new/feh.changes     2018-02-01 
21:31:55.197968123 +0100
@@ -1,0 +2,12 @@
+Thu Feb  1 17:53:52 UTC 2018 - [email protected]
+
+- update to 2.23.1
+  * The Makefile no longer honors CPPFLAGS and instead consistently
+    uses CFLAGS for user-provided include paths
+  * Fix %u format specifier in multiwindow and list modes
+  * Minor performance improvements
+  * Stability improvements when using --magick-timeout
+- switch to https version of website
+- rebase feh-makefile_optflags.patch
+
+-------------------------------------------------------------------

Old:
----
  feh-2.23.tar.bz2
  feh-2.23.tar.bz2.asc

New:
----
  feh-2.23.1.tar.bz2
  feh-2.23.1.tar.bz2.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ feh.spec ++++++
--- /var/tmp/diff_new_pack.8SVjye/_old  2018-02-01 21:31:55.845937810 +0100
+++ /var/tmp/diff_new_pack.8SVjye/_new  2018-02-01 21:31:55.849937623 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package feh
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 Name:           feh
-Version:        2.23
+Version:        2.23.1
 Release:        0
 Summary:        X11 image viewer
 License:        MIT AND LGPL-2.0+
 Group:          Productivity/Graphics/Viewers
-Url:            http://feh.finalrewind.org/
-Source:         http://feh.finalrewind.org/feh-%{version}.tar.bz2
-Source1:        http://feh.finalrewind.org/%{name}-%{version}.tar.bz2.asc
+Url:            https://feh.finalrewind.org/
+Source:         https://feh.finalrewind.org/feh-%{version}.tar.bz2
+Source1:        https://feh.finalrewind.org/%{name}-%{version}.tar.bz2.asc
 Source2:        %{name}.keyring
 Source3:        jpegexiforient.c
 # PATCH-FIX-OPENSUSE feh-makefile_optflags.patch 
https://github.com/derf/feh/issues/71 [email protected] -- pass 
OPTFLAGS to make instead of hard-coded -O2 -g

++++++ feh-2.23.tar.bz2 -> feh-2.23.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/ChangeLog new/feh-2.23.1/ChangeLog
--- old/feh-2.23/ChangeLog      2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/ChangeLog    2018-01-31 17:39:02.000000000 +0100
@@ -1,3 +1,12 @@
+Wed, 31 Jan 2018 17:38:25 +0100
+
+* Release v2.23.1
+    * The Makefile no longer honors CPPFLAGS and instead consistently uses
+      CFLAGS for user-provided include paths
+    * Fix %u format specifier in multiwindow and list modes (patch by ulteq)
+    * Minor performance improvements (patches by ulteq)
+    * Stability improvements when using --magick-timeout (patch by ulteq)
+
 Thu, 28 Dec 2017 19:26:29 +0100
 
 * Release v2.23
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/config.mk new/feh-2.23.1/config.mk
--- old/feh-2.23/config.mk      2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/config.mk    2018-01-31 17:39:02.000000000 +0100
@@ -1,5 +1,5 @@
 PACKAGE ?= feh
-VERSION ?= 2.23
+VERSION ?= 2.23.1
 
 app ?= 0
 cam ?= 0
@@ -38,7 +38,7 @@
 CFLAGS += -Wall -Wextra -pedantic
 
 # Settings for glibc >= 2.19 - may need to be adjusted for other systems
-CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
+CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
 
 ifeq (${curl},1)
        CFLAGS += -DHAVE_LIBCURL
@@ -79,7 +79,7 @@
        MAN_EXIF = disabled
 endif
 
-MAN_DATE ?= December 28, 2017
+MAN_DATE ?= January 31, 2018
 
 # Uncomment this to use dmalloc
 #CFLAGS += -DWITH_DMALLOC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/man/feh.pre new/feh-2.23.1/man/feh.pre
--- old/feh-2.23/man/feh.pre    2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/man/feh.pre  2018-01-31 17:39:02.000000000 +0100
@@ -450,6 +450,11 @@
 .Nm
 to try indefinitely. By default, magick support is disabled.
 .
+Note that feh may clutter
+.Pa /tmp
+with temporary files created by ImageMagick for each failed conversion attempt.
+This is a known bug.
+.
 .It Cm --max-dimension Ar width No x Ar height
 .
 Only show images with width <=
@@ -1665,56 +1670,56 @@
 .
 .Bl -tag -width indent
 .
-.It feh /opt/images
+.It feh ~/Pictures
 .
-Show all images in /opt/images
+Show all images in ~/Pictures
 .
-.It feh -r /opt/images
+.It feh -r ~/Pictures
 .
-Recursively show all images found in /opt/images and subdirectories
+Recursively show all images found in ~/Pictures and subdirectories
 .
-.It feh -rSfilename /opt/images
+.It feh -rSfilename ~/Pictures
 .
 Same as above, but sort by filename. By default, feh will show files in the
 order it finds them on the hard disk, which is usually somewhat random.
 .
-.It feh -t -Sfilename -E 128 -y 128 -W 1024 /opt/images
+.It feh -t -Sfilename -E 128 -y 128 -W 1024 ~/Pictures
 .
 Show 128x128 pixel thumbnails, limit window width to 1024 pixels.
 .
-.It feh -t -Sfilename -E 128 -y 128 -W 1024 -P -C 
/usr/share/fonts/truetype/ttf-dejavu/ -e DejaVuSans/8 /opt/images
+.It feh -t -Sfilename -E 128 -y 128 -W 1024 -P -C 
/usr/share/fonts/truetype/ttf-dejavu/ -e DejaVuSans/8 ~/Pictures
 .
 Same as above, but enable thumbnail caching in ~/.thumbnails and use a smaller
 font.
 .
-.It feh -irFarial/14 -O index.jpg /opt/images
+.It feh -irFarial/14 -O index.jpg ~/Pictures
 .
-Make an index print of /opt/images and all directories below it, using 14 point
+Make an index print of ~/Pictures and all directories below it, using 14 point
 Arial to write the image info under each thumbnail.  Save the image as
 index.jpg and don't display it, just exit.  Note that this even works without
 a running X server
 .
-.It feh --unloadable -r /opt/images
+.It feh --unloadable -r ~/Pictures
 .
-Print all unloadable images in /opt/images, recursively
+Print all unloadable images in ~/Pictures, recursively
 .
 .It feh -f by_width -S width --reverse --list \&.
 .
 Write a list of all images in the directory to by_width, sorted by width
 .Pq widest images first
 .
-.It feh -w /opt/images/holidays
+.It feh -w ~/Pictures/holidays
 .
-Open each image in /opt/images/holidays in its own window
+Open each image in ~/Pictures/holidays in its own window
 .
-.It feh -FD5 -Sname /opt/images/presentation
+.It feh -FD5 -Sname ~/Pictures/presentation
 .
 Show the images in .../presentation, sorted by name, in fullscreen,
 automatically change to the next image after 5 seconds
 .
-.It feh -rSwidth -A Qo mv %F ~/images/\&%N Qc /opt/images
+.It feh -rSwidth -A Qo mv %F ~/images/\&%N Qc ~/Pictures
 .
-View all images in /opt/images and below, sorted by width, move an image to
+View all images in ~/Pictures and below, sorted by width, move an image to
 ~/image/image_name when enter is pressed
 .
 .It feh --start-at ./foo.jpg \&.
@@ -1787,6 +1792,14 @@
 does not take window decorations into account and may therefore make the
 window slightly too large.
 .
+.Pp
+.
+When enabled,
+.Cm --magick-timeout
+may clutter
+.Pa /tmp
+with temporary files produced by ImageMagick. This happens whenever an image
+is not loaded due to the conversion taking longer than the specified timeout.
 .
 .Ss REPORTING BUGS
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/Makefile new/feh-2.23.1/src/Makefile
--- old/feh-2.23/src/Makefile   2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/Makefile 2018-01-31 17:39:02.000000000 +0100
@@ -51,9 +51,9 @@
 fehrc.inc: fehrc.raw
 help.inc: help.raw
 
-
+# CFLAGS might contain include paths needed to resolve includes in headers
 deps.mk: ${TARGETS} ${I_DSTS}
-       ${CC} ${CPPFLAGS} -MM ${TARGETS} > $@
+       ${CC} ${CFLAGS} -MM ${TARGETS} > $@
 
 clean:
        rm -f feh *.o *.inc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/collage.c new/feh-2.23.1/src/collage.c
--- old/feh-2.23/src/collage.c  2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/collage.c        2018-01-31 17:39:02.000000000 +0100
@@ -41,7 +41,6 @@
        feh_file *file = NULL;
        unsigned char trans_bg = 0;
        gib_list *l, *last = NULL;
-       char *s;
 
        mode = "collage";
 
@@ -105,15 +104,9 @@
                gib_imlib_image_fill_rectangle(im_main, 0, 0, w, h, 0, 0, 0, 
255);
        }
 
-       /* Create the title string */
-
-       if (!opt.title)
-               s = estrdup(PACKAGE " [collage mode]");
-       else
-               s = estrdup(feh_printf(opt.title, NULL, NULL));
-
        if (opt.display) {
-               winwid = winwidget_create_from_image(im_main, s, 
WIN_TYPE_SINGLE);
+               winwid = winwidget_create_from_image(im_main, WIN_TYPE_SINGLE);
+               winwidget_rename(winwid, PACKAGE " [collage mode]");
                winwidget_show(winwid);
        }
 
@@ -210,7 +203,6 @@
 
        if (!opt.display)
                gib_imlib_free_image_and_decache(im_main);
-       free(s);
 
        return;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/feh.h new/feh-2.23.1/src/feh.h
--- old/feh-2.23/src/feh.h      2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/feh.h    2018-01-31 17:39:02.000000000 +0100
@@ -137,8 +137,6 @@
 void show_mini_usage(void);
 void slideshow_change_image(winwidget winwid, int change, int render);
 void slideshow_pause_toggle(winwidget w);
-char *slideshow_create_name(feh_file * file, winwidget winwid);
-char *thumbnail_create_name(feh_file * file, winwidget winwid);
 void init_keyevents(void);
 void init_buttonbindings(void);
 void setup_stdin(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/feh_png.c new/feh-2.23.1/src/feh_png.c
--- old/feh-2.23/src/feh_png.c  2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/feh_png.c        2018-01-31 17:39:02.000000000 +0100
@@ -23,13 +23,13 @@
 
 */
 
-#include "feh_png.h"
-
 #include <png.h>
 
 #include <stdio.h>
 #include <stdarg.h>
 
+#include "feh_png.h"
+
 #define FEH_PNG_COMPRESSION 3
 #define FEH_PNG_NUM_COMMENTS 4
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/feh_png.h new/feh-2.23.1/src/feh_png.h
--- old/feh-2.23/src/feh_png.h  2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/feh_png.h        2018-01-31 17:39:02.000000000 +0100
@@ -26,11 +26,11 @@
 #ifndef FEH_PNG_H
 #define FEH_PNG_H
 
-#include "feh.h"
-
 #include <stdio.h>
 #include <stdarg.h>
 
+#include "feh.h"
+
 gib_hash *feh_png_read_comments(char *file);
 int feh_png_write_png_fd(Imlib_Image image, int fd, ...);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/gib_hash.c new/feh-2.23.1/src/gib_hash.c
--- old/feh-2.23/src/gib_hash.c 2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/gib_hash.c       2018-01-31 17:39:02.000000000 +0100
@@ -22,11 +22,11 @@
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 */
+#include <strings.h>
 
 #include "gib_hash.h"
 #include "utils.h"
 #include "debug.h"
-#include <strings.h>
 
 gib_hash_node *gib_hash_node_new(char *key, void *data)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/imlib.c new/feh-2.23.1/src/imlib.c
--- old/feh-2.23/src/imlib.c    2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/imlib.c  2018-01-31 17:39:02.000000000 +0100
@@ -231,7 +231,7 @@
 
        if ((image_source != SRC_IMLIB) && tmpname) {
                *im = imlib_load_image_with_error_return(tmpname, &err);
-               if (im) {
+               if (!err && im) {
                        real_filename = file->filename;
                        file->filename = tmpname;
                        feh_file_info_load(file, *im);
@@ -240,7 +240,7 @@
                        file->ed = exif_get_data(tmpname);
 #endif
                }
-               if ((image_source == SRC_MAGICK) || !opt.keep_http)
+               if ((image_source != SRC_HTTP) || !opt.keep_http)
                        unlink(tmpname);
 
                free(tmpname);
@@ -357,30 +357,17 @@
        else {
                alarm(opt.magick_timeout);
                waitpid(childpid, &status, 0);
-               alarm(0);
-               if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
-                       close(fd);
+               kill(childpid, SIGKILL);
+               if (opt.magick_timeout > 0 && !alarm(0)) {
                        unlink(sfn);
                        free(sfn);
                        sfn = NULL;
 
                        if (!opt.quiet) {
-                               if (WIFSIGNALED(status))
-                                       weprintf("%s - Conversion took too 
long, skipping",
-                                               filename);
+                               weprintf("%s - Conversion took too long, 
skipping", filename);
                        }
-
-                       /*
-                        * Reap child.  The previous waitpid call was 
interrupted by
-                        * alarm, but convert doesn't terminate immediately.
-                        * XXX
-                        * normally, if (WIFSIGNALED(status)) waitpid(childpid, 
&status, 0);
-                        * would suffice. However, as soon as feh has its own 
window,
-                        * this doesn't work anymore and the following 
workaround is
-                        * required. Hm.
-                        */
-                       waitpid(-1, &status, 0);
                }
+               close(fd);
                childpid = 0;
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/index.c new/feh-2.23.1/src/index.c
--- old/feh-2.23/src/index.c    2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/index.c  2018-01-31 17:39:02.000000000 +0100
@@ -59,7 +59,6 @@
        int lineno;
        unsigned char trans_bg = 0;
        int index_image_width, index_image_height;
-       char *s;
        gib_list *line, *lines;
 
        if (opt.montage) {
@@ -164,15 +163,9 @@
                gib_imlib_image_fill_rectangle(im_main, 0, 0, w, h + 
title_area_h, 0, 0, 0, 255);
        }
 
-       /* Create the window title at this point */
-
-       if (!opt.title)
-               s = estrdup(PACKAGE " [index mode]");
-       else
-               s = estrdup(feh_printf(opt.title, NULL, NULL));
-
        if (opt.display) {
-               winwid = winwidget_create_from_image(im_main, s, 
WIN_TYPE_SINGLE);
+               winwid = winwidget_create_from_image(im_main, WIN_TYPE_SINGLE);
+               winwidget_rename(winwid, PACKAGE " [index mode]");
                winwidget_show(winwid);
        }
 
@@ -348,7 +341,6 @@
        if (!opt.display)
                gib_imlib_free_image_and_decache(im_main);
 
-       free(s);
        return;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/list.c new/feh-2.23.1/src/list.c
--- old/feh-2.23/src/list.c     2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/list.c   2018-01-31 17:39:02.000000000 +0100
@@ -92,6 +92,7 @@
                                if (opt.verbose)
                                        feh_display_status('.');
                                puts(file->filename);
+                               fflush(stdout);
                                feh_action_run(file, opt.actions[0], NULL);
                        }
                        else {
@@ -106,6 +107,7 @@
                                if (opt.verbose)
                                        feh_display_status('.');
                                puts(file->filename);
+                               fflush(stdout);
                                feh_action_run(file, opt.actions[0], NULL);
                        }
                        else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/multiwindow.c 
new/feh-2.23.1/src/multiwindow.c
--- old/feh-2.23/src/multiwindow.c      2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/multiwindow.c    2018-01-31 17:39:02.000000000 +0100
@@ -34,25 +34,14 @@
 {
        winwidget w = NULL;
        gib_list *l;
-       feh_file *file = NULL;
+
+       if (!opt.title)
+               opt.title = PACKAGE " - %f";
 
        mode = "multiwindow";
 
        for (l = filelist; l; l = l->next) {
-               char *s = NULL;
-               int len = 0;
-               file = FEH_FILE(l->data);
-               current_file = l;
-
-               if (!opt.title) {
-                       len = strlen(PACKAGE " - ") + strlen(file->filename) + 
1;
-                       s = emalloc(len);
-                       snprintf(s, len, PACKAGE " - %s", file->filename);
-               } else {
-                       s = estrdup(feh_printf(opt.title, file, w));
-               }
-
-               if ((w = winwidget_create_from_file(l, s, WIN_TYPE_SINGLE)) != 
NULL) {
+               if ((w = winwidget_create_from_file(l, WIN_TYPE_SINGLE)) != 
NULL) {
                        winwidget_show(w);
                        if (opt.reload > 0)
                                feh_add_unique_timer(cb_reload_timer, w, 
opt.reload);
@@ -62,7 +51,6 @@
                        D(("EEEK. Couldn't load image in multiwindow mode. "
                                                "I 'm not sure if this is a 
problem\n"));
                }
-               free(s);
        }
 
        return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/options.c new/feh-2.23.1/src/options.c
--- old/feh-2.23/src/options.c  2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/options.c        2018-01-31 17:39:02.000000000 +0100
@@ -24,10 +24,11 @@
 
 */
 
+#include <strings.h>
+
 #include "feh.h"
 #include "filelist.h"
 #include "options.h"
-#include <strings.h>
 
 static void check_options(void);
 static void feh_getopt_theme(int argc, char **argv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/slideshow.c 
new/feh-2.23.1/src/slideshow.c
--- old/feh-2.23/src/slideshow.c        2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/slideshow.c      2018-01-31 17:39:02.000000000 +0100
@@ -35,9 +35,7 @@
 {
        winwidget w = NULL;
        int success = 0;
-       char *s = NULL;
        gib_list *l = filelist, *last = NULL;
-       feh_file *file = NULL;
 
        for (; l && opt.start_list_at; l = l->next) {
                if (!strcmp(opt.start_list_at, FEH_FILE(l->data)->filename)) {
@@ -50,17 +48,17 @@
                eprintf("--start-at %s: File not found in filelist",
                                opt.start_list_at);
 
+       if (!opt.title)
+               opt.title = PACKAGE " [%u of %l] - %f",
+
        mode = "slideshow";
        for (; l; l = l->next) {
-               file = FEH_FILE(l->data);
                if (last) {
                        filelist = feh_file_remove_from_list(filelist, last);
                        last = NULL;
                }
                current_file = l;
-               s = slideshow_create_name(file, NULL);
-               if ((w = winwidget_create_from_file(l, s, WIN_TYPE_SLIDESHOW)) 
!= NULL) {
-                       free(s);
+               if ((w = winwidget_create_from_file(l, WIN_TYPE_SLIDESHOW)) != 
NULL) {
                        success = 1;
                        winwidget_show(w);
                        if (opt.slideshow_delay > 0.0)
@@ -69,7 +67,6 @@
                                feh_add_unique_timer(cb_reload_timer, w, 
opt.reload);
                        break;
                } else {
-                       free(s);
                        last = l;
                }
        }
@@ -130,13 +127,6 @@
                current_file = filelist;
        w->file = current_file;
 
-       /* reset window name in case of current file order,
-        * filename, or filelist_length has changed.
-        */
-       current_filename = slideshow_create_name(FEH_FILE(current_file->data), 
w);
-       winwidget_rename(w, current_filename);
-       free(current_filename);
-
        feh_reload_image(w, 1, 0);
        feh_add_unique_timer(cb_reload_timer, w, opt.reload);
        return;
@@ -144,7 +134,7 @@
 
 void feh_reload_image(winwidget w, int resize, int force_new)
 {
-       char *title, *new_title;
+       char *new_title;
        int len;
        Imlib_Image tmp;
        int old_w, old_h;
@@ -173,8 +163,8 @@
        len = strlen(w->name) + sizeof("Reloading: ") + 1;
        new_title = emalloc(len);
        snprintf(new_title, len, "Reloading: %s", w->name);
-       title = estrdup(w->name);
        winwidget_rename(w, new_title);
+       free(new_title);
 
        old_w = gib_imlib_image_get_width(w->im);
        old_h = gib_imlib_image_get_height(w->im);
@@ -195,9 +185,6 @@
                        im_weprintf(w, "Couldn't reload image. Is it still 
there?");
                        winwidget_render_image(w, 0, 0);
                }
-               winwidget_rename(w, title);
-               free(title);
-               free(new_title);
                return;
        }
 
@@ -237,10 +224,6 @@
                winwidget_render_image(w, resize, 0);
        }
 
-       winwidget_rename(w, title);
-       free(title);
-       free(new_title);
-
        return;
 }
 
@@ -253,7 +236,6 @@
         * encounter invalid images.
         */
        int our_filelist_len = filelist_len;
-       char *s;
 
        unsigned char tmode =0;
        int tim_x =0;
@@ -402,11 +384,6 @@
                                        winwidget_render_image(winwid, 1, 0);
                                }
                        }
-
-                       s = slideshow_create_name(FEH_FILE(current_file->data), 
winwid);
-                       winwidget_rename(winwid, s);
-                       free(s);
-
                        break;
                } else
                        last = current_file;
@@ -433,23 +410,6 @@
        winwidget_rename(w, NULL);
 }
 
-char *slideshow_create_name(feh_file * file, winwidget winwid)
-{
-       char *s = NULL;
-       int len = 0;
-
-       if (!opt.title) {
-               len = strlen(PACKAGE " [slideshow mode] - ") + 
strlen(file->filename) + 1;
-               s = emalloc(len);
-               snprintf(s, len, PACKAGE " [%d of %d] - %s",
-                       gib_list_num(filelist, current_file) + 1, 
gib_list_length(filelist), file->filename);
-       } else {
-               s = estrdup(feh_printf(opt.title, file, winwid));
-       }
-
-       return(s);
-}
-
 void feh_action_run(feh_file * file, char *action, winwidget winwid)
 {
        if (action) {
@@ -486,6 +446,7 @@
 
        ret[0] = '\0';
        filelist_tmppath = NULL;
+       gib_list *f;
 
        for (c = str; *c != '\0'; c++) {
                if ((*c == '%') && (*(c+1) != '\0')) {
@@ -570,9 +531,8 @@
                                }
                                break;
                        case 'u':
-                               snprintf(buf, sizeof(buf), "%d",
-                                        current_file != NULL ? 
gib_list_num(filelist, current_file)
-                                        + 1 : 0);
+                               f = current_file ? current_file : 
gib_list_find_by_data(filelist, file);
+                               snprintf(buf, sizeof(buf), "%d", f ? 
gib_list_num(filelist, f) + 1 : 0);
                                strncat(ret, buf, sizeof(ret) - strlen(ret) - 
1);
                                break;
                        case 'v':
@@ -626,7 +586,6 @@
 void feh_filelist_image_remove(winwidget winwid, char do_delete)
 {
        if (winwid->type == WIN_TYPE_SLIDESHOW) {
-               char *s;
                gib_list *doomed;
 
                doomed = current_file;
@@ -653,9 +612,6 @@
                        winwidget_destroy(winwid);
                        return;
                }
-               s = slideshow_create_name(FEH_FILE(winwid->file->data), winwid);
-               winwidget_rename(winwid, s);
-               free(s);
                winwidget_render_image(winwid, 1, 0);
        } else if ((winwid->type == WIN_TYPE_SINGLE)
                   || (winwid->type == WIN_TYPE_THUMBNAIL_VIEWER)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/thumbnail.c 
new/feh-2.23.1/src/thumbnail.c
--- old/feh-2.23/src/thumbnail.c        2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/thumbnail.c      2018-01-31 17:39:02.000000000 +0100
@@ -71,7 +71,6 @@
        gib_list *l, *last = NULL;
        int lineno;
        int index_image_width, index_image_height;
-       char *s;
        unsigned int thumb_counter = 0;
        gib_list *line, *lines;
 
@@ -92,6 +91,9 @@
        td.vertical = 0;
        td.max_column_w = 0;
 
+       if (!opt.thumb_title)
+               opt.thumb_title = "%n";
+
        mode = "thumbnail";
 
        if (opt.font)
@@ -168,15 +170,9 @@
                                td.h + title_area_h, 0, 0, 0, 255);
        }
 
-       /* Create title now */
-
-       if (!opt.title)
-               s = estrdup(PACKAGE " [thumbnail mode]");
-       else
-               s = estrdup(feh_printf(opt.title, NULL, NULL));
-
        if (opt.display) {
-               winwid = winwidget_create_from_image(td.im_main, s, 
WIN_TYPE_THUMBNAIL);
+               winwid = winwidget_create_from_image(td.im_main, 
WIN_TYPE_THUMBNAIL);
+               winwidget_rename(winwid, PACKAGE " [thumbnail mode]");
                winwidget_show(winwid);
        }
 
@@ -415,8 +411,6 @@
                }
        }
 
-
-       free(s);
        return;
 }
 
@@ -772,24 +766,17 @@
 void feh_thumbnail_show_fullsize(feh_file *thumbfile)
 {
        winwidget thumbwin = NULL;
-       char *s;
 
-       if (!opt.thumb_title)
-               s = thumbfile->name;
-       else
-               s = feh_printf(opt.thumb_title, thumbfile, NULL);
-       
        thumbwin = 
winwidget_get_first_window_of_type(WIN_TYPE_THUMBNAIL_VIEWER);
        if (!thumbwin) {
                thumbwin = winwidget_create_from_file(
                                gib_list_add_front(NULL, thumbfile),
-                               s, WIN_TYPE_THUMBNAIL_VIEWER);
+                               WIN_TYPE_THUMBNAIL_VIEWER);
                if (thumbwin)
                        winwidget_show(thumbwin);
        } else if (FEH_FILE(thumbwin->file->data) != thumbfile) {
                free(thumbwin->file);
                thumbwin->file = gib_list_add_front(NULL, thumbfile);
-               winwidget_rename(thumbwin, s);
                feh_reload_image(thumbwin, 1, 1);
        }
 }
@@ -925,16 +912,3 @@
 
        return status;
 }
-
-char *thumbnail_create_name(feh_file * file, winwidget winwid)
-{
-       char *s = NULL;
-
-       if (!opt.thumb_title) {
-               s = estrdup(file->filename);
-       } else {
-               s = estrdup(feh_printf(opt.thumb_title, file, winwid));
-       }
-
-       return(s);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/wallpaper.c 
new/feh-2.23.1/src/wallpaper.c
--- old/feh-2.23/src/wallpaper.c        2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/wallpaper.c      2018-01-31 17:39:02.000000000 +0100
@@ -24,12 +24,14 @@
 
 */
 
+#include <limits.h>
+#include <sys/stat.h>
+
 #include "feh.h"
 #include "filelist.h"
 #include "options.h"
 #include "wallpaper.h"
-#include <limits.h>
-#include <sys/stat.h>
+
 Window ipc_win = None;
 Window my_ipc_win = None;
 Atom ipc_atom = None;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/winwidget.c 
new/feh-2.23.1/src/winwidget.c
--- old/feh-2.23/src/winwidget.c        2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/winwidget.c      2018-01-31 17:39:02.000000000 +0100
@@ -81,7 +81,7 @@
        return(ret);
 }
 
-winwidget winwidget_create_from_image(Imlib_Image im, char *name, char type)
+winwidget winwidget_create_from_image(Imlib_Image im, char type)
 {
        winwidget ret = NULL;
 
@@ -95,11 +95,6 @@
        ret->w = ret->im_w = gib_imlib_image_get_width(ret->im);
        ret->h = ret->im_h = gib_imlib_image_get_height(ret->im);
 
-       if (name)
-               ret->name = estrdup(name);
-       else
-               ret->name = estrdup(PACKAGE);
-
        if (opt.full_screen && (type != WIN_TYPE_THUMBNAIL))
                ret->full_screen = True;
        winwidget_create_window(ret, ret->w, ret->h);
@@ -108,7 +103,7 @@
        return(ret);
 }
 
-winwidget winwidget_create_from_file(gib_list * list, char *name, char type)
+winwidget winwidget_create_from_file(gib_list * list, char type)
 {
        winwidget ret = NULL;
        feh_file *file = FEH_FILE(list->data);
@@ -119,10 +114,6 @@
        ret = winwidget_allocate();
        ret->file = list;
        ret->type = type;
-       if (name)
-               ret->name = estrdup(name);
-       else
-               ret->name = estrdup(file->filename);
 
        if (winwidget_loadimage(ret, file) == 0) {
                winwidget_destroy(ret);
@@ -498,12 +489,6 @@
                           && (winwid->im_h < max_h));
 
                if (!smaller || opt.zoom_mode) {
-                       double ratio = 0.0;
-
-                       /* Image is larger than the screen (so wants 
shrinking), or it's
-                          smaller but wants expanding to fill it */
-                       ratio = feh_calc_needed_zoom(&(winwid->zoom), 
winwid->im_w, winwid->im_h, max_w, max_h);
-
                        /* contributed by Jens Laas <[email protected]>
                         * What it does:
                         * zooms images by a fixed amount but never larger than 
the screen.
@@ -535,6 +520,10 @@
                                winwid->im_y = ((int)
                                                (max_h - (winwid->im_h * 
winwid->zoom))) >> 1;
                        } else {
+                               /* Image is larger than the screen (so wants 
shrinking), or it's
+                                  smaller but wants expanding to fill it */
+                               double ratio = 
feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, max_w, max_h);
+
                                if (ratio > 1.0) {
                                        /* height is the factor */
                                        winwid->im_x = 0;
@@ -634,16 +623,12 @@
                        feh_draw_info(winwid);
                if (winwid->errstr)
                        feh_draw_errstr(winwid);
-               if (opt.title && (winwid->type != WIN_TYPE_THUMBNAIL_VIEWER) &&
-                               (winwid->file != NULL)) {
-                       char *s = 
slideshow_create_name(FEH_FILE(winwid->file->data), winwid);
-                       winwidget_rename(winwid, s);
-                       free(s);
-               } else if (opt.thumb_title && (winwid->type == 
WIN_TYPE_THUMBNAIL_VIEWER) &&
-                               (winwid->file != NULL)) {
-                       char *s = 
thumbnail_create_name(FEH_FILE(winwid->file->data), winwid);
-                       winwidget_rename(winwid, s);
-                       free(s);
+               if (winwid->file != NULL) {
+                       if (opt.title && winwid->type != 
WIN_TYPE_THUMBNAIL_VIEWER) {
+                               winwidget_rename(winwid, feh_printf(opt.title, 
FEH_FILE(winwid->file->data), winwid));
+                       } else if (opt.thumb_title && winwid->type == 
WIN_TYPE_THUMBNAIL_VIEWER) {
+                               winwidget_rename(winwid, 
feh_printf(opt.thumb_title, FEH_FILE(winwid->file->data), winwid));
+                       }
                }
        } else if ((opt.mode == MODE_ZOOM) && !antialias)
                feh_draw_zoom(winwid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/src/winwidget.h 
new/feh-2.23.1/src/winwidget.h
--- old/feh-2.23/src/winwidget.h        2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/src/winwidget.h      2018-01-31 17:39:02.000000000 +0100
@@ -141,8 +141,8 @@
 int winwidget_get_width(winwidget winwid);
 int winwidget_get_height(winwidget winwid);
 winwidget winwidget_get_from_window(Window win);
-winwidget winwidget_create_from_file(gib_list * filename, char *name, char 
type);
-winwidget winwidget_create_from_image(Imlib_Image im, char *name, char type);
+winwidget winwidget_create_from_file(gib_list * filename, char type);
+winwidget winwidget_create_from_image(Imlib_Image im, char type);
 void winwidget_rename(winwidget winwid, char *newname);
 void winwidget_destroy(winwidget winwid);
 void winwidget_create_window(winwidget ret, int w, int h);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/test/list/custom 
new/feh-2.23.1/test/list/custom
--- old/feh-2.23/test/list/custom       2017-12-28 19:28:35.000000000 +0100
+++ new/feh-2.23.1/test/list/custom     2018-01-31 17:39:02.000000000 +0100
@@ -1,4 +1,4 @@
-test/ok/gif; 16; 4; list; gif; 256; 953; gif; 0; 16
-test/ok/jpg; 16; 4; list; jpg; 256; 354; jpeg; 0; 16
-test/ok/png; 16; 4; list; png; 256; 403; png; 0; 16
-test/ok/pnm; 16; 4; list; pnm; 256; 269; pnm; 0; 16
+test/ok/gif; 16; 4; list; gif; 256; 953; gif; 1; 16
+test/ok/jpg; 16; 4; list; jpg; 256; 354; jpeg; 2; 16
+test/ok/png; 16; 4; list; png; 256; 403; png; 3; 16
+test/ok/pnm; 16; 4; list; pnm; 256; 269; pnm; 4; 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/test/nx_action/loadable_action 
new/feh-2.23.1/test/nx_action/loadable_action
--- old/feh-2.23/test/nx_action/loadable_action 2017-12-28 19:28:35.000000000 
+0100
+++ new/feh-2.23.1/test/nx_action/loadable_action       2018-01-31 
17:39:02.000000000 +0100
@@ -1,8 +1,8 @@
-touch test/ok/gif
-touch test/ok/jpg
-touch test/ok/png
-touch test/ok/pnm
 test/ok/gif
+touch test/ok/gif
 test/ok/jpg
+touch test/ok/jpg
 test/ok/png
+touch test/ok/png
 test/ok/pnm
+touch test/ok/pnm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/test/nx_action/loadable_naction 
new/feh-2.23.1/test/nx_action/loadable_naction
--- old/feh-2.23/test/nx_action/loadable_naction        2017-12-28 
19:28:35.000000000 +0100
+++ new/feh-2.23.1/test/nx_action/loadable_naction      2018-01-31 
17:39:02.000000000 +0100
@@ -1,8 +1,8 @@
-touch test/ok/gif
-touch test/ok/jpg
-touch test/ok/png
-touch test/ok/pnm
 test/ok/gif
+touch test/ok/gif
 test/ok/jpg
+touch test/ok/jpg
 test/ok/png
+touch test/ok/png
 test/ok/pnm
+touch test/ok/pnm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/test/nx_action/unloadable_action 
new/feh-2.23.1/test/nx_action/unloadable_action
--- old/feh-2.23/test/nx_action/unloadable_action       2017-12-28 
19:28:35.000000000 +0100
+++ new/feh-2.23.1/test/nx_action/unloadable_action     2018-01-31 
17:39:02.000000000 +0100
@@ -1,8 +1,8 @@
-rm test/fail/gif
-rm test/fail/jpg
-rm test/fail/png
-rm test/fail/pnm
 test/fail/gif
+rm test/fail/gif
 test/fail/jpg
+rm test/fail/jpg
 test/fail/png
+rm test/fail/png
 test/fail/pnm
+rm test/fail/pnm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/feh-2.23/test/nx_action/unloadable_naction 
new/feh-2.23.1/test/nx_action/unloadable_naction
--- old/feh-2.23/test/nx_action/unloadable_naction      2017-12-28 
19:28:35.000000000 +0100
+++ new/feh-2.23.1/test/nx_action/unloadable_naction    2018-01-31 
17:39:02.000000000 +0100
@@ -1,8 +1,8 @@
-rm test/fail/gif
-rm test/fail/jpg
-rm test/fail/png
-rm test/fail/pnm
 test/fail/gif
+rm test/fail/gif
 test/fail/jpg
+rm test/fail/jpg
 test/fail/png
+rm test/fail/png
 test/fail/pnm
+rm test/fail/pnm

++++++ feh-makefile_optflags.patch ++++++
--- /var/tmp/diff_new_pack.8SVjye/_old  2018-02-01 21:31:56.477908245 +0100
+++ /var/tmp/diff_new_pack.8SVjye/_new  2018-02-01 21:31:56.481908058 +0100
@@ -7,7 +7,7 @@
 ===================================================================
 --- a/config.mk
 +++ b/config.mk
-@@ -34,8 +34,8 @@ icon_dir = ${ICON_PREFIX}/hicolor
+@@ -34,8 +34,8 @@
  scalable_icon_dir = ${icon_dir}/scalable/apps
  
  # default CFLAGS
@@ -17,7 +17,7 @@
 +CFLAGS += -Wall -Wextra -pedantic $(OPTFLAGS)
  
  # Settings for glibc >= 2.19 - may need to be adjusted for other systems
- CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
+ CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
 Index: b/src/Makefile
 ===================================================================
 --- a/src/Makefile


Reply via email to