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)

This commit is contained in:
Ondřej Vašík 2012-05-30 14:19:07 +02:00
parent a10305c603
commit 7371bfd6e5
2 changed files with 24 additions and 6 deletions

View File

@ -1,6 +1,6 @@
Name: docbook-utils Name: docbook-utils
Version: 0.6.14 Version: 0.6.14
Release: 30%{?dist} Release: 31%{?dist}
Group: Applications/Text Group: Applications/Text
Summary: Shell scripts for managing DocBook documents Summary: Shell scripts for managing DocBook documents
@ -138,6 +138,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/docbook2ps.* %{_mandir}/*/docbook2ps.*
%changelog %changelog
* Wed May 30 2012 Ondrej Vasik <ovasik@redhat.com> 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 <rel-eng@lists.fedoraproject.org> - 0.6.14-30 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.14-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

23
docbook2man-spec.pl Normal file → Executable file
View File

@ -193,7 +193,7 @@ sub fold_string
$_ = shift; $_ = shift;
s/\\/\\\\/g; s/\\/\\\\/g;
s/"/\\\&"/g; s/"/""/g;
# Change tabs and newlines to spaces # Change tabs and newlines to spaces
# The newlines will be swallowed later while trimming # The newlines will be swallowed later while trimming
@ -483,8 +483,8 @@ man_sgml('<FUNCSYNOPSIS>', sub {
bold_on(); bold_on();
}); });
man_sgml('</FUNCSYNOPSIS>', sub { man_sgml('</FUNCSYNOPSIS>', sub {
man_output("\n.fi");
font_off(); font_off();
man_output "\n.fi";
}); });
man_sgml('<CMDSYNOPSIS>', "\n.sp\n"); man_sgml('<CMDSYNOPSIS>', "\n.sp\n");
@ -493,9 +493,22 @@ man_sgml('</CMDSYNOPSIS>', "\n");
man_sgml('<FUNCPROTOTYPE>', "\n.sp\n"); man_sgml('<FUNCPROTOTYPE>', "\n.sp\n");
# Arguments to functions. This is C convention. # Arguments to functions. This is C convention.
man_sgml('<PARAMDEF>', '('); #man_sgml('<PARAMDEF>', '(');
man_sgml('</PARAMDEF>', ");\n"); #man_sgml('</PARAMDEF>', ");\n");
man_sgml('<VOID>', "(void);\n"); #man_sgml('<VOID>', "(void);\n");
sub paramdef
{
if($_[0]->parent->ext->{'inparams'}) {
output ', ';
} else {
output ' (';
$_[0]->parent->ext->{'inparams'} = 1;
}
}
man_sgml('<PARAMDEF>', \&paramdef);
man_sgml('</FUNCPROTOTYPE>', ");\n");
man_sgml('<VOID>', "(void");
man_sgml('<VARARGS>', "(...");
sub arg_start sub arg_start