Fixed documentation problems
[pspp-builds.git] / doc / get-commands.pl
1 #!/usr/bin/perl
2 # Creates Texinfo documentation from the source 
3
4 $file = $ARGV[0]; 
5 open(INFO, $file) || die "Cannot open \"$file\"\n" ;    
6 print "\@c Generated from $file by get-commands.pl\n";
7 print "\@c Do not modify!\n\n";
8
9 print "\@table \@asis\n";
10 while ($line = <INFO>)
11 {
12     if ( $line =~ /^UNIMPL_CMD/ ) 
13     {
14         @fields = split(/,/,$line); 
15         $_ = $fields[0];
16         s/^UNIMPL_CMD//;
17         s/ *\(\"// ;
18         s/\"//;
19         $command = $_;
20         $_=$fields[1];
21         s/^ *\"//;
22         s/\"\)//;
23         chomp;
24         $description = $_;
25         print "\@item $command\n$description\n\n";
26     }
27 }
28 print "\@end table\n";
29
30 print "\@c Local Variables:\n";
31 print "\@c buffer-read-only: t\n";
32 close(INFO);                    # Close the file