]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
mdoc2texi fixes: parseQuote, closing of list item tables
authorHarlan Stenn <stenn@ntp.org>
Tue, 25 Dec 2012 11:21:04 +0000 (11:21 +0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 25 Dec 2012 11:21:04 +0000 (11:21 +0000)
bk: 50d98c20-WuoHsBrlfK5T4DXofF1WQ

ChangeLog
sntp/ag-tpl/mdoc2texi

index 0b0a14deecbb221968ccd305980e8566483b9c96..fdda7ad6ffe9354eb364de1252ccd063412e4f86 100644 (file)
--- 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.
index 3e654a0b1f5dfcd439447b025c895a2811f6726b..ffb7ce637b3f2519a8d195187bda1b6d96a240e0 100755 (executable)
@@ -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);