Added parsing of Status header and &amp
authorDavid Schleef <ds@schleef.org>
Sat, 11 May 2002 06:45:40 +0000 (06:45 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 11 May 2002 06:45:40 +0000 (06:45 +0000)
doc/mkdr

index ed475e86c0dc89b7f287391a204569429c390588..2fe840bdfb5cd0b46617954fed8e68baef787e07 100755 (executable)
--- a/doc/mkdr
+++ b/doc/mkdr
@@ -19,6 +19,7 @@ while(<>){
 }
 
 $secend="";
+$status="unknown";
 
 while($s = shift @lines){
        @x = $s;
@@ -42,6 +43,8 @@ while($s = shift @lines){
                        $devices = $1;
                }elsif($x =~ m/^Author: (.*)/){
                        $author = $1
+               }elsif($x =~ m/^Status: (.*)/){
+                       $status = $1
                }
        }else{
                if($s eq "\n"){
@@ -52,9 +55,11 @@ while($s = shift @lines){
                $comment = $comment . $s;
        }
        if($blank==3){
+               $comment =~ s/&/&amp;/g;
                $comment =~ s/@/&#64;/g;
                $comment =~ s/</&lt;/g;
                $comment =~ s/>/&gt;/g;
+               $author =~ s/&/&amp;/g;
                $author =~ s/@/&#64;/g;
                $author =~ s/</&lt;/g;
                $author =~ s/>/&gt;/g;
@@ -67,6 +72,9 @@ $driver -- $description
   <para>
 Author: $author
   </para>
+  <para>
+Status: $status
+  </para>
 ";
                if($devices ne ""){
                        print
@@ -138,6 +146,7 @@ $comment
                $blank=0;
 
                $comment="";
+               $status="unknown";
        }
 }