Hello community,
here is the log from the commit of package discount for openSUSE:Factory checked in at 2017-02-13 07:49:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/discount (Old)
and /work/SRC/openSUSE:Factory/.discount.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "discount"
Changes:
--------
--- /work/SRC/openSUSE:Factory/discount/discount.changes 2016-11-01 09:58:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.discount.new/discount.changes 2017-02-13 07:49:19.404495967 +0100
@@ -1,0 +2,9 @@
+Thu Feb 9 16:09:59 UTC 2017 - mpluskal@suse.com
+
+- Update to version 2.2.2:
+ * No changelog provided
+- Refresh patches:
+ * discount-disable_ldconfig.patch
+ * discount-fix-compile-warings.diff
+
+-------------------------------------------------------------------
Old:
----
discount-2.2.1.tar.bz2
New:
----
discount-2.2.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ discount.spec ++++++
--- /var/tmp/diff_new_pack.4F720L/_old 2017-02-13 07:49:20.504338937 +0100
+++ /var/tmp/diff_new_pack.4F720L/_new 2017-02-13 07:49:20.508338365 +0100
@@ -1,7 +1,7 @@
#
# spec file for package discount
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -16,10 +16,10 @@
#
-%define soname 2
+%define sover 2
%bcond_with fenced_code
Name: discount
-Version: 2.2.1
+Version: 2.2.2
Release: 0
Summary: Markdown text to HTML converter
License: BSD-3-Clause
@@ -37,11 +37,11 @@
with some extensions from PHP Markdown Extra, Pandoc, and other implementations
of Markdown.
-%package -n libmarkdown%{soname}
+%package -n libmarkdown%{sover}
Summary: Markdown text to HTML converter library
Group: Development/Libraries/C and C++
-%description -n libmarkdown%{soname}
+%description -n libmarkdown%{sover}
Discount is an implementation of John Gruber’s Markdown text to HTML language
with some extensions from PHP Markdown Extra, Pandoc, and other implementations
of Markdown.
@@ -49,7 +49,7 @@
%package -n libmarkdown-devel
Summary: Markdown text to HTML converter library
Group: Development/Libraries/C and C++
-Requires: libmarkdown%{soname} = %{version}
+Requires: libmarkdown%{sover} = %{version}
%description -n libmarkdown-devel
Discount is an implementation of John Gruber’s Markdown text to HTML language
@@ -80,6 +80,8 @@
make DESTDIR=%{buildroot} install.everything
%fdupes -s %{buildroot}%{_mandir}/man3
+install -D -p -m 0644 libmarkdown.pc \
+ %{buildroot}%{_libdir}/pkgconfig/libmarkdown.pc
# update-alternatives
mv %{buildroot}%{_bindir}/markdown %{buildroot}%{_bindir}/discount-markdown
@@ -96,8 +98,8 @@
update-alternatives --remove markdown %{_bindir}/discount-markdown
fi
-%post -n libmarkdown%{soname} -p /sbin/ldconfig
-%postun -n libmarkdown%{soname} -p /sbin/ldconfig
+%post -n libmarkdown%{sover} -p /sbin/ldconfig
+%postun -n libmarkdown%{sover} -p /sbin/ldconfig
%files
%defattr(-,root,root)
@@ -112,10 +114,9 @@
%{_mandir}/man7/markdown.7%{ext_man}
%{_mandir}/man7/mkd-extensions.7%{ext_man}
-%files -n libmarkdown%{soname}
+%files -n libmarkdown%{sover}
%defattr(-,root,root)
-%{_libdir}/libmarkdown.so.%{soname}
-%{_libdir}/libmarkdown.so.%{soname}.*
+%{_libdir}/libmarkdown.so.%{sover}*
%files -n libmarkdown-devel
%defattr(-,root,root)
++++++ discount-2.2.1.tar.bz2 -> discount-2.2.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/Csio.c new/discount-2.2.2/Csio.c
--- old/discount-2.2.1/Csio.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/Csio.c 2017-01-19 03:42:06.000000000 +0100
@@ -54,7 +54,7 @@
{
MMIOT f;
___mkd_initmmiot(&f, 0);
- ___mkd_reparse(buf, size, 0, &f, 0);
+ ___mkd_reparse(buf, size, flags, &f, 0);
___mkd_emblock(&f);
SUFFIX(*iot, T(f.out), S(f.out));
___mkd_freemmiot(&f, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/INSTALL new/discount-2.2.2/INSTALL
--- old/discount-2.2.1/INSTALL 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/INSTALL 2017-01-19 03:42:06.000000000 +0100
@@ -26,11 +26,12 @@
--libdir=DIR where to put libraries (prefix/lib)
--libexecdir=DIR where to put private executables
--mandir=DIR where to put manpages
---enable-dl-tag Use the DL tag extension
---enable-pandoc-header Use pandoc-style header blocks
---enable-superscript A^B expands to A<sup>B</sup>
---enable-amalloc Use a debugging memory allocator (to detect leaks)
---with-tabstops=N Set tabstops to N characters (default is 4)
+--with-amalloc Use my paranoid malloc library to catch memory leaks
+--shared Build shared libraries
+--debian-glitch When mangling email addresses, do them deterministically
+ so the Debian regression tester won't complain
+--pkg-config Build & install a pkg-config(1) .pc file for
+ the discount library.
3) Installing sample programs and manpages
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/Makefile.in new/discount-2.2.2/Makefile.in
--- old/discount-2.2.1/Makefile.in 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/Makefile.in 2017-01-19 03:42:06.000000000 +0100
@@ -8,7 +8,7 @@
MANDIR=@mandir@
LIBDIR=@libdir@
INCDIR=@prefix@/include
-PKGDIR=$(LIBDIR)/pkgconfig
+@MK_PKGCONFIG@PKGDIR=$(LIBDIR)/pkgconfig
PGMS=markdown
SAMPLE_PGMS=mkd2html makepage
@@ -28,7 +28,9 @@
@INSTALL_PROGRAM@ $(PGMS) $(DESTDIR)$(BINDIR)
./librarian.sh install libmarkdown VERSION $(DESTDIR)$(LIBDIR)
@INSTALL_DATA@ mkdio.h $(DESTDIR)$(INCDIR)
- @INSTALL_DATA@ $(MKDLIB).pc $(DESTDIR)$(PKGDIR)
+
+@MK_PKGCONFIG@$(DESTDIR)$(PKGDIR)/$(MKDLIB).pc: $(MKDLIB).pc $(DESTDIR)$(PKGDIR)
+@MK_PKGCONFIG@ @INSTALL_DATA@ $(MKDLIB).pc $(DESTDIR)$(PKGDIR)
install.everything: install install.samples install.man
@@ -67,8 +69,8 @@
$(DESTDIR)$(LIBDIR):
@INSTALL_DIR@ $(DESTDIR)$(LIBDIR)
-$(DESTDIR)$(PKGDIR): $(DESTDIR)$(LIBDIR)
- @INSTALL_DIR@ $(DESTDIR)$(PKGDIR)
+@MK_PKGCONFIG@$(DESTDIR)$(PKGDIR):
+@MK_PKGCONFIG@ @INSTALL_DIR@ $(DESTDIR)$(PKGDIR)
version.o: version.c VERSION
$(CC) $(CFLAGS) -DVERSION=\"`cat VERSION`\" -c version.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/VERSION new/discount-2.2.2/VERSION
--- old/discount-2.2.1/VERSION 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/VERSION 2017-01-19 03:42:06.000000000 +0100
@@ -1 +1 @@
-2.2.1
+2.2.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/configure.inc new/discount-2.2.2/configure.inc
--- old/discount-2.2.1/configure.inc 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/configure.inc 2017-01-19 03:42:06.000000000 +0100
@@ -442,6 +442,25 @@
#
+# check for the existence of __attribute__((__noreturn__))
+#
+AC_CHECK_NORETURN() {
+ AC_PROG_CC
+
+ echo "extern int noreturn __attribute__((__noreturn__));" > ngc$$.c
+
+ TLOGN "Checking __attribute__((__noreturn__)) "
+ if $AC_CC -c ngc$$.c; then
+ TLOG "(yes)"
+ AC_DEFINE 'NORETURN' ' __attribute__((__noreturn__))'
+ else
+ TLOG "(no)"
+ AC_DEFINE 'NORETURN' ''
+ fi
+}
+
+
+#
# acLookFor actually looks for a program, without setting anything.
#
acLookFor () {
@@ -548,11 +567,11 @@
EOF
unset __share
- if [ -d $AC_PREFIX/share/man ]; then
+ if [ -d "$AC_PREFIX/share/man" ]; then
for t in 1 2 3 4 5 6 7 8 9; do
- if [ -d $AC_PREFIX/share/man/man$t ]; then
+ if [ -d "$AC_PREFIX/share/man/man$t" ]; then
__share=/share
- elif [ -d $AC_PREFIX/share/man/cat$t ]; then
+ elif [ -d "$AC_PREFIX/share/man/cat$t" ]; then
__share=/share
fi
done
@@ -560,7 +579,7 @@
__share=
fi
- if [ -d $AC_PREFIX/libexec ]; then
+ if [ -d "$AC_PREFIX/libexec" ]; then
__libexec=libexec
else
__libexec=lib
@@ -576,6 +595,7 @@
AC_CONFDIR=${AC_CONFDIR:-/etc}
AC_PATH=${WITH_PATH:-$PATH}
+ AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
@@ -964,6 +984,14 @@
#
+# quote a string if it has spaces in it
+#
+__ac_quote() {
+
+ echo "$1" | sed -e 's/ /\\\\ /g'
+}
+
+#
# AC_OUTPUT generates makefiles from makefile.in's
#
AC_OUTPUT () {
@@ -982,14 +1010,14 @@
AC_SUB 'CC' "$AC_CC"
AC_SUB 'CFLAGS' "$AC_CFLAGS"
AC_SUB 'LDFLAGS' "$AC_LDFLAGS"
- AC_SUB 'srcdir' "$AC_SRCDIR"
- AC_SUB 'prefix' "$AC_PREFIX"
- AC_SUB 'exedir' "$AC_EXECDIR"
- AC_SUB 'sbindir' "$AC_SBINDIR"
- AC_SUB 'libdir' "$AC_LIBDIR"
- AC_SUB 'libexec' "$AC_LIBEXEC"
- AC_SUB 'confdir' "$AC_CONFDIR"
- AC_SUB 'mandir' "$AC_MANDIR"
+ AC_SUB 'srcdir' `__ac_quote "$AC_SRCDIR"`
+ AC_SUB 'prefix' `__ac_quote "$AC_PREFIX"`
+ AC_SUB 'exedir' `__ac_quote "$AC_EXECDIR"`
+ AC_SUB 'sbindir' `__ac_quote "$AC_SBINDIR"`
+ AC_SUB 'libdir' `__ac_quote "$AC_LIBDIR"`
+ AC_SUB 'libexec' `__ac_quote "$AC_LIBEXEC"`
+ AC_SUB 'confdir' `__ac_quote "$AC_CONFDIR"`
+ AC_SUB 'mandir' `__ac_quote "$AC_MANDIR"`
if echo "$__config_files" | grep -v librarian.sh >/dev/null; then
# write a librarian that works with static libraries
@@ -1017,14 +1045,14 @@
VERSION=\$1; shift
case "\$ACTION" in
-make) ${PROG_AR} crv \$LIBRARY.a "\$@"
- ${PROG_RANLIB} \$LIBRARY.a
- rm -f \$LIBRARY
- ${__dolink} \$LIBRARY.a \$LIBRARY
+make) ${PROG_AR} crv "\$LIBRARY.a" "\$@"
+ ${PROG_RANLIB} "\$LIBRARY.a"
+ rm -f "\$LIBRARY"
+ ${__dolink} "\$LIBRARY.a" "\$LIBRARY"
;;
files) echo "\${LIBRARY}.a"
;;
-install)$PROG_INSTALL -m 644 \${LIBRARY}.a \$1
+install)$PROG_INSTALL -m 644 "\${LIBRARY}.a" "\$1"
;;
esac
EOF
@@ -1278,21 +1306,21 @@
printf "VERSION=%d.%d.%d\n", \$1, \$2, \$3; }' \$1\`
shift
-LIBNAME=\$LIBRARY.dylib
-FULLNAME=\$LIBNAME
+LIBNAME="\$LIBRARY.dylib"
+FULLNAME="\$LIBNAME"
case "\$ACTION" in
make) FLAGS="$AC_CFLAGS -dynamiclib"
VFLAGS="-current_version \$VERSION -compatibility_version \$MAJOR"
rm -f \$LIBRARY
- if $AC_CC \$FLAGS \$VFLAGS -o \$FULLNAME "\$@"; then
- $PROG_LN_S \$FULLNAME \$LIBRARY
+ if $AC_CC \$FLAGS \$VFLAGS -o "\$FULLNAME" "\$@"; then
+ $PROG_LN_S "\$FULLNAME" "\$LIBRARY"
fi
;;
files) echo "\$FULLNAME"
;;
-install)$PROG_INSTALL -c \$FULLNAME "\$1"
+install)$PROG_INSTALL -c "\$FULLNAME" "\$1"
;;
esac
EOF
@@ -1323,26 +1351,26 @@
printf "VERSION=%d.%d.%d\n", \$1, \$2, \$3; }' \$1\`
shift
-LIBNAME=\$LIBRARY.so
-FULLNAME=\$LIBNAME.\$VERSION
+LIBNAME="\$LIBRARY.so"
+FULLNAME="\$LIBNAME.\$VERSION"
case "\$ACTION" in
make) FLAGS="$AC_CFLAGS -shared"
unset VFLAGS
test "$USE_SONAME" && VFLAGS="-Wl,-soname,\$LIBNAME.\$MAJOR"
- rm -f \$LIBRARY \$LIBNAME \$LIBNAME.\$MAJOR
- if $AC_CC \$FLAGS \$VFLAGS -o \$FULLNAME "\$@"; then
- $PROG_LN_S \$FULLNAME \$LIBRARY
- $PROG_LN_S \$FULLNAME \$LIBNAME
- $PROG_LN_S \$FULLNAME \$LIBNAME.\$MAJOR
+ rm -f "\$LIBRARY" "\$LIBNAME" "\$LIBNAME.\$MAJOR"
+ if $AC_CC \$FLAGS \$VFLAGS -o "\$FULLNAME" "\$@"; then
+ $PROG_LN_S "\$FULLNAME" "\$LIBRARY"
+ $PROG_LN_S "\$FULLNAME" "\$LIBNAME"
+ $PROG_LN_S "\$FULLNAME" "\$LIBNAME.\$MAJOR"
fi
;;
files) echo "\$FULLNAME" "\$LIBNAME" "\$LIBNAME.\$MAJOR"
;;
-install)$PROG_INSTALL -c \$FULLNAME "\$1"
- $PROG_LN_S -f \$FULLNAME \$1/\$LIBNAME.\$MAJOR
- $PROG_LN_S -f \$FULLNAME \$1/\$LIBNAME
+install)$PROG_INSTALL -c "\$FULLNAME" "\$1"
+ $PROG_LN_S -f "\$FULLNAME" "\$1/\$LIBNAME.\$MAJOR"
+ $PROG_LN_S -f "\$FULLNAME" "\$1/\$LIBNAME"
EOF
test "$LDCONFIG" && echo ' '$LDCONFIG '"$1"' >> librarian.sh
cat >> librarian.sh << EOF
@@ -1540,13 +1568,66 @@
$__fail 1
}
+
+#
+# __ac_config_sed; a C program to do escaping for AC_SUB
+__ac_config_sed() {
+
+
+ test -x config.sed && return
+
+ echo "generating config.sed"
+
+ AC_PROG_CC
+
+cat > ngc$$.c << \EOF
+#include
+
+int
+main(argc, argv)
+int argc;
+char **argv;
+{
+ char *p;
+
+ if (argc != 3)
+ return 1;
+
+ printf("s;@%s@;", argv[1]);
+
+ for (p=argv[2]; *p; ++p) {
+ if ( *p == ';' )
+ putchar('\\');
+ putchar(*p);
+ }
+
+ puts(";g");
+ return 0;
+}
+EOF
+
+ $AC_CC -o config.sed ngc$$.c
+ status=$?
+ rm -f ngc$$.c
+
+ if [ "$status" -eq 0 ]; then
+ __config_files="$__config_files config.sed"
+ else
+ AC_FAIL "Cannot generate config.sed helper program"
+ fi
+}
+
#
# AC_SUB writes a substitution into config.sub
AC_SUB() {
- ( _target="$1"
- shift
- _subst=`echo "$*" | sed -e 's/;/\\;/g'`
- echo "s;@$_target@;$_subst;g" ) >> "$__cwd"/config.sub
+
+ _target="$1"
+ shift
+
+ echo "target=$_target, rest=$*"
+
+ __ac_config_sed
+ ./config.sed "$_target" "$*" >> "$__cwd"/config.sub
}
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/configure.sh new/discount-2.2.2/configure.sh
--- old/discount-2.2.1/configure.sh 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/configure.sh 2017-01-19 03:42:06.000000000 +0100
@@ -9,7 +9,8 @@
#
ac_help='--enable-amalloc Enable memory allocation debugging
--with-tabstops=N Set tabstops to N characters (default is 4)
---shared Build shared libraries (default is static)'
+--shared Build shared libraries (default is static)
+--pkg-config Install pkg-config(1) glue files'
LOCAL_AC_OPTIONS='
set=`locals $*`;
@@ -31,6 +32,9 @@
--DEBIAN-GLITCH)
echo DEBIAN_GLITCH=T
;;
+ --PKG-CONFIG)
+ echo PKGCONFIG=true
+ ;;
esac
}
@@ -63,6 +67,7 @@
test "$DEBIAN_GLITCH" && AC_DEFINE 'DEBIAN_GLITCH' 1
AC_PROG_CC
+AC_CHECK_NORETURN
test "$TRY_SHARED" && AC_COMPILER_PIC && AC_CC_SHLIBS
@@ -85,6 +90,17 @@
AC_PROG ar || AC_FAIL "$TARGET requires ar"
AC_PROG ranlib
+# should we create a .pc for pkg-config & GNU automake
+#
+if [ "$PKGCONFIG" ]; then
+ AC_SUB MK_PKGCONFIG ''
+elif AC_PROG pkg-config || AC_PROG automake ; then
+ PKGCONFIG=true
+ AC_SUB MK_PKGCONFIG ''
+else
+ AC_SUB MK_PKGCONFIG '#'
+fi
+
AC_C_VOLATILE
AC_C_CONST
AC_C_INLINE
@@ -162,4 +178,10 @@
[ "$WITH_PANDOC_HEADER" ] && AC_DEFINE 'PANDOC_HEADER' '1'
-AC_OUTPUT Makefile version.c mkdio.h libmarkdown.pc
+GENERATE="Makefile version.c mkdio.h"
+
+if [ "$PKGCONFIG" ]; then
+ GENERATE="$GENERATE libmarkdown.pc"
+fi
+
+AC_OUTPUT $GENERATE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/generate.c new/discount-2.2.2/generate.c
--- old/discount-2.2.1/generate.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/generate.c 2017-01-19 03:42:06.000000000 +0100
@@ -852,7 +852,7 @@
int i,c;
for ( i=0; i < length; i++ )
- if ( (c = s[i]) == MKD_EOLN) /* ^C: expand back to 2 spaces */
+ if ( (c = s[i]) == MKD_EOLN) /* expand back to 2 spaces */
Qstring(" ", f);
else if ( c == '\\' && (i < length-1) && escaped(f, s[i+1]) )
cputc(s[++i], f);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/markdown.3 new/discount-2.2.2/markdown.3
--- old/discount-2.2.1/markdown.3 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/markdown.3 2017-01-19 03:42:06.000000000 +0100
@@ -119,7 +119,8 @@
.It Ar MKD_GITHUBTAGS
Allow underscore and dash in passed through element names.
.It Ar MKD_URLENCODEDANCHOR
-Use url-encoded chars for multibyte and nonalphanumeric chars rather than dots in toc links.
+Use html5 encoding for multibyte and nonalphanumeric characters rather
+than hex expansion in toc links.
.El
.Sh RETURN VALUES
.Fn markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/markdown.h new/discount-2.2.2/markdown.h
--- old/discount-2.2.1/markdown.h 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/markdown.h 2017-01-19 03:42:06.000000000 +0100
@@ -51,7 +51,6 @@
struct line *text; /* all the text in this paragraph */
char *ident; /* %id% tag for QUOTE */
char *lang; /* lang attribute for CODE */
- char *label; /* label for TOC */
enum { WHITESPACE=0, CODE, QUOTE, MARKUP,
HTML, STYLE, DL, UL, OL, AL, LISTITEM,
HDR, HR, TABLE, SOURCE } typ;
@@ -146,7 +145,7 @@
} MMIOT;
-#define MKD_EOLN 3
+#define MKD_EOLN '\r'
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/mkd2html.c new/discount-2.2.2/mkd2html.c
--- old/discount-2.2.1/mkd2html.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/mkd2html.c 2017-01-19 03:42:06.000000000 +0100
@@ -166,11 +166,14 @@
" type=\"text/css\"\n"
" href=\"%s\" />\n", T(css)[i]);
- if ( h ) {
- fprintf(output," <title>");
+ fprintf(output," <title>");
+ if ( h )
mkd_generateline(h, strlen(h), output, 0);
- fprintf(output, "</title>\n");
- }
+ /* xhtml requires a <title> in the header, even if it doesn't
+ * contain anything
+ */
+ fprintf(output, "</title>\n");
+
for ( i=0; i < S(headers); i++ )
fprintf(output, " %s\n", T(headers)[i]);
fprintf(output, "</head>\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/mkdio.c new/discount-2.2.2/mkdio.c
--- old/discount-2.2.1/mkdio.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/mkdio.c 2017-01-19 03:42:06.000000000 +0100
@@ -220,25 +220,39 @@
int i, size;
char *line;
+ /* MKD_URLENCODEDANCHOR is now perverted to being a html5 anchor
+ *
+ * !labelformat: print all characters
+ * labelformat && h4anchor: prefix nonalpha label with L,
+ * expand all nonalnum, _, ':', '.' to hex
+ * except space which maps to -
+ * labelformat && !h4anchor:expand space to -, other isspace() & '%' to hex
+ */
+ int h4anchor = !(flags & MKD_URLENCODEDANCHOR);
size = mkd_line(s, len, &line, IS_LABEL);
- if ( !(flags & MKD_URLENCODEDANCHOR)
- && labelformat
- && (size>0) && !isalpha(line[0]) )
+ if ( h4anchor && labelformat && (size>0) && !isalpha(line[0]) )
(*outchar)('L',out);
+
for ( i=0; i < size ; i++ ) {
c = line[i];
if ( labelformat ) {
- if ( isalnum(c) || (c == '_') || (c == ':') || (c == '-') || (c == '.' ) )
+ if ( h4anchor
+ ? (isalnum(c) || (c == '_') || (c == ':') || (c == '.' ) )
+ : !(isspace(c) || c == '%') )
(*outchar)(c, out);
- else if ( flags & MKD_URLENCODEDANCHOR ) {
- (*outchar)('%', out);
- (*outchar)(hexchars[c >> 4 & 0xf], out);
- (*outchar)(hexchars[c & 0xf], out);
+ else {
+ if ( c == ' ' )
+ (*outchar)('-', out);
+ else {
+ (*outchar)(h4anchor ? '-' : '%', out);
+ (*outchar)(hexchars[c >> 4 & 0xf], out);
+ (*outchar)(hexchars[c & 0xf], out);
+ if ( h4anchor )
+ (*outchar)('-', out);
+ }
}
- else
- (*outchar)('.', out);
}
else
(*outchar)(c,out);
@@ -272,15 +286,14 @@
mkd_parse_line(bfr, size, &f, flags);
if ( len = S(f.out) ) {
- /* kludge alert; we know that T(f.out) is malloced memory,
- * so we can just steal it away. This is awful -- there
- * should be an opaque method that transparently moves
- * the pointer out of the embedded Cstring.
- */
EXPAND(f.out) = 0;
- *res = T(f.out);
- T(f.out) = 0;
- S(f.out) = ALLOCATED(f.out) = 0;
+ /* strdup() doesn't use amalloc(), so in an amalloc()ed
+ * build this copies the string safely out of our memory
+ * paranoia arena. In a non-amalloc world, it's a spurious
+ * memory allocation, but it avoids unintentional hilarity
+ * with amalloc()
+ */
+ *res = strdup(T(f.out));
}
else {
*res = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/mktags.c new/discount-2.2.2/mktags.c
--- old/discount-2.2.1/mktags.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/mktags.c 2017-01-19 03:42:06.000000000 +0100
@@ -65,6 +65,7 @@
KW("H6");
KW("LISTING");
KW("NOBR");
+ KW("FORM");
KW("UL");
KW("P");
KW("OL");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/pgm_options.c new/discount-2.2.2/pgm_options.c
--- old/discount-2.2.1/pgm_options.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/pgm_options.c 2017-01-19 03:42:06.000000000 +0100
@@ -60,7 +60,8 @@
{ "fencedcode", "fenced code blocks", 0, 0, 1, MKD_FENCEDCODE },
{ "idanchor", "id= anchors in TOC", 0, 0, 1, MKD_IDANCHOR },
{ "githubtags", "permit - and _ in element names", 0, 0, 0, MKD_GITHUBTAGS },
- { "urlencodedanchor", "urlencode special chars in TOC links", 0, 0, 0, MKD_URLENCODEDANCHOR },
+ { "urlencodedanchor", "html5-style anchors", 0, 0, 0, MKD_URLENCODEDANCHOR },
+ { "html5anchor", "html5-style anchors", 0, 1, 0, MKD_URLENCODEDANCHOR },
{ "latex", "handle LaTeX escapes", 0, 0, 1, MKD_LATEX },
} ;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/tests/html.t new/discount-2.2.2/tests/html.t
--- old/discount-2.2.1/tests/html.t 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/tests/html.t 2017-01-19 03:42:06.000000000 +0100
@@ -82,5 +82,16 @@
try 'unclosed block' '<p>here we go!' '<p><p>here we go!</p>'
+
+try '<form> block' '<form>
+
+pie?
+
+</form>' '<form>
+
+pie?
+
+</form>'
+
summary $0
exit $rc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/tests/toc.t new/discount-2.2.2/tests/toc.t
--- old/discount-2.2.1/tests/toc.t 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/tests/toc.t 2017-01-19 03:42:06.000000000 +0100
@@ -19,30 +19,30 @@
<p>hi</p>'
-try -fidanchor -fnourlencodedanchor '-T -ftoc' 'toc item with link' \
+try -fidanchor -fnohtml5anchor '-T -ftoc' 'toc item with link' \
'##[H2](H2) here' \
'<ul>
<li>
<ul>
- <li><a href="#H2.here">H2 here</a></li>
+ <li><a href="#H2-here">H2 here</a></li>
</ul>
</li>
</ul>
-<h2 id="H2.here"><a href="H2">H2</a> here</h2>'
+<h2 id="H2-here"><a href="H2">H2</a> here</h2>'
-try -fidanchor -fnourlencodedanchor '-T -ftoc' 'toc item with non-alpha start' \
+try -fidanchor -fnohtml5anchor '-T -ftoc' 'toc item with non-alpha start' \
'#1 header' \
'<ul>
- <li><a href="#L1.header">1 header</a></li>
+ <li><a href="#L1-header">1 header</a></li>
</ul>
-<h1 id="L1.header">1 header</h1>'
+<h1 id="L1-header">1 header</h1>'
-try -fidanchor -furlencodedanchor '-T -ftoc' 'toc item with non-alpha start (url encoded)' \
+try -fidanchor -fhtml5anchor '-T -ftoc' 'toc item with non-alpha start (url encoded)' \
'#1 header' \
'<ul>
- <li><a href="#1%20header">1 header</a></li>
+ <li><a href="#1-header">1 header</a></li>
</ul>
-<h1 id="1%20header">1 header</h1>'
+<h1 id="1-header">1 header</h1>'
summary $0
@@ -67,28 +67,28 @@
'<ul>
<li>
<ul>
- <li><a href="#H2.here">H2 here</a></li>
+ <li><a href="#H2-here">H2 here</a></li>
</ul>
</li>
</ul>
-<a name="H2.here"></a>
+<a name="H2-here"></a>
<h2><a href="H2">H2</a> here</h2>'
try '-T -ftoc' 'toc item with non-alpha start' \
'#1 header' \
'<ul>
- <li><a href="#L1.header">1 header</a></li>
+ <li><a href="#L1-header">1 header</a></li>
</ul>
-<a name="L1.header"></a>
+<a name="L1-header"></a>
<h1>1 header</h1>'
# Be sure to save toc.t as UTF-8.
-try '-T -ftoc,urlencodedanchor' 'urlencoded multibyte chars' \
+try '-T -ftoc,html5anchor' 'html5 multibyte chars' \
'#It’s an apostrophe' \
'<ul>
- <li><a href="#It%e2%80%99s%20an%20apostrophe">It’s an apostrophe</a></li>
+ <li><a href="#It’s-an-apostrophe">It’s an apostrophe</a></li>
</ul>
-<a name="It%e2%80%99s%20an%20apostrophe"></a>
+<a name="It’s-an-apostrophe"></a>
<h1>It’s an apostrophe</h1>'
summary $0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/toc.c new/discount-2.2.2/toc.c
--- old/discount-2.2.1/toc.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/toc.c 2017-01-19 03:42:06.000000000 +0100
@@ -64,9 +64,8 @@
S(srcp->text->text),
(mkd_sta_function_t)Csputc, &res,1,p->ctx->flags);
Csprintf(&res, "\">");
- mkd_string_to_anchor(T(srcp->text->text),
- S(srcp->text->text),
- (mkd_sta_function_t)Csputc, &res,0,p->ctx->flags);
+ Csreparse(&res, T(srcp->text->text),
+ S(srcp->text->text), IS_LABEL);
Csprintf(&res, "</a>");
first = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/discount-2.2.1/xmlpage.c new/discount-2.2.2/xmlpage.c
--- old/discount-2.2.1/xmlpage.c 2016-09-21 22:24:51.000000000 +0200
+++ new/discount-2.2.2/xmlpage.c 2017-01-19 03:42:06.000000000 +0100
@@ -24,9 +24,11 @@
"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n") );
DO_OR_DIE( fprintf(out, "<head>\n") );
+ DO_OR_DIE( fprintf(out, "<title>") );
if ( title = mkd_doc_title(p) ) {
- DO_OR_DIE( fprintf(out, "<title>%s</title>\n", title) );
+ DO_OR_DIE( fprintf(out, "%s", title) );
}
+ DO_OR_DIE( fprintf(out, "</title>\n") );
DO_OR_DIE( mkd_generatecss(p, out) );
DO_OR_DIE( fprintf(out, "</head>\n"
"<body>\n") );
++++++ discount-disable_ldconfig.patch ++++++
--- /var/tmp/diff_new_pack.4F720L/_old 2017-02-13 07:49:20.668315524 +0100
+++ /var/tmp/diff_new_pack.4F720L/_new 2017-02-13 07:49:20.668315524 +0100
@@ -2,7 +2,7 @@
===================================================================
--- configure.inc.orig
+++ configure.inc
-@@ -1309,7 +1309,6 @@ __AC_ELF_LIBRARIAN() {
+@@ -1337,7 +1337,6 @@ __AC_ELF_LIBRARIAN() {
if $AC_CC $_VFLAGS -o ngc$$.so ngc$$.c; then
USE_SONAME=T
fi
@@ -10,9 +10,9 @@
__config_files="$__config_files librarian.sh"
cat > librarian.sh << EOF
#! /bin/sh
-@@ -1344,7 +1343,6 @@ install)$PROG_INSTALL -c \$FULLNAME "\$1
- $PROG_LN_S -f \$FULLNAME \$1/\$LIBNAME.\$MAJOR
- $PROG_LN_S -f \$FULLNAME \$1/\$LIBNAME
+@@ -1372,7 +1371,6 @@ install)$PROG_INSTALL -c "\$FULLNAME" "\
+ $PROG_LN_S -f "\$FULLNAME" "\$1/\$LIBNAME.\$MAJOR"
+ $PROG_LN_S -f "\$FULLNAME" "\$1/\$LIBNAME"
EOF
- test "$LDCONFIG" && echo ' '$LDCONFIG '"$1"' >> librarian.sh
cat >> librarian.sh << EOF
++++++ discount-fix-compile-warings.diff ++++++
--- /var/tmp/diff_new_pack.4F720L/_old 2017-02-13 07:49:20.680313812 +0100
+++ /var/tmp/diff_new_pack.4F720L/_new 2017-02-13 07:49:20.684313240 +0100
@@ -2,7 +2,7 @@
===================================================================
--- Makefile.in.orig
+++ Makefile.in
-@@ -113,9 +113,9 @@ test: $(PGMS) $(TESTFRAMEWORK) verify
+@@ -115,9 +115,9 @@ test: $(PGMS) $(TESTFRAMEWORK) verify
done
cols: tools/cols.c config.h