openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
November 2015
- 1 participants
- 1310 discussions
Hello community,
here is the log from the commit of package libsodium for openSUSE:Factory checked in at 2015-11-04 15:33:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libsodium (Old)
and /work/SRC/openSUSE:Factory/.libsodium.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libsodium"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libsodium/libsodium.changes 2015-10-25 19:12:57.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libsodium.new/libsodium.changes 2015-11-04 15:33:25.000000000 +0100
@@ -1,0 +2,14 @@
+Mon Nov 2 10:53:04 UTC 2015 - idonmez(a)suse.com
+
+- Update to 1.0.6
+ * Optimized implementations of Blake2 have been added for modern
+ Intel platforms. crypto_generichash() is now faster than MD5 and
+ SHA1 implementations while being far more secure.
+ * The crypto_sign_edwards25519sha512batch_*() functions have been
+ tagged as deprecated.
+ * sodium_compare() now works as documented, and compares numbers
+ in little-endian format instead of behaving like memcmp().
+ * sodium_runtime_has_ssse3() and sodium_runtime_has_sse41() have
+ been added.
+
+-------------------------------------------------------------------
Old:
----
libsodium-1.0.4.tar.gz
New:
----
libsodium-1.0.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libsodium.spec ++++++
--- /var/tmp/diff_new_pack.6eq5C6/_old 2015-11-04 15:33:26.000000000 +0100
+++ /var/tmp/diff_new_pack.6eq5C6/_new 2015-11-04 15:33:26.000000000 +0100
@@ -16,9 +16,9 @@
#
-%define lname libsodium13
+%define lname libsodium17
Name: libsodium
-Version: 1.0.4
+Version: 1.0.6
Release: 0
Summary: Portable NaCl-based crypto library
License: ISC
++++++ libsodium-1.0.4.tar.gz -> libsodium-1.0.6.tar.gz ++++++
++++ 4383 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package qbittorrent for openSUSE:Factory checked in at 2015-11-04 15:33:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qbittorrent (Old)
and /work/SRC/openSUSE:Factory/.qbittorrent.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qbittorrent"
Changes:
--------
--- /work/SRC/openSUSE:Factory/qbittorrent/qbittorrent.changes 2015-10-14 16:44:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.qbittorrent.new/qbittorrent.changes 2015-11-04 15:33:23.000000000 +0100
@@ -1,0 +2,6 @@
+Sat Oct 31 17:12:31 UTC 2015 - sor.alexei(a)meowr.ru
+
+- Update to 3.2.5:
+ + BUGFIX: Fix difficult to reproduce crash.
+
+-------------------------------------------------------------------
Old:
----
qbittorrent-3.2.4.tar.gz
New:
----
qbittorrent-3.2.5.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qbittorrent.spec ++++++
--- /var/tmp/diff_new_pack.p83oEX/_old 2015-11-04 15:33:25.000000000 +0100
+++ /var/tmp/diff_new_pack.p83oEX/_new 2015-11-04 15:33:25.000000000 +0100
@@ -19,13 +19,13 @@
%define _name qBittorrent
Name: qbittorrent
-Version: 3.2.4
+Version: 3.2.5
Release: 0
Summary: A BitTorrent client in Qt
License: GPL-2.0+
Group: Productivity/Networking/File-Sharing
Url: http://qbittorrent.org/
-Source: https://github.com/%{name}/%{_name}/archive/release-%{version}.tar.gz#/%{na…
+Source: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.xz
Patch1: bittorrent_missing_ppc64le_in_ax_boost_base.m4.patch
BuildRequires: autoconf
BuildRequires: automake
@@ -77,39 +77,35 @@
as well as many features.
%prep
-%setup -q -n %{_name}-release-%{version}
+%setup -q
%patch1 -p1
%build
aclocal -I m4
autoconf
-
%global _configure ../configure
for ui in nox gui; do
[[ "$ui" == nox ]] && ui_opt='--disable-gui' || ui_opt=
mkdir $ui
pushd $ui
%configure \
+ $ui_opt \
%if 0%{?suse_version} >= 1320 || (0%{?suse_version} == 1315 && 0%{?is_opensuse})
--with-qt5 \
%endif
- $ui_opt \
--enable-systemd
make %{?_smp_mflags}
popd
done
%install
-for ui in nox gui; do
- pushd $ui
- make INSTALL_ROOT=%{buildroot} install
- popd
-done
+make INSTALL_ROOT=%{buildroot} install -C nox
+make INSTALL_ROOT=%{buildroot} install -C gui
mkdir -p %{buildroot}%{_sbindir}/
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-nox
-%fdupes %{buildroot}%{_datadir}
+%fdupes %{buildroot}%{_datadir}/
%post
%desktop_database_post
1
0
Hello community,
here is the log from the commit of package qscintilla for openSUSE:Factory checked in at 2015-11-04 15:33:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qscintilla (Old)
and /work/SRC/openSUSE:Factory/.qscintilla.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qscintilla"
Changes:
--------
--- /work/SRC/openSUSE:Factory/qscintilla/python-qscintilla.changes 2015-08-14 14:47:04.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.qscintilla.new/python-qscintilla.changes 2015-11-04 15:33:19.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Oct 30 18:24:38 UTC 2015 - termim(a)gmail.com
+
+- Update to 2.9.1
+ - This is primarily a bug-fix release.
+
+-------------------------------------------------------------------
python3-qscintilla.changes: same change
qscintilla.changes: same change
Old:
----
QScintilla-gpl-2.9.tar.gz
New:
----
QScintilla-gpl-2.9.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-qscintilla.spec ++++++
--- /var/tmp/diff_new_pack.4akWcU/_old 2015-11-04 15:33:20.000000000 +0100
+++ /var/tmp/diff_new_pack.4akWcU/_new 2015-11-04 15:33:20.000000000 +0100
@@ -17,7 +17,7 @@
Name: python-qscintilla
-Version: 2.9
+Version: 2.9.1
Release: 0
Summary: Python Bindings for the C++ Editor Class Library
License: GPL-3.0
python3-qscintilla.spec: same change
++++++ qscintilla.spec ++++++
--- /var/tmp/diff_new_pack.4akWcU/_old 2015-11-04 15:33:20.000000000 +0100
+++ /var/tmp/diff_new_pack.4akWcU/_new 2015-11-04 15:33:20.000000000 +0100
@@ -19,7 +19,7 @@
%define sonum 12
%define debug_package_requires libqscintilla2-%{sonum} = %{version}-%{release}
Name: qscintilla
-Version: 2.9
+Version: 2.9.1
Release: 0
Summary: C++ Editor Class Library
License: GPL-3.0
++++++ QScintilla-gpl-2.9.tar.gz -> QScintilla-gpl-2.9.1.tar.gz ++++++
++++ 13882 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python3-matplotlib for openSUSE:Factory checked in at 2015-11-04 15:33:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-matplotlib (Old)
and /work/SRC/openSUSE:Factory/.python3-matplotlib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-matplotlib"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-matplotlib/python3-matplotlib.changes 2015-06-30 10:19:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-matplotlib.new/python3-matplotlib.changes 2015-11-04 15:33:14.000000000 +0100
@@ -1,0 +2,18 @@
+Fri Oct 30 11:16:57 UTC 2015 - toddrme2178(a)gmail.com
+
+- Add new python3-Cycler dependency
+
+-------------------------------------------------------------------
+Fri Oct 30 09:07:44 UTC 2015 - toddrme2178(a)gmail.com
+
+- Update to 1.5.0
+ * Auto-redraw using the object-oriented API.
+ * Most plotting functions now support labeled data API.
+ * Color cycling has extended to all style properties.
+ * Four new perceptually uniform color maps, including the
+ soon-to-be default 'viridis'.
+ * More included style sheets.
+ * Many small plotting improvements.
+ * Proposed new framework for managing the GUI toolbar and tools.
+
+-------------------------------------------------------------------
Old:
----
matplotlib-1.4.3.tar.gz
New:
----
matplotlib-1.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-matplotlib.spec ++++++
--- /var/tmp/diff_new_pack.U2vqZE/_old 2015-11-04 15:33:17.000000000 +0100
+++ /var/tmp/diff_new_pack.U2vqZE/_new 2015-11-04 15:33:17.000000000 +0100
@@ -17,7 +17,7 @@
Name: python3-matplotlib
-Version: 1.4.3
+Version: 1.5.0
Release: 0
Summary: Plotting Library for Python
License: SUSE-Matplotlib
@@ -38,6 +38,7 @@
BuildRequires: poppler-tools
BuildRequires: python3
BuildRequires: python3-CXX-devel >= 6.2.4
+BuildRequires: python3-Cycler
BuildRequires: python3-Pillow
BuildRequires: python3-dateutil >= 1.1
BuildRequires: python3-devel
@@ -91,6 +92,7 @@
# BuildRequires: wxWidgets-devel
# %%define _use_internal_dependency_generator 0
# %%define __find_requires %%wx_requires
+Requires: python3-Cycler
Requires: python3-dateutil >= 1.1
Requires: python3-numpy >= 1.6
Requires: python3-pyparsing >= 1.5.6
++++++ matplotlib-1.4.3.tar.gz -> matplotlib-1.5.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/python3-matplotlib/matplotlib-1.4.3.tar.gz /work/SRC/openSUSE:Factory/.python3-matplotlib.new/matplotlib-1.5.0.tar.gz differ: char 5, line 1
1
0
Hello community,
here is the log from the commit of package python-matplotlib for openSUSE:Factory checked in at 2015-11-04 15:33:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-matplotlib (Old)
and /work/SRC/openSUSE:Factory/.python-matplotlib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-matplotlib"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-matplotlib/python-matplotlib.changes 2015-07-03 00:17:01.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-matplotlib.new/python-matplotlib.changes 2015-11-04 15:33:08.000000000 +0100
@@ -1,0 +2,18 @@
+Fri Oct 30 11:14:56 UTC 2015 - toddrme2178(a)gmail.com
+
+- Add new python-Cycler dependency
+
+-------------------------------------------------------------------
+Fri Oct 30 09:07:44 UTC 2015 - toddrme2178(a)gmail.com
+
+- Update to 1.5.0
+ * Auto-redraw using the object-oriented API.
+ * Most plotting functions now support labeled data API.
+ * Color cycling has extended to all style properties.
+ * Four new perceptually uniform color maps, including the
+ soon-to-be default 'viridis'.
+ * More included style sheets.
+ * Many small plotting improvements.
+ * Proposed new framework for managing the GUI toolbar and tools.
+
+-------------------------------------------------------------------
Old:
----
matplotlib-1.4.3.tar.gz
New:
----
matplotlib-1.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-matplotlib.spec ++++++
--- /var/tmp/diff_new_pack.8l28Jo/_old 2015-11-04 15:33:11.000000000 +0100
+++ /var/tmp/diff_new_pack.8l28Jo/_new 2015-11-04 15:33:11.000000000 +0100
@@ -17,7 +17,7 @@
Name: python-matplotlib
-Version: 1.4.3
+Version: 1.5.0
Release: 0
Summary: Plotting Library for Python
License: SUSE-Matplotlib
@@ -39,6 +39,7 @@
BuildRequires: pkg-config
BuildRequires: poppler-tools
BuildRequires: python-CXX-devel >= 6.2.4
+BuildRequires: python-Cycler
BuildRequires: python-Pillow
BuildRequires: python-dateutil >= 1.1
BuildRequires: python-devel
@@ -102,6 +103,7 @@
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif
+Requires: python-Cycler
Requires: python-dateutil >= 1.1
Requires: python-numpy >= 1.6
Requires: python-pyparsing >= 1.5.6
++++++ matplotlib-1.4.3.tar.gz -> matplotlib-1.5.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-matplotlib/matplotlib-1.4.3.tar.gz /work/SRC/openSUSE:Factory/.python-matplotlib.new/matplotlib-1.5.0.tar.gz differ: char 5, line 1
1
0
Hello community,
here is the log from the commit of package python-scipy for openSUSE:Factory checked in at 2015-11-04 15:32:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-scipy (Old)
and /work/SRC/openSUSE:Factory/.python-scipy.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-scipy"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-scipy/python-scipy.changes 2015-08-01 11:37:59.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-scipy.new/python-scipy.changes 2015-11-04 15:33:00.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Oct 30 09:04:05 UTC 2015 - toddrme2178(a)gmail.com
+
+- Update to 0.16.1
+ SciPy 0.16.1 is a bug-fix release with no new features compared
+ to 0.16.0.
+
+-------------------------------------------------------------------
Old:
----
scipy-0.16.0.tar.gz
New:
----
scipy-0.16.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-scipy.spec ++++++
--- /var/tmp/diff_new_pack.H1jFB8/_old 2015-11-04 15:33:02.000000000 +0100
+++ /var/tmp/diff_new_pack.H1jFB8/_new 2015-11-04 15:33:02.000000000 +0100
@@ -19,7 +19,7 @@
%define with_atlas 0
Name: python-scipy
-Version: 0.16.0
+Version: 0.16.1
Release: 0
Summary: Scientific Tools for Python
License: BSD-3-Clause
++++++ scipy-0.16.0.tar.gz -> scipy-0.16.1.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-scipy/scipy-0.16.0.tar.gz /work/SRC/openSUSE:Factory/.python-scipy.new/scipy-0.16.1.tar.gz differ: char 5, line 1
1
0
Hello community,
here is the log from the commit of package python-Markdown for openSUSE:Factory checked in at 2015-11-04 15:32:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Markdown (Old)
and /work/SRC/openSUSE:Factory/.python-Markdown.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Markdown"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Markdown/python-Markdown.changes 2015-04-23 08:04:20.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-Markdown.new/python-Markdown.changes 2015-11-04 15:32:57.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Oct 27 19:09:17 UTC 2015 - benoit.monin(a)gmx.fr
+
+- update to version 2.6.3: bugfix release
+
+-------------------------------------------------------------------
Old:
----
Markdown-2.6.2.tar.gz
New:
----
Markdown-2.6.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Markdown.spec ++++++
--- /var/tmp/diff_new_pack.PCPIye/_old 2015-11-04 15:32:58.000000000 +0100
+++ /var/tmp/diff_new_pack.PCPIye/_new 2015-11-04 15:32:58.000000000 +0100
@@ -17,7 +17,7 @@
Name: python-Markdown
-Version: 2.6.2
+Version: 2.6.3
Release: 0
Summary: Python implementation of Markdown
License: BSD-3-Clause
++++++ Markdown-2.6.2.tar.gz -> Markdown-2.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/MANIFEST new/Markdown-2.6.3/MANIFEST
--- old/Markdown-2.6.2/MANIFEST 2015-04-21 01:21:22.000000000 +0200
+++ new/Markdown-2.6.3/MANIFEST 2015-10-27 00:51:24.000000000 +0100
@@ -170,6 +170,8 @@
tests/extensions/extra/footnote_many_footnotes.txt
tests/extensions/extra/footnote_placeholder.html
tests/extensions/extra/footnote_placeholder.txt
+tests/extensions/extra/footnote_placeholder_depth.html
+tests/extensions/extra/footnote_placeholder_depth.txt
tests/extensions/extra/loose_def_list.html
tests/extensions/extra/loose_def_list.txt
tests/extensions/extra/markdown-syntax.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/PKG-INFO new/Markdown-2.6.3/PKG-INFO
--- old/Markdown-2.6.2/PKG-INFO 2015-04-21 01:21:22.000000000 +0200
+++ new/Markdown-2.6.3/PKG-INFO 2015-10-27 00:51:24.000000000 +0100
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: Markdown
-Version: 2.6.2
+Version: 2.6.3
Summary: Python implementation of Markdown.
Home-page: https://pythonhosted.org/Markdown/
Author: Waylan Limberg
Author-email: waylan.limberg [at] icloud.com
License: BSD License
-Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.6.2.tar.gz
+Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.6.3.tar.gz
Description:
This is a Python implementation of John Gruber's Markdown_.
It is almost completely compliant with the reference implementation,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/docs/change_log.txt new/Markdown-2.6.3/docs/change_log.txt
--- old/Markdown-2.6.2/docs/change_log.txt 2015-03-09 02:13:55.000000000 +0100
+++ new/Markdown-2.6.3/docs/change_log.txt 2015-10-27 00:48:49.000000000 +0100
@@ -7,6 +7,10 @@
Python-Markdown Change Log
=========================
+Oct 26, 2015: Released version 2.6.3 (a bug-fix release).
+
+Apr 20, 2015: Released version 2.6.2 (a bug-fix release).
+
Mar 8, 2015: Released version 2.6.1 (a bug-fix release). The (new)
`yaml` option has been removed from the Meta-Data Extension as it was buggy
(see [#390](https://github.com/waylan/Python-Markdown/issues/390)).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/markdown/__version__.py new/Markdown-2.6.3/markdown/__version__.py
--- old/Markdown-2.6.2/markdown/__version__.py 2015-04-21 01:12:55.000000000 +0200
+++ new/Markdown-2.6.3/markdown/__version__.py 2015-10-27 00:47:53.000000000 +0100
@@ -5,7 +5,7 @@
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
-version_info = (2, 6, 2, 'final', 0)
+version_info = (2, 6, 3, 'final', 0)
def _get_version():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/markdown/blockprocessors.py new/Markdown-2.6.3/markdown/blockprocessors.py
--- old/Markdown-2.6.2/markdown/blockprocessors.py 2015-02-19 00:57:32.000000000 +0100
+++ new/Markdown-2.6.3/markdown/blockprocessors.py 2015-08-28 05:42:04.000000000 +0200
@@ -38,7 +38,7 @@
return parser
-class BlockProcessor:
+class BlockProcessor(object):
""" Base class for block processors.
Each subclass will provide the methods below to work with the source and
@@ -141,7 +141,7 @@
LIST_TYPES = ['ul', 'ol']
def __init__(self, *args):
- BlockProcessor.__init__(self, *args)
+ super(ListIndentProcessor, self).__init__(*args)
self.INDENT_RE = re.compile(r'^(([ ]{%s})+)' % self.tab_length)
def test(self, parent, block):
@@ -300,12 +300,6 @@
""" Process ordered list blocks. """
TAG = 'ol'
- # Detect an item (``1. item``). ``group(1)`` contains contents of item.
- RE = re.compile(r'^[ ]{0,3}\d+\.[ ]+(.*)')
- # Detect items on secondary lines. they can be of either list type.
- CHILD_RE = re.compile(r'^[ ]{0,3}((\d+\.)|[*+-])[ ]+(.*)')
- # Detect indented (nested) items of either type
- INDENT_RE = re.compile(r'^[ ]{4,7}((\d+\.)|[*+-])[ ]+.*')
# The integer (python string) with which the lists starts (default=1)
# Eg: If list is intialized as)
# 3. Item
@@ -314,6 +308,17 @@
# List of allowed sibling tags.
SIBLING_TAGS = ['ol', 'ul']
+ def __init__(self, parser):
+ super(OListProcessor, self).__init__(parser)
+ # Detect an item (``1. item``). ``group(1)`` contains contents of item.
+ self.RE = re.compile(r'^[ ]{0,%d}\d+\.[ ]+(.*)' % (self.tab_length - 1))
+ # Detect items on secondary lines. they can be of either list type.
+ self.CHILD_RE = re.compile(r'^[ ]{0,%d}((\d+\.)|[*+-])[ ]+(.*)' %
+ (self.tab_length - 1))
+ # Detect indented (nested) items of either type
+ self.INDENT_RE = re.compile(r'^[ ]{%d,%d}((\d+\.)|[*+-])[ ]+.*' %
+ (self.tab_length, self.tab_length * 2 - 1))
+
def test(self, parent, block):
return bool(self.RE.match(block))
@@ -407,7 +412,11 @@
""" Process unordered list blocks. """
TAG = 'ul'
- RE = re.compile(r'^[ ]{0,3}[*+-][ ]+(.*)')
+
+ def __init__(self, parser):
+ super(UListProcessor, self).__init__(parser)
+ # Detect an item (``1. item``). ``group(1)`` contains contents of item.
+ self.RE = re.compile(r'^[ ]{0,%d}[*+-][ ]+(.*)' % (self.tab_length - 1))
class HashHeaderProcessor(BlockProcessor):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/markdown/extensions/footnotes.py new/Markdown-2.6.3/markdown/extensions/footnotes.py
--- old/Markdown-2.6.2/markdown/extensions/footnotes.py 2015-01-31 18:06:19.000000000 +0100
+++ new/Markdown-2.6.3/markdown/extensions/footnotes.py 2015-10-27 00:36:43.000000000 +0100
@@ -96,7 +96,9 @@
if child.tail:
if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
return child, element, False
- finder(child)
+ child_res = finder(child)
+ if child_res is not None:
+ return child_res
return None
res = finder(root)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/markdown/extensions/sane_lists.py new/Markdown-2.6.3/markdown/extensions/sane_lists.py
--- old/Markdown-2.6.2/markdown/extensions/sane_lists.py 2014-11-21 01:12:27.000000000 +0100
+++ new/Markdown-2.6.3/markdown/extensions/sane_lists.py 2015-08-28 05:42:04.000000000 +0200
@@ -24,15 +24,23 @@
class SaneOListProcessor(OListProcessor):
- CHILD_RE = re.compile(r'^[ ]{0,3}((\d+\.))[ ]+(.*)')
SIBLING_TAGS = ['ol']
+ def __init__(self, parser):
+ super(SaneOListProcessor, self).__init__(parser)
+ self.CHILD_RE = re.compile(r'^[ ]{0,%d}((\d+\.))[ ]+(.*)' %
+ (self.tab_length - 1))
+
class SaneUListProcessor(UListProcessor):
- CHILD_RE = re.compile(r'^[ ]{0,3}(([*+-]))[ ]+(.*)')
SIBLING_TAGS = ['ul']
+ def __init__(self, parser):
+ super(SaneUListProcessor, self).__init__(parser)
+ self.CHILD_RE = re.compile(r'^[ ]{0,%d}(([*+-]))[ ]+(.*)' %
+ (self.tab_length - 1))
+
class SaneListExtension(Extension):
""" Add sane lists to Markdown. """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/markdown/extensions/smarty.py new/Markdown-2.6.3/markdown/extensions/smarty.py
--- old/Markdown-2.6.2/markdown/extensions/smarty.py 2015-04-21 01:10:46.000000000 +0200
+++ new/Markdown-2.6.3/markdown/extensions/smarty.py 2015-08-28 05:42:04.000000000 +0200
@@ -83,7 +83,7 @@
from __future__ import unicode_literals
from . import Extension
-from ..inlinepatterns import HtmlPattern
+from ..inlinepatterns import HtmlPattern, HTML_RE
from ..odict import OrderedDict
from ..treeprocessors import InlineProcessor
@@ -147,6 +147,8 @@
remainingSingleQuotesRegex = "'"
remainingDoubleQuotesRegex = '"'
+HTML_STRICT_RE = HTML_RE + r'(?!\>)'
+
class SubstituteTextPattern(HtmlPattern):
def __init__(self, pattern, replace, markdown_instance):
@@ -251,6 +253,9 @@
self.educateQuotes(md)
if configs['smart_angled_quotes']:
self.educateAngledQuotes(md)
+ # Override HTML_RE from inlinepatterns.py so that it does not
+ # process tags with duplicate closing quotes.
+ md.inlinePatterns["html"] = HtmlPattern(HTML_STRICT_RE, md)
if configs['smart_dashes']:
self.educateDashes(md)
inlineProcessor = InlineProcessor(md)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/markdown/extensions/tables.py new/Markdown-2.6.3/markdown/extensions/tables.py
--- old/Markdown-2.6.2/markdown/extensions/tables.py 2015-04-21 01:10:46.000000000 +0200
+++ new/Markdown-2.6.3/markdown/extensions/tables.py 2015-10-27 00:45:57.000000000 +0100
@@ -19,6 +19,7 @@
from __future__ import unicode_literals
from . import Extension
from ..blockprocessors import BlockProcessor
+from ..inlinepatterns import BacktickPattern, BACKTICK_RE
from ..util import etree
@@ -72,7 +73,11 @@
for i, a in enumerate(align):
c = etree.SubElement(tr, tag)
try:
- c.text = cells[i].strip()
+ if isinstance(cells[i], str) or isinstance(cells[i], unicode):
+ c.text = cells[i].strip()
+ else:
+ # we've already inserted a code element
+ c.append(cells[i])
except IndexError: # pragma: no cover
c.text = ""
if a:
@@ -85,7 +90,49 @@
row = row[1:]
if row.endswith('|'):
row = row[:-1]
- return row.split('|')
+ return self._split(row, '|')
+
+ def _split(self, row, marker):
+ """ split a row of text with some code into a list of cells. """
+ if self._row_has_unpaired_backticks(row):
+ # fallback on old behaviour
+ return row.split(marker)
+ # modify the backtick pattern to only match at the beginning of the search string
+ backtick_pattern = BacktickPattern('^' + BACKTICK_RE)
+ elements = []
+ current = ''
+ i = 0
+ while i < len(row):
+ letter = row[i]
+ if letter == marker:
+ if current != '' or len(elements) == 0:
+ # Don't append empty string unless it is the first element
+ # The border is already removed when we get the row, then the line is strip()'d
+ # If the first element is a marker, then we have an empty first cell
+ elements.append(current)
+ current = ''
+ else:
+ match = backtick_pattern.getCompiledRegExp().match(row[i:])
+ if not match:
+ current += letter
+ else:
+ groups = match.groups()
+ delim = groups[1] # the code block delimeter (ie 1 or more backticks)
+ row_contents = groups[2] # the text contained inside the code block
+ i += match.start(4) # jump pointer to the beginning of the rest of the text (group #4)
+ element = delim + row_contents + delim # reinstert backticks
+ current += element
+ i += 1
+ elements.append(current)
+ return elements
+
+ def _row_has_unpaired_backticks(self, row):
+ count_total_backtick = row.count('`')
+ count_escaped_backtick = row.count('\`')
+ count_backtick = count_total_backtick - count_escaped_backtick
+ # odd number of backticks,
+ # we won't be able to build correct code blocks
+ return count_backtick & 1
class TableExtension(Extension):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/markdown/preprocessors.py new/Markdown-2.6.3/markdown/preprocessors.py
--- old/Markdown-2.6.2/markdown/preprocessors.py 2015-02-19 01:00:15.000000000 +0100
+++ new/Markdown-2.6.3/markdown/preprocessors.py 2015-10-27 00:36:43.000000000 +0100
@@ -178,10 +178,11 @@
else: # raw html
if len(items) - right_listindex <= 1: # last element
right_listindex -= 1
- offset = 1 if i == right_listindex else 0
+ if right_listindex <= i:
+ right_listindex = i + 1
placeholder = self.markdown.htmlStash.store('\n\n'.join(
- items[i:right_listindex + offset]))
- del items[i:right_listindex + offset]
+ items[i:right_listindex]))
+ del items[i:right_listindex]
items.insert(i, placeholder)
return items
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/basic/inline-html-simple.html new/Markdown-2.6.3/tests/basic/inline-html-simple.html
--- old/Markdown-2.6.2/tests/basic/inline-html-simple.html 2014-11-03 05:43:58.000000000 +0100
+++ new/Markdown-2.6.3/tests/basic/inline-html-simple.html 2015-08-28 05:42:04.000000000 +0200
@@ -57,4 +57,5 @@
<hr class="foo" id="bar" >
-<p><some <a href="http://example.com">weird</a> stuff></p>
\ No newline at end of file
+<p><some <a href="http://example.com">weird</a> stuff></p>
+<p><some>> <<unbalanced>> <<brackets></p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/basic/inline-html-simple.txt new/Markdown-2.6.3/tests/basic/inline-html-simple.txt
--- old/Markdown-2.6.2/tests/basic/inline-html-simple.txt 2014-11-03 05:43:58.000000000 +0100
+++ new/Markdown-2.6.3/tests/basic/inline-html-simple.txt 2015-08-28 05:42:04.000000000 +0200
@@ -68,3 +68,5 @@
<hr class="foo" id="bar" >
<some [weird](http://example.com) stuff>
+
+<some>> <<unbalanced>> <<brackets>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/extra/footnote_placeholder_depth.html new/Markdown-2.6.3/tests/extensions/extra/footnote_placeholder_depth.html
--- old/Markdown-2.6.2/tests/extensions/extra/footnote_placeholder_depth.html 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.6.3/tests/extensions/extra/footnote_placeholder_depth.html 2015-10-27 00:36:43.000000000 +0100
@@ -0,0 +1,13 @@
+<blockquote>
+<blockquote>
+<div class="footnote">
+<hr />
+<ol>
+<li id="fn:1">
+<p>A Footnote. <a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">↩</a></p>
+</li>
+</ol>
+</div>
+<p>Some text with a footnote<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup>.</p>
+</blockquote>
+</blockquote>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/extra/footnote_placeholder_depth.txt new/Markdown-2.6.3/tests/extensions/extra/footnote_placeholder_depth.txt
--- old/Markdown-2.6.2/tests/extensions/extra/footnote_placeholder_depth.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.6.3/tests/extensions/extra/footnote_placeholder_depth.txt 2015-10-27 00:36:43.000000000 +0100
@@ -0,0 +1,5 @@
+>> ///Footnotes Go Here///
+>>
+>> Some text with a footnote[^1].
+
+[^1]: A Footnote.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/extra/raw-html.html new/Markdown-2.6.3/tests/extensions/extra/raw-html.html
--- old/Markdown-2.6.2/tests/extensions/extra/raw-html.html 2014-11-20 03:01:25.000000000 +0100
+++ new/Markdown-2.6.3/tests/extensions/extra/raw-html.html 2015-10-27 00:36:43.000000000 +0100
@@ -41,4 +41,9 @@
<p>Markdown is <em>still</em> active here.</p>
</div>
-<p>Markdown is <em>active again</em> here.</p>
\ No newline at end of file
+<p>Markdown is <em>active again</em> here.</p>
+<div>
+<p>foo bar</p>
+<p><em>bar</em>
+</p>
+</div>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/extra/raw-html.txt new/Markdown-2.6.3/tests/extensions/extra/raw-html.txt
--- old/Markdown-2.6.2/tests/extensions/extra/raw-html.txt 2014-11-20 03:01:25.000000000 +0100
+++ new/Markdown-2.6.3/tests/extensions/extra/raw-html.txt 2015-10-27 00:36:43.000000000 +0100
@@ -65,3 +65,9 @@
</div>
Markdown is *active again* here.
+
+<div markdown=1>
+foo bar
+
+<em>bar</em>
+</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/extra/tables.html new/Markdown-2.6.3/tests/extensions/extra/tables.html
--- old/Markdown-2.6.2/tests/extensions/extra/tables.html 2015-04-21 01:10:46.000000000 +0200
+++ new/Markdown-2.6.3/tests/extensions/extra/tables.html 2015-10-27 00:45:57.000000000 +0100
@@ -168,4 +168,71 @@
</tr>
</thead>
<tbody></tbody>
+</table>
+<p>More inline code block tests</p>
+<table>
+<thead>
+<tr>
+<th>Column 1</th>
+<th>Column 2</th>
+<th>Column 3</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>word 1</td>
+<td>word 2</td>
+<td>word 3</td>
+</tr>
+<tr>
+<td>word 1</td>
+<td><code>word 2</code></td>
+<td>word 3</td>
+</tr>
+<tr>
+<td>word 1</td>
+<td>`word 2</td>
+<td>word 3</td>
+</tr>
+<tr>
+<td>word 1</td>
+<td>`word 2</td>
+<td>word 3</td>
+</tr>
+<tr>
+<td>word 1</td>
+<td><code>word |2</code></td>
+<td>word 3</td>
+</tr>
+<tr>
+<td>words</td>
+<td><code>some | code</code></td>
+<td>more words</td>
+</tr>
+<tr>
+<td>words</td>
+<td><code>some | code</code></td>
+<td>more words</td>
+</tr>
+<tr>
+<td>words</td>
+<td><code>some | code</code></td>
+<td>more words</td>
+</tr>
+<tr>
+<td>words</td>
+<td><code>some ` | ` code</code></td>
+<td>more words</td>
+</tr>
+<tr>
+<td>words</td>
+<td><code>some ` | ` code</code></td>
+<td>more words</td>
+</tr>
+<tr>
+<td>words</td>
+<td><code>some ` | ` code</code></td>
+<td>more words</td>
+</tr>
+</tbody>
</table>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/extra/tables.txt new/Markdown-2.6.3/tests/extensions/extra/tables.txt
--- old/Markdown-2.6.2/tests/extensions/extra/tables.txt 2015-04-21 01:10:46.000000000 +0200
+++ new/Markdown-2.6.3/tests/extensions/extra/tables.txt 2015-10-27 00:45:57.000000000 +0100
@@ -52,4 +52,20 @@
Content Cell | Content Cell
| First Header | Second Header |
-| ------------ | ------------- |
\ No newline at end of file
+| ------------ | ------------- |
+
+More inline code block tests
+
+Column 1 | Column 2 | Column 3
+---------|----------|---------
+word 1 | word 2 | word 3
+word 1 | `word 2` | word 3
+word 1 | \`word 2 | word 3
+word 1 | `word 2 | word 3
+word 1 | `word |2` | word 3
+words |`` some | code `` | more words
+words |``` some | code ``` | more words
+words |```` some | code ```` | more words
+words |`` some ` | ` code `` | more words
+words |``` some ` | ` code ``` | more words
+words |```` some ` | ` code ```` | more words
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/smarty.html new/Markdown-2.6.3/tests/extensions/smarty.html
--- old/Markdown-2.6.2/tests/extensions/smarty.html 2015-04-21 01:10:46.000000000 +0200
+++ new/Markdown-2.6.3/tests/extensions/smarty.html 2015-08-28 05:42:04.000000000 +0200
@@ -16,6 +16,7 @@
“<a href="http://example.com">Link</a>” — she said.</p>
<p>“Ellipsis within quotes…”</p>
<p>Кавычки-«ёлочки»<br />
+«hello»<br />
Anführungszeichen-»Chevrons«</p>
<hr />
<p>Escaped -- ndash<br />
@@ -23,7 +24,7 @@
Escaped ellipsis...</p>
<p>‘Escaped "quotes" in real ones’<br />
'“Real” quotes in escaped ones'</p>
-<p>Skip <code>"code" -- --- 'spans' ...</code>.</p>
+<p>Skip <code><<all>> "code" -- --- 'spans' ...</code>.</p>
<pre><code>Also skip "code" 'blocks'
foo -- bar --- baz ...
</code></pre>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/smarty.txt new/Markdown-2.6.3/tests/extensions/smarty.txt
--- old/Markdown-2.6.2/tests/extensions/smarty.txt 2015-04-21 01:10:46.000000000 +0200
+++ new/Markdown-2.6.3/tests/extensions/smarty.txt 2015-08-28 05:42:04.000000000 +0200
@@ -19,6 +19,7 @@
"Ellipsis within quotes..."
Кавычки-<<ёлочки>>
+<<hello>>
Anführungszeichen->>Chevrons<<
--- -- ---
@@ -30,7 +31,7 @@
'Escaped \"quotes\" in real ones'
\'"Real" quotes in escaped ones\'
-Skip `"code" -- --- 'spans' ...`.
+Skip `<<all>> "code" -- --- 'spans' ...`.
Also skip "code" 'blocks'
foo -- bar --- baz ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.6.2/tests/extensions/test.cfg new/Markdown-2.6.3/tests/extensions/test.cfg
--- old/Markdown-2.6.2/tests/extensions/test.cfg 2014-12-30 19:41:55.000000000 +0100
+++ new/Markdown-2.6.3/tests/extensions/test.cfg 2015-10-27 00:45:57.000000000 +0100
@@ -70,4 +70,4 @@
- markdown.extensions.smarty
extension_configs:
markdown.extensions.smarty:
- smart_angled_quotes: True
+ smart_angled_quotes: True
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package python-xlrd for openSUSE:Factory checked in at 2015-11-04 15:32:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xlrd (Old)
and /work/SRC/openSUSE:Factory/.python-xlrd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xlrd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xlrd/python-xlrd.changes 2013-05-02 11:45:27.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-xlrd.new/python-xlrd.changes 2015-11-04 15:32:54.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Oct 29 17:54:20 UTC 2015 - scorot(a)free.fr
+
+- Update to 0.9.4
+ * No changelog available
+
+-------------------------------------------------------------------
Old:
----
xlrd-0.9.2.tar.gz
New:
----
xlrd-0.9.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-xlrd.spec ++++++
--- /var/tmp/diff_new_pack.4sdQlS/_old 2015-11-04 15:32:55.000000000 +0100
+++ /var/tmp/diff_new_pack.4sdQlS/_new 2015-11-04 15:32:55.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-xlrd
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python-xlrd
-Version: 0.9.2
+Version: 0.9.4
Release: 0
Url: http://www.lexicon.net/sjmachin/xlrd.htm
Summary: Library for Developers to Extract Data From Microsoft Excel Spreadsheet Files
++++++ xlrd-0.9.2.tar.gz -> xlrd-0.9.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/PKG-INFO new/xlrd-0.9.4/PKG-INFO
--- old/xlrd-0.9.2/PKG-INFO 2013-04-09 21:36:10.000000000 +0200
+++ new/xlrd-0.9.4/PKG-INFO 2015-07-15 08:21:41.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: xlrd
-Version: 0.9.2
+Version: 0.9.4
Summary: Library for developers to extract data from Microsoft Excel (tm) spreadsheet files
Home-page: http://www.python-excel.org/
Author: John Machin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/scripts/runxlrd.py new/xlrd-0.9.4/scripts/runxlrd.py
--- old/xlrd-0.9.2/scripts/runxlrd.py 2013-04-05 00:36:57.000000000 +0200
+++ new/xlrd-0.9.4/scripts/runxlrd.py 2015-07-15 08:12:19.000000000 +0200
@@ -89,9 +89,8 @@
if cty == xlrd.XL_CELL_DATE:
try:
showval = xlrd.xldate_as_tuple(cval, dmode)
- except xlrd.XLDateError:
- e1, e2 = sys.exc_info()[:2]
- showval = "%s:%s" % (e1.__name__, e2)
+ except xlrd.XLDateError as e:
+ showval = "%s:%s" % (type(e).__name__, e)
cty = xlrd.XL_CELL_ERROR
elif cty == xlrd.XL_CELL_ERROR:
showval = xlrd.error_text_from_code.get(cval, '<Unknown error code 0x%02x>' % cval)
@@ -335,17 +334,15 @@
t1 = time.time()
if not options.suppress_timing:
print("Open took %.2f seconds" % (t1-t0,))
- except xlrd.XLRDError:
- e0, e1 = sys.exc_info()[:2]
- print("*** Open failed: %s: %s" % (e0.__name__, e1))
+ except xlrd.XLRDError as e:
+ print("*** Open failed: %s: %s" % (type(e).__name__, e))
continue
except KeyboardInterrupt:
print("*** KeyboardInterrupt ***")
traceback.print_exc(file=sys.stdout)
sys.exit(1)
- except:
- e0, e1 = sys.exc_info()[:2]
- print("*** Open failed: %s: %s" % (e0.__name__, e1))
+ except BaseException as e:
+ print("*** Open failed: %s: %s" % (type(e).__name__, e))
traceback.print_exc(file=sys.stdout)
continue
t0 = time.time()
Files old/xlrd-0.9.2/tests/apachepoi_49609.xlsx and new/xlrd-0.9.4/tests/apachepoi_49609.xlsx differ
Files old/xlrd-0.9.2/tests/merged_cells.xlsx and new/xlrd-0.9.4/tests/merged_cells.xlsx differ
Files old/xlrd-0.9.2/tests/reveng1.xlsx and new/xlrd-0.9.4/tests/reveng1.xlsx differ
Files old/xlrd-0.9.2/tests/self_evaluation_report_2014-05-19.xlsx and new/xlrd-0.9.4/tests/self_evaluation_report_2014-05-19.xlsx differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/tests/test_cell.py new/xlrd-0.9.4/tests/test_cell.py
--- old/xlrd-0.9.2/tests/test_cell.py 2013-04-05 00:36:57.000000000 +0200
+++ new/xlrd-0.9.4/tests/test_cell.py 2014-01-25 10:49:12.000000000 +0100
@@ -39,3 +39,26 @@
row_lo, row_hi, col_lo, col_hi = sheet3.merged_cells[0]
self.assertEqual(sheet3.cell(row_lo, col_lo).value, 'MERGED')
self.assertEqual((row_lo, row_hi, col_lo, col_hi), (3, 7, 2, 5))
+
+ def test_merged_cells_xlsx(self):
+ book = xlrd.open_workbook(from_this_dir('merged_cells.xlsx'))
+
+ sheet1 = book.sheet_by_name('Sheet1')
+ expected = []
+ got = sheet1.merged_cells
+ self.assertEqual(expected, got)
+
+ sheet2 = book.sheet_by_name('Sheet2')
+ expected = [(0, 1, 0, 2)]
+ got = sheet2.merged_cells
+ self.assertEqual(expected, got)
+
+ sheet3 = book.sheet_by_name('Sheet3')
+ expected = [(0, 1, 0, 2), (0, 1, 2, 4), (1, 4, 0, 2), (1, 9, 2, 4)]
+ got = sheet3.merged_cells
+ self.assertEqual(expected, got)
+
+ sheet4 = book.sheet_by_name('Sheet4')
+ expected = [(0, 1, 0, 2), (2, 20, 0, 1), (1, 6, 2, 5)]
+ got = sheet4.merged_cells
+ self.assertEqual(expected, got)
Files old/xlrd-0.9.2/tests/test_comments_excel.xlsx and new/xlrd-0.9.4/tests/test_comments_excel.xlsx differ
Files old/xlrd-0.9.2/tests/test_comments_gdocs.xlsx and new/xlrd-0.9.4/tests/test_comments_gdocs.xlsx differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/tests/test_sheet.py new/xlrd-0.9.4/tests/test_sheet.py
--- old/xlrd-0.9.2/tests/test_sheet.py 2013-04-05 00:36:57.000000000 +0200
+++ new/xlrd-0.9.4/tests/test_sheet.py 2015-07-15 08:11:03.000000000 +0200
@@ -2,8 +2,9 @@
from unittest import TestCase
-import sys
import os
+import sys
+import types
import unittest
import xlrd
@@ -92,6 +93,12 @@
row = sheet.row(0)
self.assertEqual(len(row), NCOLS)
+ def test_get_rows(self):
+ sheet = self.book.sheet_by_index(SHEETINDEX)
+ rows = sheet.get_rows()
+ self.assertTrue(isinstance(rows, types.GeneratorType), True)
+ self.assertEqual(len(list(rows)), sheet.nrows)
+
def test_col_slice(self):
sheet = self.book.sheet_by_index(SHEETINDEX)
self.check_col_slice(sheet.col_slice)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/tests/test_xldate_to_datetime.py new/xlrd-0.9.4/tests/test_xldate_to_datetime.py
--- old/xlrd-0.9.2/tests/test_xldate_to_datetime.py 1970-01-01 01:00:00.000000000 +0100
+++ new/xlrd-0.9.4/tests/test_xldate_to_datetime.py 2014-04-07 16:40:04.000000000 +0200
@@ -0,0 +1,164 @@
+###############################################################################
+#
+# Tests for the xlrd xldate.xldate_as_datetime() function.
+#
+
+import unittest
+from datetime import datetime
+from xlrd import xldate
+
+not_1904 = False
+is_1904 = True
+
+
+class TestConvertToDateTime(unittest.TestCase):
+ """
+ Testcases to test the _xldate_to_datetime() function against dates
+ extracted from Excel files, with 1900/1904 epochs.
+
+ """
+
+ def test_dates_and_times_1900_epoch(self):
+ """
+ Test the _xldate_to_datetime() function for dates and times in
+ the Excel standard 1900 epoch.
+
+ """
+ # Test Excel dates strings and corresponding serial date numbers taken
+ # from an Excel file.
+ excel_dates = [
+ # Excel's 0.0 date in the 1900 epoch is 1 day before 1900.
+ ('1899-12-31T00:00:00.000', 0),
+
+ # Date/time before the false Excel 1900 leapday.
+ ('1900-02-28T02:11:11.986', 59.09111094906),
+
+ # Date/time after the false Excel 1900 leapday.
+ ('1900-03-01T05:46:44.068', 61.24078782403),
+
+ # Random date/times in Excel's 0-9999.9999+ range.
+ ('1982-08-25T00:15:20.213', 30188.010650613425),
+ ('2065-04-19T00:16:48.290', 60376.011670023145),
+ ('3222-06-11T03:08:08.251', 483014.13065105322),
+ ('4379-08-03T06:14:48.580', 905652.26028449077),
+ ('5949-12-30T12:59:54.263', 1479232.5416002662),
+
+ # End of Excel's date range.
+ ('9999-12-31T23:59:59.000', 2958465.999988426),
+ ]
+
+ # Convert the Excel date strings to datetime objects and compare
+ # against the dateitme return value of xldate.xldate_as_datetime().
+ for excel_date in excel_dates:
+ exp = datetime.strptime(excel_date[0], "%Y-%m-%dT%H:%M:%S.%f")
+ got = xldate.xldate_as_datetime(excel_date[1], not_1904)
+
+ self.assertEqual(got, exp)
+
+ def test_dates_only_1900_epoch(self):
+ """
+ Test the _xldate_to_datetime() function for dates in the Excel
+ standard 1900 epoch.
+
+ """
+ # Test Excel dates strings and corresponding serial date numbers taken
+ # from an Excel file.
+ excel_dates = [
+ # Excel's day 0 in the 1900 epoch is 1 day before 1900.
+ ('1899-12-31', 0),
+
+ # Excel's day 1 in the 1900 epoch.
+ ('1900-01-01', 1),
+
+ # Date/time before the false Excel 1900 leapday.
+ ('1900-02-28', 59),
+
+ # Date/time after the false Excel 1900 leapday.
+ ('1900-03-01', 61),
+
+ # Random date/times in Excel's 0-9999.9999+ range.
+ ('1902-09-27', 1001),
+ ('1999-12-31', 36525),
+ ('2000-01-01', 36526),
+ ('4000-12-31', 767376),
+ ('4321-01-01', 884254),
+ ('9999-01-01', 2958101),
+
+ # End of Excel's date range.
+ ('9999-12-31', 2958465),
+ ]
+
+ # Convert the Excel date strings to datetime objects and compare
+ # against the dateitme return value of xldate.xldate_as_datetime().
+ for excel_date in excel_dates:
+ exp = datetime.strptime(excel_date[0], "%Y-%m-%d")
+ got = xldate.xldate_as_datetime(excel_date[1], not_1904)
+
+ self.assertEqual(got, exp)
+
+ def test_dates_only_1904_epoch(self):
+ """
+ Test the _xldate_to_datetime() function for dates in the Excel
+ Mac/1904 epoch.
+
+ """
+ # Test Excel dates strings and corresponding serial date numbers taken
+ # from an Excel file.
+ excel_dates = [
+ # Excel's day 0 in the 1904 epoch.
+ ('1904-01-01', 0),
+
+ # Random date/times in Excel's 0-9999.9999+ range.
+ ('1904-01-31', 30),
+ ('1904-08-31', 243),
+ ('1999-02-28', 34757),
+ ('1999-12-31', 35063),
+ ('2000-01-01', 35064),
+ ('2400-12-31', 181526),
+ ('4000-01-01', 765549),
+ ('9999-01-01', 2956639),
+
+ # End of Excel's date range.
+ ('9999-12-31', 2957003),
+ ]
+
+ # Convert the Excel date strings to datetime objects and compare
+ # against the dateitme return value of xldate.xldate_as_datetime().
+ for excel_date in excel_dates:
+ exp = datetime.strptime(excel_date[0], "%Y-%m-%d")
+ got = xldate.xldate_as_datetime(excel_date[1], is_1904)
+
+ self.assertEqual(got, exp)
+
+ def test_times_only(self):
+ """
+ Test the _xldate_to_datetime() function for times only, i.e, the
+ fractional part of the Excel date when the serial date is 0.
+
+ """
+ # Test Excel dates strings and corresponding serial date numbers taken
+ # from an Excel file. The 1899-12-31 date is Excel's day 0.
+ excel_dates = [
+ # Random times in Excel's 0-0.9999+ range for 1 day.
+ ('1899-12-31T00:00:00.000', 0),
+ ('1899-12-31T00:15:20.213', 1.0650613425925924E-2),
+ ('1899-12-31T02:24:37.095', 0.10042934027777778),
+ ('1899-12-31T04:56:35.792', 0.2059698148148148),
+ ('1899-12-31T07:31:20.407', 0.31343063657407405),
+ ('1899-12-31T09:37:23.945', 0.40097158564814817),
+ ('1899-12-31T12:09:48.602', 0.50681252314814818),
+ ('1899-12-31T14:37:57.451', 0.60969271990740748),
+ ('1899-12-31T17:04:02.415', 0.71113906250000003),
+ ('1899-12-31T19:14:24.673', 0.80167445601851861),
+ ('1899-12-31T21:39:05.944', 0.90215212962962965),
+ ('1899-12-31T23:17:12.632', 0.97028509259259266),
+ ('1899-12-31T23:59:59.999', 0.99999998842592586),
+ ]
+
+ # Convert the Excel date strings to datetime objects and compare
+ # against the dateitme return value of xldate.xldate_as_datetime().
+ for excel_date in excel_dates:
+ exp = datetime.strptime(excel_date[0], "%Y-%m-%dT%H:%M:%S.%f")
+ got = xldate.xldate_as_datetime(excel_date[1], not_1904)
+
+ self.assertEqual(got, exp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/tests/test_xlsx_comments.py new/xlrd-0.9.4/tests/test_xlsx_comments.py
--- old/xlrd-0.9.2/tests/test_xlsx_comments.py 1970-01-01 01:00:00.000000000 +0100
+++ new/xlrd-0.9.4/tests/test_xlsx_comments.py 2014-01-25 10:49:12.000000000 +0100
@@ -0,0 +1,46 @@
+from unittest import TestCase
+
+import os
+
+from xlrd import open_workbook
+
+from .base import from_this_dir
+
+class TestXlsxComments(TestCase):
+
+ def test_excel_comments(self):
+ book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
+ sheet = book.sheet_by_index(0)
+
+ note_map = sheet.cell_note_map
+ self.assertEqual(len(note_map), 1)
+ self.assertEqual(note_map[(0, 1)].text, 'hello')
+
+ def test_excel_comments_multiline(self):
+ book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
+ sheet = book.sheet_by_index(1)
+
+ note_map = sheet.cell_note_map
+ self.assertEqual(note_map[(1, 2)].text, '1st line\n2nd line')
+
+ def test_excel_comments_two_t_elements(self):
+ book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
+ sheet = book.sheet_by_index(2)
+
+ note_map = sheet.cell_note_map
+ self.assertEqual(note_map[(0, 0)].text, 'Author:\nTwo t elements')
+
+ def test_excel_comments_no_t_elements(self):
+ book = open_workbook(from_this_dir('test_comments_excel.xlsx'))
+ sheet = book.sheet_by_index(3)
+
+ note_map = sheet.cell_note_map
+ self.assertEqual(note_map[(0,0)].text, '')
+
+ def test_gdocs_comments(self):
+ book = open_workbook(from_this_dir('test_comments_gdocs.xlsx'))
+ sheet = book.sheet_by_index(0)
+
+ note_map = sheet.cell_note_map
+ self.assertEqual(len(note_map), 1)
+ self.assertEqual(note_map[(0, 1)].text, 'Just a test')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/tests/test_xlsx_parse.py new/xlrd-0.9.4/tests/test_xlsx_parse.py
--- old/xlrd-0.9.2/tests/test_xlsx_parse.py 1970-01-01 01:00:00.000000000 +0100
+++ new/xlrd-0.9.4/tests/test_xlsx_parse.py 2015-07-15 08:11:03.000000000 +0200
@@ -0,0 +1,39 @@
+###############################################################################
+#
+# Test the parsing of problematic xlsx files from bug reports.
+#
+
+import unittest
+import xlrd
+from .base import from_this_dir
+
+
+class TestXlsxParse(unittest.TestCase):
+ # Test parsing of problematic xlsx files. These are usually submitted
+ # as part of bug reports as noted below.
+
+ def test_for_github_issue_96(self):
+ # Test for non-Excel file with forward slash file separator and
+ # lowercase names. https://github.com/python-excel/xlrd/issues/96
+ workbook = xlrd.open_workbook(from_this_dir('apachepoi_49609.xlsx'))
+ worksheet = workbook.sheet_by_index(0)
+
+ # Test reading sample data from the worksheet.
+ cell = worksheet.cell(0, 1)
+ self.assertEqual(cell.value, 'Cycle')
+ self.assertEqual(cell.ctype, xlrd.book.XL_CELL_TEXT)
+
+ cell = worksheet.cell(1, 1)
+ self.assertEqual(cell.value, 1)
+ self.assertEqual(cell.ctype, xlrd.book.XL_CELL_NUMBER)
+
+ def test_for_github_issue_101(self):
+ # Test for non-Excel file with forward slash file separator
+ # https://github.com/python-excel/xlrd/issues/101
+ workbook = xlrd.open_workbook(from_this_dir('self_evaluation_report_2014-05-19.xlsx'))
+ worksheet = workbook.sheet_by_index(0)
+
+ # Test reading sample data from the worksheet.
+ cell = worksheet.cell(0, 0)
+ self.assertEqual(cell.value, 'one')
+ self.assertEqual(cell.ctype, xlrd.book.XL_CELL_TEXT)
Files old/xlrd-0.9.2/tests/text_bar.xlsx and new/xlrd-0.9.4/tests/text_bar.xlsx differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/__init__.py new/xlrd-0.9.4/xlrd/__init__.py
--- old/xlrd-0.9.2/xlrd/__init__.py 2013-04-05 00:36:57.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/__init__.py 2015-07-15 08:11:03.000000000 +0200
@@ -399,7 +399,13 @@
zf = zipfile.ZipFile(timemachine.BYTES_IO(file_contents))
else:
zf = zipfile.ZipFile(filename)
- component_names = zf.namelist()
+
+ # Workaround for some third party files that use forward slashes and
+ # lower case names. We map the expected name in lowercase to the
+ # actual filename in the zip container.
+ component_names = dict([(name.replace('\\', '/').lower(), name)
+ for name in zf.namelist()])
+
if verbosity:
logfile.write('ZIP component_names:\n')
pprint.pprint(component_names, logfile)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/book.py new/xlrd-0.9.4/xlrd/book.py
--- old/xlrd-0.9.2/xlrd/book.py 2013-04-05 00:36:57.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/book.py 2014-01-25 10:49:12.000000000 +0100
@@ -452,22 +452,20 @@
# @return true if sheet is loaded, false otherwise
# <br /> -- New in version 0.7.1
def sheet_loaded(self, sheet_name_or_index):
- # using type(1) because int won't work with Python 2.1
- if isinstance(sheet_name_or_index, type(1)):
+ if isinstance(sheet_name_or_index, int):
sheetx = sheet_name_or_index
else:
try:
sheetx = self._sheet_names.index(sheet_name_or_index)
except ValueError:
raise XLRDError('No sheet named <%r>' % sheet_name_or_index)
- return self._sheet_list[sheetx] and True or False # Python 2.1 again
+ return bool(self._sheet_list[sheetx])
##
# @param sheet_name_or_index Name or index of sheet to be unloaded.
# <br /> -- New in version 0.7.1
def unload_sheet(self, sheet_name_or_index):
- # using type(1) because int won't work with Python 2.1
- if isinstance(sheet_name_or_index, type(1)):
+ if isinstance(sheet_name_or_index, int):
sheetx = sheet_name_or_index
else:
try:
@@ -566,43 +564,18 @@
self.ragged_rows = ragged_rows
if not file_contents:
- if python_version < (2, 2) and self.use_mmap:
- # need to open for update
- open_mode = "r+b"
- else:
- open_mode = "rb"
- retry = False
- f = None
- try:
- try:
- f = open(filename, open_mode)
- except IOError:
- e, v = sys.exc_info()[:2]
- if open_mode == "r+b" \
- and (v.errno == 13 or v.strerror == "Permission denied"):
- # Maybe the file is read-only
- retry = True
- self.use_mmap = False
- else:
- raise
- if retry:
- f = open(filename, "rb")
+ with open(filename, "rb") as f:
f.seek(0, 2) # EOF
size = f.tell()
f.seek(0, 0) # BOF
if size == 0:
raise XLRDError("File size is 0 bytes")
if self.use_mmap:
- if python_version < (2, 2):
- self.filestr = mmap.mmap(f.fileno(), size)
- else:
- self.filestr = mmap.mmap(f.fileno(), size, access=mmap.ACCESS_READ)
+ self.filestr = mmap.mmap(f.fileno(), size, access=mmap.ACCESS_READ)
self.stream_len = size
else:
self.filestr = f.read()
self.stream_len = len(self.filestr)
- finally:
- if f: f.close()
else:
self.filestr = file_contents
self.stream_len = len(file_contents)
@@ -800,11 +773,10 @@
# we're well & truly stuffed -- let the punter know ASAP.
try:
_unused = unicode(b'trial', self.encoding)
- except:
- ei = sys.exc_info()[:2]
+ except BaseException as e:
fprintf(self.logfile,
"ERROR *** codepage %r -> encoding %r -> %s: %s\n",
- self.codepage, self.encoding, ei[0].__name__.split(".")[-1], ei[1])
+ self.codepage, self.encoding, type(e).__name__.split(".")[-1], e)
raise
if self.raw_user_name:
strg = unpack_string(self.user_name, 0, self.encoding, lenlen=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/compdoc.py new/xlrd-0.9.4/xlrd/compdoc.py
--- old/xlrd-0.9.2/xlrd/compdoc.py 2013-04-05 00:37:01.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/compdoc.py 2014-01-25 10:49:12.000000000 +0100
@@ -15,7 +15,7 @@
# 2007-05-07 SJM Meaningful exception instead of IndexError if a SAT (sector allocation table) is corrupted.
# 2007-04-22 SJM Missing "<" in a struct.unpack call => can't open files on bigendian platforms.
-from __future__ import nested_scopes, print_function
+from __future__ import print_function
import sys
from struct import unpack
from .timemachine import *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/examples/xlrdnameAPIdemo.py new/xlrd-0.9.4/xlrd/examples/xlrdnameAPIdemo.py
--- old/xlrd-0.9.2/xlrd/examples/xlrdnameAPIdemo.py 2013-04-05 00:36:57.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/examples/xlrdnameAPIdemo.py 2014-01-25 10:49:12.000000000 +0100
@@ -77,9 +77,8 @@
if celltype == xlrd.XL_CELL_DATE:
try:
showval = xlrd.xldate_as_tuple(cellvalue, datemode)
- except xlrd.XLDateError:
- e1, e2 = sys.exc_info()[:2]
- showval = "%s:%s" % (e1.__name__, e2)
+ except xlrd.XLDateError as e:
+ showval = "%s:%s" % (type(e).__name__, e)
elif celltype == xlrd.XL_CELL_ERROR:
showval = xlrd.error_text_from_code.get(
cellvalue, '<Unknown error code 0x%02x>' % cellvalue)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/formatting.py new/xlrd-0.9.4/xlrd/formatting.py
--- old/xlrd-0.9.2/xlrd/formatting.py 2013-04-05 00:36:57.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/formatting.py 2014-04-07 16:40:09.000000000 +0200
@@ -10,22 +10,10 @@
# No part of the content of this file was derived from the works of David Giffin.
-# 2010-10-30 SJM Added space after colon in "# coding" line to work around IBM iSeries Python bug
-# 2009-05-31 SJM Fixed problem with non-zero reserved bits in some STYLE records in Mac Excel files
-# 2008-08-03 SJM Ignore PALETTE record when Book.formatting_info is false
-# 2008-08-03 SJM Tolerate up to 4 bytes trailing junk on PALETTE record
-# 2008-05-10 SJM Do some XF checks only when Book.formatting_info is true
-# 2008-02-08 SJM Preparation for Excel 2.0 support
-# 2008-02-03 SJM Another tweak to is_date_format_string()
-# 2007-12-04 SJM Added support for Excel 2.x (BIFF2) files.
-# 2007-10-13 SJM Warning: style XF whose parent XF index != 0xFFF
-# 2007-09-08 SJM Work around corrupt STYLE record
-# 2007-07-11 SJM Allow for BIFF2/3-style FORMAT record in BIFF4/8 file
-
from __future__ import print_function
DEBUG = 0
-import copy, re
+import re
from struct import unpack
from .timemachine import *
from .biffh import BaseObject, unpack_unicode, unpack_string, \
@@ -279,7 +267,7 @@
if bv >= 50:
(
f.height, option_flags, f.colour_index, f.weight,
- f.escapement_type, f.underline_type, f.family,
+ f.escapement, f.underline_type, f.family,
f.character_set,
) = unpack('<HHHHHBBB', data[0:13])
f.bold = option_flags & 1
@@ -303,7 +291,7 @@
f.name = unpack_string(data, 6, book.encoding, lenlen=1)
# Now cook up the remaining attributes ...
f.weight = [400, 700][f.bold]
- f.escapement_type = 0 # None
+ f.escapement = 0 # None
f.underline_type = f.underlined # None or Single
f.family = 0 # Unknown / don't care
f.character_set = 1 # System default (0 means "ANSI Latin")
@@ -319,7 +307,7 @@
f.name = unpack_string(data, 4, book.encoding, lenlen=1)
# Now cook up the remaining attributes ...
f.weight = [400, 700][f.bold]
- f.escapement_type = 0 # None
+ f.escapement = 0 # None
f.underline_type = f.underlined # None or Single
f.family = 0 # Unknown / don't care
f.character_set = 1 # System default (0 means "ANSI Latin")
@@ -622,7 +610,7 @@
book.colour_indexes_used[cx] = 1
elif book.verbosity:
print("Size of colour table:", len(book.colour_map), file=book.logfile)
- fprintf(self.logfile, "*** Font #%d (%r): colour index 0x%04x is unknown\n",
+ fprintf(book.logfile, "*** Font #%d (%r): colour index 0x%04x is unknown\n",
font.font_index, font.name, cx)
if book.verbosity >= 1:
used = sorted(book.colour_indexes_used.keys())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/info.py new/xlrd-0.9.4/xlrd/info.py
--- old/xlrd-0.9.2/xlrd/info.py 2013-04-09 21:29:41.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/info.py 2015-07-15 08:20:47.000000000 +0200
@@ -1 +1 @@
-__VERSION__ = "0.9.2"
+__VERSION__ = "0.9.4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/sheet.py new/xlrd-0.9.4/xlrd/sheet.py
--- old/xlrd-0.9.2/xlrd/sheet.py 2013-04-05 00:37:29.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/sheet.py 2015-07-15 08:11:03.000000000 +0200
@@ -458,6 +458,11 @@
]
##
+ # Returns a generator for iterating through each row.
+ def get_rows(self):
+ return (self.row(index) for index in range(self.nrows))
+
+ ##
# Returns a slice of the types
# of the cells in the given row.
def row_types(self, rowx, start_colx=0, end_colx=None):
@@ -1046,6 +1051,9 @@
self_put_cell(rowx, colx, XL_CELL_BLANK, '', result[pos])
pos += 1
elif rc == XL_DIMENSION or rc == XL_DIMENSION2:
+ if data_len == 0:
+ # Four zero bytes after some other record. See github issue 64.
+ continue
# if data_len == 10:
# Was crashing on BIFF 4.0 file w/o the two trailing unused bytes.
# Reported by Ralph Heimburger.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/xldate.py new/xlrd-0.9.4/xlrd/xldate.py
--- old/xlrd-0.9.2/xlrd/xldate.py 2013-04-05 00:37:01.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/xldate.py 2014-04-07 16:40:04.000000000 +0200
@@ -17,10 +17,16 @@
# More importantly:
# Noon on Gregorian 1900-03-01 (day 61 in the 1900-based system) is JDN 2415080.0
# Noon on Gregorian 1904-01-02 (day 1 in the 1904-based system) is JDN 2416482.0
+import datetime
_JDN_delta = (2415080 - 61, 2416482 - 1)
assert _JDN_delta[1] - _JDN_delta[0] == 1462
+# Pre-calculate the datetime epochs for efficiency.
+epoch_1904 = datetime.datetime(1904, 1, 1)
+epoch_1900 = datetime.datetime(1899, 12, 31)
+epoch_1900_minus_1 = datetime.datetime(1899, 12, 30)
+
class XLDateError(ValueError): pass
class XLDateNegative(XLDateError): pass
@@ -90,6 +96,40 @@
else:
return ((yreg // 1461) - 4716, mp + 3, d, hour, minute, second)
+
+##
+# Convert an Excel date/time number into a datetime.datetime object.
+#
+# @param xldate The Excel number
+# @param datemode 0: 1900-based, 1: 1904-based.
+#
+# @return a datetime.datetime() object.
+#
+def xldate_as_datetime(xldate, datemode):
+ """Convert an Excel date/time number into a datetime.datetime object."""
+
+ # Set the epoch based on the 1900/1904 datemode.
+ if datemode:
+ epoch = epoch_1904
+ else:
+ if xldate < 60:
+ epoch = epoch_1900
+ else:
+ # Workaround Excel 1900 leap year bug by adjusting the epoch.
+ epoch = epoch_1900_minus_1
+
+ # The integer part of the Excel date stores the number of days since
+ # the epoch and the fractional part stores the percentage of the day.
+ days = int(xldate)
+ fraction = xldate - days
+
+ # Get the the integer and decimal seconds in Excel's millisecond resolution.
+ seconds = int(round(fraction * 86400000.0))
+ seconds, milliseconds = divmod(seconds, 1000)
+
+ return epoch + datetime.timedelta(days, seconds, 0, milliseconds)
+
+
# === conversions from date/time to xl numbers
def _leap(y):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xlrd-0.9.2/xlrd/xlsx.py new/xlrd-0.9.4/xlrd/xlsx.py
--- old/xlrd-0.9.2/xlrd/xlsx.py 2013-04-09 20:58:44.000000000 +0200
+++ new/xlrd-0.9.4/xlrd/xlsx.py 2015-07-15 08:11:03.000000000 +0200
@@ -19,9 +19,10 @@
ET = None
ET_has_iterparse = False
+Element_has_iter = False
def ensure_elementtree_imported(verbosity, logfile):
- global ET, ET_has_iterparse
+ global ET, ET_has_iterparse, Element_has_iter
if ET is not None:
return
if "IronPython" in sys.version:
@@ -47,6 +48,7 @@
ET_has_iterparse = True
except NotImplementedError:
pass
+ Element_has_iter = hasattr(ET.ElementTree, 'iter')
if verbosity:
etree_version = repr([
(item, getattr(ET, item))
@@ -225,14 +227,15 @@
if bk.verbosity:
print(msg, file=bk.logfile)
name_and_scope_map[key] = nobj
+ sort_data = (nobj.scope, namex, nobj)
if name_lcase in name_map:
- name_map[name_lcase].append((nobj.scope, nobj))
+ name_map[name_lcase].append(sort_data)
else:
- name_map[name_lcase] = [(nobj.scope, nobj)]
+ name_map[name_lcase] = [sort_data]
for key in name_map.keys():
alist = name_map[key]
alist.sort()
- name_map[key] = [x[1] for x in alist]
+ name_map[key] = [x[2] for x in alist]
bk.name_and_scope_map = name_and_scope_map
bk.name_map = name_map
@@ -243,7 +246,7 @@
fprintf(self.logfile, "\n=== %s ===\n", heading)
self.tree = ET.parse(stream)
getmethod = self.tag2meth.get
- for elem in self.tree.getiterator():
+ for elem in self.tree.iter() if Element_has_iter else self.tree.getiterator():
if self.verbosity >= 3:
self.dump_elem(elem)
meth = getmethod(elem.tag)
@@ -289,7 +292,7 @@
self.tree = ET.parse(stream)
getmenu = self.core_props_menu.get
props = {}
- for elem in self.tree.getiterator():
+ for elem in self.tree.iter() if Element_has_iter else self.tree.getiterator():
if self.verbosity >= 3:
self.dump_elem(elem)
menu = getmenu(elem.tag)
@@ -363,7 +366,14 @@
if self.verbosity >= 2:
self.dumpout('Ignoring sheet of type %r (name=%r)', reltype, name)
return
- bk._sheet_visibility.append(True)
+ state = elem.get('state')
+ visibility_map = {
+ None: 0,
+ 'visible': 0,
+ 'hidden': 1,
+ 'veryHidden': 2
+ }
+ bk._sheet_visibility.append(visibility_map[state])
sheet = Sheet(bk, position=None, name=name, number=sheetx)
sheet.utter_max_rows = X12_MAX_ROWS
sheet.utter_max_cols = X12_MAX_COLS
@@ -504,6 +514,7 @@
self.rowx = -1 # We may need to count them.
self.bk = sheet.book
self.sst = self.bk._sharedstrings
+ self.merged_cells = sheet.merged_cells
self.warned_no_cell_name = 0
self.warned_no_row_num = 0
if ET_has_iterparse:
@@ -521,8 +532,34 @@
elem.clear() # destroy all child elements (cells)
elif elem.tag == U_SSML12 + "dimension":
self.do_dimension(elem)
+ elif elem.tag == U_SSML12 + "mergeCell":
+ self.do_merge_cell(elem)
self.finish_off()
-
+
+ def process_comments_stream(self, stream):
+ root = ET.parse(stream).getroot()
+ author_list = root[0]
+ assert author_list.tag == U_SSML12 + 'authors'
+ authors = [elem.text for elem in author_list]
+ comment_list = root[1]
+ assert comment_list.tag == U_SSML12 + 'commentList'
+ cell_note_map = self.sheet.cell_note_map
+ from .sheet import Note
+ text_tag = U_SSML12 + 'text'
+ r_tag = U_SSML12 + 'r'
+ t_tag = U_SSML12 + 't'
+ for elem in comment_list.findall(U_SSML12 + 'comment'):
+ ts = elem.findall('./' + text_tag + '/' + t_tag)
+ ts += elem.findall('./' + text_tag + '/' + r_tag + '/' + t_tag)
+ ref = elem.get('ref')
+ note = Note()
+ note.author = authors[int(elem.get('authorId'))]
+ note.rowx, note.colx = coords = cell_name_to_rowx_colx(ref)
+ note.text = ''
+ for t in ts:
+ note.text += cooked_text(self, t)
+ cell_note_map[coords] = note
+
def do_dimension(self, elem):
ref = elem.get('ref') # example: "A1:Z99" or just "A1"
if ref:
@@ -532,6 +569,16 @@
self.sheet._dimnrows = rowx + 1
self.sheet._dimncols = colx + 1
+ def do_merge_cell(self, elem):
+ # The ref attribute should be a cell range like "B1:D5".
+ ref = elem.get('ref')
+ if ref:
+ first_cell_ref, last_cell_ref = ref.split(':')
+ first_rowx, first_colx = cell_name_to_rowx_colx(first_cell_ref)
+ last_rowx, last_colx = cell_name_to_rowx_colx(last_cell_ref)
+ self.merged_cells.append((first_rowx, last_rowx + 1,
+ first_colx, last_colx + 1))
+
def do_row(self, row_elem):
def bad_child_tag(child_tag):
@@ -569,6 +616,8 @@
try:
for c in cell_name:
charx += 1
+ if c == '$':
+ continue
lv = letter_value[c]
if lv:
colx = colx * 26 + lv
@@ -683,15 +732,6 @@
}
augment_keys(tag2meth, U_SSML12)
-def getzflo(zipfile, member_path):
- # GET a Zipfile File-Like Object for passing to
- # an XML parser
- try:
- return zipfile.open(member_path) # CPython 2.6 onwards
- except AttributeError:
- # old way
- return BYTES_IO(zipfile.read(member_path))
-
def open_workbook_2007_xml(
zf,
component_names,
@@ -718,41 +758,47 @@
bk.ragged_rows = ragged_rows
x12book = X12Book(bk, logfile, verbosity)
- zflo = getzflo(zf, 'xl/_rels/workbook.xml.rels')
+ zflo = zf.open(component_names['xl/_rels/workbook.xml.rels'])
x12book.process_rels(zflo)
del zflo
- zflo = getzflo(zf, 'xl/workbook.xml')
+ zflo = zf.open(component_names['xl/workbook.xml'])
x12book.process_stream(zflo, 'Workbook')
del zflo
- props_name = 'docProps/core.xml'
+ props_name = 'docprops/core.xml'
if props_name in component_names:
- zflo = getzflo(zf, props_name)
+ zflo = zf.open(component_names[props_name])
x12book.process_coreprops(zflo)
x12sty = X12Styles(bk, logfile, verbosity)
if 'xl/styles.xml' in component_names:
- zflo = getzflo(zf, 'xl/styles.xml')
+ zflo = zf.open(component_names['xl/styles.xml'])
x12sty.process_stream(zflo, 'styles')
del zflo
else:
# seen in MS sample file MergedCells.xlsx
pass
- sst_fname = 'xl/sharedStrings.xml'
+ sst_fname = 'xl/sharedstrings.xml'
x12sst = X12SST(bk, logfile, verbosity)
if sst_fname in component_names:
- zflo = getzflo(zf, sst_fname)
+ zflo = zf.open(component_names[sst_fname])
x12sst.process_stream(zflo, 'SST')
del zflo
for sheetx in range(bk.nsheets):
fname = x12book.sheet_targets[sheetx]
- zflo = getzflo(zf, fname)
+ zflo = zf.open(component_names[fname])
sheet = bk._sheet_list[sheetx]
x12sheet = X12Sheet(sheet, logfile, verbosity)
heading = "Sheet %r (sheetx=%d) from %r" % (sheet.name, sheetx, fname)
x12sheet.process_stream(zflo, heading)
del zflo
+ comments_fname = 'xl/comments%d.xml' % (sheetx + 1)
+ if comments_fname in component_names:
+ comments_stream = zf.open(component_names[comments_fname])
+ x12sheet.process_comments_stream(comments_stream)
+ del comments_stream
+
sheet.tidy_dimensions()
return bk
1
0
Hello community,
here is the log from the commit of package ghostscript-fonts-grops for openSUSE:Factory checked in at 2015-11-04 15:32:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghostscript-fonts-grops (Old)
and /work/SRC/openSUSE:Factory/.ghostscript-fonts-grops.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghostscript-fonts-grops"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghostscript-fonts-grops/ghostscript-fonts-grops.changes 2014-02-28 07:20:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghostscript-fonts-grops.new/ghostscript-fonts-grops.changes 2015-11-04 15:32:53.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Oct 28 17:06:32 CET 2015 - tiwai(a)suse.de
+
+- dynamically create requires to groff with the version instead of
+ hardcoding in spec file
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghostscript-fonts-grops.spec ++++++
--- /var/tmp/diff_new_pack.HOcSaq/_old 2015-11-04 15:32:54.000000000 +0100
+++ /var/tmp/diff_new_pack.HOcSaq/_new 2015-11-04 15:32:54.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghostscript-fonts-grops
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,6 @@
Version: 1.22.2
Release: 0
Url: http://www.gnu.org/software/groff/groff.html
-Requires: groff = %{version}
Summary: Ghostscript fonts imported to groff for use with grops
License: GPL-2.0
Group: Productivity/Publishing/Troff
@@ -39,6 +38,9 @@
%prep
%build
+%define groff_version $(readlink %{_datadir}/groff/current)
+%define _use_internal_dependency_generator 0
+%define __find_requires sh -c "echo groff = %{groff_version}; exec /usr/lib/rpm/find-requires"a
%define gs_fonts %{_datadir}/ghostscript/fonts
%define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && pfbtopfa "%{gs_fonts}/%1.pfb" "devps/%1.pfa"
@@ -66,8 +68,7 @@
done >>devps/download
%install
-groffver=$(readlink %{_datadir}/groff/current)
-target="%{buildroot}%{_datadir}/groff/$groffver/font/gs"
+target="%{buildroot}%{_datadir}/groff/%{groff_version}/font/gs"
install -d "${target}"
mv "-t${target}" devps
mkdir -p %{buildroot}/etc/profile.d
1
0
Hello community,
here is the log from the commit of package libmicrohttpd for openSUSE:Factory checked in at 2015-11-04 15:32:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libmicrohttpd (Old)
and /work/SRC/openSUSE:Factory/.libmicrohttpd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libmicrohttpd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libmicrohttpd/libmicrohttpd.changes 2015-10-14 16:41:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libmicrohttpd.new/libmicrohttpd.changes 2015-11-04 15:32:42.000000000 +0100
@@ -1,0 +2,19 @@
+Sun Nov 1 11:44:58 UTC 2015 - mpluskal(a)suse.com
+
+- Update to 0.9.45
+ * Rework deprecation maros: fix errors with old GCC versions,
+ improved support for old clang and new GCC. -EG
+ * Return correct header kind in MHD_get_connection_values()
+ even if a bitmask is used for the "kind" argument. -FC/CG
+ * Fixing transient resource leak affecting long-lived
+ connections with many keep-alives and HTTP request
+ pipelining under certain circumstances (which reduced
+ the receive window).
+ * Fixed assertion failure triggered by a race in
+ thread-per-connection mode on shutdown in rare
+ circumstances. -CG
+ * Deduplicate code between digestauth and connection
+ parsing logic for URI arguments, shared code moved
+ to new MHD_parse_arguments_ function in internal.c. -CG
+
+-------------------------------------------------------------------
Old:
----
libmicrohttpd-0.9.44.tar.gz
libmicrohttpd-0.9.44.tar.gz.sig
New:
----
libmicrohttpd-0.9.45.tar.gz
libmicrohttpd-0.9.45.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libmicrohttpd.spec ++++++
--- /var/tmp/diff_new_pack.08IE75/_old 2015-11-04 15:32:43.000000000 +0100
+++ /var/tmp/diff_new_pack.08IE75/_new 2015-11-04 15:32:43.000000000 +0100
@@ -23,10 +23,10 @@
%define enable_libmicrospdy 0
%endif
-%global libmicrohttpd libmicrohttpd10
+%global libmicrohttpd libmicrohttpd11
%global libmicrospdy libmicrospdy0
Name: libmicrohttpd
-Version: 0.9.44
+Version: 0.9.45
Release: 0
Summary: Small Embeddable HTTP Server Library
License: LGPL-2.1+
++++++ libmicrohttpd-0.9.44.tar.gz -> libmicrohttpd-0.9.45.tar.gz ++++++
++++ 2181 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/ChangeLog new/libmicrohttpd-0.9.45/ChangeLog
--- old/libmicrohttpd-0.9.44/ChangeLog 2015-10-01 21:22:26.000000000 +0200
+++ new/libmicrohttpd-0.9.45/ChangeLog 2015-10-31 15:53:10.000000000 +0100
@@ -1,3 +1,28 @@
+Sat Oct 31 15:52:52 CET 2015
+ Releasing libmicrohttpd 0.9.45. -CG
+
+Tue Oct 27 12:08:02 CET 2015
+ Rework deprecation maros: fix errors with old GCC versions,
+ improved support for old clang and new GCC. -EG
+
+Sun Oct 25 23:05:32 CET 2015
+ Return correct header kind in MHD_get_connection_values()
+ even if a bitmask is used for the "kind" argument. -FC/CG
+
+Sun Oct 25 15:29:23 CET 2015
+ Fixing transient resource leak affecting long-lived
+ connections with many keep-alives and HTTP request
+ pipelining under certain circumstances (which reduced
+ the receive window).
+ Fixed assertion failure triggered by a race in
+ thread-per-connection mode on shutdown in rare
+ circumstances. -CG
+
+Mon Oct 5 11:53:52 CEST 2015
+ Deduplicate code between digestauth and connection
+ parsing logic for URI arguments, shared code moved
+ to new MHD_parse_arguments_ function in internal.c. -CG
+
Thu Oct 1 21:22:05 CEST 2015
Releasing libmicrohttpd 0.9.44. -CG
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/configure.ac new/libmicrohttpd-0.9.45/configure.ac
--- old/libmicrohttpd-0.9.44/configure.ac 2015-10-01 21:21:49.000000000 +0200
+++ new/libmicrohttpd-0.9.45/configure.ac 2015-10-31 15:52:35.000000000 +0100
@@ -22,13 +22,13 @@
#
AC_PREREQ([2.60])
LT_PREREQ([2.4.0])
-AC_INIT([libmicrohttpd],[0.9.44],[libmicrohttpd(a)gnu.org])
+AC_INIT([libmicrohttpd],[0.9.45],[libmicrohttpd(a)gnu.org])
AM_INIT_AUTOMAKE([silent-rules] [subdir-objects])
AC_CONFIG_HEADERS([MHD_config.h])
AC_CONFIG_MACRO_DIR([m4])
AH_TOP([#define _GNU_SOURCE 1])
-LIB_VERSION_CURRENT=44
+LIB_VERSION_CURRENT=45
LIB_VERSION_REVISION=0
LIB_VERSION_AGE=34
AC_SUBST(LIB_VERSION_CURRENT)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/doc/libmicrohttpd.info new/libmicrohttpd-0.9.45/doc/libmicrohttpd.info
--- old/libmicrohttpd-0.9.44/doc/libmicrohttpd.info 2015-10-01 21:23:00.000000000 +0200
+++ new/libmicrohttpd-0.9.45/doc/libmicrohttpd.info 2015-10-31 15:53:49.000000000 +0100
@@ -1,8 +1,8 @@
This is libmicrohttpd.info, produced by makeinfo version 6.0 from
libmicrohttpd.texi.
-This manual is for GNU libmicrohttpd (version 0.9.44, 22 September
-2015), a library for embedding an HTTP(S) server into C applications.
+This manual is for GNU libmicrohttpd (version 0.9.45, 25 October 2015),
+a library for embedding an HTTP(S) server into C applications.
Copyright (C) 2007-2013 Christian Grothoff
@@ -23,8 +23,8 @@
The GNU libmicrohttpd Library
*****************************
-This manual is for GNU libmicrohttpd (version 0.9.44, 22 September
-2015), a library for embedding an HTTP(S) server into C applications.
+This manual is for GNU libmicrohttpd (version 0.9.45, 25 October 2015),
+a library for embedding an HTTP(S) server into C applications.
Copyright (C) 2007-2013 Christian Grothoff
@@ -1372,7 +1372,9 @@
-- Function: int MHD_get_connection_values (struct MHD_Connection
*connection, enum MHD_ValueKind kind, MHD_KeyValueIterator
iterator, void *iterator_cls)
- Get all the headers matching KIND from the request.
+ Get all the headers matching KIND from the request. The KIND
+ argument can be a bitmask, ORing the various header kinds that are
+ requested.
The ITERATOR callback is invoked once for each header, with
ITERATOR_CLS as first argument. After version 0.9.19, the headers
@@ -1397,8 +1399,8 @@
the string "key".
-- Function: int MHD_set_connection_value (struct MHD_Connection
- *connection, enum MHD_ValueKind kind, const char * key, const
- char * value)
+ *connection, enum MHD_ValueKind kind, const char *key, const
+ char *value)
This function can be used to append an entry to the list of HTTP
headers of a connection (so that the 'MHD_get_connection_values
function' will return them - and the MHD PostProcessor will also
@@ -4033,7 +4035,7 @@
(line 6)
* MHD_is_feature_supported: microhttpd-util feature.
(line 75)
-* MHD_lookup_connection_value: microhttpd-requests. (line 56)
+* MHD_lookup_connection_value: microhttpd-requests. (line 58)
* MHD_post_process: microhttpd-post api. (line 33)
* MHD_queue_auth_fail_response: microhttpd-dauth digest.
(line 35)
@@ -4047,7 +4049,7 @@
* MHD_run_from_select: microhttpd-init. (line 86)
* MHD_set_connection_option: microhttpd-option conn.
(line 6)
-* MHD_set_connection_value: microhttpd-requests. (line 33)
+* MHD_set_connection_value: microhttpd-requests. (line 35)
* MHD_set_panic_func: microhttpd-init. (line 6)
* MHD_set_response_options: microhttpd-response options.
(line 6)
@@ -4090,41 +4092,41 @@
Tag Table:
-Node: Top818
-Node: microhttpd-intro3024
-Ref: fig:performance7073
-Ref: tbl:supported8019
-Node: microhttpd-const15292
-Node: microhttpd-struct43050
-Node: microhttpd-cb43830
-Node: microhttpd-init53172
-Node: microhttpd-inspect58926
-Node: microhttpd-requests60863
-Node: microhttpd-responses64347
-Node: microhttpd-response enqueue65459
-Ref: microhttpd-response enqueue-Footnote-167726
-Node: microhttpd-response create67945
-Node: microhttpd-response headers73978
-Node: microhttpd-response options75805
-Node: microhttpd-response inspect76660
-Node: microhttpd-flow77833
-Node: microhttpd-dauth80570
-Node: microhttpd-dauth basic82121
-Node: microhttpd-dauth digest83313
-Node: microhttpd-post87961
-Node: microhttpd-post api90906
-Node: microhttpd-info93490
-Node: microhttpd-info daemon93912
-Node: microhttpd-info conn97317
-Node: microhttpd-option conn101034
-Node: microhttpd-util102098
-Node: microhttpd-util feature102369
-Node: microhttpd-util unescape105810
-Node: GNU-LGPL106450
-Node: GNU GPL with eCos Extension134554
-Node: GNU-FDL154431
-Node: Concept Index179517
-Node: Function and Data Index187607
-Node: Type Index192779
+Node: Top816
+Node: microhttpd-intro3020
+Ref: fig:performance7069
+Ref: tbl:supported8015
+Node: microhttpd-const15288
+Node: microhttpd-struct43046
+Node: microhttpd-cb43826
+Node: microhttpd-init53168
+Node: microhttpd-inspect58922
+Node: microhttpd-requests60859
+Node: microhttpd-responses64439
+Node: microhttpd-response enqueue65551
+Ref: microhttpd-response enqueue-Footnote-167818
+Node: microhttpd-response create68037
+Node: microhttpd-response headers74070
+Node: microhttpd-response options75897
+Node: microhttpd-response inspect76752
+Node: microhttpd-flow77925
+Node: microhttpd-dauth80662
+Node: microhttpd-dauth basic82213
+Node: microhttpd-dauth digest83405
+Node: microhttpd-post88053
+Node: microhttpd-post api90998
+Node: microhttpd-info93582
+Node: microhttpd-info daemon94004
+Node: microhttpd-info conn97409
+Node: microhttpd-option conn101126
+Node: microhttpd-util102190
+Node: microhttpd-util feature102461
+Node: microhttpd-util unescape105902
+Node: GNU-LGPL106542
+Node: GNU GPL with eCos Extension134646
+Node: GNU-FDL154523
+Node: Concept Index179609
+Node: Function and Data Index187699
+Node: Type Index192871
End Tag Table
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/doc/libmicrohttpd.texi new/libmicrohttpd-0.9.45/doc/libmicrohttpd.texi
--- old/libmicrohttpd-0.9.44/doc/libmicrohttpd.texi 2015-09-22 19:19:01.000000000 +0200
+++ new/libmicrohttpd-0.9.45/doc/libmicrohttpd.texi 2015-10-25 23:05:19.000000000 +0100
@@ -1578,7 +1578,9 @@
@deftypefun int MHD_get_connection_values (struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
-Get all the headers matching @var{kind} from the request.
+Get all the headers matching @var{kind} from the request. The @var{kind}
+argument can be a bitmask, ORing the various header kinds that are
+requested.
The @var{iterator} callback is invoked once for each header, with
@var{iterator_cls} as first argument. After version 0.9.19, the
@@ -1604,7 +1606,7 @@
@end deftypefun
-@deftypefun int MHD_set_connection_value (struct MHD_Connection *connection, enum MHD_ValueKind kind, const char * key, const char * value)
+@deftypefun int MHD_set_connection_value (struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, const char *value)
This function can be used to append an entry to
the list of HTTP headers of a connection (so that the
@code{MHD_get_connection_values function} will return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/doc/stamp-vti new/libmicrohttpd-0.9.45/doc/stamp-vti
--- old/libmicrohttpd-0.9.44/doc/stamp-vti 2015-10-01 21:22:58.000000000 +0200
+++ new/libmicrohttpd-0.9.45/doc/stamp-vti 2015-10-31 15:53:48.000000000 +0100
@@ -1,4 +1,4 @@
-@set UPDATED 22 September 2015
-@set UPDATED-MONTH September 2015
-@set EDITION 0.9.44
-@set VERSION 0.9.44
+@set UPDATED 25 October 2015
+@set UPDATED-MONTH October 2015
+@set EDITION 0.9.45
+@set VERSION 0.9.45
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/doc/version.texi new/libmicrohttpd-0.9.45/doc/version.texi
--- old/libmicrohttpd-0.9.44/doc/version.texi 2015-10-01 21:22:58.000000000 +0200
+++ new/libmicrohttpd-0.9.45/doc/version.texi 2015-10-31 15:53:48.000000000 +0100
@@ -1,4 +1,4 @@
-@set UPDATED 22 September 2015
-@set UPDATED-MONTH September 2015
-@set EDITION 0.9.44
-@set VERSION 0.9.44
+@set UPDATED 25 October 2015
+@set UPDATED-MONTH October 2015
+@set EDITION 0.9.45
+@set VERSION 0.9.45
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/include/microhttpd.h new/libmicrohttpd-0.9.45/src/include/microhttpd.h
--- old/libmicrohttpd-0.9.44/src/include/microhttpd.h 2015-10-01 21:22:00.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/include/microhttpd.h 2015-10-31 15:52:49.000000000 +0100
@@ -130,7 +130,7 @@
* Current version of the library.
* 0x01093001 = 1.9.30-1.
*/
-#define MHD_VERSION 0x00094400
+#define MHD_VERSION 0x00094500
/**
* MHD-internal return code for "YES".
@@ -207,14 +207,20 @@
#define _MHD_INSTRMACRO(a) #a
#define _MHD_STRMACRO(a) _MHD_INSTRMACRO(a)
#define _MHD_DEPR_MACRO(msg) __pragma(message(__FILE__ "(" _MHD_STRMACRO(__LINE__)"): warning: " msg))
+#define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
#elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__)
#define _MHD_GCC_PRAG(x) _Pragma (#x)
#if __clang_major__+0 >= 5 || \
(!defined(__apple_build_version__) && (__clang_major__+0 > 3 || (__clang_major__+0 == 3 && __clang_minor__ >= 3))) || \
__GNUC__+0 > 4 || (__GNUC__+0 == 4 && __GNUC_MINOR__+0 >= 8)
#define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(GCC warning msg)
+#define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
#else /* older clang or GCC */
#define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(message msg)
+#if (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9)) /* FIXME: earlier versions not tested */
+/* clang handles inline pragmas better than GCC */
+#define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
+#endif /* clang >= 2.9 */
#endif
/* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
#else /* other compilers */
@@ -222,17 +228,22 @@
#endif
#endif /* _MHD_DEPR_MACRO */
+#ifndef _MHD_DEPR_IN_MACRO
+#define _MHD_NO_DEPR_IN_MACRO 1
+#define _MHD_DEPR_IN_MACRO(msg)
+#endif /* !_MHD_DEPR_IN_MACRO */
+
#ifndef _MHD_DEPR_FUNC
#if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1400
#define _MHD_DEPR_FUNC(msg) __declspec(deprecated(msg))
#elif defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1310
/* VS .NET 2003 deprecation do not support custom messages */
#define _MHD_DEPR_FUNC(msg) __declspec(deprecated)
-#elif defined (__clang__) && \
- (__clang_major__+0 >= 4 || (!defined(__apple_build_version__) && __clang_major__+0 >= 3))
+#elif (__GNUC__+0 >= 5) || (defined (__clang__) && \
+ (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9))) /* FIXME: earlier versions not tested */
#define _MHD_DEPR_FUNC(msg) __attribute__((deprecated(msg)))
#elif defined (__clang__) || __GNUC__+0 > 3 || (__GNUC__+0 == 3 && __GNUC_MINOR__+0 >= 1)
-/* GCC-style deprecation do not support custom messages */
+/* old GCC-style deprecation do not support custom messages */
#define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__))
/* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
#else /* other compilers */
@@ -305,7 +316,7 @@
#define MHD_HTTP_NOT_ACCEPTABLE 406
/** @deprecated */
#define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
- _MHD_DEPR_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") 406
+ _MHD_DEPR_IN_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") 406
#define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
#define MHD_HTTP_REQUEST_TIMEOUT 408
#define MHD_HTTP_CONFLICT 409
@@ -1777,7 +1788,7 @@
* Get all of the headers from the request.
*
* @param connection connection to get values from
- * @param kind types of values to iterate over
+ * @param kind types of values to iterate over, can be a bitmask
* @param iterator callback to call on each header;
* maybe NULL (then just count headers)
* @param iterator_cls extra argument to @a iterator
@@ -1787,7 +1798,8 @@
_MHD_EXTERN int
MHD_get_connection_values (struct MHD_Connection *connection,
enum MHD_ValueKind kind,
- MHD_KeyValueIterator iterator, void *iterator_cls);
+ MHD_KeyValueIterator iterator,
+ void *iterator_cls);
/**
@@ -2133,11 +2145,13 @@
int fd,
off_t offset);
+#ifndef _MHD_NO_DEPR_IN_MACRO
/* Substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset()
to minimize possible problems with different off_t options */
#define MHD_create_response_from_fd_at_offset(size,fd,offset) \
- _MHD_DEPR_MACRO("Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
+ _MHD_DEPR_IN_MACRO("Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
MHD_create_response_from_fd_at_offset64((size),(fd),(offset))
+#endif /* ! _MHD_NO_DEPR_IN_MACRO */
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/connection.c new/libmicrohttpd-0.9.45/src/microhttpd/connection.c
--- old/libmicrohttpd-0.9.44/src/microhttpd/connection.c 2015-10-01 18:31:33.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/microhttpd/connection.c 2015-10-25 23:04:04.000000000 +0100
@@ -116,7 +116,7 @@
* Get all of the headers from the request.
*
* @param connection connection to get values from
- * @param kind types of values to iterate over
+ * @param kind types of values to iterate over, can be a bitmask
* @param iterator callback to call on each header;
* maybe NULL (then just count headers)
* @param iterator_cls extra argument to @a iterator
@@ -126,7 +126,8 @@
int
MHD_get_connection_values (struct MHD_Connection *connection,
enum MHD_ValueKind kind,
- MHD_KeyValueIterator iterator, void *iterator_cls)
+ MHD_KeyValueIterator iterator,
+ void *iterator_cls)
{
int ret;
struct MHD_HTTP_Header *pos;
@@ -138,9 +139,11 @@
if (0 != (pos->kind & kind))
{
ret++;
- if ((NULL != iterator) &&
- (MHD_YES != iterator (iterator_cls,
- kind, pos->header, pos->value)))
+ if ( (NULL != iterator) &&
+ (MHD_YES != iterator (iterator_cls,
+ pos->kind,
+ pos->header,
+ pos->value)) )
return ret;
}
return ret;
@@ -264,8 +267,8 @@
* @param termination_code termination reason to give
*/
void
-MHD_connection_close (struct MHD_Connection *connection,
- enum MHD_RequestTerminationCode termination_code)
+MHD_connection_close_ (struct MHD_Connection *connection,
+ enum MHD_RequestTerminationCode termination_code)
{
struct MHD_Daemon *daemon;
@@ -300,8 +303,8 @@
if (NULL != emsg)
MHD_DLOG (connection->daemon, emsg);
#endif
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_WITH_ERROR);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_WITH_ERROR);
}
@@ -368,8 +371,8 @@
if (NULL != response->crc)
(void) MHD_mutex_unlock_ (&response->mutex);
if ( ((ssize_t)MHD_CONTENT_READER_END_OF_STREAM) == ret)
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_COMPLETED_OK);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_COMPLETED_OK);
else
CONNECTION_CLOSE_ERROR (connection,
"Closing connection (stream error)\n");
@@ -1176,17 +1179,22 @@
*/
static int
connection_add_header (struct MHD_Connection *connection,
- char *key, char *value, enum MHD_ValueKind kind)
+ const char *key,
+ const char *value,
+ enum MHD_ValueKind kind)
{
- if (MHD_NO == MHD_set_connection_value (connection,
- kind,
- key, value))
+ if (MHD_NO ==
+ MHD_set_connection_value (connection,
+ kind,
+ key,
+ value))
{
#if HAVE_MESSAGES
MHD_DLOG (connection->daemon,
"Not enough memory to allocate header record!\n");
#endif
- transmit_error_response (connection, MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+ transmit_error_response (connection,
+ MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
REQUEST_TOO_BIG);
return MHD_NO;
}
@@ -1195,98 +1203,9 @@
/**
- * Parse and unescape the arguments given by the client as part
- * of the HTTP request URI.
- *
- * @param kind header kind to use for adding to the connection
- * @param connection connection to add headers to
- * @param args argument URI string (after "?" in URI)
- * @return #MHD_NO on failure (out of memory), #MHD_YES for success
- */
-static int
-parse_arguments (enum MHD_ValueKind kind,
- struct MHD_Connection *connection,
- char *args)
-{
- char *equals;
- char *amper;
-
- while (NULL != args)
- {
- equals = strchr (args, '=');
- amper = strchr (args, '&');
- if (NULL == amper)
- {
- /* last argument */
- if (NULL == equals)
- {
- /* got 'foo', add key 'foo' with NULL for value */
- MHD_unescape_plus (args);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- args);
- return connection_add_header (connection,
- args,
- NULL,
- kind);
- }
- /* got 'foo=bar' */
- equals[0] = '\0';
- equals++;
- MHD_unescape_plus (args);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- args);
- MHD_unescape_plus (equals);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- equals);
- return connection_add_header (connection, args, equals, kind);
- }
- /* amper is non-NULL here */
- amper[0] = '\0';
- amper++;
- if ( (NULL == equals) ||
- (equals >= amper) )
- {
- /* got 'foo&bar' or 'foo&bar=val', add key 'foo' with NULL for value */
- MHD_unescape_plus (args);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- args);
- if (MHD_NO ==
- connection_add_header (connection,
- args,
- NULL,
- kind))
- return MHD_NO;
- /* continue with 'bar' */
- args = amper;
- continue;
- }
- /* equals and amper are non-NULL here, and equals < amper,
- so we got regular 'foo=value&bar...'-kind of argument */
- equals[0] = '\0';
- equals++;
- MHD_unescape_plus (args);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- args);
- MHD_unescape_plus (equals);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- equals);
- if (MHD_NO == connection_add_header (connection, args, equals, kind))
- return MHD_NO;
- args = amper;
- }
- return MHD_YES;
-}
-
-
-/**
* Parse the cookie header (see RFC 2109).
*
+ * @param connection connection to parse header of
* @return #MHD_YES for success, #MHD_NO for failure (malformed, out of memory)
*/
static int
@@ -1372,8 +1291,11 @@
equals[strlen (equals) - 1] = '\0';
equals++;
}
- if (MHD_NO == connection_add_header (connection,
- pos, equals, MHD_COOKIE_KIND))
+ if (MHD_NO ==
+ connection_add_header (connection,
+ pos,
+ equals,
+ MHD_COOKIE_KIND))
return MHD_NO;
pos = semicolon;
}
@@ -1392,9 +1314,11 @@
parse_initial_message_line (struct MHD_Connection *connection,
char *line)
{
+ struct MHD_Daemon *daemon = connection->daemon;
char *uri;
char *http_version;
char *args;
+ unsigned int unused_num_headers;
if (NULL == (uri = strchr (line, ' ')))
return MHD_NO; /* serious error */
@@ -1409,21 +1333,26 @@
http_version[0] = '\0';
http_version++;
}
- if (NULL != connection->daemon->uri_log_callback)
+ if (NULL != daemon->uri_log_callback)
connection->client_context
- = connection->daemon->uri_log_callback (connection->daemon->uri_log_callback_cls,
- uri,
- connection);
+ = daemon->uri_log_callback (daemon->uri_log_callback_cls,
+ uri,
+ connection);
args = strchr (uri, '?');
if (NULL != args)
{
args[0] = '\0';
args++;
- parse_arguments (MHD_GET_ARGUMENT_KIND, connection, args);
- }
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- uri);
+ /* note that this call clobbers 'args' */
+ MHD_parse_arguments_ (connection,
+ MHD_GET_ARGUMENT_KIND,
+ args,
+ &connection_add_header,
+ &unused_num_headers);
+ }
+ daemon->unescape_callback (daemon->unescape_callback_cls,
+ connection,
+ uri);
connection->url = uri;
if (NULL == http_version)
connection->version = "";
@@ -1685,8 +1614,8 @@
/* other side closed connection; RFC 2616, section 8.1.4 suggests
we should then shutdown ourselves as well. */
connection->read_closed = MHD_YES;
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_CLIENT_ABORT);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_CLIENT_ABORT);
return MHD_YES;
}
connection->read_buffer_offset += bytes_read;
@@ -1858,7 +1787,9 @@
}
EXTRA_CHECK ((NULL != last) && (NULL != connection->colon));
if ((MHD_NO == connection_add_header (connection,
- last, connection->colon, kind)))
+ last,
+ connection->colon,
+ kind)))
{
transmit_error_response (connection, MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
REQUEST_TOO_BIG);
@@ -2031,8 +1962,8 @@
/* nothing to do but default action */
if (MHD_YES == connection->read_closed)
{
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_READ_ERROR);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_READ_ERROR);
continue;
}
break;
@@ -2611,8 +2542,8 @@
(MHD_NO == keepalive_possible (connection)))
{
/* have to close for some reason */
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_COMPLETED_OK);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_COMPLETED_OK);
MHD_pool_destroy (connection->pool);
connection->pool = NULL;
connection->read_buffer = NULL;
@@ -2627,7 +2558,7 @@
connection->read_buffer
= MHD_pool_reset (connection->pool,
connection->read_buffer,
- connection->read_buffer_size);
+ connection->read_buffer_offset);
}
connection->client_aware = MHD_NO;
connection->client_context = NULL;
@@ -2657,8 +2588,8 @@
if ( (0 != timeout) &&
(timeout <= (MHD_monotonic_sec_counter() - connection->last_activity)) )
{
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_TIMEOUT_REACHED);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_TIMEOUT_REACHED);
connection->in_idle = MHD_NO;
return MHD_YES;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/connection.h new/libmicrohttpd-0.9.45/src/microhttpd/connection.h
--- old/libmicrohttpd-0.9.44/src/microhttpd/connection.h 2015-02-08 00:10:32.000000000 +0100
+++ new/libmicrohttpd-0.9.45/src/microhttpd/connection.h 2015-10-25 14:15:18.000000000 +0100
@@ -89,8 +89,8 @@
* @param termination_code termination reason to give
*/
void
-MHD_connection_close (struct MHD_Connection *connection,
- enum MHD_RequestTerminationCode termination_code);
+MHD_connection_close_ (struct MHD_Connection *connection,
+ enum MHD_RequestTerminationCode termination_code);
#if EPOLL_SUPPORT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/connection_https.c new/libmicrohttpd-0.9.45/src/microhttpd/connection_https.c
--- old/libmicrohttpd-0.9.44/src/microhttpd/connection_https.c 2015-09-13 15:50:21.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/microhttpd/connection_https.c 2015-10-25 15:28:56.000000000 +0100
@@ -69,8 +69,8 @@
MHD_DLOG (connection->daemon,
"Error: received handshake message out of context\n");
#endif
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_WITH_ERROR);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_WITH_ERROR);
return MHD_YES;
}
return MHD_NO;
@@ -142,8 +142,8 @@
#endif
timeout = connection->connection_timeout;
if ( (timeout != 0) && (timeout <= (MHD_monotonic_sec_counter() - connection->last_activity)))
- MHD_connection_close (connection,
- MHD_REQUEST_TERMINATED_TIMEOUT_REACHED);
+ MHD_connection_close_ (connection,
+ MHD_REQUEST_TERMINATED_TIMEOUT_REACHED);
switch (connection->state)
{
/* on newly created connections we might reach here before any reply has been received */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/daemon.c new/libmicrohttpd-0.9.45/src/microhttpd/daemon.c
--- old/libmicrohttpd-0.9.44/src/microhttpd/daemon.c 2015-10-01 18:31:33.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/microhttpd/daemon.c 2015-10-25 14:59:48.000000000 +0100
@@ -135,7 +135,8 @@
const char *reason)
{
#if HAVE_MESSAGES
- fprintf (stderr, "Fatal error in GNU libmicrohttpd %s:%u: %s\n",
+ fprintf (stderr,
+ "Fatal error in GNU libmicrohttpd %s:%u: %s\n",
file, line, reason);
#endif
abort ();
@@ -994,7 +995,8 @@
if (0 != (p[0].revents & POLLOUT))
con->write_handler (con);
if (0 != (p[0].revents & (POLLERR | POLLHUP)))
- MHD_connection_close (con, MHD_REQUEST_TERMINATED_WITH_ERROR);
+ MHD_connection_close_ (con,
+ MHD_REQUEST_TERMINATED_WITH_ERROR);
if (MHD_NO == con->idle_handler (con))
goto exit;
}
@@ -1009,8 +1011,8 @@
#endif
#endif
if (MHD_CONNECTION_CLOSED != con->state)
- MHD_connection_close (con,
- MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
+ MHD_connection_close_ (con,
+ MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
con->idle_handler (con);
}
exit:
@@ -1130,12 +1132,12 @@
left = connection->response->total_size - connection->response_write_position;
#ifndef HAVE_SENDFILE64
offset = (off_t) offsetu64;
- if ( (offsetu64 <= (uint64_t)OFF_T_MAX) &&
- 0 < (ret = sendfile (connection->socket_fd, fd, &offset, left)))
+ if ( (offsetu64 <= (uint64_t) OFF_T_MAX) &&
+ (0 < (ret = sendfile (connection->socket_fd, fd, &offset, left))) )
#else /* HAVE_SENDFILE64 */
offset = (off64_t) offsetu64;
- if ( (offsetu64 <= (uint64_t)OFF64_T_MAX) &&
- 0 < (ret = sendfile64 (connection->socket_fd, fd, &offset, left)))
+ if ( (offsetu64 <= (uint64_t) OFF64_T_MAX) &&
+ (0 < (ret = sendfile64 (connection->socket_fd, fd, &offset, left))) )
#endif /* HAVE_SENDFILE64 */
{
#if EPOLL_SUPPORT
@@ -4359,8 +4361,8 @@
{
struct MHD_Daemon *daemon = pos->daemon;
- MHD_connection_close (pos,
- MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
+ MHD_connection_close_ (pos,
+ MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
return; /* must let thread to the rest */
if (pos->connection_timeout == pos->daemon->connection_timeout)
@@ -4398,35 +4400,50 @@
if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
(MHD_YES != MHD_mutex_lock_ (&daemon->cleanup_connection_mutex)) )
MHD_PANIC ("Failed to acquire cleanup mutex\n");
+ if (NULL != daemon->suspended_connections_head)
+ MHD_PANIC ("MHD_stop_daemon() called while we have suspended connections.\n");
for (pos = daemon->connections_head; NULL != pos; pos = pos->next)
{
shutdown (pos->socket_fd,
- (pos->read_closed == MHD_YES) ? SHUT_WR : SHUT_RDWR);
+ (MHD_YES == pos->read_closed) ? SHUT_WR : SHUT_RDWR);
#if MHD_WINSOCK_SOCKETS
if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
(MHD_INVALID_PIPE_ != daemon->wpipe[1]) &&
(1 != MHD_pipe_write_ (daemon->wpipe[1], "e", 1)) )
- MHD_PANIC ("failed to signal shutdown via pipe");
+ MHD_PANIC ("Failed to signal shutdown via pipe");
#endif
}
if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
(MHD_YES != MHD_mutex_unlock_ (&daemon->cleanup_connection_mutex)) )
MHD_PANIC ("Failed to release cleanup mutex\n");
- /* now, collect threads from thread pool */
+ /* now, collect per-connection threads */
if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
{
- for (pos = daemon->connections_head; NULL != pos; pos = pos->next)
- {
- if (0 != MHD_join_thread_ (pos->pid))
- MHD_PANIC ("Failed to join a thread\n");
- pos->thread_joined = MHD_YES;
- }
+ pos = daemon->connections_head;
+ while (NULL != pos)
+ {
+ if (MHD_YES != pos->thread_joined)
+ {
+ if (0 != MHD_join_thread_ (pos->pid))
+ MHD_PANIC ("Failed to join a thread\n");
+ pos->thread_joined = MHD_YES;
+ /* The thread may have concurrently modified the DLL,
+ need to restart from the beginning */
+ pos = daemon->connections_head;
+ continue;
+ }
+ pos = pos->next;
+ }
}
-
/* now that we're alone, move everyone to cleanup */
while (NULL != (pos = daemon->connections_head))
+ {
+ if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
+ (MHD_YES != pos->thread_joined) )
+ MHD_PANIC ("Failed to join a thread\n");
close_connection (pos);
+ }
MHD_cleanup_connections (daemon);
}
@@ -4478,7 +4495,7 @@
/* Prepare workers for shutdown */
if (NULL != daemon->worker_pool)
{
- /* MHD_USE_NO_LISTEN_SOCKET disables thread pools, hence we need to check */
+ /* #MHD_USE_NO_LISTEN_SOCKET disables thread pools, hence we need to check */
for (i = 0; i < daemon->worker_pool_size; ++i)
{
daemon->worker_pool[i].shutdown = MHD_YES;
@@ -4556,9 +4573,9 @@
else
{
/* clean up master threads */
- if ((0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ||
- ((0 != (daemon->options & MHD_USE_SELECT_INTERNALLY))
- && (0 == daemon->worker_pool_size)))
+ if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ||
+ ( (0 != (daemon->options & MHD_USE_SELECT_INTERNALLY)) &&
+ (0 == daemon->worker_pool_size) ) )
{
if (0 != MHD_join_thread_ (daemon->pid))
{
@@ -4676,7 +4693,8 @@
* @ingroup logging
*/
void
-MHD_set_panic_func (MHD_PanicCallback cb, void *cls)
+MHD_set_panic_func (MHD_PanicCallback cb,
+ void *cls)
{
mhd_panic = cb;
mhd_panic_cls = cls;
@@ -4825,13 +4843,14 @@
#if defined(MHD_USE_POSIX_THREADS)
GCRY_THREAD_OPTION_PTHREAD_IMPL;
#elif defined(MHD_W32_MUTEX_)
-static int gcry_w32_mutex_init (void **ppmtx)
+
+static int
+gcry_w32_mutex_init (void **ppmtx)
{
*ppmtx = malloc (sizeof (MHD_mutex_));
if (NULL == *ppmtx)
return ENOMEM;
-
if (MHD_YES != MHD_mutex_create_ ((MHD_mutex_*)*ppmtx))
{
free (*ppmtx);
@@ -4841,13 +4860,30 @@
return 0;
}
-static int gcry_w32_mutex_destroy (void **ppmtx)
- { int res = (MHD_YES == MHD_mutex_destroy_ ((MHD_mutex_*)*ppmtx)) ? 0 : 1;
- free (*ppmtx); return res; }
-static int gcry_w32_mutex_lock (void **ppmtx)
- { return (MHD_YES == MHD_mutex_lock_ ((MHD_mutex_*)*ppmtx)) ? 0 : 1; }
-static int gcry_w32_mutex_unlock (void **ppmtx)
- { return (MHD_YES == MHD_mutex_unlock_ ((MHD_mutex_*)*ppmtx)) ? 0 : 1; }
+
+
+static int
+gcry_w32_mutex_destroy (void **ppmtx)
+{
+ int res = (MHD_YES == MHD_mutex_destroy_ ((MHD_mutex_*)*ppmtx)) ? 0 : 1;
+ free (*ppmtx);
+ return res;
+}
+
+
+static int
+gcry_w32_mutex_lock (void **ppmtx)
+{
+ return (MHD_YES == MHD_mutex_lock_ ((MHD_mutex_*)*ppmtx)) ? 0 : 1;
+}
+
+
+static int
+gcry_w32_mutex_unlock (void **ppmtx)
+{
+ return (MHD_YES == MHD_mutex_unlock_ ((MHD_mutex_*)*ppmtx)) ? 0 : 1;
+}
+
static struct gcry_thread_cbs gcry_threads_w32 = {
(GCRY_THREAD_OPTION_USER | (GCRY_THREAD_OPTION_VERSION << 8)),
@@ -4862,7 +4898,8 @@
/**
* Initialize do setup work.
*/
-void MHD_init(void)
+void
+MHD_init(void)
{
mhd_panic = &mhd_panic_std;
mhd_panic_cls = NULL;
@@ -4895,7 +4932,8 @@
}
-void MHD_fini(void)
+void
+MHD_fini(void)
{
#if HTTPS_SUPPORT
gnutls_global_deinit ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/digestauth.c new/libmicrohttpd-0.9.45/src/microhttpd/digestauth.c
--- old/libmicrohttpd-0.9.44/src/microhttpd/digestauth.c 2015-10-01 18:31:33.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/microhttpd/digestauth.c 2015-10-07 21:41:35.000000000 +0200
@@ -443,19 +443,21 @@
* @param connection the connection
* @param key the key
* @param value the value, can be NULL
+ * @param kind type of the header
* @return #MHD_YES if the key-value pair is in the headers,
* #MHD_NO if not
*/
static int
test_header (struct MHD_Connection *connection,
const char *key,
- const char *value)
+ const char *value,
+ enum MHD_ValueKind kind)
{
struct MHD_HTTP_Header *pos;
for (pos = connection->headers_received; NULL != pos; pos = pos->next)
{
- if (MHD_GET_ARGUMENT_KIND != pos->kind)
+ if (kind != pos->kind)
continue;
if (0 != strcmp (key, pos->header))
continue;
@@ -488,114 +490,26 @@
{
struct MHD_HTTP_Header *pos;
char *argb;
- char *argp;
- char *equals;
- char *amper;
unsigned int num_headers;
+ int ret;
argb = strdup (args);
if (NULL == argb)
- {
+ {
#if HAVE_MESSAGES
- MHD_DLOG (connection->daemon,
- "Failed to allocate memory for copy of URI arguments\n");
+ MHD_DLOG (connection->daemon,
+ "Failed to allocate memory for copy of URI arguments\n");
#endif /* HAVE_MESSAGES */
- return MHD_NO;
- }
- num_headers = 0;
- argp = argb;
- while ( (NULL != argp) &&
- ('\0' != argp[0]) )
- {
- equals = strchr (argp, '=');
- amper = strchr (argp, '&');
- if (NULL == amper)
- {
- /* last argument */
- if (NULL == equals)
- {
- /* last argument, without '=' */
- MHD_unescape_plus (argp);
- if (MHD_YES != test_header (connection,
- argp,
- NULL))
- {
- free (argb);
- return MHD_NO;
- }
- num_headers++;
- break;
- }
- /* got 'foo=bar' */
- equals[0] = '\0';
- equals++;
- MHD_unescape_plus (argp);
- /* add with 'value' NULL */
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- argp);
- MHD_unescape_plus (equals);
- /* add with 'value' NULL */
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- equals);
- if (MHD_YES != test_header (connection,
- argp,
- equals))
- {
- free (argb);
- return MHD_NO;
- }
- num_headers++;
- break;
- }
- /* amper is non-NULL here */
- amper[0] = '\0';
- amper++;
- if ( (NULL == equals) ||
- (equals >= amper) )
- {
- /* got 'foo&bar' or 'foo&bar=val', add key 'foo' with NULL for value */
- MHD_unescape_plus (argp);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- argp);
- if (MHD_YES !=
- test_header (connection,
- argp,
- NULL))
- {
- free (argb);
- return MHD_NO;
- }
- /* continue with 'bar' */
- num_headers++;
- args = amper;
- continue;
- }
- equals[0] = '\0';
- equals++;
- MHD_unescape_plus (argp);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- argp);
- MHD_unescape_plus (equals);
- connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls,
- connection,
- equals);
- if (MHD_YES !=
- test_header (connection,
- argp,
- equals))
- {
- free (argb);
- return MHD_NO;
- }
- num_headers++;
- argp = amper;
+ return MHD_NO;
}
+ ret = MHD_parse_arguments_ (connection,
+ MHD_GET_ARGUMENT_KIND,
+ argb,
+ &test_header,
+ &num_headers);
free (argb);
-
+ if (MHD_YES != ret)
+ return MHD_NO;
/* also check that the number of headers matches */
for (pos = connection->headers_received; NULL != pos; pos = pos->next)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/internal.c new/libmicrohttpd-0.9.45/src/microhttpd/internal.c
--- old/libmicrohttpd-0.9.44/src/microhttpd/internal.c 2015-08-30 14:54:17.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/microhttpd/internal.c 2015-10-07 21:41:35.000000000 +0200
@@ -171,4 +171,116 @@
}
+/**
+ * Parse and unescape the arguments given by the client
+ * as part of the HTTP request URI.
+ *
+ * @param kind header kind to pass to @a cb
+ * @param connection connection to add headers to
+ * @param[in|out] args argument URI string (after "?" in URI),
+ * clobbered in the process!
+ * @param cb function to call on each key-value pair found
+ * @param[out] num_headers set to the number of headers found
+ * @return #MHD_NO on failure (@a cb returned #MHD_NO),
+ * #MHD_YES for success (parsing succeeded, @a cb always
+ * returned #MHD_YES)
+ */
+int
+MHD_parse_arguments_ (struct MHD_Connection *connection,
+ enum MHD_ValueKind kind,
+ char *args,
+ MHD_ArgumentIterator_ cb,
+ unsigned int *num_headers)
+{
+ struct MHD_Daemon *daemon = connection->daemon;
+ char *equals;
+ char *amper;
+
+ *num_headers = 0;
+ while ( (NULL != args) &&
+ ('\0' != args[0]) )
+ {
+ equals = strchr (args, '=');
+ amper = strchr (args, '&');
+ if (NULL == amper)
+ {
+ /* last argument */
+ if (NULL == equals)
+ {
+ /* last argument, without '=' */
+ MHD_unescape_plus (args);
+ daemon->unescape_callback (daemon->unescape_callback_cls,
+ connection,
+ args);
+ if (MHD_YES != cb (connection,
+ args,
+ NULL,
+ kind))
+ return MHD_NO;
+ (*num_headers)++;
+ break;
+ }
+ /* got 'foo=bar' */
+ equals[0] = '\0';
+ equals++;
+ MHD_unescape_plus (args);
+ daemon->unescape_callback (daemon->unescape_callback_cls,
+ connection,
+ args);
+ MHD_unescape_plus (equals);
+ daemon->unescape_callback (daemon->unescape_callback_cls,
+ connection,
+ equals);
+ if (MHD_YES != cb (connection,
+ args,
+ equals,
+ kind))
+ return MHD_NO;
+ (*num_headers)++;
+ break;
+ }
+ /* amper is non-NULL here */
+ amper[0] = '\0';
+ amper++;
+ if ( (NULL == equals) ||
+ (equals >= amper) )
+ {
+ /* got 'foo&bar' or 'foo&bar=val', add key 'foo' with NULL for value */
+ MHD_unescape_plus (args);
+ daemon->unescape_callback (daemon->unescape_callback_cls,
+ connection,
+ args);
+ if (MHD_YES != cb (connection,
+ args,
+ NULL,
+ kind))
+ return MHD_NO;
+ /* continue with 'bar' */
+ (*num_headers)++;
+ args = amper;
+ continue;
+ }
+ /* equals and amper are non-NULL here, and equals < amper,
+ so we got regular 'foo=value&bar...'-kind of argument */
+ equals[0] = '\0';
+ equals++;
+ MHD_unescape_plus (args);
+ daemon->unescape_callback (daemon->unescape_callback_cls,
+ connection,
+ args);
+ MHD_unescape_plus (equals);
+ daemon->unescape_callback (daemon->unescape_callback_cls,
+ connection,
+ equals);
+ if (MHD_YES != cb (connection,
+ args,
+ equals,
+ kind))
+ return MHD_NO;
+ (*num_headers)++;
+ args = amper;
+ }
+ return MHD_YES;
+}
+
/* end of internal.c */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/internal.h new/libmicrohttpd-0.9.45/src/microhttpd/internal.h
--- old/libmicrohttpd-0.9.44/src/microhttpd/internal.h 2015-08-30 14:54:17.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/microhttpd/internal.h 2015-10-25 13:58:35.000000000 +0100
@@ -109,19 +109,19 @@
{
/**
- * The socket is not involved with a defined state in epoll right
+ * The socket is not involved with a defined state in epoll() right
* now.
*/
MHD_EPOLL_STATE_UNREADY = 0,
/**
- * epoll told us that data was ready for reading, and we did
+ * epoll() told us that data was ready for reading, and we did
* not consume all of it yet.
*/
MHD_EPOLL_STATE_READ_READY = 1,
/**
- * epoll told us that space was available for writing, and we did
+ * epoll() told us that space was available for writing, and we did
* not consume all of it yet.
*/
MHD_EPOLL_STATE_WRITE_READY = 2,
@@ -132,7 +132,7 @@
MHD_EPOLL_STATE_IN_EREADY_EDLL = 4,
/**
- * Is this connection currently in the 'epoll' set?
+ * Is this connection currently in the epoll() set?
*/
MHD_EPOLL_STATE_IN_EPOLL_SET = 8,
@@ -201,7 +201,7 @@
#if HAVE_MESSAGES
/**
- * fprintf-like helper function for logging debug
+ * fprintf()-like helper function for logging debug
* messages.
*/
void
@@ -311,8 +311,8 @@
size_t data_buffer_size;
/**
- * Reference count for this response. Free
- * once the counter hits zero.
+ * Reference count for this response. Free once the counter hits
+ * zero.
*/
unsigned int reference_count;
@@ -332,16 +332,17 @@
/**
* States in a state machine for a connection.
*
- * Transitions are any-state to CLOSED, any state to state+1,
- * FOOTERS_SENT to INIT. CLOSED is the terminal state and
- * INIT the initial state.
+ * The main transitions are any-state to #MHD_CONNECTION_CLOSED, any
+ * state to state+1, #MHD_CONNECTION_FOOTERS_SENT to
+ * #MHD_CONNECTION_INIT. #MHD_CONNECTION_CLOSED is the terminal state
+ * and #MHD_CONNECTION_INIT the initial state.
*
- * Note that transitions for *reading* happen only after
- * the input has been processed; transitions for
- * *writing* happen after the respective data has been
- * put into the write buffer (the write does not have
- * to be completed yet). A transition to CLOSED or INIT
- * requires the write to be complete.
+ * Note that transitions for *reading* happen only after the input has
+ * been processed; transitions for *writing* happen after the
+ * respective data has been put into the write buffer (the write does
+ * not have to be completed yet). A transition to
+ * #MHD_CONNECTION_CLOSED or #MHD_CONNECTION_INIT requires the write
+ * to be complete.
*/
enum MHD_CONNECTION_STATE
{
@@ -462,7 +463,7 @@
/**
* The initial connection state for all secure connectoins
* Handshake messages will be processed in this state & while
- * in the 'MHD_TLS_HELLO_REQUEST' state
+ * in the #MHD_TLS_HELLO_REQUEST state
*/
MHD_TLS_CONNECTION_INIT = MHD_CONNECTION_IN_CLEANUP + 1
@@ -487,7 +488,7 @@
* @param conn the connection struct
* @param write_to where to write received data
* @param max_bytes maximum number of bytes to receive
- * @return number of bytes written to write_to
+ * @return number of bytes written to @a write_to
*/
typedef ssize_t
(*ReceiveCallback) (struct MHD_Connection *conn,
@@ -662,7 +663,7 @@
MHD_thread_handle_ pid;
/**
- * Size of read_buffer (in bytes). This value indicates
+ * Size of @e read_buffer (in bytes). This value indicates
* how many bytes we're willing to read into the buffer;
* the real buffer is one byte longer to allow for
* adding zero-termination (when needed).
@@ -671,12 +672,12 @@
/**
* Position where we currently append data in
- * read_buffer (last valid position).
+ * @e read_buffer (last valid position).
*/
size_t read_buffer_offset;
/**
- * Size of write_buffer (in bytes).
+ * Size of @e write_buffer (in bytes).
*/
size_t write_buffer_size;
@@ -728,8 +729,8 @@
unsigned int connection_timeout;
/**
- * Did we ever call the "default_handler" on this connection?
- * (this flag will determine if we call the 'notify_completed'
+ * Did we ever call the "default_handler" on this connection? (this
+ * flag will determine if we call the #MHD_OPTION_NOTIFY_COMPLETED
* handler when the connection closes down).
*/
int client_aware;
@@ -755,7 +756,8 @@
int thread_joined;
/**
- * Are we currently inside the "idle" handler (to avoid recursively invoking it).
+ * Are we currently inside the "idle" handler (to avoid recursively
+ * invoking it).
*/
int in_idle;
@@ -783,7 +785,7 @@
unsigned int responseCode;
/**
- * Set to MHD_YES if the response's content reader
+ * Set to #MHD_YES if the response's content reader
* callback failed to provide data the last time
* we tried to read from it. In that case, the
* write socket should be marked as unready until
@@ -793,10 +795,10 @@
/**
* Are we receiving with chunked encoding? This will be set to
- * MHD_YES after we parse the headers and are processing the body
+ * #MHD_YES after we parse the headers and are processing the body
* with chunks. After we are done with the body and we are
* processing the footers; once the footers are also done, this will
- * be set to MHD_NO again (before the final call to the handler).
+ * be set to #MHD_NO again (before the final call to the handler).
*/
int have_chunked_upload;
@@ -882,8 +884,8 @@
* @return new closure
*/
typedef void *
-(*LogCallback)(void * cls,
- const char * uri,
+(*LogCallback)(void *cls,
+ const char *uri,
struct MHD_Connection *con);
/**
@@ -972,8 +974,8 @@
* moved back to the tail of the list.
*
* All connections by default start in this list; if a custom
- * timeout that does not match 'connection_timeout' is set, they
- * are moved to the 'manual_timeout_head'-XDLL.
+ * timeout that does not match @e connection_timeout is set, they
+ * are moved to the @e manual_timeout_head-XDLL.
*/
struct MHD_Connection *normal_timeout_head;
@@ -1014,7 +1016,7 @@
MHD_RequestCompletedCallback notify_completed;
/**
- * Closure argument to notify_completed.
+ * Closure argument to @e notify_completed.
*/
void *notify_completed_cls;
@@ -1025,7 +1027,7 @@
MHD_NotifyConnectionCallback notify_connection;
/**
- * Closure argument to notify_connection.
+ * Closure argument to @e notify_connection.
*/
void *notify_connection_cls;
@@ -1061,7 +1063,7 @@
void (*custom_error_log) (void *cls, const char *fmt, va_list va);
/**
- * Closure argument to custom_error_log.
+ * Closure argument to @e custom_error_log.
*/
void *custom_error_log_cls;
#endif
@@ -1447,4 +1449,44 @@
MHD_unescape_plus (char *arg);
+/**
+ * Callback invoked when iterating over @a key / @a value
+ * argument pairs during parsing.
+ *
+ * @param connection context of the iteration
+ * @param key 0-terminated key string, never NULL
+ * @param value 0-terminated value string, may be NULL
+ * @param kind origin of the key-value pair
+ * @return #MHD_YES on success (continue to iterate)
+ * #MHD_NO to signal failure (and abort iteration)
+ */
+typedef int
+(*MHD_ArgumentIterator_)(struct MHD_Connection *connection,
+ const char *key,
+ const char *value,
+ enum MHD_ValueKind kind);
+
+
+/**
+ * Parse and unescape the arguments given by the client
+ * as part of the HTTP request URI.
+ *
+ * @param kind header kind to pass to @a cb
+ * @param connection connection to add headers to
+ * @param[in|out] args argument URI string (after "?" in URI),
+ * clobbered in the process!
+ * @param cb function to call on each key-value pair found
+ * @param[out] num_headers set to the number of headers found
+ * @return #MHD_NO on failure (@a cb returned #MHD_NO),
+ * #MHD_YES for success (parsing succeeded, @a cb always
+ * returned #MHD_YES)
+ */
+int
+MHD_parse_arguments_ (struct MHD_Connection *connection,
+ enum MHD_ValueKind kind,
+ char *args,
+ MHD_ArgumentIterator_ cb,
+ unsigned int *num_headers);
+
+
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/memorypool.c new/libmicrohttpd-0.9.45/src/microhttpd/memorypool.c
--- old/libmicrohttpd-0.9.44/src/microhttpd/memorypool.c 2015-02-08 00:10:32.000000000 +0100
+++ new/libmicrohttpd-0.9.45/src/microhttpd/memorypool.c 2015-10-31 15:51:30.000000000 +0100
@@ -240,7 +240,7 @@
{
/* fits */
ret = &pool->memory[pool->pos];
- memcpy (ret, old, old_size);
+ memmove (ret, old, old_size);
pool->pos += asize;
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/microhttpd/memorypool.h new/libmicrohttpd-0.9.45/src/microhttpd/memorypool.h
--- old/libmicrohttpd-0.9.44/src/microhttpd/memorypool.h 2015-02-08 00:10:32.000000000 +0100
+++ new/libmicrohttpd-0.9.45/src/microhttpd/memorypool.h 2015-10-20 00:11:02.000000000 +0200
@@ -62,7 +62,7 @@
*
* @param pool memory pool to use for the operation
* @param size number of bytes to allocate
- * @param from_end allocate from end of pool (set to MHD_YES);
+ * @param from_end allocate from end of pool (set to #MHD_YES);
* use this for small, persistent allocations that
* will never be reallocated
* @return NULL if the pool cannot support size more
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/src/testcurl/test_concurrent_stop.c new/libmicrohttpd-0.9.45/src/testcurl/test_concurrent_stop.c
--- old/libmicrohttpd-0.9.44/src/testcurl/test_concurrent_stop.c 2015-06-30 21:11:10.000000000 +0200
+++ new/libmicrohttpd-0.9.45/src/testcurl/test_concurrent_stop.c 2015-10-25 14:13:14.000000000 +0100
@@ -68,13 +68,15 @@
return size * nmemb;
}
+
static int
ahc_echo (void *cls,
struct MHD_Connection *connection,
const char *url,
const char *method,
const char *version,
- const char *upload_data, size_t *upload_data_size,
+ const char *upload_data,
+ size_t *upload_data_size,
void **unused)
{
static int ptr;
@@ -166,7 +168,8 @@
static int
-testMultithreadedGet (int port, int poll_flag)
+testMultithreadedGet (int port,
+ int poll_flag)
{
struct MHD_Daemon *d;
pid_t p;
@@ -184,7 +187,8 @@
static int
-testMultithreadedPoolGet (int port, int poll_flag)
+testMultithreadedPoolGet (int port,
+ int poll_flag)
{
struct MHD_Daemon *d;
pid_t p;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmicrohttpd-0.9.44/w32/VS2013/microhttpd_dll_res_vc.rc new/libmicrohttpd-0.9.45/w32/VS2013/microhttpd_dll_res_vc.rc
--- old/libmicrohttpd-0.9.44/w32/VS2013/microhttpd_dll_res_vc.rc 2015-10-01 21:22:43.000000000 +0200
+++ new/libmicrohttpd-0.9.45/w32/VS2013/microhttpd_dll_res_vc.rc 2015-10-31 15:53:36.000000000 +0100
@@ -4,8 +4,8 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,44,0
- PRODUCTVERSION 0,9,44,0
+ FILEVERSION 0,9,45,0
+ PRODUCTVERSION 0,9,45,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#if defined(_DEBUG)
FILEFLAGS VS_FF_DEBUG
@@ -21,8 +21,8 @@
BLOCK "04090000" /* Lang = US English, Charset = ASCII */
BEGIN
VALUE "ProductName", "GNU libmicrohttpd\0"
- VALUE "ProductVersion", "0.9.44\0"
- VALUE "FileVersion", "0.9.44\0"
+ VALUE "ProductVersion", "0.9.45\0"
+ VALUE "FileVersion", "0.9.45\0"
VALUE "FileDescription", "GNU libmicrohttpd dll for Windows (VC build)\0"
VALUE "InternalName", "libmicrohttpd\0"
#if defined(_DEBUG)
1
0