summaryrefslogtreecommitdiffstats
path: root/source/l/id3lib/patches/id3lib.c_wrapper.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/l/id3lib/patches/id3lib.c_wrapper.patch
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.xz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/l/id3lib/patches/id3lib.c_wrapper.patch')
-rw-r--r--source/l/id3lib/patches/id3lib.c_wrapper.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/source/l/id3lib/patches/id3lib.c_wrapper.patch b/source/l/id3lib/patches/id3lib.c_wrapper.patch
new file mode 100644
index 000000000..d72e81c0e
--- /dev/null
+++ b/source/l/id3lib/patches/id3lib.c_wrapper.patch
@@ -0,0 +1,58 @@
+This patch adds C wrapper functions for field encoding.
+
+It was first introduced in version 3.8.3-8 and fixes
+http://bugs.debian.org/281292
+--- a/include/id3.h
++++ b/include/id3.h
+@@ -104,6 +104,9 @@
+ ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength);
+ ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName);
+ ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName);
++ ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc);
++ ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field);
++ ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field);
+
+ /* field-info wrappers */
+ ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid);
+--- a/src/c_wrapper.cpp
++++ b/src/c_wrapper.cpp
+@@ -681,6 +681,39 @@
+ }
+ }
+
++ ID3_C_EXPORT bool CCONV
++ ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc)
++ {
++ bool changed = false;
++ if (field)
++ {
++ ID3_CATCH(changed = reinterpret_cast<ID3_Field *>(field)->SetEncoding(enc));
++ }
++ return changed;
++ }
++
++ ID3_C_EXPORT ID3_TextEnc CCONV
++ ID3Field_GetEncoding(const ID3Field *field)
++ {
++ ID3_TextEnc enc = ID3TE_NONE;
++ if (field)
++ {
++ ID3_CATCH(enc = reinterpret_cast<const ID3_Field *>(field)->GetEncoding());
++ }
++ return enc;
++ }
++
++ ID3_C_EXPORT bool CCONV
++ ID3Field_IsEncodable(const ID3Field *field)
++ {
++ bool isEncodable = false;
++ if (field)
++ {
++ ID3_CATCH(isEncodable = reinterpret_cast<const ID3_Field *>(field)->IsEncodable());
++ }
++ return isEncodable;
++ }
++
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */