aboutsummaryrefslogtreecommitdiff
path: root/mkusage.pl
blob: fab9626911cff4dcf2dabbbc5183db15e9467016 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl -w

print "const char *helptext[] = {\n";

while(<>) {
	chomp;
	next if /^---/;
	if(/^-[-a-zA-Z\d]/) {
		$opt = $_;
		next;
	}
	if($opt && (/^\.\. (.*)$/)) {
		print "\t\"  $opt: $1\",\n";
		undef $opt;
	}
}

print "\t(const char*)0\n};\n";