From: Harlan Stenn Date: Tue, 25 Dec 2012 11:21:04 +0000 (+0000) Subject: mdoc2texi fixes: parseQuote, closing of list item tables X-Git-Tag: NTP_4_2_7P339~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd1780b0100aff9d7b9903c5bb26ab663c9e586b;p=thirdparty%2Fntp.git mdoc2texi fixes: parseQuote, closing of list item tables bk: 50d98c20-WuoHsBrlfK5T4DXofF1WQ --- diff --git a/ChangeLog b/ChangeLog index 0b0a14dee..fdda7ad6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* mdoc2texi fixes: parseQuote, closing of list item tables. * ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates. * mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ. * ntp-keygen autogen documentation updates. diff --git a/sntp/ag-tpl/mdoc2texi b/sntp/ag-tpl/mdoc2texi index 3e654a0b1..ffb7ce637 100755 --- a/sntp/ag-tpl/mdoc2texi +++ b/sntp/ag-tpl/mdoc2texi @@ -239,6 +239,12 @@ sub Handle_El $retval .= "\@end enumerate\n"; print $retval; } + elsif ($optlist == 3) + { + $oldoptlist = 0; + $retval .= "\@end table\n"; + print $retval; + } elsif ($optlist = 4) { $count = 0; @@ -249,6 +255,10 @@ sub Handle_El $retval .= "\n\@end multitable\n"; print $retval; } + else + { + die "optlist <$optlist> was not expected."; + } $optlist = 0; } } @@ -321,7 +331,7 @@ sub Handle_ArCmFlIc print " " if $didOne && $spacing; print '@code{'; print $dash if ($dash ne ""); # Do we need this? - ParseQuote(\@words); + parseQuote(\@words); print $words[0]; print '}'; } @@ -386,7 +396,7 @@ sub Handle_Fn if ($words[0] =~ /^"/) { # assert $isOpen == 1 print '@code{, }' if ($didArg); - ParseQuote(\@words); + parseQuote(\@words); print '@emph{', $words[0], "}"; $didArg = 1; } else { @@ -530,12 +540,12 @@ sub Handle_Q elsif (/^Sq$/) { $lq = '@quoteleft{}'; $rq = '@quoteright{}'; } print "$lq"; - do { + while (@words > 0 && $words[0] !~ /^[[:punct:]]$/) { # print STDERR "Handle_Q: <$words[0]>\n"; # XXX print " " if ($wc); print shift @words; ++$wc; - } while (@words > 0 || $words[0] =~ /^[[:punct:]]$/); + } print "$rq"; print join('', @words) if (@words > 0); print "\n"; @@ -554,7 +564,7 @@ sub Handle_Sec $sh =~ /Sh/; - ParseQuote(\@words) if ($words[0] =~ /^"/); + parseQuote(\@words) if ($words[0] =~ /^"/); $a = $words[0]; @@ -574,7 +584,7 @@ sub Handle_Sx my ($a); - ParseQuote(\@words) if ($words[0] =~ /^"/); + parseQuote(\@words) if ($words[0] =~ /^"/); $a = $words[0]; @@ -653,7 +663,7 @@ sub Handle_Xr print "\n"; } -sub ParseQuote # ref to array of words +sub parseQuote # ref to array of words { my ($waref) = @_; # word array reference my ($string);