5 $topdir = (shift @ARGV) or $topdir = ".";
7 ##################################################
8 # Reading links from manpage
14 open(IN
,"xsltproc --xinclude --param smb.context ALL generate-context.xsl parameters.all.xml|");
17 if( /<samba:parameter .*?name="([^"]*?)"/g ){
20 $doc{$name} = "NOTFOUND";
28 #################################################
29 # Reading entries from source code
32 open(SOURCE
,"$topdir/param/loadparm.c") or die("Can't open $topdir/param/loadparm.c: $!");
34 while ($ln = <SOURCE
>) {
35 last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/;
36 } #burn through the preceding lines
38 while ($ln = <SOURCE
>) {
39 last if $ln =~ m/^\s*\}\;\s*$/;
40 #pull in the param names only
41 next if $ln =~ m/.*P_SEPARATOR.*/;
42 next unless $ln =~ /\s*\.label\s*=\s*\"(.*)\".*/;
48 $doc{lc($name)} = "FOUND";
50 print "'$name' is not documented\n";
55 ##################################################
56 # Trying to find missing references
59 if($doc{$_} cmp "FOUND") {
60 print "'$_' is documented but is not a configuration option\n";