File: get-commands.pl

package info (click to toggle)
pspp 0.8.4-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 35,692 kB
  • ctags: 20,600
  • sloc: ansic: 218,288; sh: 12,890; xml: 11,342; perl: 715; lisp: 597; makefile: 157
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