Hello community,

here is the log from the commit of package libt3window for openSUSE:Factory 
checked in at 2019-12-21 12:32:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libt3window (Old)
 and      /work/SRC/openSUSE:Factory/.libt3window.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libt3window"

Sat Dec 21 12:32:18 2019 rev:8 rq:758357 version:0.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libt3window/libt3window.changes  2019-01-08 
12:31:34.016070289 +0100
+++ /work/SRC/openSUSE:Factory/.libt3window.new.6675/libt3window.changes        
2019-12-21 12:32:46.179402847 +0100
@@ -1,0 +2,8 @@
+Thu Dec 19 23:54:10 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Update eto release 0.4.0
+  * This release allows explicitly unsetting the binary
+    attributes when combining attributes using
+    t3_term_combine_attrs.
+
+-------------------------------------------------------------------

Old:
----
  libt3window-0.3.2.tar.bz2

New:
----
  libt3window-0.4.0.tar.bz2
  libt3window-0.4.0.tar.bz2.sig
  libt3window.keyring

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

Other differences:
------------------
++++++ libt3window.spec ++++++
--- /var/tmp/diff_new_pack.1MY0gA/_old  2019-12-21 12:32:46.615403055 +0100
+++ /var/tmp/diff_new_pack.1MY0gA/_new  2019-12-21 12:32:46.615403055 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libt3window
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,22 +18,23 @@
 
 Name:           libt3window
 %define lname  libt3window0
-Version:        0.3.2
+Version:        0.4.0
 Release:        0
 Summary:        The Tilde Toolkit's window-based terminal program library
 License:        GPL-3.0-only
 Group:          Development/Libraries/C and C++
-Url:            http://os.ghalkes.nl/t3/libt3window.html
+URL:            https://os.ghalkes.nl/t3/libt3window.html
 
-#Git-Clone:    git://github.com/gphalkes/t3widget
-Source:         http://os.ghalkes.nl/dist/%name-%version.tar.bz2
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+#Git-Clone:    https://github.com/gphalkes/t3widget
+Source:         https://os.ghalkes.nl/dist/%name-%version.tar.bz2
+Source2:        https://os.ghalkes.nl/dist/%name-%version.tar.bz2.sig
+Source3:        %name.keyring
 BuildRequires:  fdupes
 BuildRequires:  gettext-tools
 BuildRequires:  libtool
 BuildRequires:  libunistring-devel
 BuildRequires:  ncurses-devel
-BuildRequires:  pkgconfig
+BuildRequires:  pkg-config
 BuildRequires:  pkgconfig(libtranscript) >= 0.2.2
 
 %description

++++++ libt3window-0.3.2.tar.bz2 -> libt3window-0.4.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libt3window-0.3.2/Changelog 
new/libt3window-0.4.0/Changelog
--- old/libt3window-0.3.2/Changelog     2018-11-25 16:31:44.000000000 +0100
+++ new/libt3window-0.4.0/Changelog     2019-11-30 17:49:42.000000000 +0100
@@ -1,3 +1,9 @@
+Version 0.4.0:
+    New features:
+    - Add bits to the attribute bits to signify that an attribute has been
+      explicitly set. This allows overriding with an unset value in
+      t3_term_combine_attrs, which was not possible before.
+
 Version 0.3.2:
     Bug fixes:
     - Allow compilation in C++ with pre C++11 compilers.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libt3window-0.3.2/README new/libt3window-0.4.0/README
--- old/libt3window-0.3.2/README        2018-11-25 16:31:44.000000000 +0100
+++ new/libt3window-0.4.0/README        2019-11-30 17:49:42.000000000 +0100
@@ -7,11 +7,11 @@
 the following features:
 
   - (Overlapping) windows for drawing. Overlapping windows hide windows deeper
-       in the window stack.
+    in the window stack.
   - Clipping of windows to the size of the parent window.
   - UTF-8 used internally, which is converted to the terminal encoding before
     output. libt3window depends on libunistring for UTF-8 processing and
-       libtranscript for character set conversion.
+    libtranscript for character set conversion.
   - Provides easy access to the most needed terminal functionality.
   - Small code size.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libt3window-0.3.2/config.pkg 
new/libt3window-0.4.0/config.pkg
--- old/libt3window-0.3.2/config.pkg    2018-11-25 16:31:44.000000000 +0100
+++ new/libt3window-0.4.0/config.pkg    2019-11-30 17:49:42.000000000 +0100
@@ -190,7 +190,7 @@
                error "!! Can not find libunistring library. Libunistring is 
required to compile libt3window."
 
        PKGCONFIG_DESC="Terminal windowing library"
-       PKGCONFIG_VERSION="0.3.2"
+       PKGCONFIG_VERSION="0.4.0"
        PKGCONFIG_URL="http://os.ghalkes.nl/t3/libt3window.html";
        PKGCONFIG_CFLAGS="-I\${includedir}/t3/window"
        PKGCONFIG_LIBS="-lt3window"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libt3window-0.3.2/configure 
new/libt3window-0.4.0/configure
--- old/libt3window-0.3.2/configure     2018-11-25 16:31:44.000000000 +0100
+++ new/libt3window-0.4.0/configure     2019-11-30 17:49:42.000000000 +0100
@@ -172,6 +172,7 @@
 
 #@INCLUDE_START
 [ "${EXTENSIONS}" = "c libtool pkgconfig verbose_compile pkgconfig_dep gettext 
lfs" ] || error "EXTENSIONS changed after running merge_config. Run 
merge_config again."
+SWITCHES="${SWITCHES} +c99"
 SUFFIXES="${SUFFIXES} .c .o"
 [ -z "${LINKRULE}" ] && LINKRULE='$(CC) $(CFLAGS) $(LDFLAGS) -o $@ .config.o 
$(LDLIBS) $(TESTLIBS)'
 [ -z "${COMPILERULE}" ] && COMPILERULE='$(CC) $(CFLAGS) $(TESTFLAGS) -c -o $@ 
$<'
@@ -224,6 +225,27 @@
        test_link "working C compiler (${CC-${MAKE} default})" || error "No 
working C compiler found. See config.log for errors."
 }
 
+has_support_c99() {
+       if [ "no" = "${with_c99}" ] ; then
+               return
+       fi
+       clean_c
+       cat > .config.c <<EOF
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
+#error Not a C99 compiler
+#endif
+int main(int argc, char *argv[]) {
+       return 0;
+}
+EOF
+       if test_link "C99 support in ${CC} as default" ; then
+               C99=1
+       elif test_link "C99 support in ${CC} with -std=c99" CFLAGS="$CFLAGS 
-std=c99" ; then
+               CFLAGS="${CFLAGS} -std=c99"
+               C99=1
+       fi
+}
+
 sed_rules_c() {
        insert CFLAGS "${CFLAGS}"
        [ -n "${CC}" ] && insert CC "${CC}"
@@ -234,7 +256,7 @@
        check_message "Checking for $1... "
        shift
 
-       if test_make "$@" .config.o >> config.log 2>&1 ; then
+       if test_make "CFLAGS=$CFLAGS" "$@" .config.o >> config.log 2>&1 ; then
                check_message_result "yes"
                true
        else
@@ -250,7 +272,7 @@
        check_message "Checking for $1... "
        shift
 
-       if test_make "$@" .config >> config.log 2>&1 ; then
+       if test_make "CFLAGS=$CFLAGS" "$@" .config >> config.log 2>&1 ; then
                check_message_result "yes"
                true
        else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libt3window-0.3.2/src/terminal.c 
new/libt3window-0.4.0/src/terminal.c
--- old/libt3window-0.3.2/src/terminal.c        2018-11-25 16:31:44.000000000 
+0100
+++ new/libt3window-0.4.0/src/terminal.c        2019-11-30 17:49:42.000000000 
+0100
@@ -967,11 +967,20 @@
     @param b The second set of attributes to combine (no priority).
     @return The combined attributes.
 
-    This function combines @p a and @p b, with the color attributes from @p a 
overriding
-        the color attributes from @p b if both specify colors.
+    This function combines @p a and @p b, with the color attributes from @p a 
overriding the color
+    attributes from @p b if both specify colors. Note that if @p b has an 
attribute that was
+    explicitly set (indicated by the corresponding @c _SET value), and @p a 
does not have the
+    corresponding @c _SET bit, the value of @p b will be taken. The background 
is that this allows
+    distinction between "the default should be used" (without the @c _SET bit) 
and "this bit is
+    explicitly cleared" (with the @c _SET bit).
 */
 t3_attr_t t3_term_combine_attrs(t3_attr_t a, t3_attr_t b) {
-  t3_attr_t result = b | (a & ~(T3_ATTR_FG_MASK | T3_ATTR_BG_MASK));
+  /* Select those attributes of b that have not been explicitly set, and the 
colors. */
+  t3_attr_t result = b & ~((a & T3_ATTR_SET_MASK) >> (T3_ATTR_COLOR_SHIFT + 
17));
+  /* "Or in" the attributes of a, without the colors (handled below) and those 
attributes which are
+     explicitly set in b, but not in a. */
+  result |= (a & ~(T3_ATTR_FG_MASK | T3_ATTR_BG_MASK)) &
+            ~(((b & ~a) & T3_ATTR_SET_MASK) >> (T3_ATTR_COLOR_SHIFT + 17));
   if ((a & T3_ATTR_FG_MASK) != 0) {
     result = ((result & ~(T3_ATTR_FG_MASK)) | (a & T3_ATTR_FG_MASK)) & 
~_t3_ncv;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libt3window-0.3.2/src/terminal.h 
new/libt3window-0.4.0/src/terminal.h
--- old/libt3window-0.3.2/src/terminal.h        2018-11-25 16:31:44.000000000 
+0100
+++ new/libt3window-0.4.0/src/terminal.h        2019-11-30 17:49:42.000000000 
+0100
@@ -24,6 +24,7 @@
 #endif
 
 #include <limits.h>
+#include <stddef.h>
 #include <t3window/window_api.h>
 
 /** @addtogroup t3window_other */
@@ -43,7 +44,7 @@
     The value 0 is an invalid value which should be replaced by the script
     that builds the release package.
 */
-#define T3_WINDOW_VERSION 0x000302
+#define T3_WINDOW_VERSION 0x000400
 
 /* Although it doesn't make a lot of sense to put this function in either this
    file or in window.h, there is a good reason to put it in here: because
@@ -118,8 +119,8 @@
 /** Draw characters with fallback alternate character set (for line drawing 
etc).
 
     This attribute will result if the terminal can not combine color video with
-        drawing characters with the alternate character set. This attribute 
should
-        not be used directly. */
+    drawing characters with the alternate character set. This attribute should
+    not be used directly. */
 #define T3_ATTR_FALLBACK_ACS ((t3_attr_t)(1L << 7))
 
 /** Bit number of the least significant color attribute bit. */
@@ -174,6 +175,19 @@
 #define T3_ATTR_BG_CYAN T3_ATTR_BG(6)
 /** Background color white. */
 #define T3_ATTR_BG_WHITE T3_ATTR_BG(7)
+
+/** Draw characters with underlining. */
+#define T3_ATTR_UNDERLINE_SET ((t3_attr_t)(1L << (T3_ATTR_COLOR_SHIFT + 18)))
+/** Draw characters with bold face/bright appearance. */
+#define T3_ATTR_BOLD_SET ((t3_attr_t)(1L << (T3_ATTR_COLOR_SHIFT + 19)))
+/** Draw characters with reverse video. */
+#define T3_ATTR_REVERSE_SET ((t3_attr_t)(1L << (T3_ATTR_COLOR_SHIFT + 20)))
+/** Draw characters blinking. */
+#define T3_ATTR_BLINK_SET ((t3_attr_t)(1L << (T3_ATTR_COLOR_SHIFT + 21)))
+/** Draw characters with dim appearance. */
+#define T3_ATTR_DIM_SET ((t3_attr_t)(1L << (T3_ATTR_COLOR_SHIFT + 22)))
+
+#define T3_ATTR_SET_MASK (0x1F << (T3_ATTR_COLOR_SHIFT + 18))
 /*@}*/
 
 /** Alternate character set symbolic constants. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libt3window-0.3.2/src/window_paint.c 
new/libt3window-0.4.0/src/window_paint.c
--- old/libt3window-0.3.2/src/window_paint.c    2018-11-25 16:31:44.000000000 
+0100
+++ new/libt3window-0.4.0/src/window_paint.c    2019-11-30 17:49:42.000000000 
+0100
@@ -402,7 +402,7 @@
   *size = bytes_left + 1;
   src++;
   for (; bytes_left > 0; bytes_left--) {
-    retval = (retval << 6) | (src++ [0] & 0x3f);
+    retval = (retval << 6) | (src++[0] & 0x3f);
   }
   return retval;
 }
@@ -816,6 +816,10 @@
   attrs = _t3_term_sanitize_attrs(attrs);
 
   attrs = t3_term_combine_attrs(attrs, win->default_attrs);
+  /* From this point on, there is no need to keep information about explicit 
setting of attributes,
+     as there will be no more combining. Thus we scrub that information to 
keep the number of
+     mapped attributes to a minimum. */
+  attrs &= ~T3_ATTR_SET_MASK;
   attrs_idx = _t3_map_attr(attrs);
   if (attrs_idx < 0) {
     return T3_ERR_OUT_OF_MEMORY;


Reply via email to