Hello community,
here is the log from the commit of package feh for openSUSE:Factory checked in at 2015-07-12 22:53:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/feh (Old)
and /work/SRC/openSUSE:Factory/.feh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "feh"
Changes:
--------
--- /work/SRC/openSUSE:Factory/feh/feh.changes 2015-05-19 23:51:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.feh.new/feh.changes 2015-07-12 22:53:26.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul 8 15:01:35 UTC 2015 - mimi.vx@gmail.com
+
+- update to 2.13.1
+ * Fix --scale-down breaking image centering in fullscreen mode
+- spec-cleaned
+
+-------------------------------------------------------------------
Old:
----
feh-2.12.1.tar.bz2
feh-2.12.1.tar.bz2.asc
New:
----
feh-2.13.1.tar.bz2
feh-2.13.1.tar.bz2.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ feh.spec ++++++
--- /var/tmp/diff_new_pack.1ziL3U/_old 2015-07-12 22:53:27.000000000 +0200
+++ /var/tmp/diff_new_pack.1ziL3U/_new 2015-07-12 22:53:27.000000000 +0200
@@ -1,4 +1,3 @@
-# vim: set sw=4 ts=4 et:
#
# spec file for package feh
#
@@ -17,18 +16,18 @@
#
+Name: feh
+Version: 2.13.1
+Release: 0
Summary: Fast and Lightweight Image Viewer
License: MIT and LGPL-2.0+
Group: Productivity/Graphics/Viewers
-Name: feh
-Version: 2.12.1
-Release: 0
+Url: http://feh.finalrewind.org/
Source: http://feh.finalrewind.org/feh-%{version}.tar.bz2
Source1: %{name}.desktop
Source2: %{name}.png
Source3: %{name}-%{version}.tar.bz2.asc
Source4: %{name}.keyring
-
# PATCH-FIX-OPENSUSE feh-makefile_optflags.patch https://github.com/derf/feh/issues/71 pascal.bleser@opensuse.org -- pass OPTFLAGS to make instead of hard-coded -O2 -g
Patch1: feh-makefile_optflags.patch
# PATCH-FIX-UPSTREAM feh-fix_pointer_arithmetics.patch https://github.com/derf/feh/issues/69 pascal.bleser@opensuse.org -- fix compiler warnings on casting pointers as ints
@@ -37,16 +36,15 @@
Patch4: feh-no_date.patch
# PATCH-FIX-UPSTREAM feh-fix_sighandler.patch https://github.com/derf/feh/issues/70 toganm@opensuse.org -- bad prototype for a sighandler_t and a funky unportable pointer cast
Patch5: feh-2.12-fix_sighandler.patch
-Url: http://feh.finalrewind.org/
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: curl-devel
-BuildRequires: freetype2-devel
BuildRequires: gpg-offline
-BuildRequires: imlib2-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: xorg-x11-devel
+BuildRequires: pkgconfig(freetype2)
+BuildRequires: pkgconfig(imlib2)
Requires: imlib2-loaders
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
@@ -59,7 +57,7 @@
montages as index prints with many user-configurable options.
%prep
-%gpg_verify %{S:3}
+%gpg_verify %{SOURCE3}
%setup -q
%patch1 -p1
%patch2 -p1
@@ -67,7 +65,7 @@
%patch5 -p1
%build
-%__make %{?_smp_flags} \
+make %{?_smp_mflags} \
curl=1 \
help=1 \
xinerama=1 \
@@ -76,14 +74,14 @@
OPTFLAGS="%{optflags} -Wall -Wextra"
%install
-%__make \
+make \
PREFIX="%{buildroot}%{_prefix}" \
install cam=1
-%__rm -rf "%{buildroot}%{_datadir}/doc"
+rm -rf "%{buildroot}%{_datadir}/doc"
-%__install -D -m0644 "%{SOURCE1}" "%{buildroot}/usr/share/applications/feh.desktop"
-%__install -D -m0644 "%{SOURCE2}" "%{buildroot}/usr/share/pixmaps/feh.png"
+install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/feh.desktop"
+install -D -m0644 "%{SOURCE2}" "%{buildroot}%{_datadir}/pixmaps/feh.png"
%if 0%{?suse_version}
%suse_update_desktop_file -r feh Graphics Viewer
@@ -99,8 +97,8 @@
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
-%doc %{_mandir}/man1/feh.1%{ext_man}
-%doc %{_mandir}/man1/feh-cam.1%{ext_man}
-%doc %{_mandir}/man1/gen-cam-menu.1%{ext_man}
+%{_mandir}/man1/feh.1%{ext_man}
+%{_mandir}/man1/feh-cam.1%{ext_man}
+%{_mandir}/man1/gen-cam-menu.1%{ext_man}
%changelog
++++++ feh-2.12.1.tar.bz2 -> feh-2.13.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/ChangeLog new/feh-2.13.1/ChangeLog
--- old/feh-2.12.1/ChangeLog 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/ChangeLog 2015-05-24 11:46:21.000000000 +0200
@@ -1,3 +1,21 @@
+Sun, 24 May 2015 11:45:18 +0200
+
+* Release v2.13.1
+ * Fix --scale-down breaking image centering in fullscreen mode
+
+Sun, 17 May 2015 20:40:36 +0200 Daniel Friesel
+
+* Release v2.13
+ * print --verbose output to stderr
+ * Show progress when using --verbose and --loadable / --unloadable
+ * ~/.fehbg is now a shell script and can be executed directly
+ (sourcing it still works)
+ * --max-dimension: ignore width/height limit of 0 pixels
+ * Do not re-render images when toggling keep_zoom_vp
+ * feh/themes: Support quoting with '' too (previously, only "" worked)
+ * Fix potential out of bounds array access in EXIF code
+ (when built with exif=1)
+
Wed, 08 Apr 2015 11:18:41 +0200 Daniel Friesel
* Release v2.12.1
@@ -21,7 +39,7 @@
* Fix a buffer overflow in the printf implementation when handling unknown
format specifiers (affects --action, --customlist, --index-info, --info,
--thumb-title and --title)
- * Update help (if built with help=1)
+ * Update help (when built with help=1)
Sun, 27 Apr 2014 20:28:02 +0200 Daniel Friesel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/config.mk new/feh-2.13.1/config.mk
--- old/feh-2.12.1/config.mk 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/config.mk 2015-05-24 11:46:21.000000000 +0200
@@ -1,5 +1,5 @@
PACKAGE ?= feh
-VERSION ?= 2.12.1
+VERSION ?= 2.13.1
# Prefix for all installed files
PREFIX ?= /usr/local
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/man/feh.pre new/feh-2.13.1/man/feh.pre
--- old/feh-2.12.1/man/feh.pre 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/man/feh.pre 2015-05-24 11:46:21.000000000 +0200
@@ -420,8 +420,8 @@
.Ar width
and height <=
.Ar height .
-If you only care about one parameter, set the other to either something large
-or -1.
+If you only care about one parameter, set the other to 0
+.Pq or a negative value .
.
.It Cm -M , --menu-font Ar font
.
@@ -525,7 +525,9 @@
.
.It Cm -. , --scale-down
.
-When not in fullscreen: Scale images to screen size if they are too big.
+Scale images to fit window geometry (defaults to screen size when no geometry
+was specified).
+This option is ignored when in fullscreen mode.
.
.Pp
.
@@ -569,7 +571,18 @@
.
Start the filelist at
.Ar filename .
-See
+.
+Note that at the moment,
+.Ar filename
+must match an
+.Pq expanded
+path in the filelist. So, if the file to be matched is passed via an absolute
+path in the filelist,
+.Ar filename
+must be an absolute path. If the file is passed via a relative path,
+.Ar filename
+must be an identical relative path. This is a known issue.
+See also
.Sx USAGE EXAMPLES .
.
.It Cm -T , --theme Ar theme
@@ -766,12 +779,17 @@
.Nm
can also be used as a background setter. Unless you pass the
.Cm --no-fehbg
-option, it will store the command line necessary to set the background in
-.Pa ~/.fehbg ,
-so to have your background restored every time you start X, you can add
-.Qq eval $(cat ~/.fehbg)
+option, it will write a script to set the current background to
+.Pa ~/.fehbg .
+So to have your background restored every time you start X, you can add
+.Qq sh ~/.fehbg &
to your X startup script
-.Pq like Pa ~/.xinitrc .
+.Pq such as Pa ~/.xinitrc .
+As of
+.Nm
+2.13, this script is executable, so
+.Qq ~/.fehbg &
+will work as well.
.
.Pp
.
@@ -979,10 +997,17 @@
.Ar options
are the options which will be applied when the theme is used.
.
+Note that the options are not parsed by any shell. Therefore, filename expansion
+.Po
+.Qq *.jpg
+and similar
+.Pc
+is not supported. Quoting with both single and double quotes works, though.
+.
.Pp
.
An example entry would be
-.Qq imagemap -rVq --thumb-width 40 --thumb-height 30 .
+.Qq imagemap -rVq --thumb-width 40 --thumb-height 30 --index-info \&'%n\en\&%wx\&%h\&' .
.
.Pp
.
@@ -990,10 +1015,11 @@
.Qo
.Nm
-Timagemap *.jpg
-.Qc
+.Qc ,
or create a symbolic link to
.Nm
-with the name of the theme you want it to use. So from the example above:
+with the name of the theme you want it to use. For the example above,
+this would be
.Qo
ln -s `which
.Nm
@@ -1006,11 +1032,11 @@
.Pp
.
Note that you can split a theme over several lines by placing a backslash at
-the end of a line, like in the shell.
+the end of an unfinished line.
.
.Pp
.
-You can combine these themes with commandline options.
+Command line options always override theme options.
.
.
.Sh KEYS CONFIG SYNTAX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/collage.c new/feh-2.13.1/src/collage.c
--- old/feh-2.12.1/src/collage.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/collage.c 2015-05-24 11:46:21.000000000 +0200
@@ -69,7 +69,7 @@
": No size restriction specified for collage.\n"
" You did specify a background however, so the\n"
" collage size has defaulted to the size of the image\n",
- stdout);
+ stderr);
opt.limit_w = bg_w;
opt.limit_h = bg_h;
} else {
@@ -78,7 +78,7 @@
": No size restriction specified for collage.\n"
" - For collage mode, you need to specify width and height.\n"
" Using defaults (width 800, height 600)\n",
- stdout);
+ stderr);
opt.limit_w = 800;
opt.limit_h = 600;
}
@@ -185,7 +185,7 @@
}
}
if (opt.verbose)
- fputs("\n", stdout);
+ fputs("\n", stderr);
if (opt.output && opt.output_file) {
char output_buf[1024];
@@ -199,8 +199,8 @@
tw = gib_imlib_image_get_width(im_main);
th = gib_imlib_image_get_height(im_main);
- fprintf(stdout, PACKAGE ": File saved as %s\n", output_buf);
- fprintf(stdout,
+ fprintf(stderr, PACKAGE ": File saved as %s\n", output_buf);
+ fprintf(stderr,
" - Image is %dx%d pixels and contains %d thumbnails\n",
tw, th, (tw / opt.thumb_w) * (th / opt.thumb_h));
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/exif.c new/feh-2.13.1/src/exif.c
--- old/feh-2.12.1/src/exif.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/exif.c 2015-05-24 11:46:21.000000000 +0200
@@ -259,7 +259,7 @@
else
{
/* show normal exif tags. list must be defined in exif_cfg.h */
- while ( (Exif_tag_list[i].ifd != EXIF_IFD_COUNT) && (i < USHRT_MAX) )
+ while ( (i < USHRT_MAX) && (Exif_tag_list[i].ifd != EXIF_IFD_COUNT) )
{
exif_get_tag(ed, Exif_tag_list[i].ifd, Exif_tag_list[i].tag, buffer + strlen(buffer), maxsize - strlen(buffer));
i++;
@@ -281,7 +281,7 @@
{
/* show nikon makernote exif tags. list must be defined in exif_cfg.h */
i=0;
- while ( (Exif_makernote_nikon_tag_list[i] != EXIF_NIKON_MAKERNOTE_END) && (i < USHRT_MAX) )
+ while ( (i < USHRT_MAX) && (Exif_makernote_nikon_tag_list[i] != EXIF_NIKON_MAKERNOTE_END) )
{
exn_get_mnote_nikon_tags(ed, Exif_makernote_nikon_tag_list[i],
buffer + strlen(buffer), maxsize - strlen(buffer));
@@ -293,7 +293,7 @@
{
/* show canon makernote exif tags. list must be defined in exif_cfg.h */
i=0;
- while ( (Exif_makernote_canon_tag_list[i] != EXIF_CANON_MAKERNOTE_END) && (i < USHRT_MAX) )
+ while ( (i < USHRT_MAX) && (Exif_makernote_canon_tag_list[i] != EXIF_CANON_MAKERNOTE_END) )
{
exc_get_mnote_canon_tags(ed, Exif_makernote_canon_tag_list[i],
buffer + strlen(buffer), maxsize - strlen(buffer));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/feh.h new/feh-2.13.1/src/feh.h
--- old/feh-2.12.1/src/feh.h 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/feh.h 2015-05-24 11:46:21.000000000 +0200
@@ -162,8 +162,6 @@
void feh_filelist_image_remove(winwidget winwid, char do_delete);
void feh_imlib_print_load_error(char *file, winwidget w, Imlib_Load_Error err);
void slideshow_save_image(winwidget win);
-void ungib_imlib_save_image_with_error_return(Imlib_Image im, char *file,
- Imlib_Load_Error * error_return);
void feh_edit_inplace(winwidget w, int orientation);
void feh_edit_inplace_lossless(winwidget w, int orientation);
gib_list *feh_wrap_string(char *text, int wrap_width, Imlib_Font fn, gib_style * style);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/filelist.c new/feh-2.13.1/src/filelist.c
--- old/feh-2.12.1/src/filelist.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/filelist.c 2015-05-24 11:46:21.000000000 +0200
@@ -602,7 +602,7 @@
tmpname = feh_unique_filename("", "filelist");
if (opt.verbose)
- printf("saving filelist to filename '%s'\n", tmpname);
+ fprintf(stderr, "saving filelist to filename '%s'\n", tmpname);
feh_write_filelist(filelist, tmpname);
free(tmpname);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/gib_imlib.c new/feh-2.13.1/src/gib_imlib.c
--- old/feh-2.12.1/src/gib_imlib.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/gib_imlib.c 2015-05-24 11:46:21.000000000 +0200
@@ -527,13 +527,22 @@
gib_imlib_save_image_with_error_return(Imlib_Image im, char *file,
Imlib_Load_Error * error_return)
{
- char *tmp;
+ char *tmp;
- imlib_context_set_image(im);
- tmp = strrchr(file, '.');
- if (tmp)
- imlib_image_set_format(tmp + 1);
- imlib_save_image_with_error_return(file, error_return);
+ imlib_context_set_image(im);
+ tmp = strrchr(file, '.');
+ if (tmp) {
+ char *p, *pp;
+ p = estrdup(tmp + 1);
+ pp = p;
+ while(*pp) {
+ *pp = tolower(*pp);
+ pp++;
+ }
+ imlib_image_set_format(p);
+ free(p);
+ }
+ imlib_save_image_with_error_return(file, error_return);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/imlib.c new/feh-2.13.1/src/imlib.c
--- old/feh-2.12.1/src/imlib.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/imlib.c 2015-05-24 11:46:21.000000000 +0200
@@ -148,32 +148,6 @@
return(i);
}
-/*
- * XXX gib_imlib_save_image_with_error_return breaks with *.END and
- * similar because it tries to set the image format, which only works
- * with .end .
- * So we leave that part out.
- */
-void ungib_imlib_save_image_with_error_return(Imlib_Image im, char *file,
- Imlib_Load_Error * error_return)
-{
- char *tmp;
- imlib_context_set_image(im);
- tmp = strrchr(file, '.');
- if (tmp) {
- char *p, *pp;
- p = estrdup(tmp + 1);
- pp = p;
- while(*pp) {
- *pp = tolower(*pp);
- pp++;
- }
- imlib_image_set_format(p);
- free(p);
- }
- imlib_save_image_with_error_return(file, error_return);
-}
-
void feh_imlib_print_load_error(char *file, winwidget w, Imlib_Load_Error err)
{
if (err == IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS)
@@ -276,7 +250,7 @@
if ((err) || (!im)) {
if (opt.verbose && !opt.quiet) {
- fputs("\n", stdout);
+ fputs("\n", stderr);
reset_output = 1;
}
feh_imlib_print_load_error(file->filename, NULL, err);
@@ -996,7 +970,7 @@
D(("filelist %p, filelist->next %p\n", filelist, filelist->next));
if (!stat) {
- putc('\n', stdout);
+ putc('\n', stderr);
init_len = 0;
i = 0;
return;
@@ -1009,24 +983,24 @@
if (reset_output) {
/* There's just been an error message. Unfortunate ;) */
for (j = 0; j < (((i % 50) + ((i % 50) / 10)) + 7); j++)
- putc(' ', stdout);
+ putc(' ', stderr);
}
if (!(i % 50)) {
int len = gib_list_length(filelist);
- fprintf(stdout, " %5d/%d (%d)\n[%3d%%] ",
+ fprintf(stderr, " %5d/%d (%d)\n[%3d%%] ",
i, init_len, len, ((int) ((float) i / init_len * 100)));
} else if ((!(i % 10)) && (!reset_output))
- putc(' ', stdout);
+ putc(' ', stderr);
reset_output = 0;
} else
- fputs("[ 0%] ", stdout);
+ fputs("[ 0%] ", stderr);
- fprintf(stdout, "%c", stat);
- fflush(stdout);
+ fprintf(stderr, "%c", stat);
+ fflush(stderr);
i++;
return;
}
@@ -1055,7 +1029,7 @@
imlib_image_flip_horizontal();
} else
gib_imlib_image_orientate(old, op);
- ungib_imlib_save_image_with_error_return(old,
+ gib_imlib_save_image_with_error_return(old,
FEH_FILE(w->file->data)->filename, &err);
gib_imlib_free_image(old);
if (err)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/index.c new/feh-2.13.1/src/index.c
--- old/feh-2.12.1/src/index.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/index.c 2015-05-24 11:46:21.000000000 +0200
@@ -303,7 +303,7 @@
}
}
if (opt.verbose)
- putc('\n', stdout);
+ putc('\n', stderr);
if (opt.title_font) {
int fw, fh, fx, fy;
@@ -327,7 +327,7 @@
else
strncpy(output_buf, opt.output_file, 1024);
- ungib_imlib_save_image_with_error_return(im_main, output_buf, &err);
+ gib_imlib_save_image_with_error_return(im_main, output_buf, &err);
if (err) {
feh_imlib_print_load_error(output_buf, im_main, err);
}
@@ -336,8 +336,8 @@
tw = gib_imlib_image_get_width(im_main);
th = gib_imlib_image_get_height(im_main);
- fprintf(stdout, PACKAGE " - File saved as %s\n", output_buf);
- fprintf(stdout,
+ fprintf(stderr, PACKAGE " - File saved as %s\n", output_buf);
+ fprintf(stderr,
" - Image is %dx%d pixels and contains %d thumbnails\n", tw, th, thumbnailcount);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/list.c new/feh-2.13.1/src/list.c
--- old/feh-2.12.1/src/list.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/list.c 2015-05-24 11:46:21.000000000 +0200
@@ -89,21 +89,33 @@
if (feh_load_image(&im, file)) {
/* loaded ok */
if (loadable) {
+ if (opt.verbose)
+ feh_display_status('.');
puts(file->filename);
feh_action_run(file, opt.actions[0]);
}
- else
+ else {
+ if (opt.verbose)
+ feh_display_status('s');
ret = 1;
+ }
gib_imlib_free_image_and_decache(im);
} else {
/* Oh dear. */
if (!loadable) {
+ if (opt.verbose)
+ feh_display_status('.');
puts(file->filename);
feh_action_run(file, opt.actions[0]);
}
- else
+ else {
+ if (opt.verbose)
+ feh_display_status('s');
ret = 1;
+ }
}
}
+ if (opt.verbose)
+ feh_display_status(0);
exit(ret);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/menu.c new/feh-2.13.1/src/menu.c
--- old/feh-2.12.1/src/menu.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/menu.c 2015-05-24 11:46:21.000000000 +0200
@@ -1327,7 +1327,6 @@
opt.keep_zoom_vp = 1;
else
opt.keep_zoom_vp = 0;
- winwidget_rerender_all(1);
break;
}
return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/options.c new/feh-2.13.1/src/options.c
--- old/feh-2.12.1/src/options.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/options.c 2015-05-24 11:46:21.000000000 +0200
@@ -236,7 +236,7 @@
list[num - 1] = feh_string_normalize(s);
break;
- } else if (*t == '\"' && last != '\\')
+ } else if (((*t == '\"') || (*t == '\'')) && last != '\\')
inquote = !(inquote);
last = *t;
}
@@ -265,6 +265,9 @@
else if ((*s == '\"') && (last == '\\'))
ret[i++] = '\"';
else if ((*s == '\"') && (last == 0));
+ else if ((*s == '\'') && (last == '\\'))
+ ret[i++] = '\'';
+ else if ((*s == '\'') && (last == 0));
else if ((*s == ' ') && (last == '\\'))
ret[i++] = ' ';
else
@@ -272,7 +275,7 @@
last = *s;
}
- if (i && (ret[i - 1] == '\"'))
+ if (i && ((ret[i - 1] == '\"') || (ret[i - 1] == '\'')))
ret[i - 1] = '\0';
else
ret[i] = '\0';
@@ -421,6 +424,10 @@
break;
case '<':
XParseGeometry(optarg, &discard, &discard, &opt.max_width, &opt.max_height);
+ if (opt.max_width == 0)
+ opt.max_width = UINT_MAX;
+ if (opt.max_height == 0)
+ opt.max_height = UINT_MAX;
break;
case '>':
XParseGeometry(optarg, &discard, &discard, &opt.min_width, &opt.min_height);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/slideshow.c new/feh-2.13.1/src/slideshow.c
--- old/feh-2.12.1/src/slideshow.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/slideshow.c 2015-05-24 11:46:21.000000000 +0200
@@ -662,9 +662,9 @@
}
if (opt.verbose)
- printf("saving image to filename '%s'\n", tmpname);
+ fprintf(stderr, "saving image to filename '%s'\n", tmpname);
- ungib_imlib_save_image_with_error_return(win->im, tmpname, &err);
+ gib_imlib_save_image_with_error_return(win->im, tmpname, &err);
if (err)
feh_imlib_print_load_error(tmpname, win, err);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/thumbnail.c new/feh-2.13.1/src/thumbnail.c
--- old/feh-2.12.1/src/thumbnail.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/thumbnail.c 2015-05-24 11:46:21.000000000 +0200
@@ -357,7 +357,7 @@
winwidget_render_image(winwid, 0, 1);
if (opt.verbose)
- putc('\n', stdout);
+ putc('\n', stderr);
if (opt.title_font) {
int fw, fh, fx, fy;
@@ -382,7 +382,7 @@
snprintf(output_buf, 1024, "%s/%s", opt.output_dir, opt.output_file);
else
strncpy(output_buf, opt.output_file, 1024);
- ungib_imlib_save_image_with_error_return(td.im_main, output_buf, &err);
+ gib_imlib_save_image_with_error_return(td.im_main, output_buf, &err);
if (err) {
feh_imlib_print_load_error(output_buf, td.im_main, err);
}
@@ -391,8 +391,8 @@
tw = gib_imlib_image_get_width(td.im_main);
th = gib_imlib_image_get_height(td.im_main);
- fprintf(stdout, PACKAGE " - File saved as %s\n", output_buf);
- fprintf(stdout,
+ fprintf(stderr, PACKAGE " - File saved as %s\n", output_buf);
+ fprintf(stderr,
" - Image is %dx%d pixels and contains %d thumbnails\n",
tw, th, thumbnailcount);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/wallpaper.c new/feh-2.13.1/src/wallpaper.c
--- old/feh-2.12.1/src/wallpaper.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/wallpaper.c 2015-05-24 11:46:21.000000000 +0200
@@ -29,6 +29,7 @@
#include "options.h"
#include "wallpaper.h"
#include
+#include
Window ipc_win = None;
Window my_ipc_win = None;
Atom ipc_atom = None;
@@ -450,12 +451,17 @@
if (home) {
FILE *fp;
char *path;
+ struct stat s;
path = estrjoin("/", home, ".fehbg", NULL);
if ((fp = fopen(path, "w")) == NULL) {
weprintf("Can't write to %s", path);
} else {
- fprintf(fp, "%s\n", fehbg);
+ fprintf(fp, "#!/bin/sh\n%s\n", fehbg);
fclose(fp);
+ stat(path, &s);
+ if (chmod(path, s.st_mode | S_IXUSR | S_IXGRP) != 0) {
+ weprintf("Can't set %s as executable", path);
+ }
}
free(path);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/feh-2.12.1/src/winwidget.c new/feh-2.13.1/src/winwidget.c
--- old/feh-2.12.1/src/winwidget.c 2015-04-08 11:21:11.000000000 +0200
+++ new/feh-2.13.1/src/winwidget.c 2015-05-24 11:46:21.000000000 +0200
@@ -408,16 +408,26 @@
winwidget_setup_pixmaps(winwid);
- if (!winwid->full_screen && opt.scale_down && ((winwid->w < winwid->im_w)
- || (winwid->h < winwid->im_h)) &&
+ if (!winwid->full_screen && opt.scale_down &&
(winwid->type != WIN_TYPE_THUMBNAIL) &&
(winwid->old_zoom == 1.0)) {
- D(("scaling down image %dx%d\n", winwid->w, winwid->h));
-
- feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h);
- if (resize)
- winwidget_resize(winwid, winwid->im_w * winwid->zoom, winwid->im_h * winwid->zoom);
- D(("after scaling down image %dx%d\n", winwid->w, winwid->h));
+ int max_w = winwid->w, max_h = winwid->h;
+ if (opt.geom_flags & WidthValue) {
+ max_w = opt.geom_w;
+ }
+ if (opt.geom_flags & HeightValue) {
+ max_h = opt.geom_h;
+ }
+ D(("max: %dx%d, size: %dx%d\n", max_w, max_h, winwid->im_w, winwid->im_h));
+ if (max_w < winwid->im_w || max_h < winwid->im_h) {
+ D(("scaling down image %dx%d\n", max_w, max_h));
+
+ feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h,
+ max_w, max_h);
+ if (resize)
+ winwidget_resize(winwid, winwid->im_w * winwid->zoom, winwid->im_h * winwid->zoom);
+ D(("after scaling down image %dx%d\n", winwid->w, winwid->h));
+ }
}
if (!winwid->full_screen && ((gib_imlib_image_has_alpha(winwid->im))
@@ -433,7 +443,8 @@
feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h);
- if (resize && (winwid->full_screen || (opt.geom_flags & (WidthValue | HeightValue)))) {
+ if (resize && (winwid->full_screen
+ || (!opt.scale_down && (opt.geom_flags & (WidthValue | HeightValue))))) {
int smaller; /* Is the image smaller than screen? */
int max_w = 0, max_h = 0;
@@ -827,24 +838,24 @@
D((" x %d y %d w %d h %d\n", attributes.x, attributes.y, winwid->w,
winwid->h));
- if (opt.geom_flags & (WidthValue | HeightValue)) {
- winwid->had_resize = 1;
- return;
- }
+ if (!opt.scale_down && opt.geom_flags & (WidthValue | HeightValue)) {
+ winwid->had_resize = 1;
+ return;
+ }
if (winwid && ((winwid->w != w) || (winwid->h != h))) {
/* winwidget_clear_background(winwid); */
if (opt.screen_clip) {
- winwid->w = (w > scr_width) ? scr_width : w;
- winwid->h = (h > scr_height) ? scr_height : h;
+ winwid->w = (w > scr_width) ? scr_width : w;
+ winwid->h = (h > scr_height) ? scr_height : h;
}
if (winwid->full_screen) {
- XTranslateCoordinates(disp, winwid->win, attributes.root,
- -attributes.border_width -
- attributes.x,
- -attributes.border_width - attributes.y, &tc_x, &tc_y, &dw);
- winwid->x = tc_x;
- winwid->y = tc_y;
- XMoveResizeWindow(disp, winwid->win, tc_x, tc_y, winwid->w, winwid->h);
+ XTranslateCoordinates(disp, winwid->win, attributes.root,
+ -attributes.border_width -
+ attributes.x,
+ -attributes.border_width - attributes.y, &tc_x, &tc_y, &dw);
+ winwid->x = tc_x;
+ winwid->y = tc_y;
+ XMoveResizeWindow(disp, winwid->win, tc_x, tc_y, winwid->w, winwid->h);
} else
XResizeWindow(disp, winwid->win, winwid->w, winwid->h);