Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bctoolbox for openSUSE:Factory 
checked in at 2025-02-17 20:55:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bctoolbox (Old)
 and      /work/SRC/openSUSE:Factory/.bctoolbox.new.8181 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bctoolbox"

Mon Feb 17 20:55:44 2025 rev:52 rq:1246354 version:5.3.105

Changes:
--------
--- /work/SRC/openSUSE:Factory/bctoolbox/bctoolbox.changes      2024-11-12 
19:21:59.948921345 +0100
+++ /work/SRC/openSUSE:Factory/.bctoolbox.new.8181/bctoolbox.changes    
2025-02-17 20:55:59.848154284 +0100
@@ -1,0 +2,5 @@
+Mon Feb 17 07:27:56 UTC 2025 - Paolo Stivanin <i...@paolostivanin.com>
+
+- Update to 5.3.105 (no changelog).
+
+-------------------------------------------------------------------

Old:
----
  bctoolbox-5.3.95.tar.bz2

New:
----
  bctoolbox-5.3.105.tar.bz2

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

Other differences:
------------------
++++++ bctoolbox.spec ++++++
--- /var/tmp/diff_new_pack.EPoseY/_old  2025-02-17 20:56:02.212252834 +0100
+++ /var/tmp/diff_new_pack.EPoseY/_new  2025-02-17 20:56:02.228253502 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package bctoolbox
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %define sover   1
 Name:           bctoolbox
-Version:        5.3.95
+Version:        5.3.105
 Release:        0
 Summary:        Utility library for software from Belledonne Communications
 License:        GPL-3.0-or-later

++++++ bctoolbox-5.3.95.tar.bz2 -> bctoolbox-5.3.105.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bctoolbox-5.3.95/include/bctoolbox/charconv.h 
new/bctoolbox-5.3.105/include/bctoolbox/charconv.h
--- old/bctoolbox-5.3.95/include/bctoolbox/charconv.h   2024-09-18 
21:36:16.000000000 +0200
+++ new/bctoolbox-5.3.105/include/bctoolbox/charconv.h  2024-10-14 
15:00:22.000000000 +0200
@@ -107,7 +107,7 @@
 BCTBX_PUBLIC char *bctbx_convert_string(const char *str, const char 
*from_encoding, const char *to_encoding);
 
 /**
- * @brief Convert the char string to wide char string. Only available for 
Windows platform
+ * @brief Convert the char string to wide char string using current locale.
  *
  * @param[in] str string to convert
  *
@@ -117,6 +117,16 @@
 BCTBX_PUBLIC wchar_t *bctbx_string_to_wide_string(const char *s);
 
 /**
+ * @brief Convert the wide char string to char string using current locale.
+ *
+ * @param[in] wstr wide string to convert
+ *
+ * @return a pointer to a null-terminated string containing the converted 
string. This buffer must then be freed
+ * by caller. NULL on failure.
+ */
+BCTBX_PUBLIC char *bctbx_wide_string_to_string(const wchar_t *wstr);
+
+/**
  * @brief Return the code page from the encoding. Only available for Windows 
platform
  *
  * @param[in] encoding string to convert. If NULL or "", return the code page 
defined by bctbx_get_default_encoding().
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bctoolbox-5.3.95/src/conversion/charconv.cc 
new/bctoolbox-5.3.105/src/conversion/charconv.cc
--- old/bctoolbox-5.3.95/src/conversion/charconv.cc     2024-09-18 
21:36:16.000000000 +0200
+++ new/bctoolbox-5.3.105/src/conversion/charconv.cc    2024-10-14 
15:00:22.000000000 +0200
@@ -117,12 +117,6 @@
        return convert_from_to(str, (from_encoding ? from_encoding : "LOCALE"), 
(to_encoding ? to_encoding : "LOCALE"));
 }
 
-wchar_t *bctbx_string_to_wide_string(BCTBX_UNUSED(const char *str)) {
-       // TODO
-       bctbx_error("Conversion from string to wide string is not implemented");
-       return NULL;
-}
-
 unsigned int bctbx_get_code_page(BCTBX_UNUSED(const char *encoding)) {
        bctbx_error("Getting code page is not implemented");
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bctoolbox-5.3.95/src/conversion/charconv_android.cc 
new/bctoolbox-5.3.105/src/conversion/charconv_android.cc
--- old/bctoolbox-5.3.95/src/conversion/charconv_android.cc     2024-09-18 
21:36:16.000000000 +0200
+++ new/bctoolbox-5.3.105/src/conversion/charconv_android.cc    2024-10-14 
15:00:22.000000000 +0200
@@ -52,12 +52,6 @@
        return bctbx_strdup(str);
 }
 
-wchar_t *bctbx_string_to_wide_string(BCTBX_UNUSED(const char *str)) {
-       // TODO
-       bctbx_error("Conversion from string to wide string is not implemented");
-       return NULL;
-}
-
 unsigned int bctbx_get_code_page(BCTBX_UNUSED(const char *encoding)) {
        bctbx_error("Getting code page is not implemented");
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bctoolbox-5.3.95/src/conversion/charconv_encoding.cc 
new/bctoolbox-5.3.105/src/conversion/charconv_encoding.cc
--- old/bctoolbox-5.3.95/src/conversion/charconv_encoding.cc    2024-09-18 
21:36:16.000000000 +0200
+++ new/bctoolbox-5.3.105/src/conversion/charconv_encoding.cc   2024-10-14 
15:00:22.000000000 +0200
@@ -29,6 +29,7 @@
 #include "bctoolbox/logging.h"
 #include "bctoolbox/port.h"
 
+#include <cstdlib>
 #include <string>
 
 namespace {
@@ -51,3 +52,36 @@
        return "locale";
 #endif
 }
+
+wchar_t *bctbx_string_to_wide_string(const char *str) {
+       wchar_t *wstr;
+       size_t sz = mbstowcs(NULL, str, 0);
+       if (sz == (size_t)-1) {
+               return NULL;
+       }
+       sz += 1;
+       wstr = (wchar_t *)bctbx_malloc(sz * sizeof(wchar_t));
+       sz = mbstowcs(wstr, str, sz);
+       if (sz == (size_t)-1) {
+               bctbx_free(wstr);
+               return NULL;
+       }
+       return wstr;
+}
+
+char *bctbx_wide_string_to_string(const wchar_t *wstr) {
+       size_t sz;
+       char *str;
+       sz = wcstombs(NULL, wstr, 0);
+       if (sz == (size_t)-1) {
+               return NULL;
+       }
+       sz += 1;
+       str = (char *)bctbx_malloc(sz);
+       sz = wcstombs(str, wstr, sz);
+       if (sz == (size_t)-1) {
+               bctbx_free(str);
+               return NULL;
+       }
+       return str;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bctoolbox-5.3.95/src/conversion/charconv_windows.cc 
new/bctoolbox-5.3.105/src/conversion/charconv_windows.cc
--- old/bctoolbox-5.3.95/src/conversion/charconv_windows.cc     2024-09-18 
21:36:16.000000000 +0200
+++ new/bctoolbox-5.3.105/src/conversion/charconv_windows.cc    2024-10-14 
15:00:22.000000000 +0200
@@ -74,6 +74,7 @@
                bctbx_error("Error while converting a string from '%s' to '%s': 
unknown charset", from, to);
                return NULL;
        }
+       if (rFrom == rTo) return bctbx_strdup(str);
 
        nChar = MultiByteToWideChar(rFrom, 0, str, -1, NULL, 0);
        if (nChar == 0) return NULL;
@@ -83,6 +84,7 @@
        if (nChar == 0) {
                bctbx_free(wideStr);
                wideStr = 0;
+               return NULL;
        }
 
        nbByte = WideCharToMultiByte(rTo, 0, wideStr, -1, 0, 0, 0, 0);
@@ -128,16 +130,6 @@
        return convertFromTo(str, (from_encoding ? from_encoding : "LOCALE"), 
(to_encoding ? to_encoding : "LOCALE"));
 }
 
-wchar_t *bctbx_string_to_wide_string(const char *str) {
-       std::string s(str);
-       int len;
-       int slength = (int)s.length() + 1;
-       len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
-       wchar_t *buf = (wchar_t *)bctbx_malloc(len * sizeof(wchar_t));
-       MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
-       return buf;
-}
-
 unsigned int bctbx_get_code_page(const char *encoding) {
        unsigned int codePage = CP_ACP;
        std::string encodingStr;

++++++ set_curret_version.patch ++++++
--- /var/tmp/diff_new_pack.EPoseY/_old  2025-02-17 20:56:03.244295857 +0100
+++ /var/tmp/diff_new_pack.EPoseY/_new  2025-02-17 20:56:03.272297023 +0100
@@ -7,7 +7,7 @@
  cmake_minimum_required(VERSION 3.22)
  
 -project(BCToolbox VERSION 5.3.0)
-+project(BCToolbox VERSION 5.3.95)
++project(BCToolbox VERSION 5.3.105)
  
  set(BCTOOLBOX_VERSION "${PROJECT_VERSION}")
  set(BCTOOLBOX_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})

Reply via email to