]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
mdoc2texi: fix trailing punctuation handlers
authorHarlan Stenn <stenn@ntp.org>
Sat, 29 Dec 2012 06:47:23 +0000 (06:47 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 29 Dec 2012 06:47:23 +0000 (06:47 +0000)
bk: 50de91fb62t3fjGGWOGopidnakWewA

ChangeLog
sntp/ag-tpl/mdoc2texi

index 6f6275f33d04f51ab90d01e4ba1364e4e3255a7c..d61f43e9167003050a8c293e32c4b98022fb7c93 100644 (file)
--- 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 <stenn@ntp.org>
 * mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ.
index ffb7ce637b3f2519a8d195187bda1b6d96a240e0..d9b5710f9d5a221eb1a05511512f701d3acc81d7 100755 (executable)
@@ -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";
 }