From 7371bfd6e53932997f7cd00e054b747c6a6dc44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Wed, 30 May 2012 14:19:07 +0200 Subject: [PATCH] fix escaping of double-quotes in docbook2man (#826139), fix the wrong format of C-style functions in docbook2man (#662869), fix stray .fi at the end of funcsynopsis section (#662869) --- docbook-utils.spec | 7 ++++++- docbook2man-spec.pl | 23 ++++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) mode change 100644 => 100755 docbook2man-spec.pl diff --git a/docbook-utils.spec b/docbook-utils.spec index f66d32f..4811ef5 100644 --- a/docbook-utils.spec +++ b/docbook-utils.spec @@ -1,6 +1,6 @@ Name: docbook-utils Version: 0.6.14 -Release: 30%{?dist} +Release: 31%{?dist} Group: Applications/Text Summary: Shell scripts for managing DocBook documents @@ -138,6 +138,11 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/docbook2ps.* %changelog +* Wed May 30 2012 Ondrej Vasik 0.6.14-31 +- fix escaping of double-quotes in docbook2man (#826139) +- fix the wrong format of C-style functions in docbook2man (#662869) +- fix stray .fi at the end of funcsynopsis section (#662869) + * Fri Jan 13 2012 Fedora Release Engineering - 0.6.14-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/docbook2man-spec.pl b/docbook2man-spec.pl old mode 100644 new mode 100755 index 6717a06..58939cb --- a/docbook2man-spec.pl +++ b/docbook2man-spec.pl @@ -193,7 +193,7 @@ sub fold_string $_ = shift; s/\\/\\\\/g; - s/"/\\\&"/g; + s/"/""/g; # Change tabs and newlines to spaces # The newlines will be swallowed later while trimming @@ -483,8 +483,8 @@ man_sgml('', sub { bold_on(); }); man_sgml('', sub { + man_output("\n.fi"); font_off(); - man_output "\n.fi"; }); man_sgml('', "\n.sp\n"); @@ -493,9 +493,22 @@ man_sgml('', "\n"); man_sgml('', "\n.sp\n"); # Arguments to functions. This is C convention. -man_sgml('', '('); -man_sgml('', ");\n"); -man_sgml('', "(void);\n"); +#man_sgml('', '('); +#man_sgml('', ");\n"); +#man_sgml('', "(void);\n"); +sub paramdef +{ + if($_[0]->parent->ext->{'inparams'}) { + output ', '; + } else { + output ' ('; + $_[0]->parent->ext->{'inparams'} = 1; + } +} +man_sgml('', \¶mdef); +man_sgml('', ");\n"); +man_sgml('', "(void"); +man_sgml('', "(..."); sub arg_start