diff options
-rw-r--r-- | qtools/qcstring.cpp | 5 | ||||
-rw-r--r-- | src/util.cpp | 2 | ||||
-rwxr-xr-x | templates/html/bib2xhtml.pl | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp index 8169979..da7a46f 100644 --- a/qtools/qcstring.cpp +++ b/qtools/qcstring.cpp @@ -616,7 +616,10 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst) if (dst) memcpy(r,dst,dstLen); r+=dstLen; } - qstrcpy(r,p); + if (r) + { + qstrcpy(r,p); + } //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); return result; } diff --git a/src/util.cpp b/src/util.cpp index 13b3ca5..aa1acb4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -8139,7 +8139,7 @@ QCString extractDirection(QCString &docs) { QRegExp re("\\[[ inout,]+\\]"); // [...] int l=0; - if (re.match(docs,0,&l)==0) + if (re.match(docs,0,&l)==0 && l>2) { // make dir the part inside [...] without separators QCString dir=substitute(substitute(docs.mid(1,l-2)," ",""),",",""); diff --git a/templates/html/bib2xhtml.pl b/templates/html/bib2xhtml.pl index 2b462d3..539aaab 100755 --- a/templates/html/bib2xhtml.pl +++ b/templates/html/bib2xhtml.pl @@ -201,7 +201,7 @@ while (<BBLFILE>) { next loop; } $nentry++; - ($bcite, $blabel) = m+<dt><a name=\"([^\"]*)\">\[([^\]]*)\]</a></dt><dd>+; + ($bcite, $blabel) = m:<dt><a\s+name=\"([^\"]*)\">\[([^\]]*)\]</a></dt><dd>:; $blabel = "$nentry"; $bibcite{$bcite} = $blabel; } @@ -225,7 +225,7 @@ while (<BBLFILE>) { } s/\%\n//g; s/(\.(<\/cite>|<\/a>|\')+)\./$1/g; - s:(<dt><a name=\"[^\"]*\">\[)[^\]]*(\]</a></dt><dd>):$1$nentry$2:; + s:(<dt><a\s+name=\"[^\"]*\">\[)[^\]]*(\]</a></dt><dd>):$1$nentry$2:; while (m/(\\(cite(label)?)(\001\d+)\{([^\001]+)\4\})/) { $old = $1; $cmd = $2; |