File: get-commands.pl

package info (click to toggle)
pspp 0.7.9%2Bgit20120620-1.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 71,980 kB
  • sloc: ansic: 384,310; sh: 22,024; cpp: 1,445; yacc: 1,251; perl: 903; lisp: 868; makefile: 358; xml: 182; java: 5
file content (25 lines) | stat: -rwxr-xr-x 613 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
# Creates Texinfo documentation from the source 

use strict;
use warnings 'all';

my ($file) = $ARGV[0]; 
open(INFO, $file) || die "Cannot open \"$file\"\n" ;	
print "\@c Generated from $file by get-commands.pl\n";
print "\@c Do not modify!\n\n";

print "\@table \@asis\n";
while (<INFO>)
{
    my ($command, $description)
      = /^\s*UNIMPL_CMD\s*\(\s*"([^"]*)"\s*,\s*"([^"]*)"\)\s*$/
	or next;
    print "\@item \@cmd{$command}\n$description\n\n";
}
print "\@end table\n";

print "\@c Local Variables:\n";
print "\@c buffer-read-only: t\n";
print "\@c End:\n";
close(INFO);			# Close the file