From: Harlan Stenn Date: Sat, 29 Dec 2012 06:47:23 +0000 (+0000) Subject: mdoc2texi: fix trailing punctuation handlers X-Git-Tag: NTP_4_2_7P340~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47ebe920fc56421ac23d4fdda413aeecf84a65e2;p=thirdparty%2Fntp.git mdoc2texi: fix trailing punctuation handlers bk: 50de91fb62t3fjGGWOGopidnakWewA --- diff --git a/ChangeLog b/ChangeLog index 6f6275f33..d61f43e91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ -* mdoc2texi fixes: parseQuote, closing of list item tables. +* mdoc2texi fixes: parseQuote, closing of list item tables, trailing + punctuation. * ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates. (4.2.7p338) 2012/12/25 Released by Harlan Stenn * mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ. diff --git a/sntp/ag-tpl/mdoc2texi b/sntp/ag-tpl/mdoc2texi index ffb7ce637..d9b5710f9 100755 --- a/sntp/ag-tpl/mdoc2texi +++ b/sntp/ag-tpl/mdoc2texi @@ -2,6 +2,8 @@ use strict; +print STDERR "XXX: In the local mdoc2texi\n"; # XXX + my ($optlist,$oldoptlist); my ($literal); my ($line); @@ -273,10 +275,13 @@ sub Handle_Em print '@emph{'; do { print shift @words; - } while (@words > 0 || $words[0] =~ /^[[:punct:]]$/); + } while (@words > 0 && $words[0] !~ /^[[:punct:]]$/); print "}"; - print join('', @words) if (@words > 0); + while ($_ = shift @words) + { + print; + } print "\n"; } @@ -541,13 +546,16 @@ sub Handle_Q print "$lq"; while (@words > 0 && $words[0] !~ /^[[:punct:]]$/) { - # print STDERR "Handle_Q: <$words[0]>\n"; # XXX + print STDERR "Handle_Q: <$words[0]>\n"; # XXX print " " if ($wc); print shift @words; ++$wc; } print "$rq"; - print join('', @words) if (@words > 0); + while ($_ = shift @words) + { + print; + } print "\n"; } @@ -608,7 +616,10 @@ sub Handle_Ux } print '@sc{',"$ux_name","}"; - print join('', @words) if (@words > 0); + while ($_ = shift @words) + { + print; + } print "\n"; }