zip-reader: Use xstrdup() instead of strdup().
[pspp.git] / doc / get-commands.pl
bloba1bfd5c80fd91582da98b16af79de81d461ba261
1 #!/usr/bin/perl
2 # Creates Texinfo documentation from the source
4 use strict;
5 use warnings 'all';
7 my ($file) = $ARGV[0];
8 open(INFO, $file) || die "Cannot open \"$file\"\n" ;
9 print "\@c Generated from $file by get-commands.pl\n";
10 print "\@c Do not modify!\n\n";
12 print "\@table \@asis\n";
13 while (<INFO>)
15 my ($command, $description)
16 = /^\s*UNIMPL_CMD\s*\(\s*"([^"]*)"\s*,\s*"([^"]*)"\)\s*$/
17 or next;
18 print "\@item \@cmd{$command}\n$description\n\n";
20 print "\@end table\n";
22 print "\@c Local Variables:\n";
23 print "\@c buffer-read-only: t\n";
24 print "\@c End:\n";
25 close(INFO); # Close the file