Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package chafa for openSUSE:Factory checked 
in at 2024-09-10 21:13:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/chafa (Old)
 and      /work/SRC/openSUSE:Factory/.chafa.new.17570 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "chafa"

Tue Sep 10 21:13:47 2024 rev:24 rq:1199786 version:1.14.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/chafa/chafa.changes      2024-09-09 
14:46:03.174714228 +0200
+++ /work/SRC/openSUSE:Factory/.chafa.new.17570/chafa.changes   2024-09-10 
21:15:16.303133192 +0200
@@ -1,0 +2,7 @@
+Tue Sep 10 05:20:04 UTC 2024 - Michael Vetter <mvet...@suse.com>
+
+- Update to 1.14.4:
+  * Bug fixes:
+    #216 Dither intensity does not work properly
+
+-------------------------------------------------------------------

Old:
----
  chafa-1.14.3.tar.xz

New:
----
  chafa-1.14.4.tar.xz

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

Other differences:
------------------
++++++ chafa.spec ++++++
--- /var/tmp/diff_new_pack.xIrbde/_old  2024-09-10 21:15:16.967160858 +0200
+++ /var/tmp/diff_new_pack.xIrbde/_new  2024-09-10 21:15:16.967160858 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           chafa
-Version:        1.14.3
+Version:        1.14.4
 Release:        0
 Summary:        Image-to-text converter for terminal
 License:        LGPL-3.0-or-later

++++++ chafa-1.14.3.tar.xz -> chafa-1.14.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/NEWS new/chafa-1.14.4/NEWS
--- old/chafa-1.14.3/NEWS       2024-09-09 02:59:15.000000000 +0200
+++ new/chafa-1.14.4/NEWS       2024-09-10 00:44:04.000000000 +0200
@@ -1,6 +1,16 @@
 Chafa releases
 ==============
 
+1.14.4 (2024-09-10)
+-------------------
+
+This quick follow-up release corrects the incomplete fix for the CLI argument
+fraction parsing. It now accepts C locale formatting in addition to that of the
+current locale.
+
+* Bug fixes:
+  github#216  Dither intensity does not work properly (found by @veltza).
+
 1.14.3 (2024-09-09)
 -------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/chafa/Makefile.am 
new/chafa-1.14.4/chafa/Makefile.am
--- old/chafa-1.14.3/chafa/Makefile.am  2024-09-09 02:59:15.000000000 +0200
+++ new/chafa-1.14.4/chafa/Makefile.am  2024-09-10 00:44:04.000000000 +0200
@@ -9,7 +9,7 @@
 noinst_HEADERS =
 
 libchafa_la_CFLAGS = $(LIBCHAFA_CFLAGS) $(GLIB_CFLAGS) -DCHAFA_COMPILATION
-libchafa_la_LDFLAGS = $(LIBCHAFA_LDFLAGS) -no-undefined -version-info 9:3:9
+libchafa_la_LDFLAGS = $(LIBCHAFA_LDFLAGS) -no-undefined -version-info 9:4:9
 libchafa_la_LIBADD = $(GLIB_LIBS) internal/libchafa-internal.la -lm
 
 libchafa_la_SOURCES = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/chafa/Makefile.in 
new/chafa-1.14.4/chafa/Makefile.in
--- old/chafa-1.14.3/chafa/Makefile.in  2024-09-09 03:02:14.000000000 +0200
+++ new/chafa-1.14.4/chafa/Makefile.in  2024-09-10 00:46:23.000000000 +0200
@@ -449,7 +449,7 @@
 # produce documentation.
 noinst_HEADERS = chafa-term-seq-doc.h chafa-term-seq-doc-in.h
 libchafa_la_CFLAGS = $(LIBCHAFA_CFLAGS) $(GLIB_CFLAGS) -DCHAFA_COMPILATION
-libchafa_la_LDFLAGS = $(LIBCHAFA_LDFLAGS) -no-undefined -version-info 9:3:9
+libchafa_la_LDFLAGS = $(LIBCHAFA_LDFLAGS) -no-undefined -version-info 9:4:9
 libchafa_la_LIBADD = $(GLIB_LIBS) internal/libchafa-internal.la -lm
 libchafa_la_SOURCES = \
        chafa-canvas.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/configure new/chafa-1.14.4/configure
--- old/chafa-1.14.3/configure  2024-09-09 03:02:15.000000000 +0200
+++ new/chafa-1.14.4/configure  2024-09-10 00:46:23.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for chafa 1.14.3.
+# Generated by GNU Autoconf 2.72 for chafa 1.14.4.
 #
 # Report bugs to <h...@hpjansson.org>.
 #
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='chafa'
 PACKAGE_TARNAME='chafa'
-PACKAGE_VERSION='1.14.3'
-PACKAGE_STRING='chafa 1.14.3'
+PACKAGE_VERSION='1.14.4'
+PACKAGE_STRING='chafa 1.14.4'
 PACKAGE_BUGREPORT='h...@hpjansson.org'
 PACKAGE_URL=''
 
@@ -1470,7 +1470,7 @@
   # 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 chafa 1.14.3 to adapt to many kinds of systems.
+'configure' configures chafa 1.14.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1541,7 +1541,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of chafa 1.14.3:";;
+     short | recursive ) echo "Configuration of chafa 1.14.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1698,7 +1698,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-chafa configure 1.14.3
+chafa configure 1.14.4
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1961,7 +1961,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by chafa $as_me 1.14.3, which was
+It was created by chafa $as_me 1.14.4, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3255,7 +3255,7 @@
 
 # Define the identity of the package.
  PACKAGE='chafa'
- VERSION='1.14.3'
+ VERSION='1.14.4'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3367,8 +3367,8 @@
 
 CHAFA_MAJOR_VERSION=1
 CHAFA_MINOR_VERSION=14
-CHAFA_MICRO_VERSION=3
-CHAFA_VERSION=1.14.3
+CHAFA_MICRO_VERSION=4
+CHAFA_VERSION=1.14.4
 
 
 
@@ -3382,7 +3382,7 @@
 printf "%s\n" "#define CHAFA_MINOR_VERSION 14" >>confdefs.h
 
 
-printf "%s\n" "#define CHAFA_MICRO_VERSION 3" >>confdefs.h
+printf "%s\n" "#define CHAFA_MICRO_VERSION 4" >>confdefs.h
 
 
 printf "%s\n" "#define CHAFA_VERSION \"$CHAFA_VERSION\"" >>confdefs.h
@@ -17921,7 +17921,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by chafa $as_me 1.14.3, which was
+This file was extended by chafa $as_me 1.14.4, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17989,7 +17989,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-chafa config.status 1.14.3
+chafa config.status 1.14.4
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/configure.ac 
new/chafa-1.14.4/configure.ac
--- old/chafa-1.14.3/configure.ac       2024-09-09 02:59:15.000000000 +0200
+++ new/chafa-1.14.4/configure.ac       2024-09-10 00:44:04.000000000 +0200
@@ -6,7 +6,7 @@
 
 m4_define([chafa_major_version], [1])
 m4_define([chafa_minor_version], [14])
-m4_define([chafa_micro_version], [3])
+m4_define([chafa_micro_version], [4])
 
 m4_define([chafa_version], 
[chafa_major_version.chafa_minor_version.chafa_micro_version])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/docs/chafa.1 
new/chafa-1.14.4/docs/chafa.1
--- old/chafa-1.14.3/docs/chafa.1       2024-09-09 03:02:34.000000000 +0200
+++ new/chafa-1.14.4/docs/chafa.1       2024-09-10 00:46:53.000000000 +0200
@@ -2,7 +2,7 @@
 .\"     Title: chafa
 .\"    Author: Hans Petter Jansson
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 09/09/2024
+.\"      Date: 09/10/2024
 .\"    Manual: User Commands
 .\"    Source: chafa
 .\"  Language: English
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/docs/html/index.html 
new/chafa-1.14.4/docs/html/index.html
--- old/chafa-1.14.3/docs/html/index.html       2024-09-09 03:03:45.000000000 
+0200
+++ new/chafa-1.14.4/docs/html/index.html       2024-09-10 00:47:16.000000000 
+0200
@@ -15,7 +15,7 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" 
cellspacing="0"><tr><th valign="middle"><p class="title">Chafa Reference 
Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-      For Chafa version 1.14.3
+      For Chafa version 1.14.4
 .
       The latest version of this documentation can be found online at
       <a class="ulink" href="https://hpjansson.org/chafa/ref/index.html"; 
target="_top">https://hpjansson.org/chafa/ref/</a>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chafa-1.14.3/tools/chafa/chafa.c 
new/chafa-1.14.4/tools/chafa/chafa.c
--- old/chafa-1.14.3/tools/chafa/chafa.c        2024-09-09 02:59:15.000000000 
+0200
+++ new/chafa-1.14.4/tools/chafa/chafa.c        2024-09-10 00:44:04.000000000 
+0200
@@ -813,33 +813,69 @@
     return result;
 }
 
-/* FIXME: Make it parse negative values too, and use sscanf() return values 
properly */
+static const gchar *
+utf8_skip_spaces (const gchar *str)
+{
+    gunichar c;
+
+    for (c = g_utf8_get_char (str);
+         c != 0 && g_unichar_isspace (c);
+         c = g_utf8_get_char (str))
+    {
+        str = g_utf8_next_char (str);
+    }
+
+    return str;
+}
+
 static gboolean
 parse_fraction_or_real (const gchar *str, gdouble *real_out)
 {
     gboolean success = FALSE;
-    gdouble ratio = -1.0;
-    gint width = -1, height = -1;
-    gint o = 0;
-
-    sscanf (str, "%d/%d%n", &width, &height, &o);
-    if (width < 0 || height < 0)
-        sscanf (str, "%d:%d%n", &width, &height, &o);
-    if (width < 0 || height < 0)
-        sscanf (str, "%lf%n", &ratio, &o);
+    gdouble ratio = G_MAXDOUBLE;
+    gint64 width = -1, height = -1;
+    const gchar *sep;
+    const gchar *p0 = NULL;
+    const gchar *end = NULL;
+
+    p0 = utf8_skip_spaces (str);
+
+    sep = g_utf8_strchr (p0, -1, '/');
+    if (!sep)
+        sep = g_utf8_strchr (p0, -1, ':');
 
-    if (o != 0 && str [o] != '\0')
+    if (sep)
     {
-        width = -1;
-        height = -1;
-        ratio = -1.0;
-        goto out;
-    }
+        width = g_ascii_strtoll (p0, (gchar **) &end, 10);
+        if (!end || end == p0)
+            goto out;
+        end = utf8_skip_spaces (end);
+        if (g_utf8_get_char (end) != '/' && g_utf8_get_char (end) != ':')
+            goto out;
+
+        sep = g_utf8_next_char (sep);
+        p0 = utf8_skip_spaces (sep);
+        height = g_ascii_strtoll (p0, (gchar **) &end, 10);
+        if (end == p0)
+            goto out;
+        end = utf8_skip_spaces (end);
+        if (!end || *end)
+            goto out;
 
-    if (width > 0 && height > 0)
-        ratio = width / (gdouble) height;
+        if ((gdouble) height != 0.0)
+            ratio = width / (gdouble) height;
+    }
+    else
+    {
+        ratio = g_strtod (p0, (gchar **) &end);
+        if (!end || end == p0)
+            goto out;
+        end = utf8_skip_spaces (end);
+        if (!end || *end)
+            goto out;
+    }
 
-    if (ratio < 0.0)
+    if (ratio == G_MAXDOUBLE)
         goto out;
 
     *real_out = ratio;

Reply via email to