[Reproducible-commits] [discount] 09/121: Imported Upstream version 2.0.5
Jérémy Bobbio
lunar at moszumanska.debian.org
Tue Sep 23 20:56:12 UTC 2014
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository discount.
commit 06fa855f922612977c3c20597fdf410f4f21f572
Author: Alessandro Ghedini <al3xbio at gmail.com>
Date: Fri Jan 28 11:01:44 2011 +0100
Imported Upstream version 2.0.5
---
VERSION | 2 +-
configure.inc | 18 +++++++++++++-----
generate.c | 11 +++++------
markdown.c | 20 ++++++++++++--------
tests/div.t | 4 ++++
tests/toc.t | 9 ++++++---
6 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/VERSION b/VERSION
index 2165f8f..e010258 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.4
+2.0.5
diff --git a/configure.inc b/configure.inc
index 5a8dac2..7fb7df8 100755
--- a/configure.inc
+++ b/configure.inc
@@ -926,7 +926,15 @@ AC_OUTPUT () {
if echo "$__config_files" | grep -v librarian.sh >/dev/null; then
# write a librarian that works with static libraries
- AC_PROG_LN_S
+ if AC_PROG_LN_S ; then
+ __dolink=$PROG_LN_S
+ elif AC_PROG ln; then
+ __dolink=$PROG_LN
+ elif AC_PROG cp; then
+ __dolink=$PROG_CP
+ else
+ __dolink=:
+ fi
AC_PROG ar
AC_PROG ranlib
AC_SUB LD_LIBRARY_PATH HERE
@@ -945,7 +953,7 @@ case "\$ACTION" in
make) ${PROG_AR} crv \$LIBRARY.a "\$@"
${PROG_RANLIB} \$LIBRARY.a
rm -f \$LIBRARY
- ${PROG_LN_S} \$LIBRARY.a \$LIBRARY
+ ${__dolink} \$LIBRARY.a \$LIBRARY
;;
files) echo "\${LIBRARY}.a"
;;
@@ -1184,9 +1192,9 @@ AC_COMPILER_PIC () {
# and if it can writes a librarian that handles those libraries for us.
#
AC_CC_SHLIBS () {
- AC_PROG_CC
- AC_PROG_LN_S
- AC_PROG_INSTALL
+ AC_PROG_CC || AC_FAIL "Need a C compiler to build shared libraries"
+ AC_PROG_LN_S || AC_FAIL "Need to be able to make symbolic links for shared libraries"
+ AC_PROG_INSTALL || AC_FAIL "Need an install program to install shared libraries"
LOGN "checking whether the C compiler can build shared libraries "
echo "int some_variable = 0;" > /tmp/ngc$$.c
diff --git a/generate.c b/generate.c
index f39dcc9..4f665fc 100644
--- a/generate.c
+++ b/generate.c
@@ -571,7 +571,7 @@ linkyformat(MMIOT *f, Cstring text, int image, Footnote *ref)
{
linkytype *tag;
- if ( image )
+ if ( image || (ref == 0) )
tag = &imaget;
else if ( tag = pseudo(ref->link) ) {
if ( f->flags & (MKD_NO_EXT|MKD_SAFELINK) )
@@ -667,7 +667,7 @@ linkylinky(int image, MMIOT *f)
sizeof key, (stfu)__mkd_footsort) )
status = linkyformat(f, name, image, ref);
else if ( f->flags & IS_LABEL )
- status = linkyformat(f, name, image, &imaget);
+ status = linkyformat(f, name, image, 0);
}
}
}
@@ -1312,13 +1312,12 @@ text(MMIOT *f)
static void
printheader(Paragraph *pp, MMIOT *f)
{
- Qprintf(f, "<h%d", pp->hnumber);
if ( f->flags & MKD_TOC ) {
- Qprintf(f, " id=\"", pp->hnumber);
+ Qstring("<a name=\"", f);
mkd_string_to_anchor(T(pp->text->text), S(pp->text->text), Qchar, f, 1);
- Qchar('"', f);
+ Qstring("\"></a>\n", f);
}
- Qchar('>', f);
+ Qprintf(f, "<h%d>", pp->hnumber);
push(T(pp->text->text), S(pp->text->text), f);
text(f);
Qprintf(f, "</h%d>", pp->hnumber);
diff --git a/markdown.c b/markdown.c
index b239265..8510b70 100644
--- a/markdown.c
+++ b/markdown.c
@@ -669,25 +669,29 @@ szmarkerclass(char *p)
* check if the first line of a quoted block is the special div-not-quote
* marker %[kind:]name%
*/
+#define iscsschar(c) (isalpha(c) || (c == '-') || (c == '_') )
+
static int
isdivmarker(Line *p, int start, DWORD flags)
{
char *s;
- int len, i;
+ int last, i;
if ( flags & (MKD_NODIVQUOTE|MKD_STRICT) )
return 0;
- len = S(p->text);
- s = T(p->text);
+ last= S(p->text) - (1 + start);
+ s = T(p->text) + start;
- if ( !(len && s[start] == '%' && s[len-1] == '%') ) return 0;
+ if ( (last <= 0) || (*s != '%') || (s[last] != '%') )
+ return 0;
- i = szmarkerclass(s+start+1)+start;
- len -= start+1;
+ i = szmarkerclass(s+1);
- while ( ++i < len )
- if ( !isalnum(s[i]) )
+ if ( !iscsschar(s[i+1]) )
+ return 0;
+ while ( ++i < last )
+ if ( !(isdigit(s[i]) || iscsschar(s[i])) )
return 0;
return 1;
diff --git a/tests/div.t b/tests/div.t
index 17ca298..4e9468a 100644
--- a/tests/div.t
+++ b/tests/div.t
@@ -41,5 +41,9 @@ more' \
<div class="more"><p>more</p></div>'
+try '%class% with _' '>%class:this_that%' '<div class="this_that"></div>'
+try '%class% with -' '>%class:this-that%' '<div class="this-that"></div>'
+try 'illegal %class%' '>%class:0zip%' '<blockquote><p>%class:0zip%</p></blockquote>'
+
summary $0
exit $rc
diff --git a/tests/toc.t b/tests/toc.t
index 342f9cb..7ba98f0 100644
--- a/tests/toc.t
+++ b/tests/toc.t
@@ -11,7 +11,8 @@ hi' \
'<ul>
<li><a href="#H1">H1</a></li>
</ul>
-<h1 id="H1">H1</h1>
+<a name="H1"></a>
+<h1>H1</h1>
<p>hi</p>'
@@ -22,14 +23,16 @@ try '-T -ftoc' 'toc item with link' \
<li><a href="#H2.here">H2 here</a></li>
</ul></li>
</ul>
-<h2 id="H2.here"><a href="H2">H2</a> here</h2>'
+<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>
</ul>
-<h1 id="L1.header">1 header</h1>'
+<a name="L1.header"></a>
+<h1>1 header</h1>'
summary $0
exit $rc
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/discount.git
More information about the Reproducible-commits
mailing list